Auditum API (v1alpha1)
This is the specification for Auditum HTTP API.
For gRPC API, see repository.
For more information, see Usage Guide.
For any issues and feature requests, please use GitHub Issue Tracker
Project is the top-level resource in Auditum. Projects contain all other resources like Records.
A project is a logical grouping of records. Typically, a project is created for each of the applications that is being audited.
List projects
Returns a list of projects by the provided criteria.
query Parameters
filter.external_ids | Array of strings Filter projects by their external identifiers. |
page_size | integer <int32> The maximum number of projects to return. The service may return fewer than this value. If unspecified, at most 10 projects will be returned. The maximum value is 100; values above 100 will be coerced to 100. |
page_token | string A page token, received from a previous When paginating, all other parameters provided to |
Responses
Response samples
- 200
- default
{- "projects": [
- {
- "id": "string",
- "create_time": "2019-08-24T14:15:22Z",
- "display_name": "string",
- "update_record_enabled": true,
- "delete_record_enabled": true,
- "external_id": "string"
}
], - "next_page_token": "string"
}
Create project
Creates a new project.
Request Body schema: application/json
required | object (auditumio.auditum.v1alpha1.Project) Represents a project. | ||||||||
|
Responses
Request samples
- Payload
{- "project": {
- "display_name": "string",
- "update_record_enabled": true,
- "delete_record_enabled": true,
- "external_id": "string"
}
}
Response samples
- 200
- default
{- "project": {
- "id": "string",
- "create_time": "2019-08-24T14:15:22Z",
- "display_name": "string",
- "update_record_enabled": true,
- "delete_record_enabled": true,
- "external_id": "string"
}
}
Get project
Returns a project by its id.
path Parameters
project_id required | string ID of the record to get. |
Responses
Response samples
- 200
- default
{- "project": {
- "id": "string",
- "create_time": "2019-08-24T14:15:22Z",
- "display_name": "string",
- "update_record_enabled": true,
- "delete_record_enabled": true,
- "external_id": "string"
}
}
Update project
Updates an existing project.
path Parameters
project_id required | string Internal project identifier. |
Request Body schema: application/json
object (Project to update.) Project to update. | |
update_mask required | string Field mask indicating a list of fields to update. Currently supported fields:
|
Responses
Request samples
- Payload
{- "project": {
- "display_name": "string",
- "update_record_enabled": true,
- "delete_record_enabled": true,
- "external_id": "string"
}, - "update_mask": "string"
}
Response samples
- 200
- default
{- "project": {
- "id": "string",
- "create_time": "2019-08-24T14:15:22Z",
- "display_name": "string",
- "update_record_enabled": true,
- "delete_record_enabled": true,
- "external_id": "string"
}
}
Record is the core resource in Auditum. Records represent audit trail records a.k.a. audit logs.
List records
Returns a list of records by the provided criteria.
path Parameters
project_id required | string ID of the project that owns the records. |
query Parameters
filter.labels[string] | string This is a request variable of the map type. The query format is "map_name[key]=value", e.g. If the map name is Age, the key type is string, and the value type is integer, the query parameter is expressed as Age["bob"]=18 |
filter.resource_type | string Return records with the provided resource type. |
filter.resource_id | string Return records with the provided resource ID. |
filter.operation_type | string Return records with the provided operation type. |
filter.operation_id | string Return records with the provided operation ID. |
filter.operation_time_from | string <date-time> Return records with operation time starting from the provided time, inclusive. |
filter.operation_time_to | string <date-time> Return records with operation time up to the provided time, exclusive. |
filter.actor_type | string Return records with the provided actor type. |
filter.actor_id | string Return records with the provided actor ID. |
page_size | integer <int32> The maximum number of records to return. The service may return fewer than this value. If unspecified, at most 10 records will be returned. The maximum value is 100; values above 100 will be coerced to 100. |
page_token | string A page token, received from a previous When paginating, all other parameters provided to |
Responses
Response samples
- 200
- default
{- "records": [
- {
- "id": "string",
- "project_id": "string",
- "create_time": "2019-08-24T14:15:22Z",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "resource": {
- "type": "string",
- "id": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "changes": [
- {
- "name": "string",
- "description": "string",
- "old_value": null,
- "new_value": null
}
]
}, - "operation": {
- "type": "string",
- "id": "string",
- "time": "2019-08-24T14:15:22Z",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "trace_context": {
- "traceparent": "string",
- "tracestate": "string"
}, - "status": "UNSPECIFIED"
}, - "actor": {
- "type": "string",
- "id": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
}
], - "next_page_token": "string"
}
Create record
Creates a new audit record.
path Parameters
project_id required | string Identifier of the project the record belongs to. |
Request Body schema: application/json
object (Record to create.) Record to create. | |||||||||
|
Responses
Request samples
- Payload
{- "record": {
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "resource": {
- "type": "string",
- "id": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "changes": [
- {
- "name": "string",
- "description": "string",
- "old_value": null,
- "new_value": null
}
]
}, - "operation": {
- "type": "string",
- "id": "string",
- "time": "2019-08-24T14:15:22Z",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "trace_context": {
- "traceparent": "string",
- "tracestate": "string"
}, - "status": "UNSPECIFIED"
}, - "actor": {
- "type": "string",
- "id": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
}
}
Response samples
- 200
- default
{- "record": {
- "id": "string",
- "project_id": "string",
- "create_time": "2019-08-24T14:15:22Z",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "resource": {
- "type": "string",
- "id": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "changes": [
- {
- "name": "string",
- "description": "string",
- "old_value": null,
- "new_value": null
}
]
}, - "operation": {
- "type": "string",
- "id": "string",
- "time": "2019-08-24T14:15:22Z",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "trace_context": {
- "traceparent": "string",
- "tracestate": "string"
}, - "status": "UNSPECIFIED"
}, - "actor": {
- "type": "string",
- "id": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
}
}
Get record
Returns a record by its id.
path Parameters
project_id required | string ID of the project that owns the record. |
record_id required | string ID of the record to retrieve. |
Responses
Response samples
- 200
- default
{- "record": {
- "id": "string",
- "project_id": "string",
- "create_time": "2019-08-24T14:15:22Z",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "resource": {
- "type": "string",
- "id": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "changes": [
- {
- "name": "string",
- "description": "string",
- "old_value": null,
- "new_value": null
}
]
}, - "operation": {
- "type": "string",
- "id": "string",
- "time": "2019-08-24T14:15:22Z",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "trace_context": {
- "traceparent": "string",
- "tracestate": "string"
}, - "status": "UNSPECIFIED"
}, - "actor": {
- "type": "string",
- "id": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
}
}
Delete record
Deletes an existing project.
⚠️ NOTE: this operation is disabled by default and may be enabled per project or globally.
path Parameters
project_id required | string ID of the project that owns the record. |
record_id required | string ID of the record to delete. |
Responses
Response samples
- 200
- default
{ }
Update record
Updates an existing project.
⚠️ NOTE: this operation is disabled by default and may be enabled per project or globally.
path Parameters
project_id required | string Identifier of the project the record belongs to. |
record_id required | string Internal record identifier. |
Request Body schema: application/json
object (Record to update.) Record to update. | |
update_mask required | string Field mask indicating a list of fields to update. Currently supported fields:
|
Responses
Request samples
- Payload
{- "record": {
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "resource": {
- "type": "string",
- "id": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "changes": [
- {
- "name": "string",
- "description": "string",
- "old_value": null,
- "new_value": null
}
]
}, - "operation": {
- "type": "string",
- "id": "string",
- "time": "2019-08-24T14:15:22Z",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "trace_context": {
- "traceparent": "string",
- "tracestate": "string"
}, - "status": "UNSPECIFIED"
}, - "actor": {
- "type": "string",
- "id": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
}, - "update_mask": "string"
}
Response samples
- 200
- default
{- "record": {
- "id": "string",
- "project_id": "string",
- "create_time": "2019-08-24T14:15:22Z",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "resource": {
- "type": "string",
- "id": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "changes": [
- {
- "name": "string",
- "description": "string",
- "old_value": null,
- "new_value": null
}
]
}, - "operation": {
- "type": "string",
- "id": "string",
- "time": "2019-08-24T14:15:22Z",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "trace_context": {
- "traceparent": "string",
- "tracestate": "string"
}, - "status": "UNSPECIFIED"
}, - "actor": {
- "type": "string",
- "id": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
}
}
Batch create records
Creates multiple audit records in a batch.
path Parameters
project_id required | string ID of the project to create records in. |
Request Body schema: application/json
required | Array of objects (auditumio.auditum.v1alpha1.Record) <= 100 items Records to create. Maximum number of records in a batch is 100. | ||||||||||
Array (<= 100 items)
|
Responses
Request samples
- Payload
{- "records": [
- {
- "project_id": "string",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "resource": {
- "type": "string",
- "id": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "changes": [
- {
- "name": "string",
- "description": "string",
- "old_value": null,
- "new_value": null
}
]
}, - "operation": {
- "type": "string",
- "id": "string",
- "time": "2019-08-24T14:15:22Z",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "trace_context": {
- "traceparent": "string",
- "tracestate": "string"
}, - "status": "UNSPECIFIED"
}, - "actor": {
- "type": "string",
- "id": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
}
]
}
Response samples
- 200
- default
{- "records": [
- {
- "id": "string",
- "project_id": "string",
- "create_time": "2019-08-24T14:15:22Z",
- "labels": {
- "property1": "string",
- "property2": "string"
}, - "resource": {
- "type": "string",
- "id": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "changes": [
- {
- "name": "string",
- "description": "string",
- "old_value": null,
- "new_value": null
}
]
}, - "operation": {
- "type": "string",
- "id": "string",
- "time": "2019-08-24T14:15:22Z",
- "metadata": {
- "property1": "string",
- "property2": "string"
}, - "trace_context": {
- "traceparent": "string",
- "tracestate": "string"
}, - "status": "UNSPECIFIED"
}, - "actor": {
- "type": "string",
- "id": "string",
- "metadata": {
- "property1": "string",
- "property2": "string"
}
}
}
]
}