openapi: 3.2.0 info: title: Oxide Region Current User API description: API for interacting with the Oxide control plane contact: url: https://oxide.computer email: api@oxide.computer version: 2026081901.0.0 tags: - name: current-user description: Information pertaining to the current user. externalDocs: url: http://docs.oxide.computer/api/current-user paths: /v1/me: get: tags: - current-user summary: Fetch user for current session operationId: current_user_view responses: '200': description: successful operation content: application/json: schema: $ref: '#/components/schemas/CurrentUser' 4XX: $ref: '#/components/responses/Error' 5XX: $ref: '#/components/responses/Error' /v1/me/groups: get: tags: - current-user summary: Fetch current user's groups operationId: current_user_groups parameters: - in: query name: limit description: Maximum number of items returned by a single call schema: type: - integer - 'null' format: uint32 minimum: 1 - in: query name: page_token description: Token returned by previous call to retrieve the subsequent page schema: type: - string - 'null' - in: query name: sort_by schema: $ref: '#/components/schemas/IdSortMode' responses: '200': description: successful operation content: application/json: schema: $ref: '#/components/schemas/GroupResultsPage' 4XX: $ref: '#/components/responses/Error' 5XX: $ref: '#/components/responses/Error' x-dropshot-pagination: required: [] /v1/me/ssh-keys: get: tags: - current-user summary: List SSH public keys description: Lists SSH public keys for the currently authenticated user. operationId: current_user_ssh_key_list parameters: - in: query name: limit description: Maximum number of items returned by a single call schema: type: - integer - 'null' format: uint32 minimum: 1 - in: query name: page_token description: Token returned by previous call to retrieve the subsequent page schema: type: - string - 'null' - in: query name: sort_by schema: $ref: '#/components/schemas/NameOrIdSortMode' responses: '200': description: successful operation content: application/json: schema: $ref: '#/components/schemas/SshKeyResultsPage' 4XX: $ref: '#/components/responses/Error' 5XX: $ref: '#/components/responses/Error' x-dropshot-pagination: required: [] post: tags: - current-user summary: Create SSH public key description: Create an SSH public key for the currently authenticated user. operationId: current_user_ssh_key_create requestBody: content: application/json: schema: $ref: '#/components/schemas/SshKeyCreate' required: true responses: '201': description: successful creation content: application/json: schema: $ref: '#/components/schemas/SshKey' 4XX: $ref: '#/components/responses/Error' 5XX: $ref: '#/components/responses/Error' /v1/me/ssh-keys/{ssh_key}: get: tags: - current-user summary: Fetch SSH public key description: Fetch SSH public key associated with the currently authenticated user. operationId: current_user_ssh_key_view parameters: - in: path name: ssh_key description: Name or ID of the SSH key required: true schema: $ref: '#/components/schemas/NameOrId' responses: '200': description: successful operation content: application/json: schema: $ref: '#/components/schemas/SshKey' 4XX: $ref: '#/components/responses/Error' 5XX: $ref: '#/components/responses/Error' delete: tags: - current-user summary: Delete SSH public key description: Delete an SSH public key associated with the currently authenticated user. operationId: current_user_ssh_key_delete parameters: - in: path name: ssh_key description: Name or ID of the SSH key required: true schema: $ref: '#/components/schemas/NameOrId' responses: '204': description: successful deletion 4XX: $ref: '#/components/responses/Error' 5XX: $ref: '#/components/responses/Error' components: schemas: IdSortMode: description: 'Supported set of sort modes for scanning by id only. Currently, we only support scanning in ascending order.' oneOf: - description: Sort in increasing order of "id" type: string enum: - id_ascending SshKeyCreate: description: Create-time parameters for an `SshKey` type: object properties: description: type: string name: $ref: '#/components/schemas/Name' public_key: description: SSH public key, e.g., `"ssh-ed25519 AAAAC3NzaC..."` type: string required: - description - name - public_key GroupResultsPage: description: A single page of results type: object properties: items: description: list of items on this page of results type: array items: $ref: '#/components/schemas/Group' next_page: description: token used to fetch the next page of results (if any) type: - string - 'null' required: - items NameOrId: oneOf: - title: id allOf: - type: string format: uuid - title: name allOf: - $ref: '#/components/schemas/Name' SshKeyResultsPage: description: A single page of results type: object properties: items: description: list of items on this page of results type: array items: $ref: '#/components/schemas/SshKey' next_page: description: token used to fetch the next page of results (if any) type: - string - 'null' required: - items Name: title: A name unique within the parent collection description: Names must begin with a lower case ASCII letter, be composed exclusively of lowercase ASCII, uppercase ASCII, numbers, and '-', and may not end with a '-'. Names cannot be a UUID, but they may contain a UUID. They can be at most 63 characters long. type: string pattern: ^(?![0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)^[a-z]([a-zA-Z0-9-]*[a-zA-Z0-9]+)?$ minLength: 1 maxLength: 63 CurrentUser: description: Info about the current user type: object properties: display_name: description: Human-readable name that can identify the user type: string fleet_viewer: description: Whether this user has the viewer role on the fleet. Used by the web console to determine whether to show system-level UI. type: boolean id: type: string format: uuid silo_admin: description: Whether this user has the admin role on their silo. Used by the web console to determine whether to show admin-only UI elements. type: boolean silo_id: description: Uuid of the silo to which this user belongs type: string format: uuid silo_name: description: Name of the silo to which this user belongs. allOf: - $ref: '#/components/schemas/Name' time_created: description: Timestamp when this user was created type: string format: date-time time_modified: description: Timestamp when this user was last modified type: string format: date-time required: - display_name - fleet_viewer - id - silo_admin - silo_id - silo_name - time_created - time_modified Error: description: Error information from a response. type: object properties: error_code: type: string message: type: string request_id: type: string required: - message - request_id NameOrIdSortMode: description: Supported set of sort modes for scanning by name or id oneOf: - description: Sort in increasing order of "name" type: string enum: - name_ascending - description: Sort in decreasing order of "name" type: string enum: - name_descending - description: Sort in increasing order of "id" type: string enum: - id_ascending Group: description: View of a Group type: object properties: display_name: description: Human-readable name that can identify the group type: string id: type: string format: uuid silo_id: description: Uuid of the silo to which this group belongs type: string format: uuid time_created: description: Timestamp when this group was created type: string format: date-time time_modified: description: Timestamp when this group was last modified type: string format: date-time required: - display_name - id - silo_id - time_created - time_modified SshKey: description: View of an SSH Key type: object properties: description: description: Human-readable free-form text about a resource type: string id: description: Unique, immutable, system-controlled identifier for each resource type: string format: uuid name: description: Unique, mutable, user-controlled identifier for each resource allOf: - $ref: '#/components/schemas/Name' public_key: description: SSH public key, e.g., `"ssh-ed25519 AAAAC3NzaC..."` type: string silo_user_id: description: The user to whom this key belongs type: string format: uuid time_created: description: Timestamp when this resource was created type: string format: date-time time_modified: description: Timestamp when this resource was last modified type: string format: date-time required: - description - id - name - public_key - silo_user_id - time_created - time_modified responses: Error: description: Error content: application/json: schema: $ref: '#/components/schemas/Error'