openapi: 3.2.0 info: contact: email: lxd@lists.canonical.com name: LXD upstream url: https://github.com/canonical/lxd description: 'This is the REST API used by all LXD clients. Internal endpoints aren''t included in this documentation. The LXD API is available over both a local unix+http and remote https API. Authentication for local users relies on group membership and access to the unix socket. For remote users, the default authentication method is TLS client.' license: name: AGPL-3.0-only url: https://www.gnu.org/licenses/agpl-3.0.en.html title: LXD external REST Placement Groups API version: '1.0' tags: - name: Placement Groups paths: /1.0/placement-groups: get: description: Returns a list of placement groups (URLs). operationId: placement_groups_get parameters: - description: Project name example: default in: query name: project schema: type: string - description: Retrieve placement groups from all projects example: true in: query name: all-projects schema: type: boolean responses: '200': description: API endpoints content: application/json: schema: description: Sync response properties: metadata: description: List of endpoints example: "[\n \"/1.0/placement-groups/group1\",\n \"/1.0/placement-groups/group2\"\n]" items: type: string 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 placement groups tags: - Placement Groups post: description: Creates a new placement group. operationId: placement_groups_post parameters: - description: Project name example: default in: query name: project schema: type: string responses: '200': $ref: '#/components/responses/EmptySyncResponse' '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '500': $ref: '#/components/responses/InternalServerError' summary: Add a placement group tags: - Placement Groups requestBody: content: application/json: schema: $ref: '#/components/schemas/PlacementGroupsPost' description: The new placement group required: true /1.0/placement-groups/{name}: delete: description: Removes the placement group. operationId: placement_group_delete parameters: - description: Project name example: default in: query name: project schema: type: string responses: '200': $ref: '#/components/responses/EmptySyncResponse' '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '500': $ref: '#/components/responses/InternalServerError' summary: Delete the placement group tags: - Placement Groups get: description: Gets a specific placement group. operationId: placement_group_get parameters: - description: Project name example: default in: query name: project schema: type: string responses: '200': description: zone content: application/json: schema: description: Sync response properties: metadata: $ref: '#/components/schemas/PlacementGroup' 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 placement group tags: - Placement Groups patch: description: Updates a subset of the placement group configuration. operationId: placement_group_patch parameters: - description: Project name example: default in: query name: project schema: type: string responses: '200': $ref: '#/components/responses/EmptySyncResponse' '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '412': $ref: '#/components/responses/PreconditionFailed' '500': $ref: '#/components/responses/InternalServerError' summary: Partially update the placement group tags: - Placement Groups requestBody: content: application/json: schema: $ref: '#/components/schemas/PlacementGroupPut' description: placement group required: true post: description: Renames the placement group. operationId: placement_group_post parameters: - description: Project name example: default in: query name: project schema: type: string responses: '200': $ref: '#/components/responses/EmptySyncResponse' '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '500': $ref: '#/components/responses/InternalServerError' summary: Rename a placement group tags: - Placement Groups put: description: Updates the entire placement group. operationId: placement_group_put parameters: - description: Project name example: default in: query name: project schema: type: string responses: '200': $ref: '#/components/responses/EmptySyncResponse' '400': $ref: '#/components/responses/BadRequest' '403': $ref: '#/components/responses/Forbidden' '412': $ref: '#/components/responses/PreconditionFailed' '500': $ref: '#/components/responses/InternalServerError' summary: Update the placement group tags: - Placement Groups requestBody: content: application/json: schema: $ref: '#/components/schemas/PlacementGroupPut' description: placement group required: true /1.0/placement-groups?recursion=1: get: description: Returns a list of placement groups (structs). operationId: placement_groups_get_recursion1 parameters: - description: Project name example: default in: query name: project schema: type: string - description: Retrieve placement groups from all projects example: true in: query name: all-projects schema: type: boolean responses: '200': description: API endpoints content: application/json: schema: description: Sync response properties: metadata: description: List of placement groups items: $ref: '#/components/schemas/PlacementGroup' 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 placement groups tags: - Placement Groups components: responses: 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 EmptySyncResponse: description: Empty sync response content: application/json: schema: properties: status: example: Success type: string x-go-name: Status status_code: example: 200 format: int64 type: integer x-go-name: StatusCode type: example: sync type: string x-go-name: Type type: object PreconditionFailed: description: Precondition Failed content: application/json: schema: properties: error: example: precondition failed type: string x-go-name: Error error_code: example: 412 format: int64 type: integer x-go-name: ErrorCode type: example: error type: string x-go-name: Type type: object BadRequest: description: Bad Request content: application/json: schema: properties: error: example: bad request type: string x-go-name: Error error_code: example: 400 format: int64 type: integer x-go-name: ErrorCode type: example: error type: string x-go-name: Type type: object 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