Skip to content

Latest commit

 

History

History
executable file
·
448 lines (316 loc) · 29.5 KB

AuditApi.md

File metadata and controls

executable file
·
448 lines (316 loc) · 29.5 KB

Alfresco\AuditApi

All URIs are relative to https://localhost/alfresco/api/-default-/public/alfresco/versions/1

Method HTTP request Description
deleteAuditEntriesForAuditApp DELETE /audit-applications/{auditApplicationId}/audit-entries Permanently delete audit entries for an audit application
deleteAuditEntry DELETE /audit-applications/{auditApplicationId}/audit-entries/{auditEntryId} Permanently delete an audit entry
getAuditApp GET /audit-applications/{auditApplicationId} Get audit application info
getAuditEntry GET /audit-applications/{auditApplicationId}/audit-entries/{auditEntryId} Get audit entry
listAuditApps GET /audit-applications List audit applications
listAuditEntriesForAuditApp GET /audit-applications/{auditApplicationId}/audit-entries List audit entries for an audit application
listAuditEntriesForNode GET /nodes/{nodeId}/audit-entries List audit entries for a node
updateAuditApp PUT /audit-applications/{auditApplicationId} Update audit application info

deleteAuditEntriesForAuditApp

deleteAuditEntriesForAuditApp($audit_application_id, $where)

Permanently delete audit entries for an audit application

