{ "openapi": "3.1.0", "info": { "title": "chdrms_server", "description": "", "license": { "name": "" }, "version": "0.1.0" }, "servers": [ { "url": "/api/v1" } ], "paths": { "/asset-types": { "get": { "tags": [ "asset_type" ], "summary": "List all asset types.", "operationId": "list_asset_types", "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AssetTypeDto" } } } } }, "401": { "description": "Missing permission", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } }, "post": { "tags": [ "asset_type" ], "summary": "Create an asset type.", "operationId": "create_asset_type", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetType" } } }, "required": true }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetTypeDto" } } } }, "400": { "description": "Manufacturer by that ID not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "401": { "description": "Missing permission", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/asset-types/{id}": { "get": { "tags": [ "asset_type" ], "summary": "Get an asset type by its ID.", "operationId": "get_asset_type_by_id", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetTypeDto" } } } }, "401": { "description": "Missing permission", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Asset type by that ID not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } }, "put": { "tags": [ "asset_type" ], "summary": "Update all fields of an asset type by its ID.", "operationId": "update_asset_type_by_id", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetType" } } }, "required": true }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetTypeDto" } } } }, "401": { "description": "Missing permission", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Asset type by that ID not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } }, "delete": { "tags": [ "asset_type" ], "summary": "Delete an asset type by its ID.", "operationId": "delete_asset_type_by_id", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "204": { "description": "Success" }, "401": { "description": "Missing permission", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Asset type by that ID not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } }, "patch": { "tags": [ "asset_type" ], "summary": "Patch individual fields of an asset type by its ID.", "operationId": "patch_asset_type_by_id", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PatchAssetType" } } }, "required": true }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetTypeDto" } } } }, "401": { "description": "Missing permission", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Manufacturer by that ID not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/asset-types/{id}/assets": { "get": { "tags": [ "asset_type" ], "summary": "List assets of the specified type.", "operationId": "list_assets_of_asset_type", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AssetDto" } } } } }, "401": { "description": "Missing permission", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Asset type by that ID not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/assets": { "get": { "tags": [ "asset" ], "summary": "List all assets.", "operationId": "list_assets", "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AssetDto" } } } } }, "401": { "description": "Missing permission", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } }, "post": { "tags": [ "asset" ], "summary": "Create a new asset.", "operationId": "create_asset", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateAssetRequest" } } }, "required": true }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetDto" } } } }, "401": { "description": "Missing permission", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/assets/{id}": { "get": { "tags": [ "asset" ], "summary": "Get an asset by its ID or Tag.", "operationId": "get_asset_by_id_or_tag", "parameters": [ { "name": "id", "in": "path", "description": "Requested asset ID", "required": true } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetDto" } } } }, "401": { "description": "Missing permission", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Asset by that ID or Tag not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } }, "put": { "tags": [ "asset" ], "summary": "Update an asset by its ID.", "operationId": "update_asset_by_id", "parameters": [ { "name": "id", "in": "path", "description": "Requested asset ID", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateAssetRequest" } } }, "required": true }, "responses": { "204": { "description": "Success" }, "401": { "description": "Missing permission", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Asset by that ID not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } }, "delete": { "tags": [ "asset" ], "summary": "Delete an asset by its ID.", "operationId": "delete_asset_by_id", "parameters": [ { "name": "id", "in": "path", "description": "Requested asset ID", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "204": { "description": "Success" }, "401": { "description": "Missing permission", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Asset by that ID not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/assets/{id}/location": { "get": { "tags": [ "asset" ], "summary": "Get an asset's location", "operationId": "get_asset_location", "parameters": [ { "name": "id", "in": "path", "description": "Requested asset ID", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationDto" } } } }, "401": { "description": "Missing permission", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Asset by that ID not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } }, "post": { "tags": [ "asset" ], "summary": "Set an asset's location.", "operationId": "set_asset_location", "parameters": [ { "name": "id", "in": "path", "description": "Requested asset ID", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateAssetLocationRequest" } } }, "required": true }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetDto" } } } }, "401": { "description": "Missing permission", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Asset by that ID not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/auth/providers": { "get": { "tags": [ "auth" ], "summary": "List authentication providers.", "operationId": "list_auth_providers", "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ProviderInfo" } } } } } } } }, "/bundles": { "get": { "tags": [ "asset_bundle" ], "summary": "List all asset bundles.", "operationId": "list_asset_bundles", "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AssetBundleDto" } } } } }, "401": { "description": "Missing permission", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Asset bundle by that ID not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } }, "post": { "tags": [ "asset_bundle" ], "summary": "Create an asset bundle.", "operationId": "create_asset_bundle", "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AssetDto" } } } } }, "401": { "description": "Missing permission", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/bundles/{id}": { "get": { "tags": [ "asset_bundle" ], "summary": "Get an asset bundle by its ID.", "operationId": "get_asset_bundle_by_id", "parameters": [ { "name": "id", "in": "path", "description": "Requested asset bundle ID", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssetBundleDto" } } } }, "401": { "description": "Missing permission", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Asset bundle by that ID not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } }, "delete": { "tags": [ "asset_bundle" ], "summary": "Delete an asset bundle.", "operationId": "delete_asset_bundle", "parameters": [ { "name": "id", "in": "path", "description": "Requested asset bundle ID", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "204": { "description": "Success" }, "401": { "description": "Missing permission", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Asset bundle by that ID not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/bundles/{id}/assets": { "get": { "tags": [ "asset_bundle" ], "summary": "Get assets within an asset bundle.", "operationId": "get_assets_within_bundle_by_id", "parameters": [ { "name": "id", "in": "path", "description": "Requested asset bundle ID", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AssetDto" } } } } }, "401": { "description": "Missing permission", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Asset bundle by that ID not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/contact": { "get": { "tags": [ "contact" ], "summary": "Get this instance's contact details.", "operationId": "get_contact_details", "parameters": [ { "name": "asset", "in": "query", "description": "Referred asset ID or Tag.", "required": true } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ContactDetailsDto" } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/groups": { "get": { "tags": [ "group" ], "summary": "List groups.", "operationId": "list_groups", "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/GroupInfo" } } } } } } }, "post": { "tags": [ "group" ], "summary": "Create group.", "operationId": "create_group", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateGroup" } } }, "required": true }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GroupInfo" } } } } } } }, "/groups/{group_id}": { "get": { "tags": [ "group" ], "summary": "Get group.", "operationId": "get_group_by_id", "parameters": [ { "name": "group_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GroupInfo" } } } }, "404": { "description": "Not found" } } } }, "/groups/{group_id}/members": { "get": { "tags": [ "group" ], "summary": "List group members.", "operationId": "list_group_members", "parameters": [ { "name": "group_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GroupMembers" } } } }, "404": { "description": "Not found" } } }, "post": { "tags": [ "group" ], "summary": "Add user to group.", "operationId": "add_user_to_group", "parameters": [ { "name": "group_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModifyMember" } } }, "required": true }, "responses": { "201": { "description": "Success" }, "404": { "description": "Not found" } } }, "delete": { "tags": [ "group" ], "summary": "Remove user from group.", "operationId": "remove_user_from_group", "parameters": [ { "name": "group_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModifyMember" } } }, "required": true }, "responses": { "201": { "description": "Success" }, "404": { "description": "Not found" } } } }, "/groups/{group_id}/permissions": { "get": { "tags": [ "group" ], "summary": "List group permissions.", "operationId": "list_group_permissions", "parameters": [ { "name": "group_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ObjectPermissions" } } } } }, "404": { "description": "Not found" } } }, "post": { "tags": [ "group" ], "summary": "Grant permission to group.", "operationId": "add_permission_to_group", "parameters": [ { "name": "group_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PermissionRef" } } }, "required": true }, "responses": { "201": { "description": "Success" }, "404": { "description": "Not found" } } }, "delete": { "tags": [ "group" ], "summary": "Revoke permission from group.", "operationId": "remove_permission_from_group", "parameters": [ { "name": "group_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PermissionRef" } } }, "required": true }, "responses": { "201": { "description": "Success" }, "404": { "description": "Not found" } } } }, "/health": { "get": { "summary": "Get health of the API.", "operationId": "health", "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "string" } } } } } }, "head": { "summary": "Get health of the API.", "operationId": "health", "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { "type": "string" } } } } } } }, "/locations": { "get": { "tags": [ "location" ], "summary": "List all locations.", "operationId": "list_locations", "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/LocationDto" } } } } }, "401": { "description": "Missing permission", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } }, "post": { "tags": [ "location" ], "summary": "Create a location.", "operationId": "create_location", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Location" } } }, "required": true }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationDto" } } } }, "401": { "description": "Missing permission", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/locations/{id}": { "get": { "tags": [ "location" ], "summary": "Get a location by its ID.", "operationId": "get_location_by_id", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationDto" } } } }, "401": { "description": "Missing permission", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Location by that ID not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } }, "put": { "tags": [ "location" ], "summary": "Update all fields of a location by its ID.", "operationId": "update_location_by_id", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Location" } } }, "required": true }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationDto" } } } }, "401": { "description": "Missing permission", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Location by that ID not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } }, "delete": { "tags": [ "location" ], "summary": "Delete a location by its ID.", "operationId": "delete_location_by_id", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "204": { "description": "Success" }, "401": { "description": "Missing permission", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Location by that ID not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } }, "patch": { "tags": [ "location" ], "summary": "Patch individual fields of a location by its ID.", "operationId": "patch_location_by_id", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PatchLocation" } } }, "required": true }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LocationDto" } } } }, "401": { "description": "Missing permission", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Location by that ID not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/manufacturers": { "get": { "tags": [ "manufacturer" ], "summary": "List all manufacturers.", "operationId": "list_manufacturers", "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ManufacturerInfo" } } } } }, "401": { "description": "Missing permission", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } }, "post": { "tags": [ "manufacturer" ], "summary": "Create a manufacturer.", "operationId": "create_manufacturer", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Manufacturer" } } }, "required": true }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManufacturerInfo" } } } }, "401": { "description": "Missing permission", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/manufacturers/{id}": { "get": { "tags": [ "manufacturer" ], "summary": "Get a manufacturer by its ID.", "operationId": "get_manufacturer_by_id", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManufacturerInfo" } } } }, "401": { "description": "Missing permission", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Manufacturer by that ID not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } }, "put": { "tags": [ "manufacturer" ], "summary": "Update all fields of a manufacturer by its ID.", "operationId": "update_manufacturer_by_id", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Manufacturer" } } }, "required": true }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManufacturerInfo" } } } }, "401": { "description": "Missing permission", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Manufacturer by that ID not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } }, "delete": { "tags": [ "manufacturer" ], "summary": "Delete a manufacturer by its ID.", "operationId": "delete_manufacturer_by_id", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "204": { "description": "Success" }, "401": { "description": "Missing permission", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Manufacturer by that ID not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } }, "patch": { "tags": [ "manufacturer" ], "summary": "Patch individual fields of a manufacturer by its ID.", "operationId": "patch_manufacturer_by_id", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PatchManufacturer" } } }, "required": true }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ManufacturerInfo" } } } }, "401": { "description": "Missing permission", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Manufacturer by that ID not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/manufacturers/{id}/asset-types": { "get": { "tags": [ "manufacturer" ], "summary": "List all asset types of given manufacturer.", "operationId": "list_manufacturer_asset_types", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AssetTypeDto" } } } } }, "401": { "description": "Missing permission", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "Manufacturer by that ID not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } }, "/users": { "get": { "tags": [ "user" ], "summary": "List all users.", "operationId": "list_users", "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/UserDto" } } } } } } } }, "/users/@me": { "get": { "tags": [ "user" ], "summary": "Get current user.", "operationId": "get_current_user", "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserDto" } } } } } } }, "/users/@me/permissions": { "get": { "tags": [ "user" ], "summary": "Get the current user's permissions.", "operationId": "get_current_user_permissions", "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ObjectPermissions" } } } } } } } }, "/users/{id}": { "get": { "tags": [ "user" ], "summary": "Get a user by their ID.", "operationId": "get_user_by_id", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserDto" } } } }, "401": { "description": "Missing permission", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } }, "404": { "description": "User by that ID not found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } } } }, "components": { "schemas": { "AssetBundleDto": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "string", "format": "uuid" } } }, "AssetDto": { "type": "object", "required": [ "id", "type", "tag", "locations" ], "properties": { "alias": { "type": [ "string", "null" ], "description": "An optional alias for this asset. This is purely for convenience\nin searching for and identifying multiple instances of similar\nassets." }, "bundle": { "type": [ "string", "null" ], "format": "uuid", "description": "An optional bundle that this asset is within, as asset bundle\nidentifier." }, "id": { "type": "string", "format": "uuid", "description": "The unique identifier for this asset. This property is immutable." }, "locations": { "$ref": "#/components/schemas/AssetLocations" }, "notes": { "type": [ "string", "null" ], "description": "An optional field for miscellaneous notes about the asset." }, "tag": { "type": "string", "description": "The asset tag attached to this asset." }, "type": { "type": "string", "format": "uuid", "description": "The type of this asset, as an asset type identifier. This property\nis immutable." } } }, "AssetLocations": { "type": "object", "required": [ "current", "home" ], "properties": { "current": { "type": "string", "format": "uuid", "description": "The current location of an asset. This property is only mutable\nvia its dedicated field endpoints." }, "home": { "type": "string", "format": "uuid", "description": "The default/home location of this asset. This is used to mark where\nan asset *should* be when not assigned to a project." } } }, "AssetType": { "type": "object", "required": [ "name", "manufacturer" ], "properties": { "manufacturer": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "product_url": { "type": [ "string", "null" ], "format": "uri" }, "value": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/SchemaDecimal" } ] } } }, "AssetTypeDto": { "type": "object", "required": [ "id", "name", "manufacturer" ], "properties": { "id": { "type": "string", "format": "uuid" }, "manufacturer": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "product_url": { "type": [ "string", "null" ], "format": "uri" }, "value": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/SchemaDecimal" } ] } } }, "ContactDetailsDto": { "type": "object", "required": [ "links" ], "properties": { "links": { "type": "array", "items": { "$ref": "#/components/schemas/ContactDetailsLinkDto" } }, "name": { "type": [ "string", "null" ] } } }, "ContactDetailsLinkDto": { "type": "object", "required": [ "link" ], "properties": { "label": { "type": [ "string", "null" ] }, "link": { "type": "string", "format": "uri" } } }, "Coordinates": { "type": "array", "items": { "type": "number", "format": "double" }, "maxItems": 2, "minItems": 2 }, "CreateAssetRequest": { "type": "object", "required": [ "type", "tag", "locations" ], "properties": { "alias": { "type": [ "string", "null" ] }, "bundle": { "type": [ "string", "null" ], "format": "uuid" }, "locations": { "$ref": "#/components/schemas/AssetLocations" }, "notes": { "type": [ "string", "null" ] }, "tag": { "type": "string" }, "type": { "type": "string", "format": "uuid" } } }, "CreateGroup": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string" } } }, "ErrorResponse": { "type": "object", "required": [ "error" ], "properties": { "error": { "type": "string" } } }, "GroupInfo": { "type": "object", "required": [ "id", "name" ], "properties": { "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" } } }, "GroupMembers": { "type": "object", "required": [ "members" ], "properties": { "members": { "type": "array", "items": { "$ref": "#/components/schemas/UserDto" } } } }, "Location": { "type": "object", "required": [ "name" ], "properties": { "coordinates": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/Coordinates" } ] }, "description": { "type": [ "string", "null" ] }, "name": { "type": "string" } } }, "LocationDto": { "type": "object", "required": [ "id", "name" ], "properties": { "coordinates": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/Coordinates" } ] }, "description": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" } } }, "Manufacturer": { "type": "object", "required": [ "name" ], "properties": { "description": { "type": [ "string", "null" ] }, "email": { "type": [ "string", "null" ] }, "name": { "type": "string" }, "phone": { "type": [ "string", "null" ] }, "website": { "type": [ "string", "null" ] } } }, "ManufacturerInfo": { "type": "object", "required": [ "id", "name" ], "properties": { "description": { "type": [ "string", "null" ] }, "email": { "type": [ "string", "null" ] }, "id": { "type": "string", "format": "uuid" }, "name": { "type": "string" }, "phone": { "type": [ "string", "null" ] }, "website": { "type": [ "string", "null" ] } } }, "ModifyMember": { "type": "object", "required": [ "member" ], "properties": { "member": { "type": "string", "format": "uuid" } } }, "ObjectPermissions": { "type": "object", "required": [ "name", "actions" ], "properties": { "actions": { "type": "array", "items": { "type": "string" } }, "name": { "type": "string" } } }, "PatchAssetType": { "type": "object", "properties": { "manufacturer": { "type": [ "string", "null" ], "format": "uuid" }, "name": { "type": [ "string", "null" ] }, "product_url": { "type": [ "string", "null" ] }, "value": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/SchemaDecimal" } ] } } }, "PatchLocation": { "type": "object", "properties": { "coordinates": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/Coordinates" } ] }, "description": { "type": [ "string", "null" ] }, "name": { "type": [ "string", "null" ] } } }, "PatchManufacturer": { "type": "object", "properties": { "description": { "type": [ "string", "null" ] }, "email": { "type": [ "string", "null" ] }, "name": { "type": [ "string", "null" ] }, "phone": { "type": [ "string", "null" ] }, "website": { "type": [ "string", "null" ] } } }, "PermissionRef": { "type": "object", "required": [ "object", "action" ], "properties": { "action": { "type": "string" }, "object": { "type": "string" } } }, "ProviderInfo": { "type": "object", "required": [ "id", "name" ], "properties": { "id": { "type": "string" }, "name": { "type": "string" } } }, "SchemaDecimal": { "type": "string" }, "UpdateAssetLocationRequest": { "type": "object", "required": [ "location" ], "properties": { "location": { "type": "string", "format": "uuid" } } }, "UpdateAssetLocations": { "type": "object", "required": [ "home" ], "properties": { "home": { "type": "string", "format": "uuid" } } }, "UpdateAssetRequest": { "type": "object", "required": [ "tag", "locations" ], "properties": { "alias": { "type": [ "string", "null" ] }, "bundle": { "type": [ "string", "null" ], "format": "uuid" }, "locations": { "$ref": "#/components/schemas/UpdateAssetLocations" }, "notes": { "type": [ "string", "null" ] }, "tag": { "type": "string" } } }, "UserDto": { "type": "object", "required": [ "id", "email", "name", "is_admin" ], "properties": { "email": { "type": "string" }, "id": { "type": "string", "format": "uuid" }, "is_admin": { "type": "boolean" }, "name": { "type": "string" } } } } }, "tags": [ { "name": "user", "description": "Users" }, { "name": "auth", "description": "Auth" }, { "name": "group", "description": "Groups" }, { "name": "manufacturer", "description": "Manufacturers" }, { "name": "asset_type", "description": "Asset Types" }, { "name": "location", "description": "Locations" }, { "name": "asset", "description": "Assets" }, { "name": "asset_bundle", "description": "Asset Bundles" }, { "name": "contact", "description": "Contact" } ] }