For the complete documentation index, see llms.txt. This page is also available as Markdown.

Audit Logs

The audit log provides audit trail information for user activity, changes to business objects and other important information. For more information, see Audit log.

Get audit logs

get

Get audit logs based on query params filter

Authorizations
AuthorizationstringRequired

Bearer authentication

Query parameters
startstring · date-timeRequired

Start date of time range to fetch data in ISO 8601 timestamp format.

Example: 2023-06-06T12:09:18.211Z
endstring · date-timeRequired

End date of time range to fetch data in ISO 8601 timestamp format.

Example: 2023-06-07T12:09:18.211Z
offsetinteger · int32Optional

The offset of the first item returned in the collection.

Example: 100
numberOfSamplesinteger · max: 1000Optional

The number of samples to take in the specified time range.

Default: 20Example: 20
sortOrderstring · enumOptional

Sort results in descending or ascending order.

Default: ascPossible values:
sortBystring · enumOptional

Sort results by a parameters.

Possible values:
filterBystring[]Optional

Filter results by a parameter. Use the format field-name operator value. Operators are == Equals, != Not equals, <= Less than or equal, >= Greater than or equal, =@ contains, !@ Does not contains, =^ Starts with and =$ Ends with. Dates are in ISO 8601 timestamp format and available for operators ==, !=, <= and >=.

Example: ["cluster_name==my-cluster_name","entity_type==cluster,entity_name==test"]
Responses
200

Executed successfully

application/json
totalintegerOptionalExample: 2000
nextintegerOptionalExample: 100
get/api/v1/audit/log
GET /api/v1/audit/log?start=2023-06-06T12%3A09%3A18.211Z&end=2023-06-07T12%3A09%3A18.211Z HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "total": 2000,
  "next": 100,
  "audit_logs": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "timestamp": "2022-01-01T03:49:52.531Z",
      "tenant_id": 12345,
      "subject": "researcher@run.ai",
      "subject_type": "User",
      "source_ip": "0.0.0.0",
      "action": "create",
      "http_method": "GET",
      "url": "https://example.com",
      "entity_type": "project",
      "entity_name": "project-1",
      "entity_id": "1234",
      "result": "Succeeded",
      "http_status_code": 200,
      "cluster_name": "my favorite cluster",
      "cluster_id": "123e4567-e89b-12d3-a456-426614174000",
      "request_id": "bb0c4742-e52f-4d5e-bfee-2c4ff57c339c",
      "metadata": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      }
    }
  ]
}

Download audit logs

get

Download audit logs as a file, based on query params filter

Authorizations
AuthorizationstringRequired

Bearer authentication

Query parameters
file_typestring · enumOptionalDefault: CSVPossible values:
startstring · date-timeRequired

Start date of time range to fetch data in ISO 8601 timestamp format.

Example: 2023-06-06T12:09:18.211Z
endstring · date-timeRequired

End date of time range to fetch data in ISO 8601 timestamp format.

Example: 2023-06-07T12:09:18.211Z
offsetinteger · int32Optional

The offset of the first item returned in the collection.

Example: 100
numberOfSamplesinteger · max: 100000Optional

Maximum number of records to include in the file. The hard cap is 100,000. Use the offset parameter to page through additional records.

Default: 20
filterBystring[]Optional

Filter results by a parameter. Use the format field-name operator value. Operators are == Equals, != Not equals, <= Less than or equal, >= Greater than or equal, =@ contains, !@ Does not contains, =^ Starts with and =$ Ends with. Dates are in ISO 8601 timestamp format and available for operators ==, !=, <= and >=.

Example: ["cluster_name==my-cluster_name","entity_type==cluster,entity_name==test"]
Responses
200

File downloaded

application/octet-stream
get/api/v1/audit/log/file
GET /api/v1/audit/log/file?start=2023-06-06T12%3A09%3A18.211Z&end=2023-06-07T12%3A09%3A18.211Z HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

Last updated