Crusoe Audit Logs API
The Audit Logs API from Crusoe — 1 operation(s) for audit logs.
The Audit Logs API from Crusoe — 1 operation(s) for audit logs.
swagger: '2.0'
info:
description: The API Gateway exposes all publicly available API endpoints for Crusoe Cloud products.
title: Crusoe Cloud API Gateway Audit Logs API
version: v1alpha5
host: api.crusoecloud.com
basePath: /v1alpha5
schemes:
- https
consumes:
- application/json
produces:
- application/json
tags:
- name: Audit Logs
paths:
/organizations/{organization_id}/audit-logs:
get:
tags:
- Audit Logs
summary: Get audit logs belonging to the specified organization. User must be part of the organization.
operationId: getAuditLogs
parameters:
- type: string
example: de8f27fe-8438-45e7-a2c2-a2767660625f
x-go-name: OrganizationID
name: organization_id
in: path
required: true
- type: array
items:
type: string
example: f934fbdb-7e3a-4b92-b7d2-da0f91d768e8,8c29f3f3-830f-4a44-9b6b-a51fcf6a6b5d
x-go-name: ProjectIDs
name: project_ids
in: query
- type: string
example: '2022-09-01T14:25:36-07:00'
x-go-name: StartTime
name: start_time
in: query
- type: string
example: '2022-09-06T14:25:36-07:00'
x-go-name: EndTime
name: end_time
in: query
- type: array
items:
type: string
example: Create,Update
x-go-name: Actions
name: actions
in: query
- type: array
items:
type: string
example: f934fbdb-7e3a-4b92-b7d2-da0f91d768e8,8c29f3f3-830f-4a44-9b6b-a51fcf6a6b5d
x-go-name: ActorIDs
name: actor_ids
in: query
- type: array
items:
type: string
example: hh26@xxx.com,xyz@yyy.ai, only support filter by user email, not by crusoe admin email.
x-go-name: ActorEmails
name: actor_emails
in: query
- type: array
items:
type: string
example: User,Crusoe Admin, please ensure URL encoding for values with space.
x-go-name: ActorTypes
name: actor_types
in: query
- type: array
items:
type: string
example: f934fbdb-7e3a-4b92-b7d2-da0f91d768e8,8c29f3f3-830f-4a44-9b6b-a51fcf6a6b5d
x-go-name: TargetIDs
name: target_ids
in: query
- type: array
items:
type: string
example: VM,KubernetesCluster
x-go-name: TargetTypes
name: target_types
in: query
- type: array
items:
type: string
example: my_vm1,my_vm2
x-go-name: TargetNames
name: target_names
in: query
- type: array
items:
type: string
example: us-east1,us-southcentral1-a
x-go-name: Locations
name: locations
in: query
- type: array
items:
type: string
example: OK,Bad Request
x-go-name: Results
name: results
in: query
- type: array
items:
type: string
example: OK,Bad Request
x-go-name: ResultsNot
name: results_not
in: query
- type: array
items:
type: string
example: Browser,Crusoe Terraform/v0.5.21 please make sure the values are URL encoded.
x-go-name: Surfaces
name: surfaces
in: query
- type: string
example: '20'
x-go-name: Limit
name: limit
in: query
- type: string
example: bXktZmlyc3Qtdm0
x-go-name: NextToken
name: next_token
in: query
- type: string
example: bXktZmlyc3Qtdm0
x-go-name: PrevToken
name: prev_token
in: query
responses:
'200':
$ref: '#/responses/auditLogsResponse'
'400':
$ref: '#/responses/badReqError'
'401':
$ref: '#/responses/authError'
'403':
$ref: '#/responses/permissionsError'
'500':
$ref: '#/responses/serverError'
definitions:
LogEntry:
type: object
title: Log Entry models the audit log entry.
required:
- action
- actor_id
- actor_email
- actor_type
- client_ip
- end_time
- result
- start_time
- surface
properties:
action:
description: Name of the action
type: string
x-go-name: Action
example: Create
action_detail:
description: Name of the action
type: string
x-go-name: ActionDetail
example: Attach Disk
actor_email:
description: 'ActorEmail: the email address of the actor'
type: string
x-go-name: ActorEmail
example: xxxx@gmail.coom
actor_id:
description: 'Actor: who performed the action.'
type: string
x-go-name: Actor
example: e384a1de-81f8-4cb2-b312-a7d88a9bf9cb || "system"
actor_type:
description: 'ActorType: type of the actor'
type: string
x-go-name: ActorType
example: user || admin || system
client_ip:
description: IP address of the request
type: string
x-go-name: ClientIP
example: 10.2.5.355
end_time:
description: The end time of the request
type: string
x-go-name: EndTime
example: '"2024-08-24T05:25:33.860Z"'
error_message:
description: The error message of the request
type: string
x-go-name: ErrorMsg
example: '"The requested resource is out of stock. Please try again later."'
locations:
description: Region names of where the action is performed if applicable
type: array
items:
type: string
x-go-name: Location
example: us-east1
organization_id:
description: organization id
type: string
x-go-name: OrganizationID
example: d10efcc0-7dba-4163-a3f0-f48aae20712a
organization_name:
description: organization name
type: string
x-go-name: OrganizationName
example: crusoe.ai
project_id:
description: Project ID
type: string
x-go-name: ProjectID
example: e384a1de-81f8-4cb2-b312-a7d88a9bf9cb
project_name:
description: Project Name
type: string
x-go-name: ProjectName
example: e384a1de-81f8-4cb2-b312-a7d88a9bf9cb
result:
description: The result of the action
type: string
x-go-name: Result
example: OK
start_time:
description: The start time of the request
type: string
x-go-name: StartTime
example: '"2024-08-24T05:25:30.954Z"'
surface:
description: Surface type of the request
type: string
x-go-name: Surface
example: browser
target_ids:
description: 'The targets of the action
required'
type: array
items:
type: string
x-go-name: Target
example: e384a1de-81f8-4cb2-b312-a7d88a9bf9cb,6ac4d027-ee2a-4c0c-9b6f-e8638a7ae867
target_names:
description: The target names of the action
type: array
items:
type: string
x-go-name: TargetName
example: vm-test-1,vm-test-2
target_type:
description: 'The target type of the action
required'
type: string
x-go-name: TargetType
example: VM
x-go-package: gitlab.com/crusoeenergy/island/rest-gateway/internal/handlers/logservice
AuditLogsGetResponse:
type: object
required:
- items
properties:
items:
type: array
items:
$ref: '#/definitions/LogEntry'
x-go-name: Items
next_page_token:
description: 'Base64 encoded token representing the starting of the next page of log entry.
Empty if currently on the last page.'
type: string
x-go-name: NextPageToken
example: bXktbGFzdC12bQ
prev_page_token:
description: 'Base64 encoded token representing the starting previous page of log entry.
Empty if currently on the first page.'
type: string
x-go-name: PrevPageToken
example: bXktZmlyc3Qtdm0
x-go-package: gitlab.com/crusoeenergy/island/rest-gateway/internal/handlers
responses:
auditLogsResponse:
description: ''
schema:
$ref: '#/definitions/AuditLogsGetResponse'
serverError:
description: Error Internal Server
schema:
type: object
required:
- code
- message
properties:
code:
type: string
x-go-name: Code
example: '500'
message:
type: string
x-go-name: Message
example: internal_error
badReqError:
description: Error Bad Request
schema:
type: object
required:
- code
- message
properties:
code:
type: string
x-go-name: Code
example: '400'
message:
type: string
x-go-name: Message
example: bad_request
permissionsError:
description: Error Permissions
schema:
type: object
required:
- code
- message
properties:
code:
type: string
x-go-name: Code
example: '403'
message:
type: string
x-go-name: Message
example: unauthorized
authError:
description: Error Authentication Failed
schema:
type: object
required:
- code
- message
properties:
code:
type: string
x-go-name: Code
example: '401'
message:
type: string
x-go-name: Message
example: bad_credential
x-tagGroups:
- name: Compute
tags:
- VMs
- VM Operations
- Images
- Instance Templates
- Custom Images
- Custom Image Operations
- name: Organizations
tags:
- Projects
- Entities
- Prospects
- Billing
- Usage
- Quotas
- Audit Logs
- Reservations
- name: Users
tags:
- Identities
- Roles
- SSH Keys
- Tokens
- name: Storage
tags:
- Disks
- Disk Operations
- Snapshots
- Snapshot Operations
- name: Networking
tags:
- VPC Firewall Rules
- VPC Firewall Rule Operations
- VPC Networks
- VPC Subnets
- IB Partitions
- Load Balancers
- name: Orchestration
tags:
- Kubernetes Clusters
- Kubernetes Cluster Operations
- Kubernetes Node Pools
- Kubernetes Node Pool Operations
- Kubernetes Versions
- AutoClusters
- AutoCluster Operations
- name: Locations
tags:
- Locations
- name: Capacities
tags:
- Capacities