blob: 32ac8892a0327feafc544302c478cd803186e37d [file]
basePath: /
definitions:
AllocationMembershipResponse:
properties:
compute_allocation_id:
type: string
display_name:
type: string
email:
type: string
end_time:
type: string
id:
type: string
membership_status:
allOf:
- $ref: '#/definitions/AllocationStatus'
description: ACTIVE, INACTIVE, etc.
role:
type: string
start_time:
type: string
user_id:
type: string
type: object
AllocationSUTotalResponse:
properties:
compute_allocation_id:
type: string
total_su_amount:
type: integer
type: object
AllocationStatus:
enum:
- ACTIVE
- INACTIVE
- DELETED
type: string
x-enum-varnames:
- ACTIVE
- INACTIVE
- DELETED
CallerProfileResponse:
properties:
privileges:
items:
$ref: '#/definitions/PrivilegeKey'
type: array
user:
$ref: '#/definitions/User'
type: object
ComputeAllocation:
properties:
compute_cluster_id:
description: The ID of the compute cluster where the allocation is provisioned.
type: string
end_time:
type: string
id:
type: string
initial_su_amount:
description: SUs allocated at the time of allocation creation.
type: integer
name:
type: string
project_id:
type: string
start_time:
type: string
status:
allOf:
- $ref: '#/definitions/AllocationStatus'
description: ACTIVE, INACTIVE, DELETED, etc.
type: object
ComputeAllocationChangeRequest:
properties:
approver_id:
description: The ID of the user who approved/rejected the change request,
if applicable.
type: string
change_status:
description: '"PENDING", "APPROVED", "REJECTED", etc.'
type: string
compute_allocation_id:
type: string
id:
type: string
reason:
description: The reason for the change request, e.g., "Need more SUs for upcoming
jobs", "Requesting reduction in SUs due to project completion", etc.
type: string
requested_status:
allOf:
- $ref: '#/definitions/AllocationStatus'
description: ACTIVE, INACTIVE, DELETED, etc.
requested_su_amount:
description: The requested allocation amount in SUs, e.g., 1200 SUs, etc.
type: integer
requester_id:
description: The ID of the user who made the change request.
type: string
timestamp:
description: The time when the change request was made.
type: string
type: object
ComputeAllocationChangeRequestEvent:
properties:
compute_allocation_change_request_id:
type: string
description:
description: Optional description of the event, e.g., "Change request created
by user", "Change request approved by admin", etc.
type: string
event_type:
description: '"CREATED", "APPROVED", "REJECTED", etc.'
type: string
id:
type: string
timestamp:
description: The time when the event occurred.
type: string
type: object
ComputeAllocationDiff:
properties:
compute_allocation_id:
type: string
description:
description: Optional description of the diff, e.g., "SU usage updated based
on job completion", "Allocation marked as INACTIVE due to end time reached",
etc.
type: string
diff_type:
description: '"USAGE_UPDATE", "ALLOCATION_STATUS_CHANGE", etc.'
type: string
id:
type: string
new_su_amount:
description: New allocation amount in SUs, e.g., 900 SUs, etc.
type: integer
status:
allOf:
- $ref: '#/definitions/AllocationStatus'
description: ACTIVE, INACTIVE, DELETED, etc.
timestamp:
description: The time when the diff was generated.
type: string
type: object
ComputeAllocationListResponse:
properties:
items:
items:
$ref: '#/definitions/ComputeAllocation'
type: array
total:
type: integer
type: object
ComputeAllocationMembership:
properties:
compute_allocation_id:
type: string
end_time:
type: string
id:
type: string
membership_status:
allOf:
- $ref: '#/definitions/AllocationStatus'
description: ACTIVE, INACTIVE, etc.
start_time:
type: string
user_id:
type: string
type: object
ComputeAllocationMembershipResourceOverride:
properties:
compute_allocation_membership_id:
type: string
compute_allocation_resource_id:
type: string
id:
type: string
override_resource_amount:
description: The overridden amount of the resource for the user (e.g., number
of CPUs, GPUs).
type: integer
override_resource_time:
description: The overridden wall-clock time in minutes that the resource amount
is granted for.
type: integer
type: object
ComputeAllocationResource:
properties:
compute_cluster_id:
description: The ID of the compute cluster the resource (partition) belongs
to.
type: string
id:
type: string
name:
description: resource / partition name, e.g., "cpu-01", "gpu-01", "gpu-interactive",
etc.
type: string
resource_amount:
description: Number of CPUs, GPUs.
type: integer
resource_type:
description: 'TRES: cpu, gres/gpu'
type: string
type: object
ComputeAllocationResourceMapping:
properties:
compute_allocation_id:
type: string
compute_allocation_resource_id:
type: string
id:
type: string
resource_amount:
description: Amount of the resource allocated to this allocation (e.g., number
of CPUs, GPUs).
type: integer
resource_time:
description: Wall-clock time in minutes that the allocated amount is granted
for.
type: integer
type: object
ComputeAllocationResourceRate:
properties:
compute_allocation_resource_id:
type: string
end_time:
description: The time when this rate expires.
type: string
id:
type: string
rate:
description: The rate for the resource in SUs per unit, e.g., 0.5 SU per CPU
hour, 2 SU per GPU hour, etc.
type: number
start_time:
description: The time when this rate becomes effective.
type: string
type: object
ComputeAllocationResourceSummary:
properties:
allocation_count:
type: integer
compute_cluster_id:
description: The ID of the compute cluster the resource (partition) belongs
to.
type: string
id:
type: string
name:
description: resource / partition name, e.g., "cpu-01", "gpu-01", "gpu-interactive",
etc.
type: string
rate_count:
type: integer
resource_amount:
description: Number of CPUs, GPUs.
type: integer
resource_type:
description: 'TRES: cpu, gres/gpu'
type: string
total_allocated:
type: integer
total_used_su:
type: number
type: object
ComputeAllocationUsage:
properties:
compute_allocation_id:
type: string
compute_allocation_resource_id:
description: The specific resource consumed, e.g., 20 CPU hours, 10 GPU hours,
etc.
type: string
id:
type: string
job_id:
description: The ID of the job that consumed the allocation.
type: string
last_updated:
description: The last time the usage was updated. SU should be calculated
up to this point in time and charge rates should be applied based on the
rates effective at this time.
type: string
used_raw_amount:
description: The raw amount of resource used, e.g., 20 CPU hours, 10 GPU hours,
etc.
type: number
used_su_amount:
description: SUs used by the allocation, e.g., 200 SUs, etc.
type: number
user_id:
description: The ID of the user who used the allocation.
type: string
type: object
ComputeCluster:
properties:
id:
type: string
name:
description: A human-readable name for the compute cluster, e.g., "Cluster
A", "Cluster B", etc.
type: string
type: object
ComputeClusterUser:
properties:
compute_cluster_id:
type: string
id:
type: string
local_username:
description: The username of the user on the compute cluster, which may be
different from their Airavata Custos username.
type: string
user_id:
type: string
type: object
Organization:
properties:
id:
type: string
name:
type: string
originated_id:
description: 'The ID of the organization in origination. For example: ACCESS
Record ID.'
type: string
type: object
OrganizationListResponse:
properties:
items:
items:
$ref: '#/definitions/Organization'
type: array
total:
type: integer
type: object
PrivilegeKey:
enum:
- core:clusters:read
- core:clusters:write
- core:allocations:read
- core:allocations:write
- core:projects:read
- core:projects:write
- core:users:read
- core:users:write
- core:organizations:read
- core:organizations:write
- core:traces:read
- core:privileges:grant
- core:roles:manage
type: string
x-enum-varnames:
- ClustersRead
- ClustersWrite
- AllocationsRead
- AllocationsWrite
- ProjectsRead
- ProjectsWrite
- UsersRead
- UsersWrite
- OrganizationsRead
- OrganizationsWrite
- TracesRead
- PrivilegesGrant
- RolesManage
Project:
properties:
created_time:
type: string
id:
type: string
originated_id:
description: 'The ID of the project in origination. For example: ACCESS Record
ID.'
type: string
origination:
description: ACCESS, NAIRR, XRASS, etc.
type: string
project_pi_id:
type: string
status:
$ref: '#/definitions/ProjectStatus'
title:
type: string
type: object
ProjectListResponse:
properties:
items:
items:
$ref: '#/definitions/ProjectResponse'
type: array
total:
type: integer
type: object
ProjectMemberAllocationRef:
properties:
id:
type: string
name:
type: string
role:
type: string
type: object
ProjectMemberResponse:
properties:
added_time:
type: string
allocations:
items:
$ref: '#/definitions/ProjectMemberAllocationRef'
type: array
display_name:
type: string
email:
type: string
id:
type: string
project_id:
type: string
role:
type: string
status:
type: string
user_id:
type: string
type: object
ProjectResponse:
properties:
created_time:
type: string
id:
type: string
originated_id:
description: 'The ID of the project in origination. For example: ACCESS Record
ID.'
type: string
origination:
description: ACCESS, NAIRR, XRASS, etc.
type: string
project_pi_display_name:
type: string
project_pi_email:
type: string
project_pi_id:
type: string
status:
$ref: '#/definitions/ProjectStatus'
title:
type: string
type: object
ProjectStatus:
enum:
- ACTIVE
- INACTIVE
- DELETED
type: string
x-enum-varnames:
- ProjectActive
- ProjectInactive
- ProjectDeleted
Role:
properties:
created_at:
type: string
description:
type: string
id:
type: string
is_system:
type: boolean
name:
type: string
type: object
TraceEvent:
properties:
created_at:
type: string
description:
type: string
entity_id:
type: string
entity_type:
type: string
event_type:
type: string
parent_span_id:
type: string
source:
type: string
span_id:
type: string
status:
type: string
type: object
TraceNode:
properties:
children:
items:
$ref: '#/definitions/TraceNode'
type: array
created_at:
type: string
description:
type: string
entity_id:
type: string
entity_type:
type: string
event_type:
type: string
parent_span_id:
type: string
source:
type: string
span_id:
type: string
status:
type: string
type: object
TraceSummary:
properties:
ended_at:
type: string
event_count:
type: integer
root_operation:
type: string
source:
type: string
started_at:
type: string
status:
type: string
trace_id:
type: string
type: object
User:
properties:
email:
type: string
first_name:
type: string
id:
type: string
last_name:
type: string
middle_name:
type: string
organization_id:
type: string
status:
$ref: '#/definitions/UserStatus'
type:
$ref: '#/definitions/UserType'
type: object
UserAllocationSUTotalResponse:
properties:
compute_allocation_id:
type: string
total_su_amount:
type: integer
user_id:
type: string
type: object
UserIdentity:
properties:
created_at:
type: string
email:
description: the email configured by the source
type: string
external_id:
description: the source's native identifier
type: string
id:
type: string
metadata:
description: JSON-encoded source-specific fields
type: string
oidc_sub:
description: OIDC subject when the source issues one
type: string
source:
description: e.g. access, nairr, cilogon
type: string
user_id:
type: string
type: object
UserListResponse:
properties:
items:
items:
$ref: '#/definitions/User'
type: array
total:
type: integer
type: object
UserPrivilege:
properties:
granted_at:
type: string
granted_by:
type: string
id:
type: string
privilege:
$ref: '#/definitions/PrivilegeKey'
reason:
type: string
user_id:
type: string
type: object
UserRole:
properties:
granted_at:
type: string
granted_by:
type: string
reason:
type: string
role_id:
type: string
user_id:
type: string
type: object
UserStatus:
enum:
- PENDING
- ACTIVE
- INACTIVE
- SUSPENDED
- MERGED
type: string
x-enum-varnames:
- UserPending
- UserActive
- UserInactive
- UserSuspended
- UserMerged
UserType:
enum:
- CLUSTER_LOCAL
- VIRTUAL
- SYSTEM
type: string
x-enum-varnames:
- UserTypeClusterLocal
- UserTypeVirtual
- UserTypeSystem
attachResourceRequest:
properties:
compute_allocation_resource_id:
type: string
resource_amount:
type: integer
resource_time:
type: integer
type: object
createRoleRequest:
properties:
description:
type: string
name:
type: string
type: object
grantPrivilegeRequest:
properties:
privilege:
$ref: '#/definitions/PrivilegeKey'
reason:
type: string
type: object
grantRoleRequest:
properties:
reason:
type: string
role_id:
type: string
type: object
mergeUsersRequest:
properties:
retiring_user_id:
type: string
surviving_user_id:
type: string
type: object
revokePrivilegeRequest:
properties:
reason:
type: string
type: object
revokeRoleRequest:
properties:
reason:
type: string
type: object
rolePrivilegeRequest:
properties:
privilege:
$ref: '#/definitions/PrivilegeKey'
type: object
updateAllocationResourceMappingRequest:
properties:
resource_amount:
type: integer
resource_time:
type: integer
type: object
updateRoleRequest:
properties:
description:
type: string
name:
type: string
type: object
userNameUpdateRequest:
properties:
first_name:
type: string
last_name:
type: string
middle_name:
type: string
type: object
host: localhost:8080
info:
contact: {}
description: 'REST API for Apache Custos: organizations, users, projects, compute
clusters, allocations, audit traces, and the privilege/role authorization layer.
OIDC bearer auth required. Connector endpoints live under /connectors/<name>/.'
title: Apache Custos Core API
version: 0.2.0
paths:
/audit/events:
get:
parameters:
- description: 32-char lowercase hex
in: query
name: trace_id
required: true
type: string
- description: 16-char lowercase hex
in: query
name: span_id
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
properties:
events:
items:
$ref: '#/definitions/TraceEvent'
type: array
type: object
"400":
description: Malformed trace_id or span_id
schema:
properties:
error:
type: string
type: object
"503":
description: Audit trace store not configured
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: List audit events for a trace (optionally one span)
tags:
- Audit
/audit/sources:
get:
produces:
- application/json
responses:
"200":
description: OK
schema:
properties:
sources:
items:
type: string
type: array
type: object
"503":
description: Audit trace store not configured
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: List distinct audit-event sources
tags:
- Audit
/audit/traces:
get:
description: One row per distinct trace_id. `q` matches trace_id hex prefix
or root-operation substring.
parameters:
- collectionFormat: multi
description: Restrict to listed sources (repeatable)
in: query
items:
type: string
name: source
type: array
- collectionFormat: multi
description: ok | error | in_progress (repeatable)
in: query
items:
type: string
name: status
type: array
- description: RFC3339 lower bound on started_at
in: query
name: from
type: string
- description: RFC3339 upper bound on started_at
in: query
name: to
type: string
- description: Substring match on trace_id hex or root operation
in: query
name: q
type: string
- description: Page size (default 50, max 200)
in: query
name: limit
type: integer
- description: Page offset (default 0)
in: query
name: offset
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
properties:
limit:
type: integer
offset:
type: integer
total:
type: integer
traces:
items:
$ref: '#/definitions/TraceSummary'
type: array
type: object
"400":
description: Invalid filter value
schema:
properties:
error:
type: string
type: object
"503":
description: Audit trace store not configured
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: List audit traces with filters
tags:
- Audit
/audit/traces/{trace_id}:
get:
parameters:
- description: 32-char lowercase hex
in: path
name: trace_id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
properties:
trace_id:
type: string
tree:
items:
$ref: '#/definitions/TraceNode'
type: array
truncated:
type: boolean
type: object
"400":
description: Malformed trace_id
schema:
properties:
error:
type: string
type: object
"404":
description: Trace not found
schema:
properties:
error:
type: string
type: object
"503":
description: Audit trace store not configured
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Get a trace's nested span tree
tags:
- Audit
/compute-allocation-change-request-events:
post:
consumes:
- application/json
parameters:
- description: Event payload
in: body
name: request
required: true
schema:
$ref: '#/definitions/ComputeAllocationChangeRequestEvent'
produces:
- application/json
responses:
"201":
description: Created
schema:
$ref: '#/definitions/ComputeAllocationChangeRequestEvent'
"400":
description: Bad Request
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Create a change request event
tags:
- Change Request Events
/compute-allocation-change-request-events/{id}:
delete:
parameters:
- description: Event ID
in: path
name: id
required: true
type: string
responses:
"204":
description: No Content
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Delete a change request event
tags:
- Change Request Events
get:
parameters:
- description: Event ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/ComputeAllocationChangeRequestEvent'
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Get a change request event
tags:
- Change Request Events
/compute-allocation-change-requests:
post:
consumes:
- application/json
parameters:
- description: Change request payload
in: body
name: request
required: true
schema:
$ref: '#/definitions/ComputeAllocationChangeRequest'
produces:
- application/json
responses:
"201":
description: Created
schema:
$ref: '#/definitions/ComputeAllocationChangeRequest'
"400":
description: Bad Request
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Create a compute allocation change request
tags:
- Compute Allocation Change Requests
/compute-allocation-change-requests/{id}:
delete:
parameters:
- description: Change request ID
in: path
name: id
required: true
type: string
responses:
"204":
description: No Content
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Delete a compute allocation change request
tags:
- Compute Allocation Change Requests
get:
parameters:
- description: Change request ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/ComputeAllocationChangeRequest'
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Get a compute allocation change request
tags:
- Compute Allocation Change Requests
put:
consumes:
- application/json
parameters:
- description: Change request ID
in: path
name: id
required: true
type: string
- description: Change request payload
in: body
name: request
required: true
schema:
$ref: '#/definitions/ComputeAllocationChangeRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/ComputeAllocationChangeRequest'
"400":
description: Bad Request
schema:
properties:
error:
type: string
type: object
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Update a compute allocation change request
tags:
- Compute Allocation Change Requests
/compute-allocation-change-requests/{id}/events:
get:
parameters:
- description: Change request ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/ComputeAllocationChangeRequestEvent'
type: array
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: List events for a change request
tags:
- Change Request Events
/compute-allocation-change-requests/{id}/events/latest:
get:
parameters:
- description: Change request ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/ComputeAllocationChangeRequestEvent'
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Get the most recent event for a change request
tags:
- Change Request Events
/compute-allocation-diffs:
post:
consumes:
- application/json
description: Records a discrete change against a compute allocation (e.g. USAGE_UPDATE
or ALLOCATION_STATUS_CHANGE).
parameters:
- description: Diff payload
in: body
name: request
required: true
schema:
$ref: '#/definitions/ComputeAllocationDiff'
produces:
- application/json
responses:
"201":
description: Created
schema:
$ref: '#/definitions/ComputeAllocationDiff'
"400":
description: Bad Request
schema:
properties:
error:
type: string
type: object
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Create a compute allocation diff
tags:
- Compute Allocation Diffs
/compute-allocation-diffs/{id}:
delete:
parameters:
- description: Diff ID
in: path
name: id
required: true
type: string
responses:
"204":
description: No Content
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Delete a compute allocation diff
tags:
- Compute Allocation Diffs
get:
parameters:
- description: Diff ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/ComputeAllocationDiff'
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Get a compute allocation diff
tags:
- Compute Allocation Diffs
/compute-allocation-membership-resource-overrides:
post:
consumes:
- application/json
parameters:
- description: Override payload
in: body
name: request
required: true
schema:
$ref: '#/definitions/ComputeAllocationMembershipResourceOverride'
produces:
- application/json
responses:
"201":
description: Created
schema:
$ref: '#/definitions/ComputeAllocationMembershipResourceOverride'
"400":
description: Bad Request
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Create a membership resource override
tags:
- Membership Resource Overrides
/compute-allocation-membership-resource-overrides/{id}:
delete:
parameters:
- description: Override ID
in: path
name: id
required: true
type: string
responses:
"204":
description: No Content
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Delete a membership resource override
tags:
- Membership Resource Overrides
get:
parameters:
- description: Override ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/ComputeAllocationMembershipResourceOverride'
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Get a membership resource override
tags:
- Membership Resource Overrides
put:
consumes:
- application/json
parameters:
- description: Override ID
in: path
name: id
required: true
type: string
- description: Override payload
in: body
name: request
required: true
schema:
$ref: '#/definitions/ComputeAllocationMembershipResourceOverride'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/ComputeAllocationMembershipResourceOverride'
"400":
description: Bad Request
schema:
properties:
error:
type: string
type: object
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Update a membership resource override
tags:
- Membership Resource Overrides
/compute-allocation-memberships:
post:
consumes:
- application/json
parameters:
- description: Membership payload
in: body
name: request
required: true
schema:
$ref: '#/definitions/ComputeAllocationMembership'
produces:
- application/json
responses:
"201":
description: Created
schema:
$ref: '#/definitions/ComputeAllocationMembership'
"400":
description: Bad Request
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Create a compute allocation membership
tags:
- Compute Allocation Memberships
/compute-allocation-memberships/{id}:
delete:
parameters:
- description: Membership ID
in: path
name: id
required: true
type: string
responses:
"204":
description: No Content
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Delete a compute allocation membership
tags:
- Compute Allocation Memberships
get:
parameters:
- description: Membership ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/ComputeAllocationMembership'
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Get a compute allocation membership
tags:
- Compute Allocation Memberships
put:
consumes:
- application/json
parameters:
- description: Membership ID
in: path
name: id
required: true
type: string
- description: Membership payload
in: body
name: request
required: true
schema:
$ref: '#/definitions/ComputeAllocationMembership'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/ComputeAllocationMembership'
"400":
description: Bad Request
schema:
properties:
error:
type: string
type: object
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Update a compute allocation membership
tags:
- Compute Allocation Memberships
/compute-allocation-memberships/{id}/resource-overrides:
get:
parameters:
- description: Membership ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/ComputeAllocationMembershipResourceOverride'
type: array
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: List resource overrides for a membership
tags:
- Membership Resource Overrides
/compute-allocation-memberships/{id}/status:
put:
consumes:
- application/json
parameters:
- description: Membership ID
in: path
name: id
required: true
type: string
- description: Status patch
in: body
name: request
required: true
schema:
properties:
membership_status:
$ref: '#/definitions/AllocationStatus'
type: object
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/ComputeAllocationMembership'
"400":
description: Bad Request
schema:
properties:
error:
type: string
type: object
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Update a membership's status
tags:
- Compute Allocation Memberships
/compute-allocation-resource-rates:
post:
consumes:
- application/json
description: Records the SU rate (e.g. SU per CPU-hour) for a resource over
a time window.
parameters:
- description: Rate payload
in: body
name: request
required: true
schema:
$ref: '#/definitions/ComputeAllocationResourceRate'
produces:
- application/json
responses:
"201":
description: Created
schema:
$ref: '#/definitions/ComputeAllocationResourceRate'
"400":
description: Bad Request
schema:
properties:
error:
type: string
type: object
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Create a compute allocation resource rate
tags:
- Compute Allocation Resource Rates
/compute-allocation-resource-rates/{id}:
get:
parameters:
- description: Rate ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/ComputeAllocationResourceRate'
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Get a compute allocation resource rate
tags:
- Compute Allocation Resource Rates
/compute-allocation-resources:
get:
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/ComputeAllocationResource'
type: array
"401":
description: Unauthorized
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: List all compute allocation resources
tags:
- Compute Allocation Resources
post:
consumes:
- application/json
description: Defines a resource (partition) — e.g. a CPU or GPU partition that
allocations can be attached to.
parameters:
- description: Resource payload
in: body
name: request
required: true
schema:
$ref: '#/definitions/ComputeAllocationResource'
produces:
- application/json
responses:
"201":
description: Created
schema:
$ref: '#/definitions/ComputeAllocationResource'
"400":
description: Bad Request
schema:
properties:
error:
type: string
type: object
"401":
description: Unauthorized
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Create a compute allocation resource
tags:
- Compute Allocation Resources
/compute-allocation-resources/{id}:
get:
parameters:
- description: Resource ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/ComputeAllocationResource'
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Get a compute allocation resource
tags:
- Compute Allocation Resources
/compute-allocation-resources/{id}/allocations:
get:
parameters:
- description: Compute allocation resource ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/ComputeAllocationResourceMapping'
type: array
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: List compute allocations attached to a resource
tags:
- Compute Allocation Resources
/compute-allocation-resources/{id}/membership-overrides:
get:
parameters:
- description: Compute allocation resource ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/ComputeAllocationMembershipResourceOverride'
type: array
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: List membership overrides referencing a resource
tags:
- Membership Resource Overrides
/compute-allocation-resources/{id}/rates:
get:
parameters:
- description: Compute allocation resource ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/ComputeAllocationResourceRate'
type: array
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: List rate history for a resource
tags:
- Compute Allocation Resource Rates
/compute-allocation-resources/{id}/rates/effective:
get:
description: Returns the rate whose `[start_time, end_time)` window contains
the `at` timestamp. Defaults to now when `at` is omitted.
parameters:
- description: Compute allocation resource ID
in: path
name: id
required: true
type: string
- description: RFC3339 time; defaults to now
in: query
name: at
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/ComputeAllocationResourceRate'
"400":
description: Invalid 'at' query parameter
schema:
properties:
error:
type: string
type: object
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Get the effective rate for a resource at a given time
tags:
- Compute Allocation Resource Rates
/compute-allocation-resources/summary:
get:
description: Each row is a resource plus its allocation count, total allocated
amount, total used SUs, and rate count.
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/ComputeAllocationResourceSummary'
type: array
"401":
description: Unauthorized
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: List compute allocation resources with aggregate figures
tags:
- Compute Allocation Resources
/compute-allocation-usages:
post:
consumes:
- application/json
parameters:
- description: Usage payload
in: body
name: request
required: true
schema:
$ref: '#/definitions/ComputeAllocationUsage'
produces:
- application/json
responses:
"201":
description: Created
schema:
$ref: '#/definitions/ComputeAllocationUsage'
"400":
description: Bad Request
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Create a compute allocation usage record
tags:
- Compute Allocation Usages
/compute-allocation-usages/{id}:
delete:
parameters:
- description: Usage ID
in: path
name: id
required: true
type: string
responses:
"204":
description: No Content
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Delete a compute allocation usage record
tags:
- Compute Allocation Usages
get:
parameters:
- description: Usage ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/ComputeAllocationUsage'
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Get a compute allocation usage record
tags:
- Compute Allocation Usages
/compute-allocations:
get:
parameters:
- description: Filter by project ID
in: query
name: project_id
type: string
- description: Filter by status
in: query
name: status
type: string
- description: Search name
in: query
name: q
type: string
- description: Page size
in: query
name: limit
type: integer
- description: Page offset
in: query
name: offset
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/ComputeAllocationListResponse'
security:
- BearerAuth: []
summary: List compute allocations (filtered + paginated)
tags:
- Compute Allocations
post:
consumes:
- application/json
parameters:
- description: Compute allocation payload
in: body
name: request
required: true
schema:
$ref: '#/definitions/ComputeAllocation'
produces:
- application/json
responses:
"201":
description: Created
schema:
$ref: '#/definitions/ComputeAllocation'
"400":
description: Bad Request
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Create a compute allocation
tags:
- Compute Allocations
/compute-allocations/{id}:
get:
parameters:
- description: Compute allocation ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/ComputeAllocation'
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Get a compute allocation by ID
tags:
- Compute Allocations
/compute-allocations/{id}/change-requests:
get:
parameters:
- description: Compute allocation ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/ComputeAllocationChangeRequest'
type: array
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: List change requests for a compute allocation
tags:
- Compute Allocation Change Requests
/compute-allocations/{id}/diffs:
get:
parameters:
- description: Compute allocation ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/ComputeAllocationDiff'
type: array
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: List diffs for a compute allocation
tags:
- Compute Allocation Diffs
/compute-allocations/{id}/diffs/latest:
get:
parameters:
- description: Compute allocation ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/ComputeAllocationDiff'
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Get the most recent diff for a compute allocation
tags:
- Compute Allocation Diffs
/compute-allocations/{id}/memberships:
get:
parameters:
- description: Compute allocation ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/AllocationMembershipResponse'
type: array
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: List members of a compute allocation
tags:
- Compute Allocation Memberships
/compute-allocations/{id}/resources:
get:
parameters:
- description: Compute allocation ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/ComputeAllocationResourceMapping'
type: array
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: List resources attached to a compute allocation
tags:
- Compute Allocation Resources
post:
consumes:
- application/json
description: Creates a mapping between a compute allocation and a resource (partition)
with a specific amount and wall-clock time grant.
parameters:
- description: Compute allocation ID
in: path
name: id
required: true
type: string
- description: Attach payload
in: body
name: request
required: true
schema:
$ref: '#/definitions/attachResourceRequest'
produces:
- application/json
responses:
"201":
description: Created
schema:
$ref: '#/definitions/ComputeAllocationResourceMapping'
"400":
description: Bad Request
schema:
properties:
error:
type: string
type: object
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Attach a resource to a compute allocation
tags:
- Compute Allocation Resources
/compute-allocations/{id}/resources/{resourceId}:
delete:
parameters:
- description: Compute allocation ID
in: path
name: id
required: true
type: string
- description: Compute allocation resource ID
in: path
name: resourceId
required: true
type: string
responses:
"204":
description: No Content
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Detach a resource from a compute allocation
tags:
- Compute Allocation Resources
put:
consumes:
- application/json
parameters:
- description: Compute allocation ID
in: path
name: id
required: true
type: string
- description: Compute allocation resource ID
in: path
name: resourceId
required: true
type: string
- description: Mapping update payload
in: body
name: request
required: true
schema:
$ref: '#/definitions/updateAllocationResourceMappingRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/ComputeAllocationResourceMapping'
"400":
description: Bad Request
schema:
properties:
error:
type: string
type: object
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Update a compute allocation -> resource mapping
tags:
- Compute Allocation Resources
/compute-allocations/{id}/usages:
get:
parameters:
- description: Compute allocation ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/ComputeAllocationUsage'
type: array
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: List usages for a compute allocation
tags:
- Compute Allocation Usages
/compute-allocations/{id}/usages/total:
get:
parameters:
- description: Compute allocation ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/AllocationSUTotalResponse'
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Get total SU usage for a compute allocation
tags:
- Compute Allocation Usages
/compute-allocations/{id}/users/{userId}/usages/total:
get:
parameters:
- description: Compute allocation ID
in: path
name: id
required: true
type: string
- description: User ID
in: path
name: userId
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/UserAllocationSUTotalResponse'
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Get total SU usage for a user within a compute allocation
tags:
- Compute Allocation Usages
/compute-cluster-users:
post:
consumes:
- application/json
parameters:
- description: Cluster user payload
in: body
name: request
required: true
schema:
$ref: '#/definitions/ComputeClusterUser'
produces:
- application/json
responses:
"201":
description: Created
schema:
$ref: '#/definitions/ComputeClusterUser'
"400":
description: Bad Request
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Create a compute cluster user
tags:
- Compute Cluster Users
/compute-cluster-users/{id}:
delete:
parameters:
- description: Compute cluster user ID
in: path
name: id
required: true
type: string
responses:
"204":
description: No Content
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Delete a compute cluster user
tags:
- Compute Cluster Users
get:
parameters:
- description: Compute cluster user ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/ComputeClusterUser'
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Get a compute cluster user by ID
tags:
- Compute Cluster Users
put:
consumes:
- application/json
parameters:
- description: Compute cluster user ID
in: path
name: id
required: true
type: string
- description: Cluster user payload
in: body
name: request
required: true
schema:
$ref: '#/definitions/ComputeClusterUser'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/ComputeClusterUser'
"400":
description: Bad Request
schema:
properties:
error:
type: string
type: object
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Update a compute cluster user
tags:
- Compute Cluster Users
/compute-clusters:
get:
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/ComputeCluster'
type: array
"500":
description: Internal Server Error
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: List compute clusters
tags:
- Compute Clusters
post:
consumes:
- application/json
parameters:
- description: Cluster payload
in: body
name: request
required: true
schema:
$ref: '#/definitions/ComputeCluster'
produces:
- application/json
responses:
"201":
description: Created
schema:
$ref: '#/definitions/ComputeCluster'
"400":
description: Bad Request
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Create a compute cluster
tags:
- Compute Clusters
/compute-clusters/{id}:
get:
parameters:
- description: Compute cluster ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/ComputeCluster'
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Get a compute cluster by ID
tags:
- Compute Clusters
/compute-clusters/{id}/users:
get:
parameters:
- description: Compute cluster ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/ComputeClusterUser'
type: array
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: List users on a compute cluster
tags:
- Compute Cluster Users
/compute-clusters/{id}/users/{userId}:
get:
parameters:
- description: Compute cluster ID
in: path
name: id
required: true
type: string
- description: User ID
in: path
name: userId
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/ComputeClusterUser'
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Get a compute cluster user by (cluster, user) pair
tags:
- Compute Cluster Users
/me:
get:
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/CallerProfileResponse'
"401":
description: Missing authenticated caller
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Get the caller's user record and effective privileges
tags:
- Caller
/organizations:
get:
parameters:
- description: Page size
in: query
name: limit
type: integer
- description: Page offset
in: query
name: offset
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/OrganizationListResponse'
security:
- BearerAuth: []
summary: List organizations (paginated)
tags:
- Organizations
post:
consumes:
- application/json
parameters:
- description: Organization payload
in: body
name: request
required: true
schema:
$ref: '#/definitions/Organization'
produces:
- application/json
responses:
"201":
description: Created
schema:
$ref: '#/definitions/Organization'
"400":
description: Bad Request
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Create an organization
tags:
- Organizations
/organizations/{id}:
get:
parameters:
- description: Organization ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/Organization'
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Get an organization by ID
tags:
- Organizations
/privileges/{key}/holders:
get:
description: Role-derived holders are NOT listed here.
parameters:
- description: Privilege key
enum:
- core:clusters:read
- core:clusters:write
- core:allocations:read
- core:allocations:write
- core:projects:read
- core:projects:write
- core:users:read
- core:users:write
- core:organizations:read
- core:organizations:write
- core:traces:read
- core:privileges:grant
- core:roles:manage
in: path
name: key
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/UserPrivilege'
type: array
"400":
description: Unknown privilege key
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: List direct holders of a privilege
tags:
- Privileges
/privileges/catalog:
get:
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/PrivilegeKey'
type: array
"401":
description: Missing or invalid bearer token
schema:
properties:
error:
type: string
type: object
"403":
description: Caller lacks privileges:grant
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: List the declared privilege catalog
tags:
- Privileges
/projects:
get:
parameters:
- description: Filter by PI user ID
in: query
name: pi_id
type: string
- description: Filter by status
in: query
name: status
type: string
- description: Search title / originated_id
in: query
name: q
type: string
- description: Page size
in: query
name: limit
type: integer
- description: Page offset
in: query
name: offset
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/ProjectListResponse'
security:
- BearerAuth: []
summary: List projects (filtered + paginated, PI joined)
tags:
- Projects
post:
consumes:
- application/json
parameters:
- description: Project payload
in: body
name: request
required: true
schema:
$ref: '#/definitions/Project'
produces:
- application/json
responses:
"201":
description: Created
schema:
$ref: '#/definitions/Project'
"400":
description: Bad Request
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Create a project
tags:
- Projects
/projects/{id}:
get:
parameters:
- description: Project ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/ProjectResponse'
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Get a project by ID
tags:
- Projects
/projects/{id}/members:
get:
parameters:
- description: Project ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/ProjectMemberResponse'
type: array
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: List project members (one row per distinct user, with allocations)
tags:
- Projects
/projects/{id}/status:
put:
consumes:
- application/json
parameters:
- description: Project ID
in: path
name: id
required: true
type: string
- description: Status patch
in: body
name: request
required: true
schema:
properties:
status:
$ref: '#/definitions/ProjectStatus'
type: object
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/Project'
"400":
description: Bad Request
schema:
properties:
error:
type: string
type: object
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Update a project's status
tags:
- Projects
/roles:
get:
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/Role'
type: array
"401":
description: Unauthorized
schema:
properties:
error:
type: string
type: object
"403":
description: Caller lacks roles:manage
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: List all roles
tags:
- Roles
post:
consumes:
- application/json
parameters:
- description: Role payload
in: body
name: request
required: true
schema:
$ref: '#/definitions/createRoleRequest'
produces:
- application/json
responses:
"201":
description: Created
schema:
$ref: '#/definitions/Role'
"400":
description: Bad Request
schema:
properties:
error:
type: string
type: object
"401":
description: Unauthorized
schema:
properties:
error:
type: string
type: object
"409":
description: Role name collides
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Create a role
tags:
- Roles
/roles/{id}:
delete:
description: System roles cannot be deleted. CASCADE drops every assignment
of this role.
parameters:
- description: Role ID
in: path
name: id
required: true
type: string
responses:
"204":
description: No Content
"400":
description: System role / unknown role
schema:
properties:
error:
type: string
type: object
"401":
description: Unauthorized
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Delete a role
tags:
- Roles
get:
parameters:
- description: Role ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
properties:
privileges:
items:
$ref: '#/definitions/PrivilegeKey'
type: array
role:
$ref: '#/definitions/Role'
type: object
"400":
description: Bad Request
schema:
properties:
error:
type: string
type: object
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Get a role with its privilege bundle
tags:
- Roles
put:
consumes:
- application/json
description: System roles cannot be renamed.
parameters:
- description: Role ID
in: path
name: id
required: true
type: string
- description: Role patch
in: body
name: request
required: true
schema:
$ref: '#/definitions/updateRoleRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/Role'
"400":
description: Bad Request
schema:
properties:
error:
type: string
type: object
"401":
description: Unauthorized
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Update role name / description
tags:
- Roles
/roles/{id}/holders:
get:
parameters:
- description: Role ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/UserRole'
type: array
"400":
description: Bad Request
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: List users holding the role
tags:
- Roles
/roles/{id}/privileges:
post:
consumes:
- application/json
description: The new privilege propagates to every current holder.
parameters:
- description: Role ID
in: path
name: id
required: true
type: string
- description: Privilege key
in: body
name: request
required: true
schema:
$ref: '#/definitions/rolePrivilegeRequest'
responses:
"204":
description: No Content
"400":
description: Unknown key
schema:
properties:
error:
type: string
type: object
"401":
description: Unauthorized
schema:
properties:
error:
type: string
type: object
"409":
description: Role already carries that privilege
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Add a privilege to a role
tags:
- Roles
/roles/{id}/privileges/{key}:
delete:
description: Removal propagates to every holder. Refuses to remove `privileges:grant`
or `roles:manage` if that would leave no role anywhere carrying it.
parameters:
- description: Role ID
in: path
name: id
required: true
type: string
- description: Privilege key
enum:
- core:clusters:read
- core:clusters:write
- core:allocations:read
- core:allocations:write
- core:projects:read
- core:projects:write
- core:users:read
- core:users:write
- core:organizations:read
- core:organizations:write
- core:traces:read
- core:privileges:grant
- core:roles:manage
in: path
name: key
required: true
type: string
responses:
"204":
description: No Content
"400":
description: Last-source guard or unknown key
schema:
properties:
error:
type: string
type: object
"401":
description: Unauthorized
schema:
properties:
error:
type: string
type: object
"404":
description: Role does not carry that privilege
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Remove a privilege from a role
tags:
- Roles
/user-identities:
post:
consumes:
- application/json
parameters:
- description: Identity payload
in: body
name: request
required: true
schema:
$ref: '#/definitions/UserIdentity'
produces:
- application/json
responses:
"201":
description: Created
schema:
$ref: '#/definitions/UserIdentity'
"400":
description: Bad Request
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Create a user identity
tags:
- User Identities
/user-identities/{id}:
delete:
parameters:
- description: Identity ID
in: path
name: id
required: true
type: string
responses:
"204":
description: No Content
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Delete a user identity
tags:
- User Identities
get:
parameters:
- description: Identity ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/UserIdentity'
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Get a user identity
tags:
- User Identities
put:
consumes:
- application/json
parameters:
- description: Identity ID
in: path
name: id
required: true
type: string
- description: Identity payload
in: body
name: request
required: true
schema:
$ref: '#/definitions/UserIdentity'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/UserIdentity'
"400":
description: Bad Request
schema:
properties:
error:
type: string
type: object
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Update a user identity
tags:
- User Identities
/user-identities/oidc-subjects/{oidcSub}:
get:
parameters:
- description: OIDC subject claim
in: path
name: oidcSub
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/UserIdentity'
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Get a user identity by its OIDC subject claim
tags:
- User Identities
/user-identities/sources/{source}/external/{externalId}:
get:
parameters:
- description: Identity source
in: path
name: source
required: true
type: string
- description: Identity's external ID at that source
in: path
name: externalId
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/UserIdentity'
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Get a user identity by source and external ID
tags:
- User Identities
/user/privileges:
get:
description: Effective set is direct grants UNION every privilege carried by
every role the caller holds.
produces:
- application/json
responses:
"200":
description: Effective privilege set
schema:
properties:
privileges:
items:
$ref: '#/definitions/PrivilegeKey'
type: array
type: object
"401":
description: Missing authenticated caller
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Get caller's effective privileges
tags:
- Caller
/users:
get:
parameters:
- description: Page size
in: query
name: limit
type: integer
- description: Page offset
in: query
name: offset
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/UserListResponse'
security:
- BearerAuth: []
summary: List users (paginated)
tags:
- Users
post:
consumes:
- application/json
parameters:
- description: User payload
in: body
name: request
required: true
schema:
$ref: '#/definitions/User'
produces:
- application/json
responses:
"201":
description: Created
schema:
$ref: '#/definitions/User'
"400":
description: Bad Request
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Create a user
tags:
- Users
/users/{id}:
get:
parameters:
- description: User ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/User'
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Get a user by ID
tags:
- Users
put:
consumes:
- application/json
parameters:
- description: User ID
in: path
name: id
required: true
type: string
- description: Name fields
in: body
name: request
required: true
schema:
$ref: '#/definitions/userNameUpdateRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/User'
"400":
description: Bad Request
schema:
properties:
error:
type: string
type: object
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Update a user's name
tags:
- Users
/users/{id}/change-requests:
get:
parameters:
- description: User ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/ComputeAllocationChangeRequest'
type: array
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: List change requests submitted by a user
tags:
- Compute Allocation Change Requests
/users/{id}/compute-allocation-memberships:
get:
parameters:
- description: User ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/ComputeAllocationMembership'
type: array
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: List a user's compute allocation memberships
tags:
- Compute Allocation Memberships
/users/{id}/compute-allocation-usages:
get:
parameters:
- description: User ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/ComputeAllocationUsage'
type: array
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: List usages submitted by a user
tags:
- Compute Allocation Usages
/users/{id}/compute-cluster-users:
get:
parameters:
- description: User ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/ComputeClusterUser'
type: array
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: List compute cluster users for a user
tags:
- Compute Cluster Users
/users/{id}/privileges:
get:
description: Returns DIRECT grants only (not role-derived). Combine with `GET
/users/{id}/roles` for the full picture.
parameters:
- description: User ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/UserPrivilege'
type: array
"400":
description: Bad Request
schema:
properties:
error:
type: string
type: object
"403":
description: Caller lacks privileges:grant
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: List a user's direct privilege grants
tags:
- Privileges
post:
consumes:
- application/json
parameters:
- description: User ID
in: path
name: id
required: true
type: string
- description: Grant payload
in: body
name: request
required: true
schema:
$ref: '#/definitions/grantPrivilegeRequest'
produces:
- application/json
responses:
"201":
description: Created
schema:
$ref: '#/definitions/UserPrivilege'
"400":
description: Bad request
schema:
properties:
error:
type: string
type: object
"401":
description: Missing or invalid bearer token
schema:
properties:
error:
type: string
type: object
"403":
description: Caller lacks privileges:grant
schema:
properties:
error:
type: string
type: object
"409":
description: Privilege already active for user
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Grant a direct privilege to a user
tags:
- Privileges
/users/{id}/privileges/{key}:
delete:
consumes:
- application/json
description: '`privileges:grant` itself cannot be self-revoked or revoked from
the last holder.'
parameters:
- description: User ID
in: path
name: id
required: true
type: string
- description: Privilege key
enum:
- core:clusters:read
- core:clusters:write
- core:allocations:read
- core:allocations:write
- core:projects:read
- core:projects:write
- core:users:read
- core:users:write
- core:organizations:read
- core:organizations:write
- core:traces:read
- core:privileges:grant
- core:roles:manage
in: path
name: key
required: true
type: string
- description: Optional reason
in: body
name: request
schema:
$ref: '#/definitions/revokePrivilegeRequest'
responses:
"204":
description: No Content
"400":
description: Self-revoke meta, last-holder, or unknown key
schema:
properties:
error:
type: string
type: object
"401":
description: Missing or invalid bearer token
schema:
properties:
error:
type: string
type: object
"403":
description: Caller lacks privileges:grant
schema:
properties:
error:
type: string
type: object
"404":
description: No active grant for that key
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Revoke a direct privilege from a user
tags:
- Privileges
/users/{id}/roles:
get:
parameters:
- description: User ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/UserRole'
type: array
"400":
description: Bad Request
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: List roles a user holds
tags:
- Role Assignments
post:
consumes:
- application/json
parameters:
- description: User ID
in: path
name: id
required: true
type: string
- description: Role assignment payload
in: body
name: request
required: true
schema:
$ref: '#/definitions/grantRoleRequest'
produces:
- application/json
responses:
"201":
description: Created
schema:
$ref: '#/definitions/UserRole'
"400":
description: Bad Request
schema:
properties:
error:
type: string
type: object
"401":
description: Unauthorized
schema:
properties:
error:
type: string
type: object
"409":
description: User already holds that role
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Grant a role to a user
tags:
- Role Assignments
/users/{id}/roles/{roleId}:
delete:
consumes:
- application/json
description: Refuses if revoking would leave no holder of `privileges:grant`
or `roles:manage` anywhere (last-meta-holder guard).
parameters:
- description: User ID
in: path
name: id
required: true
type: string
- description: Role ID
in: path
name: roleId
required: true
type: string
- description: Optional reason
in: body
name: request
schema:
$ref: '#/definitions/revokeRoleRequest'
responses:
"204":
description: No Content
"400":
description: Last-meta-holder guard
schema:
properties:
error:
type: string
type: object
"401":
description: Unauthorized
schema:
properties:
error:
type: string
type: object
"404":
description: User does not hold that role
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Revoke a role from a user
tags:
- Role Assignments
/users/{id}/status:
put:
consumes:
- application/json
parameters:
- description: User ID
in: path
name: id
required: true
type: string
- description: Status patch
in: body
name: request
required: true
schema:
properties:
status:
$ref: '#/definitions/UserStatus'
type: object
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/User'
"400":
description: Bad Request
schema:
properties:
error:
type: string
type: object
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Update a user's status
tags:
- Users
/users/{id}/user-identities:
get:
parameters:
- description: User ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/UserIdentity'
type: array
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: List a user's identities
tags:
- User Identities
/users/merge:
post:
consumes:
- application/json
description: Merges the retiring user into the surviving user; the surviving
record is returned.
parameters:
- description: Merge payload
in: body
name: request
required: true
schema:
$ref: '#/definitions/mergeUsersRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/User'
"400":
description: Bad Request
schema:
properties:
error:
type: string
type: object
"404":
description: Not Found
schema:
properties:
error:
type: string
type: object
security:
- BearerAuth: []
summary: Merge two users
tags:
- Users
securityDefinitions:
BearerAuth:
in: header
name: Authorization
type: apiKey
swagger: "2.0"