Note: this endpoint is available in Alfresco 5.2.2 and newer versions. Permanently delete audit entries for an audit application auditApplicationId. The where clause must be specified, either with an inclusive time period or for an inclusive range of ids. The delete is within the context of the given audit application. For example: * where=(createdAt BETWEEN ('2017-06-02T12:13:51.593+01:00' , '2017-06-04T10:05:16.536+01:00') * where=(id BETWEEN ('1234', '4321') You must have admin rights to delete audit information.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: basicAuth
Alfresco\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Alfresco\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Alfresco\Api\AuditApi();
$audit_application_id = "audit_application_id_example"; // string | The identifier of an audit application.
$where = "where_example"; // string | Audit entries to permanently delete for an audit application, given an inclusive time period or range of ids. For example:  *   ```where=(createdAt BETWEEN ('2017-06-02T12:13:51.593+01:00' , '2017-06-04T10:05:16.536+01:00')``` *   ```where=(id BETWEEN ('1234', '4321')```

try {
    $api_instance->deleteAuditEntriesForAuditApp($audit_application_id, $where);
} catch (Exception $e) {
    echo 'Exception when calling AuditApi->deleteAuditEntriesForAuditApp: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
audit_application_id string The identifier of an audit application.
where string Audit entries to permanently delete for an audit application, given an inclusive time period or range of ids. For example: * ```where=(createdAt BETWEEN ('2017-06-02T12:13:51.593+01:00' , '2017-06-04T10:05:16.536+01:00')``` * ```where=(id BETWEEN ('1234', '4321')```

Return type

void (empty response body)

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteAuditEntry

deleteAuditEntry($audit_application_id, $audit_entry_id)

Permanently delete an audit entry

Note: this endpoint is available in Alfresco 5.2.2 and newer versions. Permanently delete a single audit entry auditEntryId. You must have admin rights to delete audit information.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: basicAuth
Alfresco\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Alfresco\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Alfresco\Api\AuditApi();
$audit_application_id = "audit_application_id_example"; // string | The identifier of an audit application.
$audit_entry_id = "audit_entry_id_example"; // string | The identifier of an audit entry.

try {
    $api_instance->deleteAuditEntry($audit_application_id, $audit_entry_id);
} catch (Exception $e) {
    echo 'Exception when calling AuditApi->deleteAuditEntry: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
audit_application_id string The identifier of an audit application.
audit_entry_id string The identifier of an audit entry.

Return type

void (empty response body)

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getAuditApp

\Alfresco\Model\AuditApp getAuditApp($audit_application_id, $fields)

Get audit application info

Note: this endpoint is available in Alfresco 5.2.2 and newer versions. Get status of an audit application auditApplicationId. You must have admin rights to retrieve audit information.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: basicAuth
Alfresco\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Alfresco\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Alfresco\Api\AuditApi();
$audit_application_id = "audit_application_id_example"; // string | The identifier of an audit application.
$fields = array("fields_example"); // string[] | A list of field names.  You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth.  The list applies to a returned individual entity or entries within a collection.  If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.

try {
    $result = $api_instance->getAuditApp($audit_application_id, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AuditApi->getAuditApp: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
audit_application_id string The identifier of an audit application.
fields string[] A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. [optional]

Return type

\Alfresco\Model\AuditApp

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getAuditEntry

\Alfresco\Model\AuditEntryEntry getAuditEntry($audit_application_id, $audit_entry_id, $fields)

Get audit entry

Note: this endpoint is available in Alfresco 5.2.2 and newer versions. Gets audit entry auditEntryId. You must have admin rights to access audit information.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: basicAuth
Alfresco\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Alfresco\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Alfresco\Api\AuditApi();
$audit_application_id = "audit_application_id_example"; // string | The identifier of an audit application.
$audit_entry_id = "audit_entry_id_example"; // string | The identifier of an audit entry.
$fields = array("fields_example"); // string[] | A list of field names.  You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth.  The list applies to a returned individual entity or entries within a collection.  If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.

try {
    $result = $api_instance->getAuditEntry($audit_application_id, $audit_entry_id, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AuditApi->getAuditEntry: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
audit_application_id string The identifier of an audit application.
audit_entry_id string The identifier of an audit entry.
fields string[] A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. [optional]

Return type

\Alfresco\Model\AuditEntryEntry

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listAuditApps

\Alfresco\Model\AuditAppPaging listAuditApps($skip_count, $max_items, $fields)

List audit applications

Note: this endpoint is available in Alfresco 5.2.2 and newer versions. Gets a list of audit applications in this repository. This list may include pre-configured audit applications, if enabled, such as: * alfresco-access * CMISChangeLog * Alfresco Tagging Service * Alfresco Sync Service (used by Enterprise Cloud Sync) You must have admin rights to retrieve audit information.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: basicAuth
Alfresco\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Alfresco\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Alfresco\Api\AuditApi();
$skip_count = 0; // int | The number of entities that exist in the collection before those included in this list.  If not supplied then the default value is 0.
$max_items = 100; // int | The maximum number of items to return in the list.  If not supplied then the default value is 100.
$fields = array("fields_example"); // string[] | A list of field names.  You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth.  The list applies to a returned individual entity or entries within a collection.  If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.

try {
    $result = $api_instance->listAuditApps($skip_count, $max_items, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AuditApi->listAuditApps: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
skip_count int The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0. [optional] [default to 0]
max_items int The maximum number of items to return in the list. If not supplied then the default value is 100. [optional] [default to 100]
fields string[] A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. [optional]

Return type

\Alfresco\Model\AuditAppPaging

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listAuditEntriesForAuditApp

\Alfresco\Model\AuditEntryPaging listAuditEntriesForAuditApp($audit_application_id, $skip_count, $order_by, $max_items, $where, $include, $fields)

List audit entries for an audit application

Note: this endpoint is available in Alfresco 5.2.2 and newer versions. Gets a list of audit entries for audit application auditApplicationId. You can use the include parameter to return additional values information. The list can be filtered by one or more of: * createdByUser person id * createdAt inclusive time period * id inclusive range of ids * valuesKey audit entry values contains the exact matching key * valuesValue audit entry values contains the exact matching value The default sort order is createdAt ascending, but you can use an optional ASC or DESC modifier to specify an ascending or descending sort order. For example, specifying orderBy=createdAt DESC returns audit entries in descending createdAt order. You must have admin rights to retrieve audit information.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: basicAuth
Alfresco\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Alfresco\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Alfresco\Api\AuditApi();
$audit_application_id = "audit_application_id_example"; // string | The identifier of an audit application.
$skip_count = 0; // int | The number of entities that exist in the collection before those included in this list.  If not supplied then the default value is 0.
$order_by = array("order_by_example"); // string[] | A string to control the order of the entities returned in a list. You can use the **orderBy** parameter to sort the list by one or more fields.  Each field has a default sort order, which is normally ascending order. Read the API method implementation notes above to check if any fields used in this method have a descending default search order.  To sort the entities in a specific order, you can use the **ASC** and **DESC** keywords for any field.
$max_items = 100; // int | The maximum number of items to return in the list.  If not supplied then the default value is 100.
$where = "where_example"; // string | Optionally filter the list. Here are some examples:  *   ```where=(createdByUser='jbloggs')```  *   ```where=(id BETWEEN ('1234', '4321')```  *   ```where=(createdAt BETWEEN ('2017-06-02T12:13:51.593+01:00' , '2017-06-04T10:05:16.536+01:00')```  *   ```where=(createdByUser='jbloggs' and createdAt BETWEEN ('2017-06-02T12:13:51.593+01:00' , '2017-06-04T10:05:16.536+01:00')```  *   ```where=(valuesKey='/alfresco-access/login/user')```  *   ```where=(valuesKey='/alfresco-access/transaction/action' and valuesValue='DELETE')```
$include = array("include_example"); // string[] | Returns additional information about the audit entry. The following optional fields can be requested: * values
$fields = array("fields_example"); // string[] | A list of field names.  You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth.  The list applies to a returned individual entity or entries within a collection.  If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.

try {
    $result = $api_instance->listAuditEntriesForAuditApp($audit_application_id, $skip_count, $order_by, $max_items, $where, $include, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AuditApi->listAuditEntriesForAuditApp: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
audit_application_id string The identifier of an audit application.
skip_count int The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0. [optional] [default to 0]
order_by string[] A string to control the order of the entities returned in a list. You can use the orderBy parameter to sort the list by one or more fields. Each field has a default sort order, which is normally ascending order. Read the API method implementation notes above to check if any fields used in this method have a descending default search order. To sort the entities in a specific order, you can use the ASC and DESC keywords for any field. [optional]
max_items int The maximum number of items to return in the list. If not supplied then the default value is 100. [optional] [default to 100]
where string Optionally filter the list. Here are some examples: * ```where=(createdByUser='jbloggs')``` * ```where=(id BETWEEN ('1234', '4321')``` * ```where=(createdAt BETWEEN ('2017-06-02T12:13:51.593+01:00' , '2017-06-04T10:05:16.536+01:00')``` * ```where=(createdByUser='jbloggs' and createdAt BETWEEN ('2017-06-02T12:13:51.593+01:00' , '2017-06-04T10:05:16.536+01:00')``` * ```where=(valuesKey='/alfresco-access/login/user')``` * ```where=(valuesKey='/alfresco-access/transaction/action' and valuesValue='DELETE')``` [optional]
include string[] Returns additional information about the audit entry. The following optional fields can be requested: * values [optional]
fields string[] A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. [optional]

Return type

\Alfresco\Model\AuditEntryPaging

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listAuditEntriesForNode

\Alfresco\Model\AuditEntryPaging listAuditEntriesForNode($node_id, $skip_count, $order_by, $max_items, $where, $include, $fields)

List audit entries for a node

Note: this endpoint is available in Alfresco 5.2.2 and newer versions. Gets a list of audit entries for node nodeId. The list can be filtered by createdByUser and for a given inclusive time period. The default sort order is createdAt ascending, but you can use an optional ASC or DESC modifier to specify an ascending or descending sort order. For example, specifying orderBy=createdAt DESC returns audit entries in descending createdAt order. This relies on the pre-configured 'alfresco-access' audit application.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: basicAuth
Alfresco\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Alfresco\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Alfresco\Api\AuditApi();
$node_id = "node_id_example"; // string | The identifier of a node.
$skip_count = 0; // int | The number of entities that exist in the collection before those included in this list.  If not supplied then the default value is 0.
$order_by = array("order_by_example"); // string[] | A string to control the order of the entities returned in a list. You can use the **orderBy** parameter to sort the list by one or more fields.  Each field has a default sort order, which is normally ascending order. Read the API method implementation notes above to check if any fields used in this method have a descending default search order.  To sort the entities in a specific order, you can use the **ASC** and **DESC** keywords for any field.
$max_items = 100; // int | The maximum number of items to return in the list.  If not supplied then the default value is 100.
$where = "where_example"; // string | Optionally filter the list. Here are some examples:  *   ```where=(createdByUser='-me-')```  *   ```where=(createdAt BETWEEN ('2017-06-02T12:13:51.593+01:00' , '2017-06-04T10:05:16.536+01:00')```  *   ```where=(createdByUser='jbloggs' and createdAt BETWEEN ('2017-06-02T12:13:51.593+01:00' , '2017-06-04T10:05:16.536+01:00')```
$include = array("include_example"); // string[] | Returns additional information about the audit entry. The following optional fields can be requested: * values
$fields = array("fields_example"); // string[] | A list of field names.  You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth.  The list applies to a returned individual entity or entries within a collection.  If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.

try {
    $result = $api_instance->listAuditEntriesForNode($node_id, $skip_count, $order_by, $max_items, $where, $include, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AuditApi->listAuditEntriesForNode: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
node_id string The identifier of a node.
skip_count int The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0. [optional] [default to 0]
order_by string[] A string to control the order of the entities returned in a list. You can use the orderBy parameter to sort the list by one or more fields. Each field has a default sort order, which is normally ascending order. Read the API method implementation notes above to check if any fields used in this method have a descending default search order. To sort the entities in a specific order, you can use the ASC and DESC keywords for any field. [optional]
max_items int The maximum number of items to return in the list. If not supplied then the default value is 100. [optional] [default to 100]
where string Optionally filter the list. Here are some examples: * ```where=(createdByUser='-me-')``` * ```where=(createdAt BETWEEN ('2017-06-02T12:13:51.593+01:00' , '2017-06-04T10:05:16.536+01:00')``` * ```where=(createdByUser='jbloggs' and createdAt BETWEEN ('2017-06-02T12:13:51.593+01:00' , '2017-06-04T10:05:16.536+01:00')``` [optional]
include string[] Returns additional information about the audit entry. The following optional fields can be requested: * values [optional]
fields string[] A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. [optional]

Return type

\Alfresco\Model\AuditEntryPaging

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateAuditApp

\Alfresco\Model\AuditApp updateAuditApp($audit_application_id, $audit_app_body_update, $fields)

Update audit application info

Note: this endpoint is available in Alfresco 5.2.2 and newer versions. Disable or re-enable the audit application auditApplicationId. New audit entries will not be created for a disabled audit application until it is re-enabled (and system-wide auditing is also enabled). Note, it is still possible to query &/or delete any existing audit entries even if auditing is disabled for the audit application. You must have admin rights to update audit application.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: basicAuth
Alfresco\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Alfresco\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new Alfresco\Api\AuditApi();
$audit_application_id = "audit_application_id_example"; // string | The identifier of an audit application.
$audit_app_body_update = new \Alfresco\Model\AuditBodyUpdate(); // \Alfresco\Model\AuditBodyUpdate | The audit application to update.
$fields = array("fields_example"); // string[] | A list of field names.  You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth.  The list applies to a returned individual entity or entries within a collection.  If the API method also supports the **include** parameter, then the fields specified in the **include** parameter are returned in addition to those specified in the **fields** parameter.

try {
    $result = $api_instance->updateAuditApp($audit_application_id, $audit_app_body_update, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AuditApi->updateAuditApp: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
audit_application_id string The identifier of an audit application.
audit_app_body_update \Alfresco\Model\AuditBodyUpdate The audit application to update.
fields string[] A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. [optional]

Return type

\Alfresco\Model\AuditApp

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]