Audit
Manages audit logs on the platform.
Get the list of audits
List all audits based on provided filters.
Request
Endpoint
GET /api/v01/draas/{draas_instance}/groups/{uuid}/audit
GET /api/v01/draas/{draas_instance}/distributors/{uuid}/audit
GET /api/v01/draas/{draas_instance}/resellers/{uuid}/audit
GET /api/v01/draas/{draas_instance}/tenants/{uuid}/audit
GET /api/v01/draas/{draas_instance}/tenants/{uuid}/subscriptions/{subscription_id}/audit
Authorization
Required role
groups.instance.audit.list
distributors.instance.audit.list
resellers.instance.audit.list
tenants.instance.audit.list
tenants.instance.subscriptions.instance.audit.list
Path Parameters
| Parameter | Type | Description |
|---|---|---|
draas_instance | string | See common parameters |
uuid | string | A system generated unique ID (UUID) identifying the group, distributor, reseller or tenant |
sub_id | integer | Index of a subscription for which you want to get the MS Teams groups |
URL/Query parameters
| Parameter | Type | Description | Required? |
|---|---|---|---|
page_size | integer | Used for pagination, determines the maximum number of records on one page of results (defaults to 10) | no |
next | string | A token used to get the next records in the list. This token is taken back from the results of the previous call | no |
type | string | The kind of event, could be create, update or delete. Will retrieve only audits of this kind | no |
owner | string | The username of the owner of the audit. This will retrieve only the audits that matches that owner | no |
date_from | string | Start date of range where the audits have been performed | no |
date_to | string | End date of range where the audits have been performed | no |
Response
Status codes
| Parameter | Description |
|---|---|
200 | One or more audits found |
400 | Error while processing the request |
500 | Uncatched error on server side |
Success
Body
| Parameter | Type | Description | Conditional? |
|---|---|---|---|
results | integer | Total number of results from the query | no |
pages | integer | Total number of pages according to pagination settings | no |
page | integer | Current displayed page from the set of pages | no |
next | string | A token used for infinite scrolling, to be used in the next call to retrieve subsequent records. Only present if the list of customer's licenses has to be continued | yes |
logs | array | List containing the retrieved Audit objects for the requesting user | no |
Audit Object
| Parameter | Type | Description | Conditional? |
|---|---|---|---|
id | integer | ID of the audit in database | no |
event | string | The event that has been performed | no |
status | string | Status of the audit. Could be SUCCESS, ERROR | no |
wf_status | string | Workflow status of the audit. Could be SUCCESS, ERROR, ONGOING | no |
response_status | integer | HTTP Response code of the request | no |
username | string | The username of the owner of the audit (who performed the action) | no |
created_on | string | The date time representation when the audit has been created | no |
updated_on | string | The date time representation when the audit has been last updated | no |
Example
{
"logs": [
{
"id": 489378,
"event": "create_subscription_post_order",
"status": "SUCCESS",
"response_status": 201,
"wf_status": "SUCCESS",
"username": "admin1",
"created_on": "2024-08-23T14:02:14.150213Z",
"updated_on": "2024-08-23T14:02:14.150213Z"
},
{
"id": 489370,
"event": "create_group_product",
"status": "ERROR",
"response_status": 400,
"wf_status": "SUCCESS",
"username": "admin1",
"created_on": "2024-08-23T14:01:57.873551Z",
"updated_on": "2024-08-23T14:01:57.873551Z"
},
],
"next": "cGFnZV9zaXplPTEmcGFnZT0y",
"page": 1,
"pages": 2,
"results": 1
}Get the details of an audit
Returns the audit's details.
Request
Endpoint
GET /api/v01/draas/{draas_instance}/groups/{uuid}/audit/{audit_id}
GET /api/v01/draas/{draas_instance}/distributors/{uuid}/audit/{audit_id}
GET /api/v01/draas/{draas_instance}/resellers/{uuid}/audit/{audit_id}
GET /api/v01/draas/{draas_instance}/tenants/{uuid}/audit/{audit_id}
GET /api/v01/draas/{draas_instance}/tenants/{uuid}/subscriptions/{subscription_id}/audit/{audit_id}
Authorization
Required role
groups.instance.audit.instance.read
distributors.instance.audit.instance.read
resellers.instance.audit.instance.read
tenants.instance.audit.instance.read
tenants.instance.subscriptions.instance.audit.instance.read
Path Parameters
| Parameter | Type | Description |
|---|---|---|
draas_instance | string | See common parameters |
uuid | string | A system generated unique ID (UUID) identifying the group, distributor, reseller or tenant |
sub_id | integer | Index of a subscription for which you want to get the MS Teams groups |
audit_id | integer | ID of the customer's license in database as returned by this API |
URL/Query parameters
N/A
Response
Status codes
| Parameter | Description |
|---|---|
200 | Details of the customer license |
404 | Customer license not found |
400 | Error while processing the request |
500 | Uncatched error on server side |
Success
Body
| Parameter | Type | Description | Conditional? |
|---|---|---|---|
id | integer | ID of the audit in database | no |
event | string | The event that has been performed | no |
status | string | Status of the audit. Could be SUCCESS, ERROR | no |
wf_status | string | Workflow status of the audit. Could be SUCCESS, ERROR, ONGOING | no |
response_status | integer | HTTP Response code of the request | no |
username | string | The username of the owner of the audit (who performed the action) | no |
created_on | string | The date time representation when the audit has been created | no |
updated_on | string | The date time representation when the audit has been last updated | no |
api_level | string | The level of the API behind the event. Could be Group, Distributor, Reseller, Tenant, Subscription | no |
user_level | string | The level of the user owner of the event. Could be Group, Distributor, Reseller, Tenant, Subscription | no |
type | string | A friendly version of the type of event (Create, Update, Delete) | no |
ids | object | An ID object representing all the IDs involved in the event | no |
request_method | string | The actual request method of the API call | no |
request_url | string | The actual url of the API call | no |
Audit ID Object
| Parameter | Type | Description | Conditional? |
|---|---|---|---|
group_uuid | string | A system generated unique ID (UUID) identifying the group | yes |
distributor_uuid | string | A system generated unique ID (UUID) identifying the group | yes |
reseller_uuid | string | A system generated unique ID (UUID) identifying the group | yes |
tenant_uuid | string | A system generated unique ID (UUID) identifying the group | yes |
subscription_id | number | Index of a subscription | yes |
<other_ids> | string | Any other relevant ID relative to the url | yes |
Example
{
"id": 489378,
"event": "create_subscription_post_order",
"status": "SUCCESS",
"response_status": 201,
"wf_status": "SUCCESS",
"username": "ilario.dalgrande+gnp1@netaxis.be",
"created_on": "2024-08-23T14:02:14.150213Z",
"updated_on": "2024-08-23T14:02:14.150213Z",
"api_level": "Subscription",
"user_level": "Group",
"type": "Create",
"ids": {
"subscription_id": "143",
"tenant_uuid": "b73c9d64-1662-4d93-b656-956e699768e3"
},
"request_method": "post",
"request_url": "/api/v01/draas/draas_fusion_dev/tenants/b73c9d64-1662-4d93-b656-956e699768e3/subscriptions/143/orders"
}Get the list of audit events
List all the event names that may appear in the audits. This list can be used to build an event filter for the list of audits.
Request
Endpoint
GET /api/v01/draas/{draas_instance}/groups/{uuid}/audit/events
GET /api/v01/draas/{draas_instance}/distributors/{uuid}/audit/events
GET /api/v01/draas/{draas_instance}/resellers/{uuid}/audit/events
GET /api/v01/draas/{draas_instance}/tenants/{uuid}/audit/events
Authorization
Required role
groups.instance.audit.events.list
distributors.instance.audit.events.list
resellers.instance.audit.events.list
tenants.instance.audit.events.list
Path Parameters
| Parameter | Type | Description |
|---|---|---|
draas_instance | string | See common parameters |
uuid | string | A system generated unique ID (UUID) identifying the group, distributor, reseller or tenant |
URL/Query parameters
| Parameter | Type | Description | Required? |
|---|---|---|---|
page_size | integer | Used for pagination, determines the maximum number of records on one page of results (defaults to 10) | no |
Response
Status codes
| Parameter | Description |
|---|---|
200 | One or more events found |
400 | Error while processing the request |
500 | Uncatched error on server side |
Success
Body
| Parameter | Type | Description | Conditional? |
|---|---|---|---|
events | array | List of event names (string) that appear in the audits | no |
Example
{
"events": [
"create_tenant",
"update_tenant",
"delete_subscription"
]
}Get the list of audit users
List all the users related to audits based.
Request
Endpoint
GET /api/v01/draas/{draas_instance}/groups/{uuid}/audit/users
GET /api/v01/draas/{draas_instance}/distributors/{uuid}/audit/users
GET /api/v01/draas/{draas_instance}/resellers/{uuid}/audit/users
GET /api/v01/draas/{draas_instance}/tenants/{uuid}/audit/users
Authorization
Required role
groups.instance.audit.users.list
distributors.instance.audit.users.list
resellers.instance.audit.users.list
tenants.instance.audit.users.list
Path Parameters
| Parameter | Type | Description |
|---|---|---|
draas_instance | string | See common parameters |
uuid | string | A system generated unique ID (UUID) identifying the group, distributor, reseller or tenant |
URL/Query parameters
| Parameter | Type | Description | Required? |
|---|---|---|---|
next | string | A token used to get the next records in the list. This token is taken back from the results of the previous call | no |
page | integer | Used for pagination, determines the returned page from the collection of result pages (defaults to 1) | no |
page_size | integer | Used for pagination, determines the maximum number of records on one page of results (defaults to 10) | no |
Response
Status codes
| Parameter | Description |
|---|---|
200 | One or more users found |
400 | Error while processing the request |
500 | Uncatched error on server side |
Success
Body
| Parameter | Type | Description | Conditional? |
|---|---|---|---|
results | integer | Total number of results from the query | no |
pages | integer | Total number of pages according to pagination settings | no |
page | integer | Current displayed page from the set of pages | no |
next | string | A token used for infinite scrolling, to be used in the next call to retrieve subsequent records. Only present if the list of customer's licenses has to be continued | yes |
users | array | List containing the retrieved Audit User objects | no |
Audit User Object
| Parameter | Type | Description | Conditional? |
|---|---|---|---|
id | integer | ID of the audit user in database | no |
admin_of | string | The entity UUID | no |
admin_as | string | The admin user level. Could be group, distributor, reseller, tenant | no |
username | string | The username of the admin user | no |
Example
{
"users": [
{
"id": 287,
"username": "jrocket3@example.com",
"admin_of": "21fb665e-c3db-40c5-a50c-65a9d4be540a",
"admin_as": "tenant"
},
{
"id": 221,
"username": "n4_dev_t",
"admin_of": "21fb665e-c3db-40c5-a50c-65a9d4be540a",
"admin_as": "tenant"
},
{
"id": 320,
"username": "russell.nkiwane+fusionten@netaxis.be",
"admin_of": "21fb665e-c3db-40c5-a50c-65a9d4be540a",
"admin_as": "tenant"
},
{
"id": 303,
"username": "test_n4_dev_t",
"admin_of": "21fb665e-c3db-40c5-a50c-65a9d4be540a",
"admin_as": "tenant"
}
],
"page": 1,
"pages": 1,
"results": 4
}