openapi: 3.2.0 info: title: Canonical Permissions API version: '1.0' description: 'Operations tagged permissions across 2 of this provider''s published API definitions: canonical-lxd-rest-api-openapi.yml, canonical-test-observer-api-openapi.json. Each path carries the servers of the definition it was published in.' tags: - name: Permissions paths: /1.0/auth/permissions: get: description: Returns a list of available permissions. operationId: permissions_get parameters: - description: Project name example: default in: query name: project schema: type: string - description: Type of entity example: instance in: query name: entityType schema: type: string responses: '200': description: API endpoints content: application/json: schema: description: Sync response properties: metadata: description: List of permissions items: $ref: '#/components/schemas/Permission' type: array status: description: Status description example: Success type: string status_code: description: Status code example: 200 type: integer type: description: Response type example: sync type: string type: object '403': $ref: '#/components/responses/Forbidden' '500': $ref: '#/components/responses/InternalServerError' summary: Get the permissions tags: - Permissions /1.0/auth/permissions?recursion=1: get: description: Returns a list of available permissions (including groups that have those permissions). operationId: permissions_get_recursion1 parameters: - description: Project name example: default in: query name: project schema: type: string - description: Type of entity example: instance in: query name: entity-type schema: type: string responses: '200': description: API endpoints content: application/json: schema: description: Sync response properties: metadata: description: List of permissions items: $ref: '#/components/schemas/PermissionInfo' type: array status: description: Status description example: Success type: string status_code: description: Status code example: 200 type: integer type: description: Response type example: sync type: string type: object '403': $ref: '#/components/responses/Forbidden' '500': $ref: '#/components/responses/InternalServerError' summary: Get the permissions tags: - Permissions /v1/permissions: get: tags: - Permissions summary: Get Permissions operationId: get_permissions_v1_permissions_get responses: '200': description: Successful Response content: application/json: schema: {} x-permissions: - view_permission components: schemas: PermissionInfo: properties: entitlement: description: Entitlement is the entitlement define for the entity type. example: can_view type: string x-go-name: Entitlement entity_type: description: EntityType is the string representation of the entity type. example: instance type: string x-go-name: EntityType groups: description: Groups is a list of groups that have the Entitlement on the Entity. example: - foo - bar items: type: string type: array x-go-name: Groups url: description: EntityReference is the URL of the entity that the permission applies to. example: /1.0/instances/c1?project=default type: string x-go-name: EntityReference title: PermissionInfo expands a Permission to include any groups that may have the specified Permission. type: object x-go-package: github.com/canonical/lxd/shared/api Permission: properties: entitlement: description: Entitlement is the entitlement define for the entity type. example: can_view type: string x-go-name: Entitlement entity_type: description: EntityType is the string representation of the entity type. example: instance type: string x-go-name: EntityType url: description: EntityReference is the URL of the entity that the permission applies to. example: /1.0/instances/c1?project=default type: string x-go-name: EntityReference title: Permission represents a permission that may be granted to a group. type: object x-go-package: github.com/canonical/lxd/shared/api responses: Forbidden: description: Forbidden content: application/json: schema: properties: error: example: not authorized type: string x-go-name: Error error_code: example: 403 format: int64 type: integer x-go-name: ErrorCode type: example: error type: string x-go-name: Type type: object InternalServerError: description: Internal Server Error content: application/json: schema: properties: error: example: internal server error type: string x-go-name: Error error_code: example: 500 format: int64 type: integer x-go-name: ErrorCode type: example: error type: string x-go-name: Type type: object x-refined-from: - canonical-lxd-rest-api-openapi.yml - canonical-test-observer-api-openapi.json