automation-suite
2.2510
true
Automation Suite API guide
- Getting started
- Authentication
- Scopes and permissions
- Platform Management APIs
Retrieve audit logs for an Automation Suite organization using the portal API, including required scope, filter parameters, and response schema.
Gets the audit logs for an organization, based on the organization name.
API endpoint
GET https://{yourDomain}/{organizationName}/portal_/api/auditLog/{partitionGlobalId}
Scopes
Requires one of the following scopes:
PM.AuditPM.Audit.Read
Request headers
--header 'Authorization: Bearer {access_token}'\
--header 'Content-Type: application/json'
--header 'Authorization: Bearer {access_token}'\
--header 'Content-Type: application/json'
Query parameters
| Parameter | Data type | Description |
|---|---|---|
language | string | Optional. Specify the available display language, in the shorten form. For example, en, fr, de, ja etc. |
top | int32 | Optional. Display the top N entries of the audit. |
skip | int32 | Optional. Skip the top N audit entries from displaying. |
sortBy | string | Optional. Specify the DTO property used to sort audit entries by. For example, createdOn, category, email, etc. |
sortOrder | string | Optional. Specify the sorting order. For example, ascending ( asc) or descending (desc). |
api-version | string | Optional. Specify the API version you are using. |
Responses
200 OK
Returns the queried audit events.
Example request
Let's say you gathered all the information needed to build the API call.
- Your
{baseURL}is:https://{yourDomain}/{organizationName} - Your
{access_token}is:1234(for length considerations). - You set the following query parameters:
language=entop= 2, to display the top two entriesskip= 2, to skip the first two entriessortBy=createdOn, to sort the entries by their creation timesortOrder=asc, to sort the entries from the earliest entry to the latest one
The call should resemble the following example (cURL):
curl --location --request GET ' https://{yourDomain}/{organizationName}/portal_/api/auditlogs?language=en&top=2&skip=2&sortBy=createdOn&sortOrder=asc' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json'
curl --location --request GET ' https://{yourDomain}/{organizationName}/portal_/api/auditlogs?language=en&top=2&skip=2&sortBy=createdOn&sortOrder=asc' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json'
Here's the response body for a successful audit entries retrieval:
{
"totalCount": 29,
"results": [
{
"createdOn": "2021-10-14T13:10:15.1964174+00:00",
"category": "User",
"action": "Login",
"auditLogDetails": "{\r\n \"userName\": \"System Administrator admin\",\r\n \"email\": \"\"\r\n}",
"userName": "System Administrator",
"email": "",
"message": "User 'System Administrator admin' logged in",
"detailsVersion": "1.0",
"source": "Cis"
},
....
{
"createdOn": "2021-10-14T12:41:00.3268964+00:00",
"category": "User",
"action": "Login",
"auditLogDetails": "{\r\n \"userName\": \"System Administrator admin\",\r\n \"email\": \"\"\r\n}",
"userName": "System Administrator",
"email": "",
"message": "User 'System Administrator admin' logged in",
"detailsVersion": "1.0",
"source": "Cis"
}
]
}
{
"totalCount": 29,
"results": [
{
"createdOn": "2021-10-14T13:10:15.1964174+00:00",
"category": "User",
"action": "Login",
"auditLogDetails": "{\r\n \"userName\": \"System Administrator admin\",\r\n \"email\": \"\"\r\n}",
"userName": "System Administrator",
"email": "",
"message": "User 'System Administrator admin' logged in",
"detailsVersion": "1.0",
"source": "Cis"
},
....
{
"createdOn": "2021-10-14T12:41:00.3268964+00:00",
"category": "User",
"action": "Login",
"auditLogDetails": "{\r\n \"userName\": \"System Administrator admin\",\r\n \"email\": \"\"\r\n}",
"userName": "System Administrator",
"email": "",
"message": "User 'System Administrator admin' logged in",
"detailsVersion": "1.0",
"source": "Cis"
}
]
}