{"openapi": "3.0.2", "info": {"title": "Inmanta Service Orchestrator", "version": "7.4.5", "description": "Back to <a href='./index.html'>Main documentation</a> for more information"}, "servers": [{"url": "http://<inmanta-server-address>"}, {"url": "/"}], "paths": {"/api/v2/docs": {"get": {"operationId": "get_api_docs", "summary": "Get the OpenAPI definition of the API", "parameters": [{"description": "Use 'openapi' to get the schema in json format, leave empty or use 'swagger' to get the Swagger-UI view", "schema": {"$ref": "#/components/schemas/ApiDocsFormat", "default": "swagger", "nullable": true}, "name": "format", "in": "query"}, {"description": "If provided, use this token to authorize the request instead of the value from the authorization header.", "schema": {"type": "string", "nullable": true}, "name": "token", "in": "query"}], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"type": "object", "properties": {"links": {"title": "Links", "type": "object", "additionalProperties": {"type": "string"}, "nullable": true}, "metadata": {"title": "Metadata", "type": "object", "properties": {"warnings": {"title": "Warnings", "type": "array", "items": {"type": "string"}}}, "nullable": true}, "data": {"anyOf": [{"$ref": "#/components/schemas/OpenAPI"}, {"type": "string"}]}}}}}}}, "tags": ["core.server"]}}, "/api/v1/serverstatus": {"get": {"operationId": "get_server_status", "summary": "Get the status of the server", "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/StatusResponse"}}}}}}}, "tags": ["core.server"]}}, "/api/v1/notify/<id>": {"get": {"operationId": "notify_change_get", "summary": "Simplified GET version of the POST method", "parameters": [{"description": "The id of the environment.", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "id", "in": "path"}, {"description": "Optional. Indicates whether to update the model code and modules. Defaults to true.", "schema": {"type": "boolean", "default": true}, "name": "update", "in": "query"}], "responses": {"200": {"description": ""}}, "tags": ["core.server"]}, "post": {"operationId": "notify_change", "summary": "Notify the server that the repository of the environment with the given id, has changed.", "parameters": [{"description": "The id of the environment", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "id", "in": "path"}], "requestBody": {"description": "* **metadata:** Optional. The metadata that indicates the source of the compilation trigger.\n* **update:** Optional. Update the model code and modules. Default value is true\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"update": {"type": "boolean", "default": true}, "metadata": {"type": "object", "default": {}}}}}}, "required": true}, "responses": {"200": {"description": ""}}, "tags": ["core.server"]}, "head": {"operationId": "is_compiling", "summary": "Is a compiler running for the given environment", "parameters": [{"description": "The environment id", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "id", "in": "path"}], "responses": {"200": {"description": ""}}, "tags": ["core.compiler"]}}, "/api/v2/agent/<name>/<action>": {"post": {"operationId": "agent_action", "summary": "Execute an action on an agent", "parameters": [{"description": "The environment this agent is defined in.", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The name of the agent.", "required": true, "schema": {"type": "string"}, "name": "name", "in": "path"}, {"description": "The type of action that should be executed on an agent.\nPause and unpause can only be used when the environment is not halted,\nwhile the on_resume actions can only be used when the environment is halted.\n* pause: A paused agent cannot execute any deploy operations.\n* unpause: A unpaused agent will be able to execute deploy operations.\n* keep_paused_on_resume: The agent will still be paused when the environment is resumed\n* unpause_on_resume: The agent will be unpaused when the environment is resumed", "required": true, "schema": {"$ref": "#/components/schemas/AgentAction"}, "name": "action", "in": "path"}], "requestBody": {"description": "", "content": {"application/json": {"schema": {"type": "object", "properties": {}}}}, "required": true}, "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}, "403": {"description": "The given environment has been halted and the action is pause/unpause,\nor the environment is not halted and the action is related to the on_resume behavior"}}, "tags": ["core.agentmanager"]}}, "/api/v2/agents/<action>": {"post": {"operationId": "all_agents_action", "summary": "Execute an action on all agents in the given environment.", "parameters": [{"description": "The environment of the agents.", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The type of action that should be executed on the agents.\nPause and unpause can only be used when the environment is not halted,\nwhile the on_resume actions can only be used when the environment is halted.\n* pause: A paused agent cannot execute any deploy operations.\n* unpause: A unpaused agent will be able to execute deploy operations.\n* keep_paused_on_resume: The agents will still be paused when the environment is resumed\n* unpause_on_resume: The agents will be unpaused when the environment is resumed", "required": true, "schema": {"$ref": "#/components/schemas/AgentAction"}, "name": "action", "in": "path"}], "requestBody": {"description": "", "content": {"application/json": {"schema": {"type": "object", "properties": {}}}}, "required": true}, "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}, "403": {"description": "The given environment has been halted and the action is pause/unpause,\nor the environment is not halted and the action is related to the on_resume behavior"}}, "tags": ["core.agentmanager"]}}, "/api/v1/agentproc/<id>": {"get": {"operationId": "get_agent_process", "summary": "Return a detailed report for a node", "parameters": [{"description": "The session id of the agent", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "id", "in": "path"}], "responses": {"200": {"description": "The requested node"}}, "tags": ["core.agentmanager"]}}, "/api/v2/agents/process/<id>": {"get": {"operationId": "get_agent_process_details", "summary": "Get the details of an agent process", "parameters": [{"description": "Id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The id of the specific agent process", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "id", "in": "path"}, {"description": "Whether to include a report from the agent or not", "schema": {"type": "boolean", "default": false}, "name": "report", "in": "query"}], "responses": {"200": {"description": "The details of an agent process", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/AgentProcess"}}}}}}, "404": {"description": "This exception is raised when the referenced environment or agent process is not found"}}, "tags": ["core.agentmanager"]}}, "/api/v2/agents": {"get": {"operationId": "get_agents", "summary": "Get all of the agents in the given environment", "parameters": [{"description": "The id of the environment the agents should belong to.", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "Limit the number of agents that are returned.", "schema": {"type": "integer", "nullable": true}, "name": "limit", "in": "query"}, {"description": "The lower limit for the order by column (exclusive).", "schema": {"nullable": true, "anyOf": [{"type": "string", "format": "date-time"}, {"type": "boolean"}, {"type": "string"}]}, "name": "start", "in": "query"}, {"description": "The upper limit for the order by column (exclusive).\nOnly one of 'start' and 'end' should be specified at the same time.", "schema": {"nullable": true, "anyOf": [{"type": "string", "format": "date-time"}, {"type": "boolean"}, {"type": "string"}]}, "name": "end", "in": "query"}, {"description": "The name to use as a continuation token for paging, in combination with the 'start' value,\nbecause the order by column might contain non-unique values.", "schema": {"type": "string", "nullable": true}, "name": "first_id", "in": "query"}, {"description": "The name to use as a continuation token for paging, in combination with the 'end' value,\nbecause the order by column might contain non-unique values.\nOnly one of 'start' and 'end' should be specified at the same time.", "schema": {"type": "string", "nullable": true}, "name": "last_id", "in": "query"}, {"description": "Filter the list of returned agents.\nFiltering by 'name', 'process_name' and 'status' is supported.", "schema": {"type": "object", "additionalProperties": {"type": "array", "items": {"type": "string"}}, "nullable": true}, "name": "filter", "in": "query"}, {"description": "Return the results sorted according to the parameter value.\nSorting by 'name', 'process_name', 'status', 'paused' and 'last_failover' is supported.\nThe following orders are supported: 'asc', 'desc'", "schema": {"type": "string", "default": "name.asc"}, "name": "sort", "in": "query"}], "responses": {"200": {"description": "A list of all matching agents", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/Agent"}}}}}}}, "404": {"description": "This exception is raised when the referenced environment is not found"}, "400": {"description": "When the parameters used for filtering, sorting or paging are not valid"}}, "tags": ["core.agentmanager"]}}, "/api/v1/agentproc": {"get": {"operationId": "list_agent_processes", "summary": "Return a list of all nodes and the agents for these nodes", "parameters": [{"description": "Optional. An optional environment. If set, only the agents that belong to this environment are returned", "schema": {"type": "string", "format": "uuid", "nullable": true}, "name": "environment", "in": "query"}, {"description": "Optional. if true show expired processes, otherwise only living processes are shown. True by default", "schema": {"type": "boolean", "default": true}, "name": "expired", "in": "query"}, {"description": "Optional. Agent processes after start (sorted by sid in ASC)", "schema": {"type": "string", "format": "uuid", "nullable": true}, "name": "start", "in": "query"}, {"description": "Optional. Agent processes before end (sorted by sid in ASC)", "schema": {"type": "string", "format": "uuid", "nullable": true}, "name": "end", "in": "query"}, {"description": "Optional. Maximum number of results, up to a maximum of 1000\nIf None, a default limit (set to 1000) is applied.", "schema": {"type": "integer", "nullable": true}, "name": "limit", "in": "query"}], "responses": {"200": {"description": "A list of nodes"}, "400": {"description": "limit parameter can not exceed 1000"}, "404": {"description": "The given environment id does not exist!"}}, "tags": ["core.agentmanager"]}}, "/api/v1/agent": {"get": {"operationId": "list_agents", "summary": "List all agent for an environment", "parameters": [{"description": "The environment the agents are defined in", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "Optional. Agent after start (sorted by name in ASC)", "schema": {"type": "string", "nullable": true}, "name": "start", "in": "query"}, {"description": "Optional. Agent before end (sorted by name in ASC)", "schema": {"type": "string", "nullable": true}, "name": "end", "in": "query"}, {"description": "Optional. Maximum number of results, up to a maximum of 1000.\nIf None, a default limit (set to 1000) is applied.", "schema": {"type": "integer", "nullable": true}, "name": "limit", "in": "query"}], "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}, "400": {"description": "limit parameter can not exceed 1000"}, "404": {"description": "The given environment id does not exist!"}}, "tags": ["core.agentmanager"]}}, "/api/v1/agent/<id>": {"post": {"operationId": "trigger_agent", "summary": "Request the server to reload an agent", "parameters": [{"description": "The environment this agent is defined in", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The name of the agent", "required": true, "schema": {"type": "string"}, "name": "id", "in": "path"}], "requestBody": {"description": "", "content": {"application/json": {"schema": {"type": "object", "properties": {}}}}, "required": true}, "responses": {"200": {"description": "The requested node", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}}, "tags": ["core.agentmanager"]}}, "/api/v2/compilereport/<id>": {"get": {"operationId": "compile_details", "parameters": [{"description": "The id of the environment in which the compilation process occurred.", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The id of the compile for which the details are being requested.", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "id", "in": "path"}], "responses": {"200": {"description": "The details of a compile", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/CompileDetails"}}}}}}, "404": {"description": "This exception is raised when the referenced environment or compile is not found"}}, "tags": ["core.compiler"]}}, "/api/v2/compiledata/<id>": {"get": {"operationId": "get_compile_data", "summary": "Get the compile data for the given compile request.", "parameters": [{"description": "The id of the compile.", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "id", "in": "path"}], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/CompileData", "nullable": true}}}}}}}, "tags": ["core.compiler"]}}, "/api/v1/compilequeue": {"get": {"operationId": "get_compile_queue", "summary": "Get the current compiler queue on the server, ordered by increasing `requested` timestamp.", "parameters": [{"description": "The id of the environment for which to retrieve the compile queue.", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}], "responses": {"200": {"description": "A list of CompileRun objects representing the current state of the compiler queue,\nwith each entry detailing a specific compile run.", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"queue": {"type": "array", "items": {"$ref": "#/components/schemas/CompileRun"}}}}}}}}, "tags": ["core.compiler"]}}, "/api/v2/compilereport": {"get": {"operationId": "get_compile_reports", "summary": "Get the compile reports from an environment.", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "Limit the number of instances that are returned", "schema": {"type": "integer", "nullable": true}, "name": "limit", "in": "query"}, {"description": "The id to use as a continuation token for paging, in combination with the 'start' value,\nbecause the order by column might contain non-unique values", "schema": {"type": "string", "format": "uuid", "nullable": true}, "name": "first_id", "in": "query"}, {"description": "The id to use as a continuation token for paging, in combination with the 'end' value,\nbecause the order by column might contain non-unique values", "schema": {"type": "string", "format": "uuid", "nullable": true}, "name": "last_id", "in": "query"}, {"description": "The lower limit for the order by column (exclusive).\nOnly one of 'start' and 'end' should be specified at the same time.", "schema": {"type": "string", "format": "date-time", "nullable": true}, "name": "start", "in": "query"}, {"description": "The upper limit for the order by column (exclusive).\nOnly one of 'start' and 'end' should be specified at the same time.", "schema": {"type": "string", "format": "date-time", "nullable": true}, "name": "end", "in": "query"}, {"description": "Filter the list of returned compile reports.\nFilters should be specified with the syntax `?filter.<filter_key>=value`,\nfor example `?filter.success=True`\nIt's also possible to provide multiple values for the same filter, in this case resources are returned,\nif they match any of these filter values.\nFor example: `?filter.requested=ge:2021-08-18T09:21:30.568353&filter.requested=lt:2021-08-18T10:21:30.568353`\nreturns compile reports that were requested between the specified dates.\nMultiple different filters narrow the results however (they are treated as an 'AND' operator).\nFor example `?filter.success=True&filter.completed=True` returns compile reports\nthat are completed and successful.\nThe following options are available:\nsuccess: whether the compile was successful or not\nstarted: whether the compile has been started or not\ncompleted: whether the compile has been completed or not\n\nrequested: return the logs matching the timestamp constraints. Valid constraints are of the form\n    \"<lt|le|gt|ge>:<x>\". The expected format is YYYY-MM-DDTHH:mm:ss.ssssss, so an ISO-8601 datetime string,\n    in UTC timezone. Specifying microseconds is optional. For example:\n    `?filter.requested=ge:2021-08-18T09:21:30.568353&filter.requested=lt:2021-08-18T10:21:30`.\n    Multiple constraints can be specified, in which case only compile reports that match all constraints will be\n    returned.", "schema": {"type": "object", "additionalProperties": {"type": "array", "items": {"type": "string"}}, "nullable": true}, "name": "filter", "in": "query"}, {"description": "Return the results sorted according to the parameter value.\nIt should follow the pattern `?sort=<attribute_to_sort_by>.<order>`, for example `?sort=requested.desc`\n(case insensitive).\nOnly sorting by the `requested` timestamp is supported.\nThe following orders are supported: 'asc', 'desc'", "schema": {"type": "string", "default": "requested.desc"}, "name": "sort", "in": "query"}], "responses": {"200": {"description": "A list of all matching compile reports", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/CompileReport"}}}}}}}, "404": {"description": "This exception is raised when the referenced environment is not found"}, "400": {"description": "When the parameters used for filtering, sorting or paging are not valid"}}, "tags": ["core.compiler"]}}, "/api/v1/compilereport/<id>": {"get": {"operationId": "get_report", "summary": "Get a compile report from the server", "parameters": [{"description": "The id of the compile and its reports to fetch.", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "id", "in": "path"}], "responses": {"200": {"description": ""}}, "tags": ["core.compiler"]}}, "/api/v1/compilereport": {"get": {"operationId": "get_reports", "summary": "Return compile reports newer then start", "parameters": [{"description": "The id of the environment to get a report from", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "Optional. Reports after start", "schema": {"type": "string", "nullable": true}, "name": "start", "in": "query"}, {"description": "Optional. Reports before end", "schema": {"type": "string", "nullable": true}, "name": "end", "in": "query"}, {"description": "Optional. Maximum number of results, up to a maximum of 1000\nIf None, a default limit (set to 1000) is applied.", "schema": {"type": "integer", "nullable": true}, "name": "limit", "in": "query"}], "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}}, "tags": ["core.compiler"]}}, "/api/v1/project": {"get": {"operationId": "list_projects", "summary": "Returns a list of projects ordered alphabetically by name. The environments within each project are also sorted by name.", "responses": {"200": {"description": ""}}, "tags": ["core.project"]}, "put": {"operationId": "create_project", "summary": "Create a new project", "requestBody": {"description": "* **name:** The name of the project\n* **project_id:** Optional. A unique uuid, when it is not provided the server generates one\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"name": {"type": "string"}, "project_id": {"type": "string", "format": "uuid", "nullable": true}}}}}, "required": true}, "responses": {"200": {"description": ""}}, "tags": ["core.project"]}}, "/api/v1/project/<id>": {"get": {"operationId": "get_project", "summary": "Get a project and a list of the ids of all environments.", "parameters": [{"description": "The id of the project to retrieve.", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "id", "in": "path"}], "responses": {"200": {"description": ""}}, "tags": ["core.project"]}, "post": {"operationId": "modify_project", "summary": "Modify the given project.", "parameters": [{"description": "The id of the project to modify.", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "id", "in": "path"}], "requestBody": {"description": "* **name:** The new name for the project.\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"name": {"type": "string"}}}}}, "required": true}, "responses": {"200": {"description": ""}}, "tags": ["core.project"]}, "delete": {"operationId": "delete_project", "summary": "Delete the given project and all related data.", "parameters": [{"description": "The id of the project to be deleted.", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "id", "in": "path"}], "responses": {"200": {"description": ""}}, "tags": ["core.project"]}}, "/api/v2/project": {"get": {"operationId": "project_list", "summary": "Returns a list of projects ordered alphabetically by name. The environments within each project are also sorted by name.", "parameters": [{"description": "Whether to include the icon and description of the environments in the results", "schema": {"type": "boolean", "default": false}, "name": "environment_details", "in": "query"}], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/Project"}}}}}}}}, "tags": ["core.project"]}, "put": {"operationId": "project_create", "summary": "Create a new project", "requestBody": {"description": "* **name:** The name of the project\n* **project_id:** A unique uuid, when it is not provided the server generates one\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"name": {"type": "string"}, "project_id": {"type": "string", "format": "uuid", "nullable": true}}}}}, "required": true}, "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/Project"}}}}}}}, "tags": ["core.project"]}}, "/api/v2/project/<id>": {"get": {"operationId": "project_get", "summary": "Get a project and a list of the environments under this project", "parameters": [{"description": "The id for which the project's details are being requested.", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "id", "in": "path"}, {"description": "Whether to include the icon and description of the environments in the results", "schema": {"type": "boolean", "default": false}, "name": "environment_details", "in": "query"}], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/Project"}}}}}}}, "tags": ["core.project"]}, "post": {"operationId": "project_modify", "summary": "Rename the given project", "parameters": [{"description": "The id of the project to be modified.", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "id", "in": "path"}], "requestBody": {"description": "* **name:** The new name for the project. This string value will replace the current name of the project.\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"name": {"type": "string"}}}}}, "required": true}, "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/Project"}}}}}}}, "tags": ["core.project"]}, "delete": {"operationId": "project_delete", "summary": "Delete the given project and all related data", "parameters": [{"description": "The id of the project to be deleted.", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "id", "in": "path"}], "responses": {"200": {"description": ""}}, "tags": ["core.project"]}}, "/api/v1/decommission/<id>": {"delete": {"operationId": "clear_environment", "summary": "Clears an environment by removing most of its associated data.", "description": "This method deletes various components associated with the specified environment from the database,\nincluding agents, compile data, parameters, notifications, code, resources, and configuration models.\nHowever, it retains the entry in the Environment table itself and settings are kept.\nThe environment will be temporarily halted during the decommissioning process.", "parameters": [{"description": "The id of the environment to be cleared.", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "id", "in": "path"}], "responses": {"200": {"description": ""}, "404": {"description": "The given environment doesn't exist."}, "403": {"description": "The given environment is protected."}}, "tags": ["core.environment"]}}, "/api/v1/environment": {"get": {"operationId": "list_environments", "summary": "Returns a list of environments. The results are sorted by (project id, environment name, environment id).", "responses": {"200": {"description": ""}}, "tags": ["core.environment"]}, "put": {"operationId": "create_environment", "summary": "Create a new environment", "requestBody": {"description": "* **branch:** Optional. The name of the branch in the repository.\n* **environment_id:** Optional. A unique environment id, if none an id is allocated by the server.\n* **name:** The name of the environment.\n* **project_id:** The id of the project this environment belongs to\n* **repository:** Optional. The URL of the repository.\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"project_id": {"type": "string", "format": "uuid"}, "name": {"type": "string"}, "repository": {"type": "string", "nullable": true}, "branch": {"type": "string", "nullable": true}, "environment_id": {"type": "string", "format": "uuid", "nullable": true}}}}}, "required": true}, "responses": {"200": {"description": ""}}, "tags": ["core.environment"]}}, "/api/v1/environment_auth": {"post": {"operationId": "create_token", "summary": "Create or get a new token for the given client types.", "parameters": [{"description": "The environment id.", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}], "requestBody": {"description": "* **client_types:** The client types for which this token is valid (api, agent, compiler).\n* **idempotent:** Optional. The token should be idempotent, meaning it does not have an expire or issued at set,\nso its value will not change.\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"client_types": {"type": "array", "items": {}}, "idempotent": {"type": "boolean", "default": true}}}}}, "required": true}, "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}}, "tags": ["core.environment"]}}, "/api/v1/environment/<id>": {"get": {"operationId": "get_environment", "summary": "Get an environment and all versions associated.", "parameters": [{"description": "The id of the environment to return.", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "id", "in": "path"}, {"description": "Optional. If provided and greater than 0, include this many of the most recent versions for this\nenvironment, ordered in descending order of their version number.\nIf not provided or 0, no version information is included.", "schema": {"type": "integer", "nullable": true}, "name": "versions", "in": "query"}, {"description": "Optional. If provided and greater than 0, include a summary of the resources in the environment.", "schema": {"type": "integer", "nullable": true}, "name": "resources", "in": "query"}], "responses": {"200": {"description": ""}}, "tags": ["core.environment"]}, "post": {"operationId": "modify_environment", "summary": "Modify the given environment.", "parameters": [{"description": "The id of the environment to modify.", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "id", "in": "path"}], "requestBody": {"description": "* **branch:** Optional. The name of the branch in the repository.\nIf 'repository' or 'branch' is provided as None, the corresponding attribute of the environment remains unchanged.\n* **name:** The new name for the environment.\n* **repository:** Optional. The URL of the repository.\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"name": {"type": "string"}, "repository": {"type": "string", "nullable": true}, "branch": {"type": "string", "nullable": true}}}}}, "required": true}, "responses": {"200": {"description": ""}}, "tags": ["core.environment"]}, "delete": {"operationId": "delete_environment", "summary": "Delete the given environment and all related data.", "parameters": [{"description": "The id of the environment to be deleted.", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "id", "in": "path"}], "responses": {"200": {"description": ""}, "404": {"description": "The given environment doesn't exist."}, "403": {"description": "The given environment is protected."}}, "tags": ["core.environment"]}}, "/api/v1/environment_settings/<id>": {"get": {"operationId": "get_setting", "summary": "Get the value of a setting.", "parameters": [{"description": "The id of the environment.", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The id of the setting to retrieve.", "required": true, "schema": {"type": "string"}, "name": "id", "in": "path"}], "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}}, "tags": ["core.environment"]}, "post": {"operationId": "set_setting", "summary": "Set a value for a setting.", "parameters": [{"description": "The id of the environment.", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The id of the setting to set.", "required": true, "schema": {"type": "string"}, "name": "id", "in": "path"}], "requestBody": {"description": "* **value:** The value to set for the setting.\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"value": {"anyOf": [{"type": "string", "format": "uuid"}, {"type": "boolean"}, {"type": "integer"}, {"type": "number"}, {"type": "string", "format": "date-time"}, {"type": "string"}, {"type": "object"}]}}}}}, "required": true}, "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}}, "tags": ["core.environment"]}, "delete": {"operationId": "delete_setting", "summary": "Restore the given setting to its default value.", "parameters": [{"description": "The id of the environment from which the setting is to be deleted.", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The key of the setting to delete.", "required": true, "schema": {"type": "string"}, "name": "id", "in": "path"}], "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}}, "tags": ["core.environment"]}}, "/api/v2/decommission/<id>": {"delete": {"operationId": "environment_clear", "summary": "Clear all data from this environment. The environment will be temporarily halted during the decommissioning process.", "parameters": [{"description": "The uuid of the environment.", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "id", "in": "path"}], "responses": {"200": {"description": ""}, "404": {"description": "The given environment doesn't exist."}, "403": {"description": "The given environment is protected."}}, "tags": ["core.environment"]}}, "/api/v2/environment": {"get": {"operationId": "environment_list", "summary": "Returns a list of environments", "parameters": [{"description": "Whether to include the icon and description of the environments in the results", "schema": {"type": "boolean", "default": false}, "name": "details", "in": "query"}], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/Environment"}}}}}}}}, "tags": ["core.environment"]}, "put": {"operationId": "environment_create", "summary": "Create a new environment", "requestBody": {"description": "* **branch:** The name of the branch in the repository\n* **description:** The description of the environment, maximum 255 characters\n* **environment_id:** A unique environment id, if none an id is allocated by the server\n* **icon:** The data-url of the icon of the environment. It should follow the pattern `<mime-type>;base64,<image>`, where\n<mime-type> is one of: 'image/png', 'image/jpeg', 'image/webp', 'image/svg+xml', and <image> is the image in\nthe format matching the specified mime-type, and base64 encoded.\nThe length of the whole string should be maximum 64 kb.\n* **name:** The name of the environment. The name should be unique for each project.\n* **project_id:** The id of the project this environment belongs to\n* **repository:** The url (in git form) of the repository\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"project_id": {"type": "string", "format": "uuid"}, "name": {"type": "string"}, "repository": {"type": "string", "nullable": true}, "branch": {"type": "string", "nullable": true}, "environment_id": {"type": "string", "format": "uuid", "nullable": true}, "description": {"type": "string", "default": ""}, "icon": {"type": "string", "default": ""}}}}}, "required": true}, "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/Environment"}}}}}}, "400": {"description": "When the parameters supplied are not valid."}}, "tags": ["core.environment"]}}, "/api/v2/environment_auth": {"post": {"operationId": "environment_create_token", "summary": "Create or get a new token for the given client types. Tokens generated with this call are scoped to the current", "description": "environment.", "parameters": [{"description": "The environment id", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}], "requestBody": {"description": "* **client_types:** The client types for which this token is valid (api, agent, compiler)\n* **idempotent:** The token should be idempotent, such tokens do not have an expire or issued at set so their\nvalue will not change.\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"client_types": {"type": "array", "items": {"type": "string"}}, "idempotent": {"type": "boolean", "default": true}}}}}, "required": true}, "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "string"}}}}}}}, "tags": ["core.environment"]}}, "/api/v2/environment/<id>": {"get": {"operationId": "environment_get", "summary": "Get an environment and all versions associated", "parameters": [{"description": "The id of the environment to return", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "id", "in": "path"}, {"description": "Whether to include the icon and description of the environment", "schema": {"type": "boolean", "default": false}, "name": "details", "in": "query"}], "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/Environment"}}}}}}}, "tags": ["core.environment"]}, "post": {"operationId": "environment_modify", "summary": "Modify the given environment", "description": "The optional parameters that are unspecified will be left unchanged by the update.", "parameters": [{"description": "The id of the environment", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "id", "in": "path"}], "requestBody": {"description": "* **branch:** The name of the branch in the repository\n* **description:** The description of the environment, maximum 255 characters\n* **icon:** The data-url of the icon of the environment. It should follow the pattern `<mime-type>;base64,<image>` , where\n<mime-type> is one of: 'image/png', 'image/jpeg', 'image/webp', 'image/svg+xml', and <image> is the image in\nthe format matching the specified mime-type, and base64 encoded.\nThe length of the whole string should be maximum 64 kb.\nThe icon can be removed by setting this parameter to an empty string.\n* **name:** The name of the environment\n* **project_id:** The id of the project the environment belongs to\n* **repository:** The url (in git form) of the repository\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"name": {"type": "string"}, "repository": {"type": "string", "nullable": true}, "branch": {"type": "string", "nullable": true}, "project_id": {"type": "string", "format": "uuid", "nullable": true}, "description": {"type": "string", "nullable": true}, "icon": {"type": "string", "nullable": true}}}}}, "required": true}, "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/Environment"}}}}}}, "400": {"description": "When the parameters supplied are not valid."}, "404": {"description": "The given environment doesn't exist."}}, "tags": ["core.environment"]}, "delete": {"operationId": "environment_delete", "summary": "Delete the given environment and all related data.", "parameters": [{"description": "The uuid of the environment.", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "id", "in": "path"}], "responses": {"200": {"description": ""}, "404": {"description": "The given environment doesn't exist."}, "403": {"description": "The given environment is protected."}}, "tags": ["core.environment"]}}, "/api/v2/environment_settings/<id>": {"get": {"operationId": "environment_setting_get", "summary": "Retrieve a specific setting from an environment's configuration.", "parameters": [{"description": "The id of the environment from which the setting is being retrieved.", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The id of the setting to be retrieved.", "required": true, "schema": {"type": "string"}, "name": "id", "in": "path"}], "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/EnvironmentSettingsReponse"}}}}}}}, "tags": ["core.environment"]}, "post": {"operationId": "environment_settings_set", "summary": "Set a specific setting in an environment's configuration.", "parameters": [{"description": "The id of the environment where the setting is to be set or updated.", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The id of the setting to be set or updated.", "required": true, "schema": {"type": "string"}, "name": "id", "in": "path"}], "requestBody": {"description": "* **value:** The new value for the setting.\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"value": {"anyOf": [{"type": "boolean"}, {"type": "integer"}, {"type": "number"}, {"type": "string"}, {"type": "object", "additionalProperties": {"anyOf": [{"type": "string"}, {"type": "integer"}, {"type": "boolean"}]}}]}}}}}, "required": true}, "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"links": {"title": "Links", "type": "object", "additionalProperties": {"type": "string"}, "nullable": true}, "metadata": {"title": "Metadata", "type": "object", "properties": {"warnings": {"title": "Warnings", "type": "array", "items": {"type": "string"}}}, "nullable": true}}}}}}}, "tags": ["core.environment"]}, "delete": {"operationId": "environment_setting_delete", "summary": "Reset the given setting to its default value.", "parameters": [{"description": "The id of the environment from which the setting is to be deleted.", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The identifier of the setting to be deleted.", "required": true, "schema": {"type": "string"}, "name": "id", "in": "path"}], "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"links": {"title": "Links", "type": "object", "additionalProperties": {"type": "string"}, "nullable": true}, "metadata": {"title": "Metadata", "type": "object", "properties": {"warnings": {"title": "Warnings", "type": "array", "items": {"type": "string"}}}, "nullable": true}}}}}}}, "tags": ["core.environment"]}}, "/api/v2/environment_settings": {"get": {"operationId": "environment_settings_list", "summary": "List the settings in the current environment ordered by name alphabetically.", "parameters": [{"description": "The id of the environment for which the list of settings is being requested.", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}], "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/EnvironmentSettingsReponse"}}}}}}}, "tags": ["core.environment"]}}, "/api/v2/actions/environment/halt": {"post": {"operationId": "halt", "summary": "Halt all orchestrator operations for an environment. The environment will enter a state where all agents are paused and", "description": "can not be unpaused. Incoming compile requests will still be queued but compilation will halt. Normal operation can be\nrestored using the `resume_environment` endpoint.", "parameters": [{"description": "The environment id", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}], "requestBody": {"description": "", "content": {"application/json": {"schema": {"type": "object", "properties": {}}}}, "required": true}, "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}, "404": {"description": "The given environment doesn't exist."}}, "tags": ["core.environment"]}}, "/api/v1/environment_settings": {"get": {"operationId": "list_settings", "summary": "List the settings in the current environment ordered by name alphabetically.", "parameters": [{"description": "The id of the environment to list settings for.", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}], "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}}, "tags": ["core.environment"]}}, "/api/v2/actions/environment/resume": {"post": {"operationId": "resume", "summary": "Resume all orchestrator operations for an environment. Resumes normal environment operation and unpauses all agents", "description": "that were active when the environment was halted.", "parameters": [{"description": "The environment id", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}], "requestBody": {"description": "", "content": {"application/json": {"schema": {"type": "object", "properties": {}}}}, "required": true}, "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}, "404": {"description": "The given environment doesn't exist."}}, "tags": ["core.environment"]}}, "/api/v1/filediff": {"post": {"operationId": "file_diff", "summary": "Returns the diff of the files with the two given ids", "requestBody": {"description": "* **file_id_1:** The identifier of the first file.\n* **file_id_2:** The identifier of the second file.\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"file_id_1": {"type": "string"}, "file_id_2": {"type": "string"}}}}}, "required": true}, "responses": {"200": {"description": "A string representing the diff between the two files."}}, "tags": ["core.file"]}}, "/api/v1/file/<id>": {"get": {"operationId": "get_file", "summary": "Retrieve a file", "parameters": [{"description": "The id of the file to retrieve", "required": true, "schema": {"type": "string"}, "name": "id", "in": "path"}], "responses": {"200": {"description": ""}}, "tags": ["core.file"]}, "put": {"operationId": "upload_file", "summary": "Upload a new file", "parameters": [{"description": "The id of the file", "required": true, "schema": {"type": "string"}, "name": "id", "in": "path"}], "requestBody": {"description": "* **content:** The base64 encoded content of the file\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"content": {"type": "string"}}}}}, "required": true}, "responses": {"200": {"description": ""}}, "tags": ["core.file"]}, "head": {"operationId": "stat_file", "summary": "Does the file exist", "parameters": [{"description": "The id of the file to check", "required": true, "schema": {"type": "string"}, "name": "id", "in": "path"}], "responses": {"200": {"description": ""}}, "tags": ["core.file"]}}, "/api/v1/file": {"post": {"operationId": "stat_files", "summary": "Check which files exist in the given list", "requestBody": {"description": "* **files:** A list of file ids to check\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"files": {"type": "array", "items": {}}}}}}, "required": true}, "responses": {"200": {"description": "A list of files that do not exist."}}, "tags": ["core.file"]}}, "/api/v1/parameter/<id>": {"get": {"operationId": "get_param", "summary": "Get a parameter from the server.", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The name of the parameter", "required": true, "schema": {"type": "string"}, "name": "id", "in": "path"}, {"description": "Optional. scope the parameter to resource (fact),\nif the resource id should not contain a version, the latest version is used", "schema": {"type": "string", "nullable": true}, "name": "resource_id", "in": "query"}], "responses": {"200": {"description": "Returns the following status codes:\n- 200: The parameter content is returned\n- 404: The parameter is not found and unable to find it because its resource is not known to the server\n- 410: The parameter has expired\n- 503: The parameter is not found but its value is requested from an agent", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}}, "tags": ["core.parameters"]}, "put": {"operationId": "set_param", "summary": "Set a parameter on the server. If the parameter is an tracked unknown, it will trigger a recompile on the server.", "description": "Otherwise, if the value is changed and recompile is true, a recompile is also triggered.\n[DEPRECATED] Please use the new endpoints `/facts/<name>` and `/parameters/<name>` instead.", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The name of the parameter", "required": true, "schema": {"type": "string"}, "name": "id", "in": "path"}], "requestBody": {"description": "* **expires:** When setting a new parameter/fact: if set to None, then a sensible default will be provided (i.e. False\nfor parameter and True for fact). When updating a parameter or fact, a None value will leave the existing value\nunchanged.\n* **metadata:** Optional. Metadata about the parameter\n* **recompile:** Optional. Whether to trigger a recompile\n* **resource_id:** Optional. Scope the parameter to resource (fact)\n* **source:** The source of the parameter.\n* **value:** The value of the parameter\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"source": {"$ref": "#/components/schemas/ParameterSource"}, "value": {"type": "string"}, "resource_id": {"type": "string", "nullable": true}, "metadata": {"type": "object", "default": {}}, "recompile": {"type": "boolean", "default": false}, "expires": {"type": "boolean", "nullable": true}}}}}, "required": true}, "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}}, "tags": ["core.parameters"]}, "delete": {"operationId": "delete_param", "summary": "Delete a parameter on the server", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The name of the parameter", "required": true, "schema": {"type": "string"}, "name": "id", "in": "path"}, {"description": "Optional. The resource id of the parameter", "schema": {"type": "string", "nullable": true}, "name": "resource_id", "in": "query"}], "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}}, "tags": ["core.parameters"]}}, "/api/v2/facts": {"get": {"operationId": "get_all_facts", "summary": "List the facts in an environment.", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "Limit the number of facts that are returned", "schema": {"type": "integer", "nullable": true}, "name": "limit", "in": "query"}, {"description": "The fact id to use as a continuation token for paging, in combination with the 'start' value,\nbecause the order by column might contain non-unique values", "schema": {"type": "string", "format": "uuid", "nullable": true}, "name": "first_id", "in": "query"}, {"description": "The fact id to use as a continuation token for paging, in combination with the 'end' value,\nbecause the order by column might contain non-unique values", "schema": {"type": "string", "format": "uuid", "nullable": true}, "name": "last_id", "in": "query"}, {"description": "The lower limit for the order by column (exclusive).\nOnly one of 'start' and 'end' should be specified at the same time.", "schema": {"type": "string", "nullable": true}, "name": "start", "in": "query"}, {"description": "The upper limit for the order by column (exclusive).\nOnly one of 'start' and 'end' should be specified at the same time.", "schema": {"type": "string", "nullable": true}, "name": "end", "in": "query"}, {"description": "Filter the list of returned facts.\nThe following options are available:\nname: filter by the name of the fact\nresource_id: filter by the resource_id of the fact\nexpires: filter on whether the fact expires or not", "schema": {"type": "object", "additionalProperties": {"type": "array", "items": {"type": "string"}}, "nullable": true}, "name": "filter", "in": "query"}, {"description": "Return the results sorted according to the parameter value.\nThe following sorting attributes are supported: 'name', 'resource_id'.\nThe following orders are supported: 'asc', 'desc'", "schema": {"type": "string", "default": "name.asc"}, "name": "sort", "in": "query"}], "responses": {"200": {"description": "A list of all matching facts", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/Fact"}}}}}}}, "404": {"description": "This exception is raised when the referenced environment is not found"}, "400": {"description": "When the parameters used for filtering, sorting or paging are not valid"}}, "tags": ["core.parameters"]}}, "/api/v2/resource/<rid>/facts/<id>": {"get": {"operationId": "get_fact", "summary": "Get one specific fact", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The id of the resource", "required": true, "schema": {"type": "string"}, "name": "rid", "in": "path"}, {"description": "The id of the fact", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "id", "in": "path"}], "responses": {"200": {"description": "A specific fact corresponding to the id", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/Fact"}}}}}}, "404": {"description": "This status code is returned when the referenced environment or fact is not found"}}, "tags": ["core.parameters"]}}, "/api/v2/resource/<rid>/facts": {"get": {"operationId": "get_facts", "summary": "Get the facts related to a specific resource. The results are sorted alphabetically by name.", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "Id of the resource", "required": true, "schema": {"type": "string"}, "name": "rid", "in": "path"}], "responses": {"200": {"description": "The facts related to this resource", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/Fact"}}}}}}}, "404": {"description": "This status code is returned when the referenced environment is not found"}}, "tags": ["core.parameters"]}}, "/api/v2/parameters": {"get": {"operationId": "get_parameters", "summary": "List the parameters in an environment", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "Limit the number of parameters that are returned", "schema": {"type": "integer", "nullable": true}, "name": "limit", "in": "query"}, {"description": "The parameter id to use as a continuation token for paging, in combination with the 'start' value,\nbecause the order by column might contain non-unique values", "schema": {"type": "string", "format": "uuid", "nullable": true}, "name": "first_id", "in": "query"}, {"description": "The parameter id to use as a continuation token for paging, in combination with the 'end' value,\nbecause the order by column might contain non-unique values", "schema": {"type": "string", "format": "uuid", "nullable": true}, "name": "last_id", "in": "query"}, {"description": "The lower limit for the order by column (exclusive). Only one of 'start' and 'end' should be specified at the\nsame time.", "schema": {"nullable": true, "anyOf": [{"type": "string", "format": "date-time"}, {"type": "string"}]}, "name": "start", "in": "query"}, {"description": "The upper limit for the order by column (exclusive). Only one of 'start' and 'end' should be specified at the\nsame time.", "schema": {"nullable": true, "anyOf": [{"type": "string", "format": "date-time"}, {"type": "string"}]}, "name": "end", "in": "query"}, {"description": "Filter the list of returned parameters.\nThe following options are available:\n    * name: filter by the name of the parameter\n    * source: filter by the source of the parameter\n    * updated: filter by the updated time of the parameter", "schema": {"type": "object", "additionalProperties": {"type": "array", "items": {"type": "string"}}, "nullable": true}, "name": "filter", "in": "query"}, {"description": "Return the results sorted according to the parameter value.\nThe following sorting attributes are supported: 'name', 'source', 'updated'.\nThe following orders are supported: 'asc', 'desc'", "schema": {"type": "string", "default": "name.asc"}, "name": "sort", "in": "query"}], "responses": {"200": {"description": "A list of all matching parameters", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/Parameter"}}}}}}}, "404": {"description": "This exception is raised when the referenced environment is not found"}, "400": {"description": "When the parameters used for filtering, sorting or paging are not valid"}}, "tags": ["core.parameters"]}}, "/api/v1/parameter": {"post": {"operationId": "list_params", "summary": "List/query parameters in this environment. The results are ordered alphabetically by parameter name.", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}], "requestBody": {"description": "* **query:** Optional. A query to match against metadata\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"query": {"type": "object", "default": {}}}}}}, "required": true}, "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}}, "tags": ["core.parameters"]}}, "/api/v2/facts/<name>": {"put": {"operationId": "set_fact", "summary": "Set a fact on the server. If the fact is a tracked unknown, it will trigger a recompile on the server.", "description": "Otherwise, if the value is changed and recompile is true, a recompile is also triggered.", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The name of the fact", "required": true, "schema": {"type": "string"}, "name": "name", "in": "path"}], "requestBody": {"description": "* **expires:** Optional. If the fact should expire or not. By default, facts expire.\n* **metadata:** Optional. Metadata about the fact\n* **recompile:** Optional. Whether to trigger a recompile if the value of the fact changed.\n* **resource_id:** The resource this fact belongs to\n* **source:** The source of the fact\n* **value:** The value of the fact\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"source": {"$ref": "#/components/schemas/ParameterSource"}, "value": {"type": "string"}, "resource_id": {"type": "string"}, "metadata": {"type": "object", "additionalProperties": {"type": "string"}, "nullable": true}, "recompile": {"type": "boolean", "default": false}, "expires": {"type": "boolean", "default": true, "nullable": true}}}}}, "required": true}, "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"links": {"title": "Links", "type": "object", "additionalProperties": {"type": "string"}, "nullable": true}, "metadata": {"title": "Metadata", "type": "object", "properties": {"warnings": {"title": "Warnings", "type": "array", "items": {"type": "string"}}}, "nullable": true}, "data": {"$ref": "#/components/schemas/Fact"}}}}}}}, "tags": ["core.parameters"]}}, "/api/v2/parameters/<name>": {"put": {"operationId": "set_parameter", "summary": "Set a parameter on the server. If the parameter is an tracked unknown, it will trigger a recompile on the server.", "description": "Otherwise, if the value is changed and recompile is true, a recompile is also triggered.", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The name of the parameter", "required": true, "schema": {"type": "string"}, "name": "name", "in": "path"}], "requestBody": {"description": "* **metadata:** Optional. Metadata about the parameter\n* **recompile:** Optional. Whether to trigger a recompile if the value of the parameter changed.\n* **source:** The source of the parameter.\n* **value:** The value of the parameter\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"source": {"$ref": "#/components/schemas/ParameterSource"}, "value": {"type": "string"}, "metadata": {"type": "object", "additionalProperties": {"type": "string"}, "nullable": true}, "recompile": {"type": "boolean", "default": false}}}}}, "required": true}, "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"links": {"title": "Links", "type": "object", "additionalProperties": {"type": "string"}, "nullable": true}, "metadata": {"title": "Metadata", "type": "object", "properties": {"warnings": {"title": "Warnings", "type": "array", "items": {"type": "string"}}}, "nullable": true}, "data": {"$ref": "#/components/schemas/Parameter"}}}}}}}, "tags": ["core.parameters"]}}, "/api/v1/parameters": {"put": {"operationId": "set_parameters", "summary": "Set a parameter on the server", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}], "requestBody": {"description": "* **parameters:** A list of dicts with the following keys:\n- id The name of the parameter\n- source The source of the parameter. Valid values are defined in the ParameterSource enum (see: inmanta/const.py)\n- value The value of the parameter\n- resource_id Optionally, scope the parameter to resource (fact)\n- expires Defaults to true. Set to false to create a never expiring fact\n- metadata metadata about the parameter\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"parameters": {"type": "array", "items": {}}}}}}, "required": true}, "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}}, "tags": ["core.parameters"]}}, "/api/v2/discovered/<discovered_resource_id>": {"get": {"operationId": "discovered_resources_get", "summary": "Get a single discovered resource.", "parameters": [{"description": "the id of the environment in which to get the discovered resource.", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The id of the discovered resource", "required": true, "schema": {"type": "string"}, "name": "discovered_resource_id", "in": "path"}], "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/DiscoveredResource"}}}}}}}, "tags": ["core.resource"]}}, "/api/v2/discovered": {"get": {"operationId": "discovered_resources_get_batch", "summary": "Get a list of discovered resources.", "description": "The discovery resource responsible for discovering each resource is included.\nFor resources that the orchestrator is already managing, a link to the corresponding resource is provided. The full list of\nsupported links can be found :ref:`here <api_self_referencing_links>`.", "parameters": [{"description": "The id of the environment this resource belongs to", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "Limit the number of instances that are returned", "schema": {"type": "integer", "nullable": true}, "name": "limit", "in": "query"}, {"description": "The lower limit for the order by column (exclusive).\nOnly one of 'start' and 'end' should be specified at the same time.", "schema": {"type": "string", "nullable": true}, "name": "start", "in": "query"}, {"description": "The upper limit for the order by column (exclusive).\nOnly one of 'start' and 'end' should be specified at the same time.", "schema": {"type": "string", "nullable": true}, "name": "end", "in": "query"}, {"description": "Return the results sorted according to the parameter value.\nThe following sorting attributes are supported: 'discovered_resource_id'.\nThe following orders are supported: 'asc', 'desc'", "schema": {"type": "string", "default": "discovered_resource_id.asc"}, "name": "sort", "in": "query"}, {"description": "Filter the list of returned resources.\nDefault behavior: return all discovered resources.\nFiltering by 'managed' is supported:\n\n    - filter.managed=true: only return discovered resources that the orchestrator is already aware of i.e.\n      resources that are present in any released configuration model of environment tid.\n    - filter.managed=false: only return discovered resources that the orchestrator is unaware of i.e. resources\n      that are not part of any released configuration model of environment tid.", "schema": {"type": "object", "additionalProperties": {"type": "array", "items": {"type": "string"}}, "nullable": true}, "name": "filter", "in": "query"}], "responses": {"200": {"description": "A list of all matching released resources", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/DiscoveredResource"}}}}}}}, "404": {"description": "This exception is raised when the referenced environment is not found"}, "400": {"description": "When the parameters used for filtering, sorting or paging are not valid"}}, "tags": ["core.resource"]}}, "/api/v1/resource/<id>": {"get": {"operationId": "get_resource", "summary": "Return a resource with the given id.", "parameters": [{"description": "The id of the environment this resource belongs to", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "Get the resource with the given resource version id", "required": true, "schema": {"type": "string"}, "name": "id", "in": "path"}, {"description": "Optional. Include the logs in the response", "schema": {"type": "boolean", "nullable": true}, "name": "logs", "in": "query"}, {"description": "Optional. Only return the status of the resource", "schema": {"type": "boolean", "nullable": true}, "name": "status", "in": "query"}, {"description": "Optional. The log action to include, leave empty/none for all actions. Valid actions are one of\nthe action strings in const.ResourceAction", "schema": {"$ref": "#/components/schemas/ResourceAction", "nullable": true}, "name": "log_action", "in": "query"}, {"description": "Optional. Limit the number of logs included in the response, up to a maximum of 1000.\nTo retrieve more entries, use  /api/v2/resource_actions\n(:func:`~inmanta.protocol.methods_v2.get_resource_actions`)\nIf None, a default limit (set to 1000) is applied.", "schema": {"type": "integer", "default": 0}, "name": "log_limit", "in": "query"}], "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}}, "tags": ["core.resource"]}}, "/api/v2/resource_actions": {"get": {"operationId": "get_resource_actions", "summary": "Return resource actions matching the search criteria.", "parameters": [{"description": "The id of the environment this resource belongs to", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The resource entity type that should be queried", "schema": {"type": "string", "nullable": true}, "name": "resource_type", "in": "query"}, {"description": "Agent name that is used to filter the results", "schema": {"type": "string", "nullable": true}, "name": "agent", "in": "query"}, {"description": "Attribute name used for filtering", "schema": {"type": "string", "nullable": true}, "name": "attribute", "in": "query"}, {"description": "Attribute value used for filtering. Attribute and attribute value should be supplied together.", "schema": {"type": "string", "nullable": true}, "name": "attribute_value", "in": "query"}, {"description": "Only include ResourceActions which have a log message with this severity.", "schema": {"type": "string", "nullable": true}, "name": "log_severity", "in": "query"}, {"description": "Limit the number of resource actions included in the response, up to 1000", "schema": {"type": "integer", "default": 0, "nullable": true}, "name": "limit", "in": "query"}, {"description": "Start the query from this action_id.\nTo be used in combination with either the first or last timestamp.", "schema": {"type": "string", "format": "uuid", "nullable": true}, "name": "action_id", "in": "query"}, {"description": "Limit the results to resource actions that started later\nthan the value of this parameter (exclusive)", "schema": {"type": "string", "format": "date-time", "nullable": true}, "name": "first_timestamp", "in": "query"}, {"description": "Limit the results to resource actions that started earlier\nthan the value of this parameter (exclusive).\nOnly the first_timestamp or last_timestamp parameter should be supplied", "schema": {"type": "string", "format": "date-time", "nullable": true}, "name": "last_timestamp", "in": "query"}, {"description": "only return ResourceActions where the change type is different from the one in this list.", "schema": {"type": "array", "items": {"$ref": "#/components/schemas/Change"}, "nullable": true}, "name": "exclude_changes", "in": "query"}], "responses": {"200": {"description": "The list of matching Resource Actions.\nThe order is ascending if first_timestamp is provided, otherwise descending.\nIf a limit is specified, also return links to the next and previous pages.\nThe \"next\" page refers to actions that started earlier, while the \"prev\" page refers to actions that started later.", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"links": {"title": "Links", "type": "object", "additionalProperties": {"type": "string"}, "nullable": true}, "metadata": {"title": "Metadata", "type": "object", "properties": {"warnings": {"title": "Warnings", "type": "array", "items": {"type": "string"}}}, "nullable": true}, "data": {"type": "array", "items": {"$ref": "#/components/schemas/inmanta__data__model__ResourceAction"}}}}}}}, "400": {"description": "When the supplied parameters are not valid."}}, "tags": ["core.resource"]}}, "/api/v2/desiredstate/<version>": {"get": {"operationId": "get_resources_in_version", "summary": "Get the resources that belong to a specific version.", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The version number", "required": true, "schema": {"type": "integer"}, "name": "version", "in": "path"}, {"description": "Limit the number of resources that are returned", "schema": {"type": "integer", "nullable": true}, "name": "limit", "in": "query"}, {"description": "The resource_version_id to use as a continuation token for paging, in combination with the 'start' value,\nbecause the order by column might contain non-unique values", "schema": {"type": "string", "nullable": true}, "name": "first_id", "in": "query"}, {"description": "The resource_version_id to use as a continuation token for paging, in combination with the 'end' value,\nbecause the order by column might contain non-unique values", "schema": {"type": "string", "nullable": true}, "name": "last_id", "in": "query"}, {"description": "The lower limit for the order by column (exclusive).\nOnly one of 'start' and 'end' should be specified at the same time.", "schema": {"type": "string", "nullable": true}, "name": "start", "in": "query"}, {"description": "The upper limit for the order by column (exclusive).\nOnly one of 'start' and 'end' should be specified at the same time.", "schema": {"type": "string", "nullable": true}, "name": "end", "in": "query"}, {"description": "Filter the list of returned resources.\nThe following options are available:\nagent: filter by the agent name of the resource\nresource_type: filter by the type of the resource\nresource_id_value: filter by the attribute values of the resource", "schema": {"type": "object", "additionalProperties": {"type": "array", "items": {"type": "string"}}, "nullable": true}, "name": "filter", "in": "query"}, {"description": "Return the results sorted according to the parameter value.\nThe following sorting attributes are supported: 'resource_type', 'agent', 'resource_id_value'.\nThe following orders are supported: 'asc', 'desc'", "schema": {"type": "string", "default": "resource_type.desc"}, "name": "sort", "in": "query"}], "responses": {"200": {"description": "A list of all matching resources", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/VersionedResource"}}}}}}}, "404": {"description": "This exception is raised when the referenced environment is not found"}, "400": {"description": "When the parameters used for filtering, sorting or paging are not valid"}}, "tags": ["core.resource"]}}, "/api/v2/resource/<rid>": {"get": {"operationId": "resource_details", "parameters": [{"description": "The id of the environment from which the resource's details are being requested.", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The unique identifier (ResourceIdStr) of the resource. This value specifies the particular resource\nfor which detailed information is being requested.", "required": true, "schema": {"type": "string"}, "name": "rid", "in": "path"}], "responses": {"200": {"description": "The details of the latest released version of a resource", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/ReleasedResourceDetails"}}}}}}, "404": {"description": "This exception is raised when the referenced environment or resource is not found"}}, "tags": ["core.resource"]}}, "/api/v2/resource/<rid>/history": {"get": {"operationId": "resource_history", "parameters": [{"description": "The id of the environment this resource belongs to", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The id of the resource", "required": true, "schema": {"type": "string"}, "name": "rid", "in": "path"}, {"description": "Limit the number of instances that are returned", "schema": {"type": "integer", "nullable": true}, "name": "limit", "in": "query"}, {"description": "The attribute_hash to use as a continuation token for paging, in combination with the 'start' value,\nbecause the order by column might contain non-unique values", "schema": {"type": "string", "nullable": true}, "name": "first_id", "in": "query"}, {"description": "The attribute_hash to use as a continuation token for paging, in combination with the 'end' value,\nbecause the order by column might contain non-unique values", "schema": {"type": "string", "nullable": true}, "name": "last_id", "in": "query"}, {"description": "The lower limit for the order by column (exclusive).\nOnly one of 'start' and 'end' should be specified at the same time.", "schema": {"type": "string", "format": "date-time", "nullable": true}, "name": "start", "in": "query"}, {"description": "The upper limit for the order by column (exclusive).\nOnly one of 'start' and 'end' should be specified at the same time.", "schema": {"type": "string", "format": "date-time", "nullable": true}, "name": "end", "in": "query"}, {"description": "Return the results sorted according to the parameter value.\nIt should follow the pattern `<attribute_to_sort_by>.<order>`, for example `date.desc`\n(case insensitive).\nSorting by `date` is supported.\nThe following orders are supported: 'asc', 'desc'", "schema": {"type": "string", "default": "date.desc"}, "name": "sort", "in": "query"}], "responses": {"200": {"description": "The history of a resource, according to its attributes", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/ResourceHistory"}}}}}}}, "404": {"description": "This exception is raised when the referenced environment is not found"}, "400": {"description": "When the parameters used for sorting or paging are not valid"}}, "tags": ["core.resource"]}}, "/api/v2/resource": {"get": {"operationId": "resource_list", "parameters": [{"description": "The id of the environment this resource belongs to", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "Limit the number of instances that are returned", "schema": {"type": "integer", "nullable": true}, "name": "limit", "in": "query"}, {"description": "The resource_version_id to use as a continuation token for paging, in combination with the 'start' value,\nbecause the order by column might contain non-unique values", "schema": {"type": "string", "nullable": true}, "name": "first_id", "in": "query"}, {"description": "The resource_version_id to use as a continuation token for paging, in combination with the 'end' value,\nbecause the order by column might contain non-unique values", "schema": {"type": "string", "nullable": true}, "name": "last_id", "in": "query"}, {"description": "The lower limit for the order by column (exclusive).\nOnly one of 'start' and 'end' should be specified at the same time.", "schema": {"type": "string", "nullable": true}, "name": "start", "in": "query"}, {"description": "The upper limit for the order by column (exclusive).\nOnly one of 'start' and 'end' should be specified at the same time.", "schema": {"type": "string", "nullable": true}, "name": "end", "in": "query"}, {"description": "Filter the list of returned resources.\nFilters should be specified with the syntax `?filter.<filter_key>=value`, for example `?filter.status=deployed`\nIt's also possible to provide multiple values for the same filter, in this case resources are returned,\nif they match any of these filter values.\nFor example: `?filter.status=deployed&filter.status=available` returns instances with either of the statuses\ndeployed or available.\nMultiple different filters narrow the results however (they are treated as an 'AND' operator).\nFor example `filter.status=deployed&filter.agent=internal` returns resources\nwith 'deployed' status, where the 'agent' is set to 'internal_agent'.\nThe following options are available:\nagent: filter by the agent of the resource\nresource_type: filter by the type of the resource\nresource_id_value: filter by the attribute values of the resource\nstatus: filter by the current status of the resource.\nFor status filters it's also possible to invert the condition with '!'.\nThe inverted status filter works as a separate filter from the normal status filter.\nFor example: `filter.status=!orphaned` will return all the resources that are not in 'orphaned' state.\nIf multiple values are provided to the inverted filter, resources are returned if they don't match\nany of the filter values.\nFor example: `?filter.status=!deployed&filter.status=!available`\nreturns all instances except those whose status is deployed or available.\nThe values for the 'agent', 'resource_type' and 'value' filters are matched partially.", "schema": {"type": "object", "additionalProperties": {"type": "array", "items": {"type": "string"}}, "nullable": true}, "name": "filter", "in": "query"}, {"description": "Return the results sorted according to the parameter value.\nIt should follow the pattern `<attribute_to_sort_by>.<order>`, for example `resource_type.desc`\n(case insensitive).\nThe following sorting attributes are supported: 'resource_type', 'agent', 'resource_id_value', 'status'.\nThe following orders are supported: 'asc', 'desc'", "schema": {"type": "string", "default": "resource_type.desc"}, "name": "sort", "in": "query"}, {"description": "If set to true, returns a summary of the deployment status of the resources in the environment\nin the metadata, describing how many resources are in each state as well as the total number\nof resources. The summary does not take into account the current filters or paging parameters.\nOrphaned resources are not included in the summary", "schema": {"type": "boolean", "default": false}, "name": "deploy_summary", "in": "query"}], "responses": {"200": {"description": "A list of all matching released resources", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/LatestReleasedResource"}}}}}}}, "404": {"description": "This exception is raised when the referenced environment is not found"}, "400": {"description": "When the parameters used for filtering, sorting or paging are not valid"}}, "tags": ["core.resource"]}}, "/api/v2/resource/<rid>/logs": {"get": {"operationId": "resource_logs", "summary": "Get the logs of a specific resource.", "parameters": [{"description": "The id of the environment this resource belongs to", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The id of the resource", "required": true, "schema": {"type": "string"}, "name": "rid", "in": "path"}, {"description": "Limit the number of instances that are returned", "schema": {"type": "integer", "nullable": true}, "name": "limit", "in": "query"}, {"description": "The lower limit for the order by column (exclusive). Only one of 'start' and 'end' should be specified at\nthe same time.", "schema": {"type": "string", "format": "date-time", "nullable": true}, "name": "start", "in": "query"}, {"description": "The upper limit for the order by column (exclusive). Only one of 'start' and 'end' should be specified at the\nsame time.", "schema": {"type": "string", "format": "date-time", "nullable": true}, "name": "end", "in": "query"}, {"description": "Filter the list of returned logs.\nFilters should be specified with the syntax `?filter.<filter_key>=value`, for example `?filter.minimal_log_level=INFO`.\nIt's also possible to provide multiple values for the same filter, in this case resources are returned, if they match\nany of these filter values.\n\nFor example: `?filter.action=pull&filter.action=deploy` returns logs with either of the actions pull or deploy.\nMultiple different filters narrow the results however (they are treated as an 'AND' operator).\nFor example `filter.minimal_log_level=INFO&filter.action=deploy` returns logs with 'deploy' action, where the\n'log_level' is at least 'INFO'.\n\nThe following options are available:\n    * action: filter by the action of the log\n\n    * timestamp: return the logs matching the timestamp constraints. Valid constraints are of the form\n      \"<lt|le|gt|ge>:<x>\". The expected format is YYYY-MM-DDTHH:mm:ss.ssssss, so an ISO-8601 datetime string,\n      in UTC timezone.\n\n    For example: `?filter.timestamp=ge:2021-08-18T09:21:30.568353&filter.timestamp=lt:2021-08-18T10:21:30.568353`.\n    Multiple constraints can be specified, in which case only log messages that match all constraints will be\n    returned.\n\n    * message: filter by the content of the log messages. Partial matches are allowed. (case-insensitive)\n\n    * minimal_log_level: filter by the log level of the log messages. The filter specifies the minimal level,\n      so messages with either this level, or a higher severity level are going to be included in the result.\n\n    For example, for `filter.minimal_log_level=INFO`, the log messages with level `INFO, WARNING, ERROR, CRITICAL`\n    all match the query.", "schema": {"type": "object", "additionalProperties": {"type": "array", "items": {"type": "string"}}, "nullable": true}, "name": "filter", "in": "query"}, {"description": "Return the results sorted according to the parameter value. It should follow the pattern\n`<attribute_to_sort_by>.<order>`, for example `timestamp.desc` (case insensitive). Only sorting by `timestamp` is\nsupported. The following orders are supported: 'asc', 'desc'", "schema": {"type": "string", "default": "timestamp.desc"}, "name": "sort", "in": "query"}], "responses": {"200": {"description": "A list of all matching resource logs", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/ResourceLog"}}}}}}}, "404": {"description": "This exception is raised when the referenced environment is not found"}, "400": {"description": "When the parameters used for filtering, sorting or paging are not valid"}}, "tags": ["core.resource"]}}, "/api/v2/desiredstate/<version>/resource/<rid>": {"get": {"operationId": "versioned_resource_details", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The version number of the resource", "required": true, "schema": {"type": "integer"}, "name": "version", "in": "path"}, {"description": "The id of the resource", "required": true, "schema": {"type": "string"}, "name": "rid", "in": "path"}], "responses": {"200": {"description": "The details of a specific version of a resource", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/VersionedResourceDetails"}}}}}}, "404": {"description": "This exception is raised when the referenced environment or resource is not found"}}, "tags": ["core.resource"]}}, "/api/v1/version/<id>": {"get": {"operationId": "get_version", "summary": "Get a particular version and a list of all resources in this version", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The id of the version to retrieve", "required": true, "schema": {"type": "integer"}, "name": "id", "in": "path"}, {"description": "Optional. If true, a log of all operations on all resources is included", "schema": {"type": "boolean", "nullable": true}, "name": "include_logs", "in": "query"}, {"description": "Optional. Filter log to only include actions of the specified type", "schema": {"type": "string", "nullable": true}, "name": "log_filter", "in": "query"}, {"description": "Optional. The maximal number of actions to return per resource (starting from the latest),\nup to a maximum of 1000.\nTo retrieve more entries, use /api/v2/resource_actions\n(:func:`~inmanta.protocol.methods_v2.get_resource_actions`)\nIf None, a default limit (set to 1000) is applied.", "schema": {"type": "integer", "nullable": true}, "name": "limit", "in": "query"}], "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}}, "tags": ["core.orchestration"]}, "post": {"operationId": "release_version", "summary": "Release version of the configuration model for deployment.", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The version of the CM to deploy", "required": true, "schema": {"type": "integer"}, "name": "id", "in": "path"}], "requestBody": {"description": "* **agent_trigger_method:** Optional. Indicates whether the agents should perform a full or an incremental deploy when\npush is true.\n* **push:** Notify all agents to deploy the version\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"push": {"type": "boolean", "default": false}, "agent_trigger_method": {"$ref": "#/components/schemas/AgentTriggerMethod", "nullable": true}}}}}, "required": true}, "responses": {"200": {"description": "Returns the following status codes:\n200: The version is released\n404: The requested version does not exist\n409: The requested version was already released", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}}, "tags": ["core.orchestration"]}, "delete": {"operationId": "delete_version", "summary": "Delete a particular version and resources", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The id of the version to retrieve", "required": true, "schema": {"type": "integer"}, "name": "id", "in": "path"}], "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}}, "tags": ["core.orchestration"]}}, "/api/v1/deploy": {"post": {"operationId": "deploy", "summary": "Notify agents to perform a deploy now.", "parameters": [{"description": "The id of the environment.", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}], "requestBody": {"description": "* **agent_trigger_method:** Indicates whether the agents should perform a full or an incremental deploy.\n* **agents:** Optional, names of specific agents to trigger\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"agent_trigger_method": {"$ref": "#/components/schemas/AgentTriggerMethod", "default": "push_full_deploy"}, "agents": {"type": "array", "items": {}, "nullable": true}}}}}, "required": true}, "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}}, "tags": ["core.orchestration"]}}, "/api/v2/desiredstate": {"get": {"operationId": "desired_state_version_list", "summary": "Get the desired state versions from an environment.", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "Limit the number of versions that are returned", "schema": {"type": "integer", "nullable": true}, "name": "limit", "in": "query"}, {"description": "The lower limit for the order by column (exclusive).\nOnly one of 'start' and 'end' should be specified at the same time.", "schema": {"type": "integer", "nullable": true}, "name": "start", "in": "query"}, {"description": "The upper limit for the order by column (exclusive).\nOnly one of 'start' and 'end' should be specified at the same time.", "schema": {"type": "integer", "nullable": true}, "name": "end", "in": "query"}, {"description": "Filter the list of returned desired state versions.\nFiltering by 'version' range, 'date' range and 'status' is supported.", "schema": {"type": "object", "additionalProperties": {"type": "array", "items": {"type": "string"}}, "nullable": true}, "name": "filter", "in": "query"}, {"description": "Return the results sorted according to the parameter value.\nOnly sorting by 'version' is supported.\nThe following orders are supported: 'asc', 'desc'", "schema": {"type": "string", "default": "version.desc"}, "name": "sort", "in": "query"}], "responses": {"200": {"description": "A list of all matching compile reports", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/DesiredStateVersion"}}}}}}}, "404": {"description": "This exception is raised when the referenced environment is not found"}, "400": {"description": "When the parameters used for filtering, sorting or paging are not valid"}}, "tags": ["core.orchestration"]}}, "/api/v2/desiredstate/diff/<from_version>/<to_version>": {"get": {"operationId": "get_diff_of_versions", "summary": "Compare two versions of desired states, and provide the difference between them,", "description": "with regard to their resources and the attributes of these resources.\nResources that are the same in both versions are not mentioned in the results.\n\nA resource diff describes whether the resource was 'added', 'modified' or 'deleted',\nand what the values of their attributes were in the versions.\nThe values are also returned in a stringified, easy to compare way,\nwhich can be used to calculate a `git diff`-like summary of the changes.", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The (lower) version number to compare", "required": true, "schema": {"type": "integer"}, "name": "from_version", "in": "path"}, {"description": "The other (higher) version number to compare", "required": true, "schema": {"type": "integer"}, "name": "to_version", "in": "path"}], "responses": {"200": {"description": "The resource diffs between from_version and to_version", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/ResourceDiff"}}}}}}}, "404": {"description": "This exception is raised when the referenced environment or versions are not found"}, "400": {"description": "When the version parameters are not valid"}}, "tags": ["core.orchestration"]}}, "/api/v2/pip/config/<version>": {"get": {"operationId": "get_pip_config", "summary": "Get the pip config for the given version", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The id of the model version", "required": true, "schema": {"type": "integer"}, "name": "version", "in": "path"}], "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/PipConfig", "nullable": true}}}}}}, "404": {"description": "Raised when the version or environment is not found"}}, "tags": ["core.orchestration"]}}, "/api/v1/version": {"get": {"operationId": "list_version", "summary": "Returns a list of all available versions, ordered by version number, descending", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "Optional. parameter to control the amount of results that are returned. 0 is the latest version.", "schema": {"type": "integer", "nullable": true}, "name": "start", "in": "query"}, {"description": "Optional. parameter to control the amount of results returned, up to a maximum of 1000.\nIf None, a default limit (set to 1000) is applied.", "schema": {"type": "integer", "nullable": true}, "name": "limit", "in": "query"}], "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}}, "tags": ["core.orchestration"]}}, "/api/v2/desiredstate/<version>/promote": {"post": {"operationId": "promote_desired_state_version", "summary": "Promote a desired state version, making it the active version in the environment.", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The number of the version to promote", "required": true, "schema": {"type": "integer"}, "name": "version", "in": "path"}], "requestBody": {"description": "* **trigger_method:** If set to 'push_incremental_deploy' or 'push_full_deploy',\nthe agents will perform an incremental or full deploy, respectively.\nIf set to 'no_push', the new version is not pushed to the agents.\nIf the parameter is not set (or set to null), the new version is pushed and\nthe environment setting 'environment_agent_trigger_method' decides if the deploy should be full or incremental\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"trigger_method": {"$ref": "#/components/schemas/PromoteTriggerMethod", "nullable": true}}}}}, "required": true}, "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}}, "tags": ["core.orchestration"]}}, "/api/v2/dryrun/<version>/<report_id>": {"get": {"operationId": "dryrun_diff", "summary": "Get the report of a dryrun, describing the changes a deployment would make,", "description": "with the difference between the current and target states provided in a form similar to the desired state diff endpoint.", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The version of the configuration model the dryrun belongs to", "required": true, "schema": {"type": "integer"}, "name": "version", "in": "path"}, {"description": "The dryrun id to calculate the diff for", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "report_id", "in": "path"}], "responses": {"200": {"description": "The dryrun report, with a summary and the list of differences.", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/DryRunReport"}}}}}}, "404": {"description": "This exception is raised when the referenced environment or version is not found"}}, "tags": ["core.dryrun"]}}, "/api/v1/dryrun": {"get": {"operationId": "dryrun_list", "summary": "Get the list of dry runs for an environment. The results are sorted by dry run id.", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "Optional. Only for this version", "schema": {"type": "integer", "nullable": true}, "name": "version", "in": "query"}], "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}}, "tags": ["core.dryrun"]}}, "/api/v1/dryrun/<id>": {"get": {"operationId": "dryrun_report", "summary": "Create a dryrun report", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The version dryrun to report", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "id", "in": "path"}], "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}}, "tags": ["core.dryrun"]}, "post": {"operationId": "dryrun_request", "summary": "Do a dryrun", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The version of the CM to deploy", "required": true, "schema": {"type": "integer"}, "name": "id", "in": "path"}], "requestBody": {"description": "", "content": {"application/json": {"schema": {"type": "object", "properties": {}}}}, "required": true}, "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}}, "tags": ["core.dryrun"]}}, "/api/v2/dryrun/<version>": {"get": {"operationId": "list_dryruns", "summary": "Query a list of dry runs for a specific version", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The configuration model version to return dryruns for", "required": true, "schema": {"type": "integer"}, "name": "version", "in": "path"}], "responses": {"200": {"description": "The list of dryruns for the specified version in descending order by date", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/DryRun"}}}}}}}, "404": {"description": "This exception is raised when the referenced environment or version is not found"}}, "tags": ["core.dryrun"]}, "post": {"operationId": "dryrun_trigger", "summary": "Trigger a new dryrun", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The version of the configuration model to execute the dryrun for", "required": true, "schema": {"type": "integer"}, "name": "version", "in": "path"}], "requestBody": {"description": "", "content": {"application/json": {"schema": {"type": "object", "properties": {}}}}, "required": true}, "responses": {"200": {"description": "The id of the new dryrun", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "string", "format": "uuid"}}}}}}, "404": {"description": "This exception is raised when the referenced environment or version is not found"}}, "tags": ["core.dryrun"]}}, "/api/v2/notification/<notification_id>": {"get": {"operationId": "get_notification", "summary": "Get a single notification", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The id of the notification", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "notification_id", "in": "path"}], "responses": {"200": {"description": "The notification with the specified id", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/Notification"}}}}}}, "404": {"description": "When the referenced environment or notification is not found"}}, "tags": ["core.notification"]}, "patch": {"operationId": "update_notification", "summary": "Update a notification by setting its flags", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The id of the notification to update", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "notification_id", "in": "path"}], "requestBody": {"description": "* **cleared:** Whether the notification has been cleared\n* **read:** Whether the notification has been read\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"read": {"type": "boolean", "nullable": true}, "cleared": {"type": "boolean", "nullable": true}}}}}, "required": true}, "responses": {"200": {"description": "The updated notification", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/Notification"}}}}}}, "404": {"description": "When the referenced environment or notification is not found"}}, "tags": ["core.notification"]}}, "/api/v2/notification": {"get": {"operationId": "list_notifications", "summary": "List the notifications in an environment.", "description": "The returned notification objects may carry links to other objects, e.g. a compile report. The full list of supported links\ncan be found :ref:`here <api_self_referencing_links>`.", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "Limit the number of notifications that are returned", "schema": {"type": "integer", "nullable": true}, "name": "limit", "in": "query"}, {"description": "The notification id to use as a continuation token for paging, in combination with the 'start' value,\nbecause the order by column might contain non-unique values", "schema": {"type": "string", "format": "uuid", "nullable": true}, "name": "first_id", "in": "query"}, {"description": "The notification id to use as a continuation token for paging, in combination with the 'end' value,\nbecause the order by column might contain non-unique values", "schema": {"type": "string", "format": "uuid", "nullable": true}, "name": "last_id", "in": "query"}, {"description": "The lower limit for the order by column (exclusive).\nOnly one of 'start' and 'end' should be specified at the same time.", "schema": {"type": "string", "format": "date-time", "nullable": true}, "name": "start", "in": "query"}, {"description": "The upper limit for the order by column (exclusive).\nOnly one of 'start' and 'end' should be specified at the same time.", "schema": {"type": "string", "format": "date-time", "nullable": true}, "name": "end", "in": "query"}, {"description": "Filter the list of returned notifications.\nThe following options are available:\nread: Whether the notification was read or not\ncleared: Whether the notification was cleared or not\nseverity: Filter by the severity field of the notifications\ntitle: Filter by the title of the notifications\nmessage: Filter by the message of the notifications", "schema": {"type": "object", "additionalProperties": {"type": "array", "items": {"type": "string"}}, "nullable": true}, "name": "filter", "in": "query"}, {"description": "Return the results sorted according to the parameter value.\nOnly sorting by the 'created' date is supported.\nThe following orders are supported: 'asc', 'desc'", "schema": {"type": "string", "default": "created.desc"}, "name": "sort", "in": "query"}], "responses": {"200": {"description": "A list of all matching notifications", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/Notification"}}}}}}}, "404": {"description": "This exception is raised when the referenced environment is not found"}, "400": {"description": "When the parameters used for filtering or paging are not valid"}}, "tags": ["core.notification"]}}, "/api/v2/user": {"get": {"operationId": "list_users", "summary": "List all users", "responses": {"200": {"description": "A list of all users", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/User"}}}}}}}}, "tags": ["core.user"]}, "post": {"operationId": "add_user", "summary": "Add a new user to the system", "requestBody": {"description": "* **password:** The password of this new user. The password should be at least 8 characters long.\n* **username:** The username of the new user. The username cannot be an empty string.\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"username": {"type": "string"}, "password": {"type": "string"}}}}}, "required": true}, "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/User"}}}}}}, "409": {"description": "Raised when there is already a user with this user_name"}, "400": {"description": "Raised when server authentication is not enabled"}}, "tags": ["core.user"]}}, "/api/v2/user/<username>": {"delete": {"operationId": "delete_user", "summary": "Delete a user from the system with given username.", "parameters": [{"description": "The username to delete", "required": true, "schema": {"type": "string"}, "name": "username", "in": "path"}], "responses": {"200": {"description": ""}, "404": {"description": "Raised when the user does not exist"}, "400": {"description": "Raised when server authentication is not enabled"}}, "tags": ["core.user"]}}, "/api/v2/current_user": {"get": {"operationId": "get_current_user", "summary": "Get the current logged in user (based on the provided JWT) and server auth settings", "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/CurrentUser"}}}}}}, "404": {"description": "Raised when server authentication is not enabled"}}, "tags": ["core.user"]}}, "/api/v2/login": {"post": {"operationId": "login", "summary": "Login a user.", "description": "When the login succeeds an authentication header is returned with the Bearer token set.", "requestBody": {"description": "* **password:** The password of this user\n* **username:** The user to login\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"username": {"type": "string"}, "password": {"type": "string"}}}}}, "required": true}, "responses": {"200": {"description": "", "content": {"application/json": {"schema": {"type": "object", "properties": {"links": {"title": "Links", "type": "object", "additionalProperties": {"type": "string"}, "nullable": true}, "metadata": {"title": "Metadata", "type": "object", "properties": {"warnings": {"title": "Warnings", "type": "array", "items": {"type": "string"}}}, "nullable": true}, "data": {"$ref": "#/components/schemas/LoginReturn"}}}}}}, "401": {"description": "Raised when the login failed or if server authentication is not enabled"}}, "tags": ["core.user"]}}, "/api/v2/user/<username>/password": {"patch": {"operationId": "set_password", "summary": "Change the password of a user", "parameters": [{"description": "The username of the user", "required": true, "schema": {"type": "string"}, "name": "username", "in": "path"}], "requestBody": {"description": "* **password:** The password of this new user. The password should be at least 8 characters long.\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"password": {"type": "string"}}}}}, "required": true}, "responses": {"200": {"description": ""}, "404": {"description": "Raised when the user does not exist"}, "400": {"description": "Raised when server authentication is not enabled"}}, "tags": ["core.user"]}}, "/api/v2/metrics": {"get": {"operationId": "get_environment_metrics", "summary": "Obtain metrics about the given environment for the given time interval.", "parameters": [{"description": "The id of the environment for which the metrics have to be collected.", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "List of names of metrics that have to be returned.", "schema": {"type": "array", "items": {"type": "string"}}, "name": "metrics", "in": "query"}, {"description": "The start of the time window for which the metrics should be returned.", "schema": {"type": "string", "format": "date-time"}, "name": "start_interval", "in": "query"}, {"description": "The end of the time window for which the metrics should be returned.", "schema": {"type": "string", "format": "date-time"}, "name": "end_interval", "in": "query"}, {"description": "The amount of datapoint that will be returned within the given time interval for each metric.", "schema": {"type": "integer"}, "name": "nb_datapoints", "in": "query"}, {"description": "If this parameter is set to True, the timestamps in the reply will be rounded to a full hour.\nAll time windows in the reply will have an equal size. To achieve this the start_interval, end_interval and\nnb_datapoint in the reply may differ from the ones requested.\n\n    * The start_interval may be smaller than requested\n    * The end_interval may be larger than requested\n    * The nb_datapoints may be larger than requested", "schema": {"type": "boolean", "default": false}, "name": "round_timestamps", "in": "query"}], "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/EnvironmentMetricsResult"}}}}}}, "400": {"description": "The round_timestamps parameter is set to True and the amount of hours between\nstart_interval and end_interval is less than the requested number of datapoints."}}, "tags": ["core.environment-metrics"]}}, "/lsm/v1/exporter/export_service_definition": {"post": {"operationId": "lsm_export_service_definition", "summary": "Trigger the server to export the service definition, defined in the inmanta project, to LSM.", "description": "This API call starts two new compiles:\n\n    * One compile that updates the service catalog using the service_entities_exporter.\n      During this compile the lsm:all() plugin will not return any service instances.\n    * If the first compile is successful, a second compile will be started to export the resources\n      using the new version of the service catalog.", "parameters": [{"description": "The environment this service is defined in", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}], "requestBody": {"description": "* **force_update:** Update the Inmanta project before exporting the definition.\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"force_update": {"type": "boolean", "default": true}}}}}, "required": true}, "responses": {"200": {"description": "The remote_id of the compile that updates the service catalog.", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "string", "format": "uuid"}}}}}}}, "tags": ["lsm.service_catalog"]}}, "/lsm/v1/service_catalog/<service_entity>": {"get": {"operationId": "lsm_service_entity_get", "summary": "Get the default version of a service entity type from the service catalog", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The unique name of the service entity type", "required": true, "schema": {"type": "string"}, "name": "service_entity", "in": "path"}, {"description": "If set to true, return a summary of the states of the instances associated with the entity", "schema": {"type": "boolean", "default": false, "nullable": true}, "name": "instance_summary", "in": "query"}], "responses": {"200": {"description": "The requested service entity", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/ServiceEntity"}}}}}}, "404": {"description": "This exception is raised when the referenced environment or service_entity is not found"}}, "tags": ["lsm.service_catalog"]}, "delete": {"operationId": "lsm_service_catalog_delete_entity", "summary": "Delete an existing service entity type from the service catalog.", "description": "All of its versions will be deleted.", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The unique name of the service entity type", "required": true, "schema": {"type": "string"}, "name": "service_entity", "in": "path"}], "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}, "404": {"description": "This exception is raised when the referenced environment or service_entity is not found"}, "409": {"description": "This exception is raised when the service entity type cannot be deleted caused by still having active\nservice instances of this service entity's versions"}}, "tags": ["lsm.service_catalog"]}, "patch": {"operationId": "lsm_service_entity_update", "summary": "Updates the default version of an existing service entity type in the service catalog.", "description": "Fails if the default version is not 0, or we have more than 1 version. Use the v2 update endpoint instead.\n\nThe name or the environment of a service entity type cannot be changed.\n\nFor changing the config, the config set method (POST /service_catalog/<service_entity>/config) should be used.\n\nA state cannot be removed if there are still instances in that state.\n\nFor attributes and embedded attributes, it is allowed to:\n- Change the type of an existing attribute to its optional variant. Other changes to the type are not supported.\n- Update the type validation parameters if all current instances are valid under the new definition.\n- Update the default value of an attribute.\n\nWhen allow_instance_updates is set, or no instances exist, it is also allowed to\n- Deleted an attribute if it's optional and its value is not set on any instances, excluding deleted instances.\n    Deleted instances will not necessarily match the new schema as they will not be changed.\n- Add a new attribute if it has a default value.\n    This default value should be backward compatible with the previous attribute sets.", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The unique name of the service entity type", "required": true, "schema": {"type": "string"}, "name": "service_entity", "in": "path"}], "requestBody": {"description": "* **allow_instance_updates:** Allow rewriting existing instances, this is irreversible.\n* **service_entity_definition:** The definition of the service entity version\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"service_entity_definition": {"$ref": "#/components/schemas/ServiceEntityWrite"}, "allow_instance_updates": {"type": "boolean", "default": false}}}}}, "required": true}, "responses": {"200": {"description": "The updated service entity default version", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"links": {"title": "Links", "type": "object", "additionalProperties": {"type": "string"}, "nullable": true}, "metadata": {"title": "Metadata", "type": "object", "properties": {"warnings": {"title": "Warnings", "type": "array", "items": {"type": "string"}}}, "nullable": true}, "data": {"$ref": "#/components/schemas/ServiceEntity"}}}}}}, "404": {"description": "This exception is raised when the referenced environment or service_entity is not found"}, "400": {"description": "If the update is not supported"}}, "tags": ["lsm.service_catalog"]}}, "/lsm/v2/service_catalog/<service_entity>/<version>": {"get": {"operationId": "lsm_service_entity_get_version", "summary": "[Experimental]", "description": "Get one service entity version from the service catalog", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The unique name of the service entity type", "required": true, "schema": {"type": "string"}, "name": "service_entity", "in": "path"}, {"description": "The version number of the service entity version", "required": true, "schema": {"type": "integer"}, "name": "version", "in": "path"}, {"description": "If set to true, return a summary of the states of the instances associated with the entity version", "schema": {"type": "boolean", "default": false, "nullable": true}, "name": "instance_summary", "in": "query"}], "responses": {"200": {"description": "The requested service entity", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/ServiceEntity"}}}}}}, "404": {"description": "This exception is raised when the referenced environment, service_entity or version is not found"}}, "tags": ["lsm.service_catalog"]}, "delete": {"operationId": "lsm_service_catalog_delete_entity_version", "summary": "[Experimental]", "description": "Delete an existing service entity version from the service catalog.\n\nFails if we try to delete the default version or the only version left.\nUse the v1 endpoint in that case.", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The unique name of the service entity type", "required": true, "schema": {"type": "string"}, "name": "service_entity", "in": "path"}, {"description": "The version number of the service entity version", "required": true, "schema": {"type": "integer"}, "name": "version", "in": "path"}], "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}, "404": {"description": "This exception is raised when the referenced environment, service_entity or version is not found"}, "409": {"description": "This exception is raised when the service entity version cannot be deleted caused by still having active\nservice instances of this service entity's version"}}, "tags": ["lsm.service_catalog"]}}, "/lsm/v2/service_catalog/<service_entity>": {"get": {"operationId": "lsm_service_catalog_get_entity_versions", "summary": "[Experimental]", "description": "Gets all versions of the service entity type from the service catalog", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The unique name of the service entity type", "required": true, "schema": {"type": "string"}, "name": "service_entity", "in": "path"}, {"description": "If set to true, return a summary of the states of the instances associated with the entity versions", "schema": {"type": "boolean", "default": false, "nullable": true}, "name": "instance_summary", "in": "query"}], "responses": {"200": {"description": "All versions of the requested service entity and the established default version", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/ServiceEntityVersions"}}}}}}, "404": {"description": "This exception is raised when the referenced environment or service_entity is not found"}}, "tags": ["lsm.service_catalog"]}, "patch": {"operationId": "lsm_service_catalog_update_entity_versions", "summary": "[Experimental]", "description": "Update an existing service entity type in the service catalog or add a new one.\n\nThe name or the environment of a service entity type cannot be changed.\n\nExpects to receive the full list of service entity versions.\nAny new version will be added and any missing versions will be deleted.\n\n\nThe update can consist of:\n    - Adding a new service entity type along with multiple versions\n    - Adding new versions to a service entity type (with a distinct version number)\n    - Deleting versions from a service entity type if there are no more service instances in that version, fail otherwise\n        (Any version not provided in the service_entity_definitions field is considered to be deleted)\n    - Changing the default version of a service entity type (to an existing version)\n\nThis update will fail if we try to:\n    - Update an existing version\n    - Delete versions that have instances\n    - Delete all versions\n    - Change to a default version that does not exist\n\nThe update is done atomically, either we execute all the changes or we fail and don't commit any changes.\n\nFor changing the config, the config set method (POST /service_catalog/<service_entity>/config) should be used.", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The unique name of the service entity type", "required": true, "schema": {"type": "string"}, "name": "service_entity", "in": "path"}], "requestBody": {"description": "* **default_version:** The default version for this service entity type\n* **service_entity_definitions:** The definition of the service entity versions.\nAll must have the same name and different version.\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"service_entity_definitions": {"type": "array", "items": {"$ref": "#/components/schemas/ServiceEntityWrite"}}, "default_version": {"type": "integer"}}}}}, "required": true}, "responses": {"200": {"description": "The updated service entity type", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/ServiceEntityVersions"}}}}}}, "404": {"description": "This exception is raised when the referenced environment or service_entity is not found"}, "400": {"description": "If the update is not supported"}}, "tags": ["lsm.service_catalog"]}}, "/lsm/v2/service_catalog": {"get": {"operationId": "lsm_service_catalog_list_all_versions", "summary": "[Experimental]", "description": "List all service entity versions of each defined services entity type in the service catalog", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}], "responses": {"200": {"description": "The list of each service entity type and all of their versions", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/ServiceEntityVersions"}}}}}}}}, "tags": ["lsm.service_catalog"]}, "post": {"operationId": "lsm_service_entity_create_versions", "summary": "[Experimental]", "description": "Create a new service entity type in the service catalog and assign a default version to it.\nMultiple versions can be defined at once in this endpoint.\n\nOpt for using version 1 as the first version, as we assume that version 0 is used for service entity versions\ncreated using the v1 endpoint, which is unaware of versions.", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}], "requestBody": {"description": "* **default_version:** The version of this service entity that we want to use as a default\n* **service_entity_definitions:** The service entity version definitions to create in the service catalog.\nAll must have the same name and different version\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"service_entity_definitions": {"type": "array", "items": {"$ref": "#/components/schemas/ServiceEntityWrite"}}, "default_version": {"type": "integer"}}}}}, "required": true}, "responses": {"200": {"description": "The newly created service entity type including its versions and the established default version", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/ServiceEntityVersions"}}}}}}, "404": {"description": "This exception is raised when the referenced environment is not found"}, "400": {"description": "This exception is raised on invalid requests, e.g. when the service entity definition is not valid"}, "409": {"description": "This exception is raised when we try to create a service entity that already exists in the database"}}, "tags": ["lsm.service_catalog"]}}, "/lsm/v1/service_catalog": {"get": {"operationId": "lsm_service_entities_list", "summary": "List the default service entity version of each defined service entity type in the service catalog", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "If set to true, return a summary of the states of the instances associated with each entity", "schema": {"type": "boolean", "default": false, "nullable": true}, "name": "instance_summary", "in": "query"}], "responses": {"200": {"description": "The list containing the default service entity version of each service entity type", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/ServiceEntity"}}}}}}}, "404": {"description": "This exception is raised when the referenced environment or service_entity is not found"}}, "tags": ["lsm.service_catalog"]}, "post": {"operationId": "lsm_service_entity_create", "summary": "Create a new service entity type in the service catalog, also creates a version 0", "description": "of that service type according to the provided definition and sets it as the default version\n\nThe version field should always be set to 0 when using this endpoint. Fails otherwise.", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}], "requestBody": {"description": "* **service_entity_definition:** The definition of the default version of the service entity type\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"service_entity_definition": {"$ref": "#/components/schemas/ServiceEntityWrite"}}}}}, "required": true}, "responses": {"200": {"description": "The newly created service entity version", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/ServiceEntity"}}}}}}, "404": {"description": "This exception is raised when the referenced environment is not found"}, "400": {"description": "This exception is raised on invalid requests, e.g. when the service entity definition is not valid"}}, "tags": ["lsm.service_catalog"]}}, "/lsm/v1/service_catalog/<service_entity>/config": {"get": {"operationId": "lsm_service_entity_config_get", "summary": "Get the config settings for the default version of a service entity", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The unique name of the service entity", "required": true, "schema": {"type": "string"}, "name": "service_entity", "in": "path"}], "responses": {"200": {"description": "A mapping of key to bool with all configuration options", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "object", "additionalProperties": {"type": "boolean"}}}}}}}, "404": {"description": "This exception is raised when the referenced environment or service_entity is not found"}}, "tags": ["lsm.service_catalog"]}, "post": {"operationId": "lsm_service_entity_config_set", "summary": "Set the config for the default version of the service entity", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The unique name of the service entity", "required": true, "schema": {"type": "string"}, "name": "service_entity", "in": "path"}], "requestBody": {"description": "* **values:** A mapping of key to bool with all configuration options that should be set. This mapping should contain the\nfull config as the existing config of the service entity is overriden.\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"values": {"type": "object", "additionalProperties": {"type": "boolean"}}}}}}, "required": true}, "responses": {"200": {"description": "A mapping of key to bool with all configuration options.", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "object", "additionalProperties": {"type": "boolean"}}}}}}}, "404": {"description": "This exception is raised when the referenced environment or service_entity is not found"}}, "tags": ["lsm.service_catalog"]}}, "/lsm/v1/service_catalog/<service_entity>/schema": {"get": {"operationId": "lsm_service_entity_get_schema", "summary": "Get the json schema for a service entity.", "parameters": [{"description": "The id of the environment.", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The unique name of the service entity.", "required": true, "schema": {"type": "string"}, "name": "service_entity", "in": "path"}], "responses": {"200": {"description": "The json schema of the requested service entity.", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "object"}}}}}}, "404": {"description": "This exception is raised when the referenced environment or service_entity is not found"}}, "tags": ["lsm.service_catalog"]}}, "/lsm/v2/service_catalog/<service_entity>/<version>/config": {"get": {"operationId": "lsm_service_entity_version_config_get", "summary": "Get the config settings for a service entity version", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The unique name of the service entity", "required": true, "schema": {"type": "string"}, "name": "service_entity", "in": "path"}, {"description": "The specific version of the service entity", "required": true, "schema": {"type": "integer"}, "name": "version", "in": "path"}], "responses": {"200": {"description": "A mapping of key to bool with all configuration options", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "object", "additionalProperties": {"type": "boolean"}}}}}}}, "404": {"description": "This exception is raised when the referenced environment or service_entity is not found"}}, "tags": ["lsm.service_catalog"]}, "post": {"operationId": "lsm_service_entity_version_config_set", "summary": "Set the config for a service entity version", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The unique name of the service entity", "required": true, "schema": {"type": "string"}, "name": "service_entity", "in": "path"}, {"description": "The specific version of the service entity", "required": true, "schema": {"type": "integer"}, "name": "version", "in": "path"}], "requestBody": {"description": "* **values:** A mapping of key to bool with all configuration options that should be set. This mapping should contain the\nfull config as the existing config of the service entity is overridden.\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"values": {"type": "object", "additionalProperties": {"type": "boolean"}}}}}}, "required": true}, "responses": {"200": {"description": "A mapping of key to bool with all configuration options.", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "object", "additionalProperties": {"type": "boolean"}}}}}}}, "404": {"description": "This exception is raised when the referenced environment or service_entity is not found"}}, "tags": ["lsm.service_catalog"]}}, "/lsm/v2/service_catalog/<service_entity>/<version>/schema": {"get": {"operationId": "lsm_service_entity_version_get_schema", "summary": "[Experimental]", "description": "Get the json schema for a service entity version.", "parameters": [{"description": "The id of the environment.", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The unique name of the service entity.", "required": true, "schema": {"type": "string"}, "name": "service_entity", "in": "path"}, {"description": "The version of the service entity.", "required": true, "schema": {"type": "integer"}, "name": "version", "in": "path"}], "responses": {"200": {"description": "The json schema of the requested service entity version.", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "object"}}}}}}, "404": {"description": "This exception is raised when the referenced environment, service_entity or version is not found"}}, "tags": ["lsm.service_catalog"]}}, "/lsm/v1/service_catalog_docs": {"get": {"operationId": "lsm_services_openapi_docs", "summary": "Get the OpenAPI definition of the Service Inventory API, describing the CRUD methods by Service Entity.", "parameters": [{"description": "ID of the environment, has to be specified either as a header or as the 'environment' query parameter", "schema": {"type": "string", "format": "uuid", "nullable": true}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "Use 'openapi' to get the schema in JSON format, leave empty or use 'swagger' to get the Swagger-UI view", "schema": {"$ref": "#/components/schemas/ApiDocsFormat", "default": "swagger", "nullable": true}, "name": "format", "in": "query"}, {"description": "ID of the environment", "schema": {"type": "string", "format": "uuid", "nullable": true}, "name": "environment", "in": "query"}, {"description": "If not None, use this as the authorization token for the request instead of the value\nfrom the Authorization header.", "schema": {"type": "string", "nullable": true}, "name": "token", "in": "query"}], "responses": {"200": {"description": "The OpenAPI definition, in JSON or Swagger-UI format", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"links": {"title": "Links", "type": "object", "additionalProperties": {"type": "string"}, "nullable": true}, "metadata": {"title": "Metadata", "type": "object", "properties": {"warnings": {"title": "Warnings", "type": "array", "items": {"type": "string"}}}, "nullable": true}, "data": {"anyOf": [{"$ref": "#/components/schemas/OpenAPI"}, {"type": "string"}]}}}}}}}, "tags": ["lsm.service_catalog"]}}, "/lsm/v1/service_inventory/<service_entity>/<service_id>/config": {"get": {"operationId": "lsm_services_config_get", "summary": "Get the config specific of the service instance.", "description": "These values override the values set in the service entity.\nOnly values set via the config_set call are returned.", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The unique name of the service entity", "required": true, "schema": {"type": "string"}, "name": "service_entity", "in": "path"}, {"description": "The id of the service instance to be retrieved", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "service_id", "in": "path"}], "responses": {"200": {"description": "A mapping of key to bool with configuration options for this specific service instance", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "object", "additionalProperties": {"type": "boolean"}}}}}}}, "404": {"description": "This exception is raised when the referenced environment, service_entity or service_id is not found"}}, "tags": ["lsm.service_inventory"]}, "post": {"operationId": "lsm_services_config_set", "summary": "Set the config specific of the service instance.", "description": "These values override the values set in the service entity.", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The unique name of the service entity", "required": true, "schema": {"type": "string"}, "name": "service_entity", "in": "path"}, {"description": "The id of the service instance for which the config should be set", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "service_id", "in": "path"}], "requestBody": {"description": "* **current_version:** The current version of the resource. This parameter is used for concurrency control to ensure\nthat an update can only happen when the instance has not changed since the caller last inspected\nit.\n* **values:** This mapping should contain the full set of config options for which the default, specified on the\nservice entity, needs to be overriden for the given service instance. For any config option not\nspecified in this dictionary, the service instance will use the default value of the service entity.\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"current_version": {"type": "integer"}, "values": {"type": "object", "additionalProperties": {"type": "boolean"}}}}}}, "required": true}, "responses": {"200": {"description": "A mapping of key to bool with all configuration options.", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "object", "additionalProperties": {"type": "boolean"}}}}}}}, "404": {"description": "This exception is raised when the referenced environment, service_entity or service_id is not found"}, "409": {"description": "This exception is raised when the provided current_version does not match the actual current version"}}, "tags": ["lsm.service_inventory"]}}, "/lsm/v1/service_inventory/<service_entity>": {"get": {"operationId": "lsm_services_list", "summary": "Get a list of service instances, by default in a descending order according to the time they were created.", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The unique name of the service entity", "required": true, "schema": {"type": "string"}, "name": "service_entity", "in": "path"}, {"description": "Include instances for which deleted has been set to true (stable state in lifecycle)", "schema": {"type": "boolean", "default": false}, "name": "include_deleted", "in": "query"}, {"description": "Limit the number of instances that are returned", "schema": {"type": "integer", "nullable": true}, "name": "limit", "in": "query"}, {"description": "The instance_id to use as a continuation token for paging, in combination with the 'start' value,\nbecause the order by column might contain non-unique values", "schema": {"type": "string", "format": "uuid", "nullable": true}, "name": "first_instance_id", "in": "query"}, {"description": "The instance_id to use as a continuation token for paging, in combination with the 'end' value,\nbecause the order by column might contain non-unique values", "schema": {"type": "string", "format": "uuid", "nullable": true}, "name": "last_instance_id", "in": "query"}, {"description": "The lower limit for the order by column (exclusive).\nOnly one of 'start' and 'end' should be specified at the same time.", "schema": {"type": "string", "nullable": true}, "name": "start", "in": "query"}, {"description": "The upper limit for the order by column (exclusive).\nOnly one of 'start' and 'end' should be specified at the same time.", "schema": {"type": "string", "nullable": true}, "name": "end", "in": "query"}, {"description": "Indicates whether to include the resource deployment progress summary\nwith the instances or not", "schema": {"type": "boolean", "default": false, "nullable": true}, "name": "include_deployment_progress", "in": "query"}, {"description": "Filter the list of returned service instances.\nFilters should be specified with the syntax `?filter.<filter_key>=value`, for example `?filter.state=up`\nIt's also possible to provide multiple values for the same filter, in this case instances are returned,\nif they match any of these filter values.\nFor example: `?filter.state=up&filter.state=creating` returns instances in either of the states up or creating.\nMultiple different filters narrow the results however (they are treated as an 'AND' operator).\nFor example `filter.state=up&filter.attribute_set_not_empty=rollback_attributes` returns instances\nin the 'up' state, where the 'rollback_attributes' set is not empty.\nThe following options are available:\nid: filter by the service instance id. Partial matches are also supported\nservice_identity [Deprecated]: If the service entity has an identity, it's possible to filter by this value.\n    The actual name of the identity is used to do this, for example `?filter.order_id=id1`\n    if the identity is 'order_id'. Partial matches are also supported.\nservice_identity: If the service entity has an identity, it's possible to filter by this value.\n    For example `?filter.service_identity=id1`. Partial matches are also supported.\nattribute_set_not_empty: return the instances whose specified attribute set is not empty.\n    For example `?filter.attribute_set_not_empty=active_attributes`.\nattribute_set_empty: return the instances whose specified attribute set is empty.\n    For example `?filter.attribute_set_not_empty=active_attributes`.\n    Specifying the same attribute set to be empty and not empty is not allowed\nstate: return the instances in the specified state.\ndeleted: Whether the instance is deleted or not.\n    Takes precedence over the `include_deleted` parameter.\nid_or_service_identity: A filter that matches both the `id` and the `service_identity` of a service instance.\n                        This filter evaluates to true if either field matches the filter.\nservice_entity_version: A filter that returns the instances matching the service entity version constraints.\nValid constraints are of the form \"<lt|le|gt|ge>:<x>\".\nFor example `?filter.service_entity_version=ge:4&filter.version=lt:10`. Multiple constraints can be\n    specified, in which case only instances that match all constraints will be returned.", "schema": {"type": "object", "additionalProperties": {"type": "array", "items": {"type": "string"}}, "nullable": true}, "name": "filter", "in": "query"}, {"description": "Return the results sorted according to the parameter value.\nIt should follow the pattern `<attribute_to_sort_by>.<order>`, for example `created_at.desc` (case insensitive).\nIf service entity has an identity, it's also possible to sort by that value.\nThe following sorting attributes are supported:\ncreated_at: Sort by when an instance was created\nlast_updated: Sort by when an instance was last updated\nstate:  Sort by the current state of the instances\nservice_identity [Deprecated]: Sort by the service identity of an instance (if defined),\n    you need to specify the name of the identifying attribute i.e. `order_id.asc`\nservice_identity; Sort by the service identity of an instance (if defined),\n    you don't need to use the actual name of the identity i.e. `service_identity.asc`\nThe following orders are supported: 'asc', 'desc'", "schema": {"type": "string", "default": "created_at.desc"}, "name": "sort", "in": "query"}, {"description": "When True, the metadata of the instances is included in the response.", "schema": {"type": "boolean", "default": false}, "name": "include_metadata", "in": "query"}, {"description": "If set to true, return a summary of the states of the instances associated with the entity\nunder the 'instance_summary' key in the returned metadata. This summary is not affected by the `filter` parameter i.e.\nit will always summarize the full list of service instances.", "schema": {"type": "boolean", "default": false}, "name": "include_instance_summary", "in": "query"}], "responses": {"200": {"description": "A list of all matching service instances", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/ServiceInstance"}}}}}}}, "404": {"description": "This exception is raised when the referenced environment or service_entity is not found"}, "400": {"description": "When the parameters used for filtering, sorting or paging are not valid"}}, "tags": ["lsm.service_inventory"]}, "post": {"operationId": "lsm_services_create", "summary": "Create a new service instance", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The unique name of the service entity", "required": true, "schema": {"type": "string"}, "name": "service_entity", "in": "path"}], "requestBody": {"description": "* **attributes:** A mapping with attributes to create the service instance with. The key of the mapping is the name\nof the attribute and the value of the mapping is the value that should be assigned. All values are\nvalidated based on the definition in the service catalog.\n* **config:** This mapping should contain the full set of config options for which the default, specified on the\nservice entity, needs to be overridden for the newly created service instance. For any config option not\nspecified in this dictionary, the service instance will use the default value of the service entity.\n* **service_entity_version:** The version of the service entity we are trying to create an instance on.\nIf left empty, creates the instance on the default version of the service entity.\n* **service_instance_id:** An optional uuid to use for this service instance. This uuid MUST be unique.\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"attributes": {"type": "object"}, "service_instance_id": {"type": "string", "format": "uuid", "nullable": true}, "config": {"type": "object", "additionalProperties": {"type": "boolean"}, "nullable": true}, "service_entity_version": {"type": "integer", "nullable": true}}}}}, "required": true}, "responses": {"200": {"description": "The newly created service instance.", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/ServiceInstance"}}}}}}, "400": {"description": "This exception is raised on invalid requests, e.g., when the attribute validation fails"}, "404": {"description": "This exception is raised when the referenced environment or service_entity is not found"}, "409": {"description": "This exception is raised when the given service_instance_id already exists"}}, "tags": ["lsm.service_inventory"]}}, "/lsm/v1/service_inventory/<service_entity>/<service_id>": {"get": {"operationId": "lsm_services_get", "summary": "Get a given service instance", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The unique name of the service entity", "required": true, "schema": {"type": "string"}, "name": "service_entity", "in": "path"}, {"description": "The id of the service instance to be retrieved\nor a service identity query in the form of 'identity_attribute_name=attribute_value',\nfor example, if the identity is 'order_id', specifying `order_id=1234` can be used to query this instance,\ninstead of the uuid", "required": true, "schema": {"type": "string"}, "name": "service_id", "in": "path"}, {"description": "If not specified the last version of the service instance is returned. If the current_version\nis provided, this value is verified against the actual current_version. If these do not match\na Conflict exception is raised. Use this parameter to verify if your current state still\nmatches the actual state.", "schema": {"type": "integer", "nullable": true}, "name": "current_version", "in": "query"}, {"description": "Determines whether to include the deployment progress summary of\nthe resources associated with this instance", "schema": {"type": "boolean", "default": false, "nullable": true}, "name": "include_deployment_progress", "in": "query"}, {"description": "If set to True, the returned attribute sets will not contain read-only attributes.", "schema": {"type": "boolean", "default": false}, "name": "exclude_read_only_attributes", "in": "query"}, {"description": "True iff the referenced_by attribute in the result will be populated with the service\ninstance ids of non-deleted service instances that reference this service instance in their\nactive attributes using an inter-service relationship.", "schema": {"type": "boolean", "default": false}, "name": "include_referenced_by", "in": "query"}, {"description": "When True, the metadata of the instance is included in the response.", "schema": {"type": "boolean", "default": false}, "name": "include_metadata", "in": "query"}], "responses": {"200": {"description": "The newly created service instance.", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/ServiceInstance"}}}}}}, "404": {"description": "This exception is raised when the referenced environment or service_entity is not found"}, "409": {"description": "This exception is raised when the provided current_version does not match the actual current version\nWhen querying on service identity, it is possible that multiple instances match,\nbecause service identities can be re-used when instances are terminated\nIf multiple instances match, the one returned is the one that is not deleted,\nif it exists, otherwise the one most recently deleted."}}, "tags": ["lsm.service_inventory"]}, "put": {"operationId": "lsm_services_put", "summary": "Update the attributes of an existing service instance, by specifying the full attribute set the instance should have.", "description": "Calling this method is equivalent to calling the v2 patch endpoint with an edit with target \".\" and operation \"replace\".", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The unique name of the service entity", "required": true, "schema": {"type": "string"}, "name": "service_entity", "in": "path"}, {"description": "The id of the service instance to perform the put call on", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "service_id", "in": "path"}], "requestBody": {"description": "* **attributes:** The full attribute set the instance should have after the update\n(including attributes that have not changed)\n* **comment:** Additional information describing this update operation. This information will be included in\nlog records of the update operation.\n* **current_version:** The current version of the resource. This parameter is used for concurrency control to ensure\nthat an update can only happen when the instance has not changed since the caller last inspected\nit.\n* **ignore_read_only_attributes:** If True, changes to read-only attributes in the attributes dictionary will not be\napplied and no exception will be raised. Changes to all other attributes will be\napplied. When this value is set to False and the provided value for a read-only\nattribute differs from the current value, this method returns a BadRequest error.\n* **put_id:** The id of this specific put call\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"current_version": {"type": "integer"}, "put_id": {"type": "string"}, "attributes": {"type": "object"}, "comment": {"type": "string", "nullable": true}, "ignore_read_only_attributes": {"type": "boolean", "default": false}}}}}, "required": true}, "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}, "400": {"description": "This exception is raised on invalid requests, e.g., when the attribute validation fails"}, "404": {"description": "This exception is raised when the referenced environment, service_entity or service_id is not found"}, "409": {"description": "This exception is raised when the provided current_version does not match the actual current version"}}, "tags": ["lsm.service_inventory"]}, "delete": {"operationId": "lsm_services_delete", "summary": "Delete an existing service instance", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The unique name of the service entity", "required": true, "schema": {"type": "string"}, "name": "service_entity", "in": "path"}, {"description": "The id of the service instance to be deleted", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "service_id", "in": "path"}, {"description": "The current version of the resource. This parameter is used for concurrency control to ensure\nthat a delete can only happen when the instance has not changed since the caller last inspected\nit.", "schema": {"type": "integer"}, "name": "current_version", "in": "query"}], "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}, "404": {"description": "This exception is raised when the referenced environment, service_entity or service_id is not found"}, "409": {"description": "This exception is raised when the provided current_version does not match the actual current version"}}, "tags": ["lsm.service_inventory"]}, "patch": {"operationId": "lsm_services_update", "summary": "Update an existing service instance.", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The unique name of the service entity", "required": true, "schema": {"type": "string"}, "name": "service_entity", "in": "path"}, {"description": "The id of the service instance for which the attributes should be updated", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "service_id", "in": "path"}], "requestBody": {"description": "* **attributes:** The attributes parameter only represents the attributes that should be changed.\n* When no candidate attributes were set, the new candidate attributes will be equal to the active\n  attributes with the attribute updates applied.\n* When candidate attributes were set, the update will be applied to the existing candidate\n  attributes.\n* **current_version:** The current version of the resource. This parameter is used for concurrency control to ensure\nthat an update can only happen when the instance has not changed since the caller last inspected\nit.\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"current_version": {"type": "integer"}, "attributes": {"type": "object"}}}}}, "required": true}, "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}, "400": {"description": "This exception is raised on invalid requests, e.g., when the attribute validation fails"}, "404": {"description": "This exception is raised when the referenced environment, service_entity or service_id is not found"}, "409": {"description": "This exception is raised when the provided current_version does not match the actual current version"}}, "tags": ["lsm.service_inventory"]}}, "/lsm/v2/service_inventory/<service_entity>/<service_id>/expert": {"delete": {"operationId": "lsm_services_delete_expert", "summary": "Forcefully deletes an existing service instance", "description": "This action can only be executed when the enable_lsm_expert_mode environment setting is enabled.", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The unique name of the service entity", "required": true, "schema": {"type": "string"}, "name": "service_entity", "in": "path"}, {"description": "The id of the service instance to be deleted", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "service_id", "in": "path"}, {"description": "The current version of the resource. This parameter is used for concurrency control to ensure\nthat a delete can only happen when the instance has not changed since the caller last inspected\nit.", "schema": {"type": "integer", "nullable": true}, "name": "current_version", "in": "query"}, {"description": "Additional information describing this delete operation. This information will be included in\nlog records on the server.", "schema": {"type": "string", "nullable": true}, "name": "comment", "in": "query"}], "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}, "404": {"description": "This exception is raised when the referenced environment, service_entity or service_id is not found"}, "409": {"description": "This exception is raised when the provided current_version does not match the actual current version"}, "403": {"description": "When the enable_lsm_expert_mode environment setting is not enabled for the given environment."}}, "tags": ["lsm.service_inventory"]}, "patch": {"operationId": "lsm_services_patch_expert", "summary": "Force the value of an attribute (regular or read-only attributes) of an existing service instance to a specific value.", "description": "This endpoint doesn't perform any validation, doesn't trigger a lifecycle transfer or any other side effect. This action\ncan only be executed when the enable_lsm_expert_mode environment setting is enabled.\n\nThis endpoint has support to replace, merge and remove attributes\nat a specific location in the attribute tree of a service instance by using a dict path expression (See documentation). As\nsuch, the value of an edit should only contain the new value for the subtree referenced by the target of the edit and not\nall attributes.\n\nThis endpoint behaves transactionally in case of a failure, i.e. if one update fails, an error is returned and no changes\nwill be made to the attributes of the service instance.", "parameters": [{"description": "The id of the environment.", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The unique name of the service entity.", "required": true, "schema": {"type": "string"}, "name": "service_entity", "in": "path"}, {"description": "The id of the service instance to perform the patch call on.", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "service_id", "in": "path"}], "requestBody": {"description": "* **attribute_set_name:** The name of the attribute set that has to be updated.\n* **comment:** Additional information describing this patch operation. This information will be included in log records of\nthe update operation. Contrasting with `patch_id`, the `comment` parameter is intended for human-readable\nnotes or explanations about the patch operation.\n* **current_version:** The current version of the resource. This parameter is used for concurrency control to ensure\nthat an update can only happen when the instance has not changed since the caller last inspected\nit.\n* **edit:** The actual edit operations to perform.\nDescription operation:\n  * replace operation: Replace the entire subtree, referenced by the target of an edit, with a new value.\n  * merge operation: Merge the subtree, referenced by the target of an edit, with the value of the edit.\n                     Only attributes mentioned in the value of the edit will be updated. Embedded entities\n                     in the current attributes and the value of the edit will be matched based on the key\n                     attributes of the embedded entity.\n  * remove operation: Remove the entire subtree, referenced by the target of an edit.\n\nOperation support:\n   * The replace operation is supported on any type of attribute and on the entire service entity using the\n     \".\" target.\n   * The merge operation is supported on the entire service entity using \".\" target or on an embedded entity.\n     When the embedded entity has an upper arity larger than one, the value of the edit should be a list of\n     dictionaries.\n   * The delete operation is supported on:\n        - Attributes with a default value: This attribute can be a primary attribute or a relationship\n                                           to an embedded entity.\n        - A specific element in a list of embedded entities: For this action, the target should use the\n          \"relationship[key_attr=attr_value]\" syntax to indicate which element has to be deleted. Selecting an\n          element should be done using the key attributes of the embedded entity and all key attributes should\n          be specified.\n* **patch_id:** The id of this specific patch call. This id is used in log messages.\nThe `patch_id` serves as a user-defined identifier for tracking and correlating specific patch operations\nwithin a request. It helps for tracing back any errors or outputs to the corresponding API call,\naiding in debugging and logging processes. This identifier is not utilized by the orchestrator for\nfunctional processes apart from reporting.\nEach `patch_id` must be unique within a single request to ensure accurate tracking of individual\noperations.\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"patch_id": {"type": "string"}, "attribute_set_name": {"$ref": "#/components/schemas/AttributeSetName"}, "edit": {"type": "array", "items": {"$ref": "#/components/schemas/PatchCallEdit"}}, "current_version": {"type": "integer", "nullable": true}, "comment": {"type": "string", "nullable": true}}}}}, "required": true}, "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}, "404": {"description": "This exception is raised when the referenced environment, service_entity or service_id is not found."}, "409": {"description": "This exception is raised when the provided current_version does not match the actual current version."}, "403": {"description": "When the enable_lsm_expert_mode environment setting is not enabled for the given environment."}}, "tags": ["lsm.service_inventory"]}}, "/lsm/v1/service_inventory/<service_entity>/<service_id>/diagnose": {"get": {"operationId": "lsm_services_diagnose", "summary": "Diagnose rejection or failure of a resource.", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The unique name of the service entity", "required": true, "schema": {"type": "string"}, "name": "service_entity", "in": "path"}, {"description": "The id of the service instance to diagnose", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "service_id", "in": "path"}, {"description": "The service instance version to use as the entry point to perform the diagnosis.", "schema": {"type": "integer", "nullable": true}, "name": "version", "in": "query"}, {"description": "The number of lifecycle versions to look back when looking for rejections. Only validation\ncompile reports for service instance versions within the lookbehind window are considered. By default (lookbehind 0),\nonly look at the validation compile events connected to the current state.", "schema": {"type": "integer", "default": 0}, "name": "rejection_lookbehind", "in": "query"}, {"description": "The number of lifecycle versions to look back when looking for failures. For a lookbehind of\nl, all lifecycle transfer resources with a next version in the range `[version - l + 1 : version + 1]` (inclusive) are\nconsidered. By default (lookbehind 1), only look at the lifecycle transfer resources that caused the transfer from the\nprevious lifecycle version to the current one, as well as transfer resources for the current lifecycle version itself.", "schema": {"type": "integer", "default": 1}, "name": "failure_lookbehind", "in": "query"}], "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/FullDiagnosis"}}}}}}}, "tags": ["lsm.service_inventory"]}}, "/lsm/v1/service_inventory/<service_entity>/<service_id>/events": {"get": {"operationId": "lsm_services_event_list", "summary": "Get a list of all events for a certain service instance.", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The unique name of the service entity", "required": true, "schema": {"type": "string"}, "name": "service_entity", "in": "path"}, {"description": "The id of the service instance for which the events should be retrieved", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "service_id", "in": "path"}, {"description": "Limit the number of events that are returned", "schema": {"type": "integer", "nullable": true}, "name": "limit", "in": "query"}, {"description": "The event_id to use as a continuation token for paging, in combination with the 'start' value,\nbecause the order by column (currently limited to 'timestamp') might contain non-unique values", "schema": {"type": "string", "format": "uuid", "nullable": true}, "name": "first_event_id", "in": "query"}, {"description": "The event_id to use as a continuation token for paging, in combination with the 'end' value,\nbecause the order by column (currently limited to 'timestamp') might contain non-unique values", "schema": {"type": "string", "format": "uuid", "nullable": true}, "name": "last_event_id", "in": "query"}, {"description": "The lower limit for the order by column (exclusive).\nOnly one of 'start' and 'end' should be specified at the same time.", "schema": {"type": "string", "format": "date-time", "nullable": true}, "name": "start", "in": "query"}, {"description": "The upper limit for the order by column (exclusive).\nOnly one of 'start' and 'end' should be specified at the same time.", "schema": {"type": "string", "format": "date-time", "nullable": true}, "name": "end", "in": "query"}, {"description": "Return the results sorted according to the parameter value.\nIt should follow the pattern `<attribute_to_sort_by>.<order>`, for example `timestamp.desc` (case insensitive).\nOnly sorting by 'timestamp' is supported.\nThe following orders are supported: 'asc', 'desc'", "schema": {"type": "string", "default": "timestamp.desc"}, "name": "sort", "in": "query"}, {"description": "Filter the list of returned events.\nFilters should be specified with the syntax `?filter.<filter_key>=value`, for example `?filter.version=4`\nIt's also possible to provide multiple values for the same filter, in this case events are returned,\nif they match any of these filter values.\nFor example: `?filter.destination=up&filter.destination=creating` returns events where the destination state is\neither of the states up or creating.\nMultiple different filters narrow the results however (they are treated as an 'AND' operator).\nFor example `filter.destination=up&filter.version=4` returns events\nwith the destination state 'up', where the 'version' is set to 4.\nThe following options are available:\n* event_type: filter by the event type\n* version: filter by the version of the service instance the event is related to.\n* source: the source state of the event.\n* destination: the destination state of the event\n* timestamp: return the events matching the timestamp constraints. Valid constraints are of the form\n    \"<lt|le|gt|ge>:<x>\". For example\n    `?filter.timestamp=ge:2021-04-14T09:21:30.568353&filter.timestamp=lt:2021-04-14T10:21:30.568353`.\n    Multiple constraints can be specified, in which case only events that match all constraints will be\n    returned.", "schema": {"type": "object", "additionalProperties": {"type": "array", "items": {"type": "string"}}, "nullable": true}, "name": "filter", "in": "query"}], "responses": {"200": {"description": "The events are sorted according to their timestamp, by default the most recent events appear first in the list", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"links": {"title": "Links", "type": "object", "additionalProperties": {"type": "string"}, "nullable": true}, "metadata": {"title": "Metadata", "type": "object", "properties": {"warnings": {"title": "Warnings", "type": "array", "items": {"type": "string"}}}, "nullable": true}, "data": {"type": "array", "items": {"$ref": "#/components/schemas/Event"}}}}}}}, "404": {"description": "This exception is raised when the referenced environment, service_entity or service_id is not found"}, "400": {"description": "When the parameters used for sorting or paging are not valid"}}, "tags": ["lsm.service_inventory"]}}, "/lsm/v1/service_inventory": {"get": {"operationId": "lsm_services_get_by_id", "summary": "Get a given service instance", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The id of the service instance to be retrieved", "schema": {"type": "string", "format": "uuid"}, "name": "service_id", "in": "query"}, {"description": "If not specified the last version of the service instance is returned. If the current_version\nis provided, this value is verified against the actual current_version. If these do not match\na Conflict exception is raised. Use this parameter to verify if your current state still\nmatches the actual state.", "schema": {"type": "integer", "nullable": true}, "name": "current_version", "in": "query"}, {"description": "Determines whether to include the deployment progress summary of\nthe resources associated with this instance", "schema": {"type": "boolean", "default": false}, "name": "include_deployment_progress", "in": "query"}, {"description": "If set to True, the returned attribute sets will not contain read-only attributes.", "schema": {"type": "boolean", "default": false}, "name": "exclude_read_only_attributes", "in": "query"}, {"description": "True iff the referenced_by attribute in the result will be populated with the service\ninstance ids of non-deleted service instances that reference this service instance in their\nactive attributes using an inter-service relationship.", "schema": {"type": "boolean", "default": false}, "name": "include_referenced_by", "in": "query"}, {"description": "When True, the metadata of the instance is included in the response.", "schema": {"type": "boolean", "default": false}, "name": "include_metadata", "in": "query"}], "responses": {"200": {"description": "The service instance.", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/ServiceInstance"}}}}}}, "404": {"description": "This exception is raised when the referenced environment or service_entity is not found"}, "409": {"description": "This exception is raised when the provided current_version does not match the actual current version"}}, "tags": ["lsm.service_inventory"]}}, "/lsm/v1/service_inventory/<service_entity>/<service_id>/log": {"get": {"operationId": "lsm_services_log_list", "summary": "Get a list of all log records for a certain service instance", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The unique name of the service entity", "required": true, "schema": {"type": "string"}, "name": "service_entity", "in": "path"}, {"description": "The id of the service instance for which the logs should be retrieved", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "service_id", "in": "path"}, {"description": "Filter the list of returned logs.\nFilters should be specified with the syntax `?filter.<filter_key>=<operator>:<value>`, for example\n`?filter.version=lt:12`.\nThe following options are available:\nversion: return the instances matching the version constraints. Valid constraints are of the form\n    \"<lt|le|gt|ge>:<x>\". For example `?filter.version=ge:4&filter.version=lt:10`. Multiple constraints can be\n    specified, in which case only logs that match all constraints will be returned.", "schema": {"type": "object", "additionalProperties": {"type": "array", "items": {"type": "string"}}, "nullable": true}, "name": "filter", "in": "query"}], "responses": {"200": {"description": "A list of log entries sorted on their last_updated timestamp ordered more recent logs entries first", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/ServiceInstanceLog"}}}}}}}, "404": {"description": "This exception is raised when the referenced environment, service_entity or service_id is not found"}}, "tags": ["lsm.service_inventory"]}}, "/lsm/v1/service_inventory/<service_entity>/<service_id>/metadata/<key>": {"get": {"operationId": "lsm_services_metadata_get_value", "summary": "Get a specific value from the metadata store for a given service instance.", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The unique name of the service entity", "required": true, "schema": {"type": "string"}, "name": "service_entity", "in": "path"}, {"description": "The id of the service instance to be retrieved", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "service_id", "in": "path"}, {"description": "Get the value associated with this key from the metadata store.", "required": true, "schema": {"type": "string"}, "name": "key", "in": "path"}, {"description": "If not specified, the metadata value for the last version of the service instance is returned.\nIf the current_version is provided, this value is verified against the actual current_version. If these do not match\na Conflict exception is raised. Use this parameter to verify if your current state still matches the actual state.", "schema": {"type": "integer", "nullable": true}, "name": "current_version", "in": "query"}], "responses": {"200": {"description": "The value associated with the key from the metadata for this specific service instance", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {}}}}}}, "404": {"description": "The referenced environment, service_entity, service_id or key is not found"}, "409": {"description": "The provided current_version does not match the actual current version"}}, "tags": ["lsm.service_inventory"]}, "post": {"operationId": "lsm_services_metadata_set_value", "summary": "Set the value for a given key in the metadata of a given service instance.", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The unique name of the service entity", "required": true, "schema": {"type": "string"}, "name": "service_entity", "in": "path"}, {"description": "The id of the service instance for which the metadata should be set", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "service_id", "in": "path"}, {"description": "Key in the metadata store for which to set the value.", "required": true, "schema": {"type": "string"}, "name": "key", "in": "path"}], "requestBody": {"description": "* **current_version:** The current version of the service instance. This parameter is used for concurrency control to\nensure that an update can only happen when the instance has not changed since the caller last inspected it.\n* **value:** The specific value to set.\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"current_version": {"type": "integer"}, "value": {}}}}}, "required": true}, "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}, "404": {"description": "The referenced environment, service_entity or service_id is not found"}, "409": {"description": "The provided current_version does not match the actual current version"}}, "tags": ["lsm.service_inventory"]}, "delete": {"operationId": "lsm_services_metadata_delete_value", "summary": "Remove a value from the metadata store", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The unique name of the service entity", "required": true, "schema": {"type": "string"}, "name": "service_entity", "in": "path"}, {"description": "The id of the service instance for which the metadata should be deleted", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "service_id", "in": "path"}, {"description": "Key for which to delete the value.", "required": true, "schema": {"type": "string"}, "name": "key", "in": "path"}, {"description": "The current version of the service instance. This parameter is used for concurrency control to\nensure that an update can only happen when the instance has not changed since the caller last inspected it.", "schema": {"type": "integer"}, "name": "current_version", "in": "query"}], "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}, "404": {"description": "The referenced environment, service_entity or service_id is not found."}, "409": {"description": "The provided current_version does not match the actual current version"}}, "tags": ["lsm.service_inventory"]}}, "/lsm/v2/service_inventory/<service_entity>/<service_id>": {"patch": {"operationId": "lsm_services_patch", "summary": "Update the attributes of an existing service instance.", "description": "This endpoint has support to replace, merge and remove attributes\nat a specific location in the attribute tree of a service instance by using a dict path expression (See documentation). As\nsuch, the value of an edit should only contain the new value for the subtree referenced by the target of the edit and not\nall attributes.\n\nThis endpoint behaves transactionally in case of a failure, i.e. if one update fails, an error is returned and no changes\nwill be made to the attributes of the service instance.", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The unique name of the service entity", "required": true, "schema": {"type": "string"}, "name": "service_entity", "in": "path"}, {"description": "The id of the service instance to perform the patch call on", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "service_id", "in": "path"}], "requestBody": {"description": "* **comment:** Additional information describing this patch operation. This information will be included in log records of\nthe update operation. Contrasting with `patch_id`, the `comment` parameter is intended for human-readable\nnotes or explanations about the patch operation.\n* **current_version:** The current version of the resource. This parameter is used for concurrency control to ensure\nthat an update can only happen when the instance has not changed since the caller last inspected\nit.\n* **edit:** The actual edit operations to perform.\nDescription operation:\n  * replace operation: Replace the entire subtree, referenced by the target of an edit, with a new value.\n  * merge operation: Merge the subtree, referenced by the target of an edit, with the value of the edit.\n                     Only attributes mentioned in the value of the edit will be updated. Embedded entities\n                     in the current attributes and the value of the edit will be matched based on the key\n                     attributes of the embedded entity.\n  * remove operation: Remove the entire subtree, referenced by the target of an edit.\n\nOperation support:\n   * The replace operation is supported on any type of attribute and on the entire service entity using the\n     \".\" target.\n   * The merge operation is supported on the entire service entity using \".\" target or on an embedded entity.\n     When the embedded entity has an upper arity larger than one, the value of the edit should be a list of\n     dictionaries.\n   * The delete operation is supported on:\n        - Attributes with a default value: This attribute can be a primary attribute or a relationship\n                                           to an embedded entity.\n        - A specific element in a list of embedded entities: For this action, the target should use the\n          \"relationship[key_attr=attr_value]\" syntax to indicate which element has to be deleted. Selecting an\n          element should be done using the key attributes of the embedded entity and all key attributes should\n          be specified.\n* **patch_id:** The id of this specific patch call. This id is used in log messages.\nThe `patch_id` serves as a user-defined identifier for tracking and correlating specific patch operations\nwithin a request. It helps for tracing back any errors or outputs to the corresponding API call,\naiding in debugging and logging processes. This identifier is not utilized by the orchestrator for\nfunctional processes apart from reporting.\nEach `patch_id` must be unique within a single request to ensure accurate tracking of individual\noperations.\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"current_version": {"type": "integer"}, "patch_id": {"type": "string"}, "edit": {"type": "array", "items": {"$ref": "#/components/schemas/PatchCallEdit"}}, "comment": {"type": "string", "nullable": true}}}}}, "required": true}, "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}, "400": {"description": "This exception is raised on invalid requests, e.g., when the attribute validation fails"}, "404": {"description": "This exception is raised when the referenced environment, service_entity or service_id is not found"}, "409": {"description": "This exception is raised when the provided current_version does not match the actual current version"}}, "tags": ["lsm.service_inventory"]}}, "/lsm/v1/service_inventory/<service_entity>/<service_id>/resources": {"get": {"operationId": "lsm_services_resources_list", "summary": "Get the list of resources that determine the state of the service", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The unique name of the service entity", "required": true, "schema": {"type": "string"}, "name": "service_entity", "in": "path"}, {"description": "The id of the service instance for which the resources should be retrieved", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "service_id", "in": "path"}, {"description": "The current version of the resource. This parameter is used for concurrency control", "schema": {"type": "integer"}, "name": "current_version", "in": "query"}], "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/Resource"}}}}}}}, "404": {"description": "This exception is raised when the referenced environment, service_entity or service_id is not found"}, "409": {"description": "This exception is raised when the provided current_version does not match the actual current version"}}, "tags": ["lsm.service_inventory"]}, "post": {"operationId": "lsm_services_resources_set_state", "summary": "Set the state of a resource.", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The unique name of the service entity", "required": true, "schema": {"type": "string"}, "name": "service_entity", "in": "path"}, {"description": "The id of the service instance to which the resources belong", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "service_id", "in": "path"}], "requestBody": {"description": "* **current_desired_state_version:** The current version of the desired state of the instance.\nThis parameter is used for transitions preserving the same desired state\n* **current_version:** The current version of the resource. This parameter is used for concurrency control. This version\ncould be None if the other version is being used: `current_desired_state_version`\n* **resource_states:** A mapping of resource version ids to the deployment state of this versions\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"current_version": {"type": "integer", "nullable": true}, "resource_states": {"type": "object", "additionalProperties": {"$ref": "#/components/schemas/ResourceState"}}, "current_desired_state_version": {"type": "integer", "nullable": true}}}}}, "required": true}, "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}, "400": {"description": "This exception is raised on invalid requests"}, "404": {"description": "This exception is raised when the referenced environment, service_entity or service_id is not found"}, "409": {"description": "This exception is raised when the provided current_version does not match the actual current version"}}, "tags": ["lsm.service_inventory"]}}, "/lsm/v1/service_inventory/<service_entity>/<service_id>/state": {"post": {"operationId": "lsm_services_set_state", "summary": "Trigger a state transition for the given service instance.", "parameters": [{"description": "The id of the environment.", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The unique name of the service entity.", "required": true, "schema": {"type": "string"}, "name": "service_entity", "in": "path"}, {"description": "The id of the service instance to trigger.", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "service_id", "in": "path"}], "requestBody": {"description": "* **current_version:** The current version of the service instance. This parameter is used for concurrency control to\nensure that an update can only happen when the instance has not changed since the caller last\ninspected it.\n* **message:** A message to include in the logs why this transfer was done.\n* **target_state:** The target state to move the lifecycle to.\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"current_version": {"type": "integer"}, "target_state": {"type": "string"}, "message": {"type": "string"}}}}}, "required": true}, "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}, "404": {"description": "This exception is raised when the referenced environment or service_entity is not found."}, "409": {"description": "This exception is raised when the provided current_version does not match the actual current version."}}, "tags": ["lsm.service_inventory"]}}, "/lsm/v1/service_inventory/<service_entity>/<service_id>/expert/state": {"post": {"operationId": "lsm_services_set_state_expert", "summary": "Force a service instance into a certain state without doing any validation or triggering any effects.", "description": "This operation can be executed even where there isn't a transition between the current state and the target state in the\nlifecycle of the instance. The enable_lsm_expert_mode environment setting has to be enabled to be able to perform this\naction.", "parameters": [{"description": "The id of the environment.", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The unique name of the service entity.", "required": true, "schema": {"type": "string"}, "name": "service_entity", "in": "path"}, {"description": "The id of the service instance.", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "service_id", "in": "path"}], "requestBody": {"description": "* **current_version:** The current version of the service instance. This parameter is used for concurrency control to\nensure that an update can only happen when the instance has not changed since the caller last\ninspected it. Leave unset, if this concurrency control check is not desired.\n* **message:** A message to include in the logs why this transfer was done.\n* **operation:** The operation to perform on the attribute sets of the service instance. If unset,\ndon't perform an attribute operation.\n* **target_state:** Put the lifecycle in this state.\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"target_state": {"type": "string"}, "message": {"type": "string"}, "current_version": {"type": "integer", "nullable": true}, "operation": {"$ref": "#/components/schemas/AttributeOperation", "nullable": true}}}}}, "required": true}, "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}, "404": {"description": "This exception is raised when the referenced environment or service_entity is not found."}, "409": {"description": "This exception is raised when the provided current_version does not match the actual current version."}, "403": {"description": "When the enable_lsm_expert_mode environment setting is not enabled for the given environment."}}, "tags": ["lsm.service_inventory"]}}, "/lsm/v1/service_inventory/<service_entity>/<service_id>/update_entity_version": {"patch": {"operationId": "lsm_services_update_entity_version", "summary": "[Experimental]", "description": "This endpoint migrates a service instance from one service entity version to another.\nThe provided attribute sets should be compliant with the schema of the new service entity version.\nAt least one attribute set needs to be provided.", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The unique name of the service entity", "required": true, "schema": {"type": "string"}, "name": "service_entity", "in": "path"}, {"description": "The id of the service instance to perform the put call on", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "service_id", "in": "path"}], "requestBody": {"description": "* **active_attributes:** The set of attributes when the model is evaluated with only active instances.\n* **candidate_attributes:** The set of attributes used when the service instance model state is candidate or designed.\n* **comment:** Additional information describing this update operation. This information will be included in\nlog records of the update operation.\n* **config:** This mapping should contain the full set of config options for which the default, specified on the target\nservice entity version, needs to be overridden for this service instance. For any config option not\nspecified in this dictionary, the service instance will use the default value\n of the target service entity version.\n* **current_version:** The current version of the service. This parameter is used for concurrency control to ensure\nthat an update can only happen when the instance has not changed since the caller last inspected\nit.\n* **put_id:** The id of this specific put call\n* **rollback_attributes:** The set of attributes that can be used to rollback active attributes that result in an error\nstate.\n* **state:** The target state to move the lifecycle to.\n* **target_entity_version:** The version of the service entity that we want to migrate to.\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"current_version": {"type": "integer"}, "target_entity_version": {"type": "integer"}, "state": {"type": "string"}, "candidate_attributes": {"type": "object", "nullable": true}, "active_attributes": {"type": "object", "nullable": true}, "rollback_attributes": {"type": "object", "nullable": true}, "config": {"type": "object", "additionalProperties": {"type": "boolean"}, "nullable": true}, "put_id": {"type": "string", "nullable": true}, "comment": {"type": "string", "nullable": true}}}}}, "required": true}, "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}, "400": {"description": "This exception is raised on invalid requests, e.g., when attribute validation fails"}, "404": {"description": "This exception is raised when the referenced environment, service_entity or service_id is not found"}}, "tags": ["lsm.service_inventory"]}}, "/lsm/v1/callbacks": {"get": {"operationId": "lsm_callbacks_list", "summary": "List all registered callbacks for the environment", "parameters": [{"description": "ID of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}], "responses": {"200": {"description": "A list of callbacks in the environment.", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/Callback"}}}}}}}, "404": {"description": "This exception is raised when the referenced environment is not found"}}, "tags": ["lsm.callback"]}, "post": {"operationId": "lsm_callbacks_create", "summary": "Register a new callback for a service entity", "parameters": [{"description": "ID of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}], "requestBody": {"description": "* **callback_id:** Optionally the id of the callback\n* **callback_url:** Url to call when an event occurs. It should accept POST requests with application/json Content-Type\n* **event_types:**\n* **minimal_log_level:**\n* **service_entity:** Name of service entity to subscribe events for\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"callback_url": {"type": "string", "format": "uri"}, "service_entity": {"type": "string", "nullable": true}, "callback_id": {"type": "string", "format": "uuid", "nullable": true}, "event_types": {"type": "array", "items": {"$ref": "#/components/schemas/EventType"}, "nullable": true}, "minimal_log_level": {"nullable": true, "anyOf": [{"$ref": "#/components/schemas/LogLevel"}, {"type": "integer"}]}}}}}, "required": true}, "responses": {"200": {"description": "ID of the callback", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "string", "format": "uuid"}}}}}}, "404": {"description": "This exception is raised when the referenced environment or service_entity is not found"}, "409": {"description": "When a callback with the given id already exists"}}, "tags": ["lsm.callback"]}}, "/lsm/v1/callbacks/<callback_id>": {"get": {"operationId": "lsm_callbacks_get", "summary": "Get the callback corresponding to the given id, if there is one", "parameters": [{"description": "ID of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "ID of the callback", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "callback_id", "in": "path"}], "responses": {"200": {"description": "The callback that matches the given ID", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/Callback"}}}}}}, "404": {"description": "When there is no callback with the given id"}}, "tags": ["lsm.callback"]}, "delete": {"operationId": "lsm_callbacks_delete", "summary": "Remove a registered callback", "parameters": [{"description": "ID of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "uuid of the callback to remove", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "callback_id", "in": "path"}], "responses": {"200": {"description": "", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}}, "404": {"description": "When there is no callback with the given id"}}, "tags": ["lsm.callback"]}}, "/lsm/v2/order": {"get": {"operationId": "lsm_order_list", "summary": "Get a batch of service orders.", "parameters": [{"description": "The id of the environment this resource belongs to", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "Limit the number of instances that are returned", "schema": {"type": "integer", "nullable": true}, "name": "limit", "in": "query"}, {"description": "Used as a continuation token for paging, in combination with the 'start' value, because the created_at\ntimestamp does not necessarily uniquely identify a service order.", "schema": {"type": "string", "format": "uuid", "nullable": true}, "name": "first_id", "in": "query"}, {"description": "Used as a continuation token for paging, in combination with the 'end' value, because the created_at\ntimestamp does not necessarily uniquely identify a service order.", "schema": {"type": "string", "format": "uuid", "nullable": true}, "name": "last_id", "in": "query"}, {"description": "Retrieve the service orders that have a created_at timestamp past this value.", "schema": {"type": "string", "format": "date-time", "nullable": true}, "name": "start", "in": "query"}, {"description": "Retrieve the service orders that have a created_at timestamp before this value.", "schema": {"type": "string", "format": "date-time", "nullable": true}, "name": "end", "in": "query"}, {"description": "Return the results sorted according to the parameter value.\nThe following sorting attributes are supported: 'created_at'.\nThe following orders are supported: 'asc', 'desc'", "schema": {"type": "string", "default": "created_at.asc"}, "name": "sort", "in": "query"}], "responses": {"200": {"description": "A list of all matching service_orders", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/ServiceOrder"}}}}}}}, "404": {"description": "This exception is raised when the referenced environment is not found"}, "400": {"description": "When the parameters used for filtering, sorting or paging are not valid"}}, "tags": ["lsm.order"]}, "post": {"operationId": "lsm_order_create", "summary": "Create a service order.", "description": "The service_order_items present in the order should be created without status field.\n\nAn order can only update instances of a service entity that have strict_modifier_enforcement enabled.", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}], "requestBody": {"description": "* **description:** description of this order\n* **id:** The id of the service order\n* **service_order_items:** a list of service order items\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"service_order_items": {"type": "array", "items": {"anyOf": [{"$ref": "#/components/schemas/CreateWritableServiceOrderItem"}, {"$ref": "#/components/schemas/DeleteWritableServiceOrderItem"}, {"$ref": "#/components/schemas/UpdateWritableServiceOrderItem"}]}}, "id": {"type": "string", "format": "uuid", "nullable": true}, "description": {"type": "string", "default": ""}}}}}, "required": true}, "responses": {"200": {"description": "The service order.", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/ServiceOrder"}}}}}}, "404": {"description": "This exception is raised when the referenced environment is not found"}, "409": {"description": "An order with the given id already exists."}}, "tags": ["lsm.order"]}}, "/lsm/v2/<tid>/order": {"get": {"operationId": "lsm_order_list", "summary": "Get a batch of service orders.", "parameters": [{"description": "The id of the environment this resource belongs to", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The id of the environment this resource belongs to", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "tid", "in": "path"}, {"description": "Limit the number of instances that are returned", "schema": {"type": "integer", "nullable": true}, "name": "limit", "in": "query"}, {"description": "Used as a continuation token for paging, in combination with the 'start' value, because the created_at\ntimestamp does not necessarily uniquely identify a service order.", "schema": {"type": "string", "format": "uuid", "nullable": true}, "name": "first_id", "in": "query"}, {"description": "Used as a continuation token for paging, in combination with the 'end' value, because the created_at\ntimestamp does not necessarily uniquely identify a service order.", "schema": {"type": "string", "format": "uuid", "nullable": true}, "name": "last_id", "in": "query"}, {"description": "Retrieve the service orders that have a created_at timestamp past this value.", "schema": {"type": "string", "format": "date-time", "nullable": true}, "name": "start", "in": "query"}, {"description": "Retrieve the service orders that have a created_at timestamp before this value.", "schema": {"type": "string", "format": "date-time", "nullable": true}, "name": "end", "in": "query"}, {"description": "Return the results sorted according to the parameter value.\nThe following sorting attributes are supported: 'created_at'.\nThe following orders are supported: 'asc', 'desc'", "schema": {"type": "string", "default": "created_at.asc"}, "name": "sort", "in": "query"}], "responses": {"200": {"description": "A list of all matching service_orders", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"type": "array", "items": {"$ref": "#/components/schemas/ServiceOrder"}}}}}}}, "404": {"description": "This exception is raised when the referenced environment is not found"}, "400": {"description": "When the parameters used for filtering, sorting or paging are not valid"}}, "tags": ["lsm.order"]}, "post": {"operationId": "lsm_order_create", "summary": "Create a service order.", "description": "The service_order_items present in the order should be created without status field.\n\nAn order can only update instances of a service entity that have strict_modifier_enforcement enabled.", "parameters": [{"description": "The id of the environment", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The id of the environment", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "tid", "in": "path"}], "requestBody": {"description": "* **description:** description of this order\n* **id:** The id of the service order\n* **service_order_items:** a list of service order items\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"service_order_items": {"type": "array", "items": {"anyOf": [{"$ref": "#/components/schemas/CreateWritableServiceOrderItem"}, {"$ref": "#/components/schemas/DeleteWritableServiceOrderItem"}, {"$ref": "#/components/schemas/UpdateWritableServiceOrderItem"}]}}, "id": {"type": "string", "format": "uuid", "nullable": true}, "description": {"type": "string", "default": ""}}}}}, "required": true}, "responses": {"200": {"description": "The service order.", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/ServiceOrder"}}}}}}, "404": {"description": "This exception is raised when the referenced environment is not found"}, "409": {"description": "An order with the given id already exists."}}, "tags": ["lsm.order"]}}, "/lsm/v2/order/<order_id>": {"get": {"operationId": "lsm_order_get", "summary": "Get a single service order.", "parameters": [{"description": "The environment that contains the service order.", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The id of the service order.", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "order_id", "in": "path"}], "responses": {"200": {"description": "The service order.", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/ServiceOrder"}}}}}}, "404": {"description": "This exception is raised when the referenced environment or order_id is not found"}}, "tags": ["lsm.order"]}}, "/lsm/v2/<tid>/order/<order_id>": {"get": {"operationId": "lsm_order_get", "summary": "Get a single service order.", "parameters": [{"description": "The environment that contains the service order.", "schema": {"type": "string", "format": "uuid"}, "name": "X-Inmanta-tid", "in": "header"}, {"description": "The environment that contains the service order.", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "tid", "in": "path"}, {"description": "The id of the service order.", "required": true, "schema": {"type": "string", "format": "uuid"}, "name": "order_id", "in": "path"}], "responses": {"200": {"description": "The service order.", "headers": {"X-Inmanta-tid": {"description": "The value of the request header X-Inmanta-tid", "schema": {"type": "string"}}}, "content": {"application/json": {"schema": {"type": "object", "properties": {"data": {"$ref": "#/components/schemas/ServiceOrder"}}}}}}, "404": {"description": "This exception is raised when the referenced environment or order_id is not found"}}, "tags": ["lsm.order"]}}, "/api/v1/support/full": {"get": {"operationId": "full_support_handle", "summary": "Collect all available information from the server for troubleshooting purposes", "responses": {"200": {"description": "A base64 encoded zip file containing troubleshooting information", "content": {"application/json": {"schema": {"type": "object", "properties": {"links": {"title": "Links", "type": "object", "additionalProperties": {"type": "string"}, "nullable": true}, "metadata": {"title": "Metadata", "type": "object", "properties": {"warnings": {"title": "Warnings", "type": "array", "items": {"type": "string"}}}, "nullable": true}, "data": {"type": "string"}}}}}}}, "tags": ["support.support"]}}, "/api/v1/support": {"post": {"operationId": "support_information_handle", "summary": "Collect information from the server for troubleshooting purposes", "requestBody": {"description": "* **collectors:** List of collector definitions (names and options) to use be used for data collection, e.g., logs,\nserver_status, configuration\n", "content": {"application/json": {"schema": {"type": "object", "properties": {"collectors": {"type": "array", "items": {"$ref": "#/components/schemas/CollectorModel"}}}}}}, "required": true}, "responses": {"200": {"description": "A base64 encoded zip file containing troubleshooting information", "content": {"application/json": {"schema": {"type": "object", "properties": {"links": {"title": "Links", "type": "object", "additionalProperties": {"type": "string"}, "nullable": true}, "metadata": {"title": "Metadata", "type": "object", "properties": {"warnings": {"title": "Warnings", "type": "array", "items": {"type": "string"}}}, "nullable": true}, "data": {"type": "string"}}}}}}}, "tags": ["support.support"]}}}, "components": {"schemas": {"ApiDocsFormat": {"title": "ApiDocsFormat", "type": "string", "enum": ["openapi", "swagger"]}, "Components": {"title": "Components", "type": "object", "properties": {"schemas": {"title": "Schemas", "type": "object", "additionalProperties": {"$ref": "#/components/schemas/Schema"}, "nullable": true}, "responses": {"title": "Responses", "type": "object", "additionalProperties": {"anyOf": [{"$ref": "#/components/schemas/Response"}, {"$ref": "#/components/schemas/Reference"}]}, "nullable": true}, "parameters": {"title": "Parameters", "type": "object", "additionalProperties": {"anyOf": [{"$ref": "#/components/schemas/Parameter"}, {"$ref": "#/components/schemas/Reference"}]}, "nullable": true}, "examples": {"title": "Examples", "type": "object", "additionalProperties": {"anyOf": [{"$ref": "#/components/schemas/Example"}, {"$ref": "#/components/schemas/Reference"}]}, "nullable": true}, "requestBodies": {"title": "Requestbodies", "type": "object", "additionalProperties": {"anyOf": [{"$ref": "#/components/schemas/RequestBody"}, {"$ref": "#/components/schemas/Reference"}]}, "nullable": true}, "headers": {"title": "Headers", "type": "object", "additionalProperties": {"anyOf": [{"$ref": "#/components/schemas/Header"}, {"$ref": "#/components/schemas/Reference"}]}, "nullable": true}, "securitySchemes": {"title": "Securityschemes", "type": "object", "additionalProperties": {"$ref": "#/components/schemas/SecurityScheme"}, "nullable": true}}}, "Encoding": {"title": "Encoding", "type": "object", "properties": {"contentType": {"title": "Contenttype", "type": "string", "nullable": true}, "headers": {"title": "Headers", "type": "object", "additionalProperties": {"anyOf": [{}, {"$ref": "#/components/schemas/Reference"}]}, "nullable": true}, "allowReserved": {"title": "Allowreserved", "type": "boolean", "nullable": true}}}, "Example": {"title": "Example", "type": "object", "properties": {"summary": {"title": "Summary", "type": "string", "nullable": true}, "description": {"title": "Description", "type": "string", "nullable": true}, "value": {"title": "Value", "nullable": true}, "externalValue": {"title": "Externalvalue", "type": "string", "format": "uri", "nullable": true}}}, "Header": {"title": "Header", "type": "object", "properties": {"description": {"title": "Description", "type": "string", "nullable": true}, "required": {"title": "Required", "type": "boolean", "nullable": true}, "deprecated": {"title": "Deprecated", "type": "boolean", "nullable": true}, "allowReserved": {"title": "Allowreserved", "type": "boolean", "nullable": true}, "schema": {"title": "Schema", "nullable": true, "anyOf": [{"$ref": "#/components/schemas/Schema"}, {"$ref": "#/components/schemas/Reference"}]}, "example": {"title": "Example", "nullable": true}, "examples": {"title": "Examples", "type": "object", "additionalProperties": {"anyOf": [{"$ref": "#/components/schemas/Example"}, {"$ref": "#/components/schemas/Reference"}]}, "nullable": true}, "content": {"title": "Content", "type": "object", "additionalProperties": {"$ref": "#/components/schemas/MediaType"}, "nullable": true}}}, "Info": {"title": "Info", "required": ["title", "version"], "type": "object", "properties": {"title": {"title": "Title", "type": "string"}, "description": {"title": "Description", "type": "string", "nullable": true}, "license": {"$ref": "#/components/schemas/License", "nullable": true}, "version": {"title": "Version", "type": "string"}}}, "License": {"title": "License", "required": ["name"], "type": "object", "properties": {"name": {"title": "Name", "type": "string"}, "url": {"title": "Url", "type": "string", "format": "uri", "nullable": true}}}, "MediaType": {"title": "MediaType", "type": "object", "properties": {"schema": {"title": "Schema", "nullable": true, "anyOf": [{"$ref": "#/components/schemas/Schema"}, {"$ref": "#/components/schemas/Reference"}]}, "example": {"title": "Example", "nullable": true}, "examples": {"title": "Examples", "type": "object", "additionalProperties": {"anyOf": [{"$ref": "#/components/schemas/Example"}, {"$ref": "#/components/schemas/Reference"}]}, "nullable": true}, "encoding": {"title": "Encoding", "type": "object", "additionalProperties": {"$ref": "#/components/schemas/Encoding"}, "nullable": true}}}, "OpenAPI": {"title": "OpenAPI", "required": ["openapi", "info", "paths"], "type": "object", "properties": {"openapi": {"title": "Openapi", "type": "string"}, "info": {"$ref": "#/components/schemas/Info"}, "servers": {"title": "Servers", "type": "array", "items": {"$ref": "#/components/schemas/Server"}, "nullable": true}, "paths": {"title": "Paths", "type": "object", "additionalProperties": {"$ref": "#/components/schemas/PathItem"}}, "components": {"$ref": "#/components/schemas/Components", "nullable": true}, "security": {"title": "Security", "type": "array", "items": {"type": "object", "additionalProperties": {"type": "array", "items": {"type": "string"}}}, "nullable": true}}}, "Operation": {"title": "Operation", "required": ["operationId", "responses"], "type": "object", "properties": {"operationId": {"title": "Operationid", "type": "string"}, "summary": {"title": "Summary", "type": "string", "nullable": true}, "description": {"title": "Description", "type": "string", "nullable": true}, "parameters": {"title": "Parameters", "type": "array", "items": {"anyOf": [{"$ref": "#/components/schemas/Parameter"}, {"$ref": "#/components/schemas/Reference"}]}, "nullable": true}, "requestBody": {"title": "Requestbody", "nullable": true, "anyOf": [{"$ref": "#/components/schemas/RequestBody"}, {"$ref": "#/components/schemas/Reference"}]}, "responses": {"title": "Responses", "type": "object", "additionalProperties": {"$ref": "#/components/schemas/Response"}}, "deprecated": {"title": "Deprecated", "type": "boolean", "nullable": true}, "tags": {"title": "Tags", "type": "array", "items": {"type": "string"}, "nullable": true}}}, "Parameter": {"title": "Parameter", "required": ["name", "in"], "type": "object", "properties": {"description": {"title": "Description", "type": "string", "nullable": true}, "required": {"title": "Required", "type": "boolean", "nullable": true}, "deprecated": {"title": "Deprecated", "type": "boolean", "nullable": true}, "allowReserved": {"title": "Allowreserved", "type": "boolean", "nullable": true}, "schema": {"title": "Schema", "nullable": true, "anyOf": [{"$ref": "#/components/schemas/Schema"}, {"$ref": "#/components/schemas/Reference"}]}, "example": {"title": "Example", "nullable": true}, "examples": {"title": "Examples", "type": "object", "additionalProperties": {"anyOf": [{"$ref": "#/components/schemas/Example"}, {"$ref": "#/components/schemas/Reference"}]}, "nullable": true}, "content": {"title": "Content", "type": "object", "additionalProperties": {"$ref": "#/components/schemas/MediaType"}, "nullable": true}, "name": {"title": "Name", "type": "string"}, "in": {"$ref": "#/components/schemas/ParameterType"}}}, "ParameterType": {"title": "ParameterType", "type": "string", "enum": ["query", "header", "path", "cookie"]}, "PathItem": {"title": "PathItem", "type": "object", "properties": {"$ref": {"title": "$Ref", "type": "string", "nullable": true}, "summary": {"title": "Summary", "type": "string", "nullable": true}, "description": {"title": "Description", "type": "string", "nullable": true}, "get": {"$ref": "#/components/schemas/Operation", "nullable": true}, "put": {"$ref": "#/components/schemas/Operation", "nullable": true}, "post": {"$ref": "#/components/schemas/Operation", "nullable": true}, "delete": {"$ref": "#/components/schemas/Operation", "nullable": true}, "options": {"$ref": "#/components/schemas/Operation", "nullable": true}, "head": {"$ref": "#/components/schemas/Operation", "nullable": true}, "patch": {"$ref": "#/components/schemas/Operation", "nullable": true}, "trace": {"$ref": "#/components/schemas/Operation", "nullable": true}, "parameters": {"title": "Parameters", "type": "array", "items": {"anyOf": [{"$ref": "#/components/schemas/Parameter"}, {"$ref": "#/components/schemas/Reference"}]}, "nullable": true}}}, "Reference": {"title": "Reference", "required": ["$ref"], "type": "object", "properties": {"$ref": {"title": "$Ref", "type": "string"}}}, "RequestBody": {"title": "RequestBody", "required": ["content"], "type": "object", "properties": {"description": {"title": "Description", "type": "string", "nullable": true}, "content": {"title": "Content", "type": "object", "additionalProperties": {"$ref": "#/components/schemas/MediaType"}}, "required": {"title": "Required", "type": "boolean", "nullable": true}}}, "Response": {"title": "Response", "required": ["description"], "type": "object", "properties": {"description": {"title": "Description", "type": "string"}, "headers": {"title": "Headers", "type": "object", "additionalProperties": {"anyOf": [{"$ref": "#/components/schemas/Header"}, {"$ref": "#/components/schemas/Reference"}]}, "nullable": true}, "content": {"title": "Content", "type": "object", "additionalProperties": {"$ref": "#/components/schemas/MediaType"}, "nullable": true}}}, "Schema": {"title": "Schema", "type": "object", "properties": {"$ref": {"title": "$Ref", "type": "string", "nullable": true}, "title": {"title": "Title", "type": "string", "nullable": true}, "required": {"title": "Required", "type": "array", "items": {"type": "string"}, "nullable": true}, "type": {"title": "Type", "type": "string", "nullable": true}, "items": {"$ref": "#/components/schemas/Schema", "nullable": true}, "properties": {"title": "Properties", "type": "object", "additionalProperties": {"$ref": "#/components/schemas/Schema"}, "nullable": true}, "additionalProperties": {"title": "Additionalproperties", "nullable": true, "anyOf": [{"$ref": "#/components/schemas/Schema"}, {"type": "boolean"}]}, "description": {"title": "Description", "type": "string", "nullable": true}, "format": {"title": "Format", "type": "string", "nullable": true}, "default": {"title": "Default", "nullable": true}, "nullable": {"title": "Nullable", "type": "boolean", "nullable": true}, "readOnly": {"title": "Readonly", "type": "boolean", "nullable": true}, "example": {"title": "Example", "nullable": true}, "deprecated": {"title": "Deprecated", "type": "boolean", "nullable": true}, "anyOf": {"title": "Anyof", "type": "array", "items": {"$ref": "#/components/schemas/Schema"}, "nullable": true}, "allOf": {"title": "Allof", "type": "array", "items": {"$ref": "#/components/schemas/Schema"}, "nullable": true}, "oneOf": {"title": "Oneof", "type": "array", "items": {"$ref": "#/components/schemas/Schema"}, "nullable": true}, "enum": {"title": "Enum", "type": "array", "items": {"type": "string"}, "nullable": true}}}, "SecurityScheme": {"title": "SecurityScheme", "required": ["type", "scheme", "bearerFormat"], "type": "object", "properties": {"type": {"title": "Type", "type": "string"}, "scheme": {"title": "Scheme", "type": "string"}, "bearerFormat": {"title": "Bearerformat", "type": "string"}}}, "Server": {"title": "Server", "required": ["url"], "type": "object", "properties": {"url": {"title": "Url", "type": "string"}, "description": {"title": "Description", "type": "string", "nullable": true}}}, "BaseModel": {"title": "BaseModel", "type": "object", "properties": {}, "description": "Base class for all data objects in Inmanta"}, "ExtensionStatus": {"title": "ExtensionStatus", "required": ["name", "version", "package"], "type": "object", "properties": {"name": {"title": "Name", "type": "string"}, "version": {"title": "Version", "type": "string"}, "package": {"title": "Package", "type": "string"}}, "description": "Status response for extensions loaded in the server"}, "FeatureStatus": {"title": "FeatureStatus", "required": ["slice", "name"], "type": "object", "properties": {"slice": {"title": "Slice", "type": "string"}, "name": {"title": "Name", "type": "string"}, "value": {"title": "Value", "nullable": true}}, "description": "Status of the feature"}, "SliceStatus": {"title": "SliceStatus", "required": ["name", "status"], "type": "object", "properties": {"name": {"title": "Name", "type": "string"}, "status": {"title": "Status", "type": "object", "additionalProperties": {"anyOf": [{"$ref": "#/components/schemas/BaseModel"}, {"type": "string", "format": "uuid"}, {"type": "boolean"}, {"type": "integer"}, {"type": "number"}, {"type": "string", "format": "date-time"}, {"type": "string"}, {"type": "array", "items": {"anyOf": [{"$ref": "#/components/schemas/BaseModel"}, {"type": "string", "format": "uuid"}, {"type": "boolean"}, {"type": "integer"}, {"type": "number"}, {"type": "string", "format": "date-time"}, {"type": "string"}]}}, {"type": "object", "additionalProperties": {"anyOf": [{"$ref": "#/components/schemas/BaseModel"}, {"type": "string", "format": "uuid"}, {"type": "boolean"}, {"type": "integer"}, {"type": "number"}, {"type": "string", "format": "date-time"}, {"type": "string"}]}}]}}}, "description": "Status response for slices loaded in the server"}, "StatusResponse": {"title": "StatusResponse", "required": ["product", "edition", "version", "license", "extensions", "slices", "features"], "type": "object", "properties": {"product": {"title": "Product", "type": "string"}, "edition": {"title": "Edition", "type": "string"}, "version": {"title": "Version", "type": "string"}, "license": {"title": "License", "anyOf": [{"type": "string"}, {"type": "object", "additionalProperties": {"anyOf": [{"$ref": "#/components/schemas/BaseModel"}, {"type": "string", "format": "uuid"}, {"type": "boolean"}, {"type": "integer"}, {"type": "number"}, {"type": "string", "format": "date-time"}, {"type": "string"}]}}]}, "extensions": {"title": "Extensions", "type": "array", "items": {"$ref": "#/components/schemas/ExtensionStatus"}}, "slices": {"title": "Slices", "type": "array", "items": {"$ref": "#/components/schemas/SliceStatus"}}, "features": {"title": "Features", "type": "array", "items": {"$ref": "#/components/schemas/FeatureStatus"}}}, "description": "Response for the status method call"}, "AgentAction": {"title": "AgentAction", "type": "string", "enum": ["pause", "unpause", "keep_paused_on_resume", "unpause_on_resume"]}, "AgentProcess": {"title": "AgentProcess", "required": ["sid", "hostname", "environment"], "type": "object", "properties": {"sid": {"title": "Sid", "type": "string", "format": "uuid"}, "hostname": {"title": "Hostname", "type": "string"}, "environment": {"title": "Environment", "type": "string", "format": "uuid"}, "first_seen": {"title": "First Seen", "type": "string", "format": "date-time", "nullable": true}, "last_seen": {"title": "Last Seen", "type": "string", "format": "date-time", "nullable": true}, "expired": {"title": "Expired", "type": "string", "format": "date-time", "nullable": true}, "state": {"title": "State", "type": "object", "additionalProperties": {"anyOf": [{"type": "object", "additionalProperties": {"type": "array", "items": {"type": "string"}}}, {"type": "object", "additionalProperties": {"type": "string"}}, {"type": "object", "additionalProperties": {"type": "number"}}, {"type": "string"}]}, "nullable": true}}}, "Agent": {"title": "Agent", "required": ["environment", "name", "paused", "status"], "type": "object", "properties": {"environment": {"title": "Environment", "type": "string", "format": "uuid"}, "name": {"title": "Name", "type": "string"}, "last_failover": {"title": "Last Failover", "type": "string", "format": "date-time", "nullable": true}, "paused": {"title": "Paused", "type": "boolean"}, "process_id": {"title": "Process Id", "type": "string", "format": "uuid", "nullable": true}, "process_name": {"title": "Process Name", "type": "string", "nullable": true}, "unpause_on_resume": {"title": "Unpause On Resume", "type": "boolean", "nullable": true}, "status": {"$ref": "#/components/schemas/AgentStatus"}}, "description": ":param environment: Id of the agent's environment\n:param name: The name of the agent\n:param last_failover: The time of the last failover\n:param paused: Whether the agent is paused or not\n:param unpause_on_resume: Whether the agent should be unpaused when the environment is resumed\n:param status: The current status of the agent\n:param process_id: The id of the agent process that belongs to this agent, if there is one\n:param process_name: The name of the agent process that belongs to this agent, if there is one"}, "AgentStatus": {"title": "AgentStatus", "type": "string", "enum": ["paused", "up", "down"]}, "CompileData": {"title": "CompileData", "required": ["errors"], "type": "object", "properties": {"errors": {"title": "Errors", "type": "array", "items": {"$ref": "#/components/schemas/Error"}}}, "description": "Top level structure of compiler data to be exported."}, "CompileDetails": {"title": "CompileDetails", "required": ["id", "environment", "do_export", "force_update", "metadata", "mergeable_environment_variables", "requested_environment_variables", "environment_variables", "partial", "removed_resource_sets"], "type": "object", "properties": {"id": {"title": "Id", "type": "string", "format": "uuid"}, "remote_id": {"title": "Remote Id", "type": "string", "format": "uuid", "nullable": true}, "environment": {"title": "Environment", "type": "string", "format": "uuid"}, "requested": {"title": "Requested", "type": "string", "format": "date-time", "nullable": true}, "started": {"title": "Started", "type": "string", "format": "date-time", "nullable": true}, "do_export": {"title": "Do Export", "type": "boolean"}, "force_update": {"title": "Force Update", "type": "boolean"}, "metadata": {"title": "Metadata", "type": "object"}, "mergeable_environment_variables": {"title": "Mergeable Environment Variables", "type": "object", "additionalProperties": {"type": "string"}}, "requested_environment_variables": {"title": "Requested Environment Variables", "type": "object", "additionalProperties": {"type": "string"}}, "environment_variables": {"title": "Environment Variables", "type": "object", "additionalProperties": {"type": "string"}}, "partial": {"title": "Partial", "type": "boolean"}, "removed_resource_sets": {"title": "Removed Resource Sets", "type": "array", "items": {"type": "string"}}, "exporter_plugin": {"title": "Exporter Plugin", "type": "string", "nullable": true}, "notify_failed_compile": {"title": "Notify Failed Compile", "type": "boolean", "nullable": true}, "failed_compile_message": {"title": "Failed Compile Message", "type": "string", "nullable": true}, "completed": {"title": "Completed", "type": "string", "format": "date-time", "nullable": true}, "success": {"title": "Success", "type": "boolean", "nullable": true}, "version": {"title": "Version", "type": "integer", "nullable": true}, "compile_data": {"$ref": "#/components/schemas/CompileData", "nullable": true}, "reports": {"title": "Reports", "type": "array", "items": {"$ref": "#/components/schemas/CompileRunReport"}, "nullable": true}}}, "CompileRunReport": {"title": "CompileRunReport", "required": ["id", "started", "command", "name", "errstream", "outstream"], "type": "object", "properties": {"id": {"title": "Id", "type": "string", "format": "uuid"}, "started": {"title": "Started", "type": "string", "format": "date-time"}, "completed": {"title": "Completed", "type": "string", "format": "date-time", "nullable": true}, "command": {"title": "Command", "type": "string"}, "name": {"title": "Name", "type": "string"}, "errstream": {"title": "Errstream", "type": "string"}, "outstream": {"title": "Outstream", "type": "string"}, "returncode": {"title": "Returncode", "type": "integer", "nullable": true}}}, "Error": {"title": "Error", "required": ["type", "message"], "type": "object", "properties": {"category": {"$ref": "#/components/schemas/ErrorCategory", "default": "runtime_error"}, "type": {"title": "Type", "type": "string"}, "message": {"title": "Message", "type": "string"}, "location": {"$ref": "#/components/schemas/Location", "nullable": true}}, "additionalProperties": true, "description": "Error occurred while trying to compile."}, "ErrorCategory": {"title": "ErrorCategory", "type": "string", "description": "Category of an error.", "enum": ["plugin_exception", "parse_error", "runtime_error"]}, "Location": {"title": "Location", "required": ["uri", "range"], "type": "object", "properties": {"uri": {"title": "Uri", "type": "string"}, "range": {"$ref": "#/components/schemas/Range"}}, "description": "Location in a file. Based on the\n`LSP spec 3.15 <https://microsoft.github.io/language-server-protocol/specifications/specification-3-15/#location>`__"}, "Position": {"title": "Position", "required": ["line", "character"], "type": "object", "properties": {"line": {"title": "Line", "type": "integer"}, "character": {"title": "Character", "type": "integer"}}, "description": "Position in a file. Based on the\n`LSP spec 3.15 <https://microsoft.github.io/language-server-protocol/specifications/specification-3-15/#position>`__"}, "Range": {"title": "Range", "required": ["start", "end"], "type": "object", "properties": {"start": {"$ref": "#/components/schemas/Position"}, "end": {"$ref": "#/components/schemas/Position"}}, "description": "Range in a file. Based on the\n`LSP spec 3.15 <https://microsoft.github.io/language-server-protocol/specifications/specification-3-15/#range>`__"}, "CompileRun": {"title": "CompileRun", "required": ["id", "environment", "do_export", "force_update", "metadata", "mergeable_environment_variables", "requested_environment_variables", "environment_variables", "partial", "removed_resource_sets"], "type": "object", "properties": {"id": {"title": "Id", "type": "string", "format": "uuid"}, "remote_id": {"title": "Remote Id", "type": "string", "format": "uuid", "nullable": true}, "environment": {"title": "Environment", "type": "string", "format": "uuid"}, "requested": {"title": "Requested", "type": "string", "format": "date-time", "nullable": true}, "started": {"title": "Started", "type": "string", "format": "date-time", "nullable": true}, "do_export": {"title": "Do Export", "type": "boolean"}, "force_update": {"title": "Force Update", "type": "boolean"}, "metadata": {"title": "Metadata", "type": "object"}, "mergeable_environment_variables": {"title": "Mergeable Environment Variables", "type": "object", "additionalProperties": {"type": "string"}}, "requested_environment_variables": {"title": "Requested Environment Variables", "type": "object", "additionalProperties": {"type": "string"}}, "environment_variables": {"title": "Environment Variables", "type": "object", "additionalProperties": {"type": "string"}}, "partial": {"title": "Partial", "type": "boolean"}, "removed_resource_sets": {"title": "Removed Resource Sets", "type": "array", "items": {"type": "string"}}, "exporter_plugin": {"title": "Exporter Plugin", "type": "string", "nullable": true}, "notify_failed_compile": {"title": "Notify Failed Compile", "type": "boolean", "nullable": true}, "failed_compile_message": {"title": "Failed Compile Message", "type": "string", "nullable": true}, "compile_data": {"$ref": "#/components/schemas/CompileData", "nullable": true}}}, "CompileReport": {"title": "CompileReport", "required": ["id", "environment", "do_export", "force_update", "metadata", "mergeable_environment_variables", "requested_environment_variables", "environment_variables", "partial", "removed_resource_sets"], "type": "object", "properties": {"id": {"title": "Id", "type": "string", "format": "uuid"}, "remote_id": {"title": "Remote Id", "type": "string", "format": "uuid", "nullable": true}, "environment": {"title": "Environment", "type": "string", "format": "uuid"}, "requested": {"title": "Requested", "type": "string", "format": "date-time", "nullable": true}, "started": {"title": "Started", "type": "string", "format": "date-time", "nullable": true}, "do_export": {"title": "Do Export", "type": "boolean"}, "force_update": {"title": "Force Update", "type": "boolean"}, "metadata": {"title": "Metadata", "type": "object"}, "mergeable_environment_variables": {"title": "Mergeable Environment Variables", "type": "object", "additionalProperties": {"type": "string"}}, "requested_environment_variables": {"title": "Requested Environment Variables", "type": "object", "additionalProperties": {"type": "string"}}, "environment_variables": {"title": "Environment Variables", "type": "object", "additionalProperties": {"type": "string"}}, "partial": {"title": "Partial", "type": "boolean"}, "removed_resource_sets": {"title": "Removed Resource Sets", "type": "array", "items": {"type": "string"}}, "exporter_plugin": {"title": "Exporter Plugin", "type": "string", "nullable": true}, "notify_failed_compile": {"title": "Notify Failed Compile", "type": "boolean", "nullable": true}, "failed_compile_message": {"title": "Failed Compile Message", "type": "string", "nullable": true}, "completed": {"title": "Completed", "type": "string", "format": "date-time", "nullable": true}, "success": {"title": "Success", "type": "boolean", "nullable": true}, "version": {"title": "Version", "type": "integer", "nullable": true}}}, "Environment": {"title": "Environment", "required": ["id", "name", "project_id", "repo_url", "repo_branch", "settings", "halted"], "type": "object", "properties": {"id": {"title": "Id", "type": "string", "format": "uuid"}, "name": {"title": "Name", "type": "string"}, "project_id": {"title": "Project Id", "type": "string", "format": "uuid"}, "repo_url": {"title": "Repo Url", "type": "string"}, "repo_branch": {"title": "Repo Branch", "type": "string"}, "settings": {"title": "Settings", "type": "object", "additionalProperties": {"anyOf": [{"type": "boolean"}, {"type": "integer"}, {"type": "number"}, {"type": "string"}, {"type": "object", "additionalProperties": {"anyOf": [{"type": "string"}, {"type": "integer"}, {"type": "boolean"}]}}]}}, "halted": {"title": "Halted", "type": "boolean"}, "is_marked_for_deletion": {"title": "Is Marked For Deletion", "type": "boolean", "default": false}, "description": {"title": "Description", "type": "string", "nullable": true}, "icon": {"title": "Icon", "type": "string", "nullable": true}}, "description": "An inmanta environment.\n\n:note: repo_url and repo_branch will be moved to the settings."}, "Project": {"title": "Project", "required": ["id", "name", "environments"], "type": "object", "properties": {"id": {"title": "Id", "type": "string", "format": "uuid"}, "name": {"title": "Name", "type": "string"}, "environments": {"title": "Environments", "type": "array", "items": {"$ref": "#/components/schemas/Environment"}}}, "description": "An inmanta project."}, "EnvironmentSetting": {"title": "EnvironmentSetting", "required": ["name", "type", "default", "doc", "recompile", "update_model", "agent_restart"], "type": "object", "properties": {"name": {"title": "Name", "type": "string"}, "type": {"title": "Type", "type": "string"}, "default": {"title": "Default", "anyOf": [{"type": "boolean"}, {"type": "integer"}, {"type": "number"}, {"type": "string"}, {"type": "object", "additionalProperties": {"anyOf": [{"type": "string"}, {"type": "integer"}, {"type": "boolean"}]}}]}, "doc": {"title": "Doc", "type": "string"}, "recompile": {"title": "Recompile", "type": "boolean"}, "update_model": {"title": "Update Model", "type": "boolean"}, "agent_restart": {"title": "Agent Restart", "type": "boolean"}, "allowed_values": {"title": "Allowed Values", "type": "array", "items": {"anyOf": [{"type": "boolean"}, {"type": "integer"}, {"type": "number"}, {"type": "string"}, {"type": "object", "additionalProperties": {"anyOf": [{"type": "string"}, {"type": "integer"}, {"type": "boolean"}]}}]}, "nullable": true}}, "description": "A class to define a new environment setting.\n\n:param name: The name of the setting.\n:param type: The type of the value. This type is mainly used for documentation purpose.\n:param default: An optional default value for this setting. When a default is set and the\n                is requested from the database, it will return the default value and also store\n                the default value in the database.\n:param doc: The documentation/help string for this setting\n:param recompile: Trigger a recompile of the model when a setting is updated?\n:param update_model: Update the configuration model (git pull on project and repos)\n:param agent_restart: Restart autostarted agents when this settings is updated.\n:param allowed_values: list of possible values (if type is enum)"}, "EnvironmentSettingsReponse": {"title": "EnvironmentSettingsReponse", "required": ["settings", "definition"], "type": "object", "properties": {"settings": {"title": "Settings", "type": "object", "additionalProperties": {"anyOf": [{"type": "boolean"}, {"type": "integer"}, {"type": "number"}, {"type": "string"}, {"type": "object", "additionalProperties": {"anyOf": [{"type": "string"}, {"type": "integer"}, {"type": "boolean"}]}}]}}, "definition": {"title": "Definition", "type": "object", "additionalProperties": {"$ref": "#/components/schemas/EnvironmentSetting"}}}}, "ParameterSource": {"title": "ParameterSource", "type": "string", "enum": ["fact", "plugin", "user", "report"]}, "Fact": {"title": "Fact", "required": ["id", "name", "value", "environment", "source", "resource_id"], "type": "object", "properties": {"id": {"title": "Id", "type": "string", "format": "uuid"}, "name": {"title": "Name", "type": "string"}, "value": {"title": "Value", "type": "string"}, "environment": {"title": "Environment", "type": "string", "format": "uuid"}, "source": {"title": "Source", "type": "string"}, "updated": {"title": "Updated", "type": "string", "format": "date-time", "nullable": true}, "metadata": {"title": "Metadata", "type": "object", "nullable": true}, "resource_id": {"title": "Resource Id", "type": "string"}, "expires": {"title": "Expires", "type": "boolean", "default": true}}}, "DiscoveredResource": {"title": "DiscoveredResource", "required": ["discovered_resource_id", "values", "discovery_resource_id"], "type": "object", "properties": {"discovered_resource_id": {"title": "Discovered Resource Id", "type": "string"}, "values": {"title": "Values", "type": "object"}, "managed_resource_uri": {"title": "Managed Resource Uri", "type": "string", "nullable": true}, "discovery_resource_id": {"title": "Discovery Resource Id", "type": "string", "nullable": true}}, "description": ":param discovered_resource_id: The name of the resource\n:param values: The actual resource\n:param managed_resource_uri: URI of the resource with the same ID that is already\n    managed by the orchestrator e.g. \"/api/v2/resource/<rid>\". Or None if the resource is not managed.\n:param discovery_resource_id: Resource id of the (managed) discovery resource that reported this\n    discovered resource."}, "ResourceAction": {"title": "ResourceAction", "type": "string", "description": "Enumeration of all resource actions.", "enum": ["store", "push", "pull", "deploy", "dryrun", "getfact", "other"]}, "Change": {"title": "Change", "type": "string", "enum": ["nochange", "created", "purged", "updated"]}, "ResourceState": {"title": "ResourceState", "type": "string", "enum": ["success", "error", "waiting"]}, "inmanta__const__ResourceAction": {"title": "ResourceAction", "type": "string", "description": "Enumeration of all resource actions.", "enum": ["store", "push", "pull", "deploy", "dryrun", "getfact", "other"]}, "inmanta__data__model__ResourceAction": {"title": "ResourceAction", "required": ["environment", "version", "resource_version_ids", "action_id", "action", "started"], "type": "object", "properties": {"environment": {"title": "Environment", "type": "string", "format": "uuid"}, "version": {"title": "Version", "type": "integer"}, "resource_version_ids": {"title": "Resource Version Ids", "type": "array", "items": {"type": "string"}}, "action_id": {"title": "Action Id", "type": "string", "format": "uuid"}, "action": {"$ref": "#/components/schemas/inmanta__const__ResourceAction"}, "started": {"title": "Started", "type": "string", "format": "date-time"}, "finished": {"title": "Finished", "type": "string", "format": "date-time", "nullable": true}, "messages": {"title": "Messages", "type": "array", "items": {"type": "object"}, "nullable": true}, "status": {"$ref": "#/components/schemas/ResourceState", "nullable": true}, "changes": {"title": "Changes", "type": "object", "nullable": true}, "change": {"$ref": "#/components/schemas/Change", "nullable": true}, "send_event": {"title": "Send Event", "type": "boolean", "nullable": true}}}, "ResourceIdDetails": {"title": "ResourceIdDetails", "required": ["resource_type", "agent", "attribute", "resource_id_value"], "type": "object", "properties": {"resource_type": {"title": "Resource Type", "type": "string"}, "agent": {"title": "Agent", "type": "string"}, "attribute": {"title": "Attribute", "type": "string"}, "resource_id_value": {"title": "Resource Id Value", "type": "string"}}}, "VersionedResource": {"title": "VersionedResource", "required": ["resource_id", "resource_version_id", "id_details", "requires"], "type": "object", "properties": {"resource_id": {"title": "Resource Id", "type": "string"}, "resource_version_id": {"title": "Resource Version Id", "type": "string"}, "id_details": {"$ref": "#/components/schemas/ResourceIdDetails"}, "requires": {"title": "Requires", "type": "array", "items": {"type": "string"}}}}, "ReleasedResourceDetails": {"title": "ReleasedResourceDetails", "required": ["resource_id", "resource_type", "agent", "id_attribute", "id_attribute_value", "attributes", "first_generated_time", "first_generated_version", "status", "requires_status"], "type": "object", "properties": {"resource_id": {"title": "Resource Id", "type": "string"}, "resource_type": {"title": "Resource Type", "type": "string"}, "agent": {"title": "Agent", "type": "string"}, "id_attribute": {"title": "Id Attribute", "type": "string"}, "id_attribute_value": {"title": "Id Attribute Value", "type": "string"}, "attributes": {"title": "Attributes", "type": "object"}, "last_deploy": {"title": "Last Deploy", "type": "string", "format": "date-time", "nullable": true}, "first_generated_time": {"title": "First Generated Time", "type": "string", "format": "date-time"}, "first_generated_version": {"title": "First Generated Version", "type": "integer"}, "status": {"$ref": "#/components/schemas/ReleasedResourceState"}, "requires_status": {"title": "Requires Status", "type": "object", "additionalProperties": {"$ref": "#/components/schemas/ReleasedResourceState"}}}, "description": "The details of a released resource\n:param last_deploy: The value of the last_deploy on the latest released version of the resource\n:param first_generated_time: The first time this resource was generated\n:param first_generated_version: The first model version this resource was in\n:param status: The current status of the resource\n:param requires_status: The id and status of the resources this resource requires"}, "ReleasedResourceState": {"title": "ReleasedResourceState", "type": "string", "enum": ["unavailable", "skipped", "dry", "deployed", "failed", "deploying", "available", "cancelled", "undefined", "skipped_for_undefined", "orphaned"]}, "ResourceHistory": {"title": "ResourceHistory", "required": ["resource_id", "date", "attributes", "attribute_hash", "requires"], "type": "object", "properties": {"resource_id": {"title": "Resource Id", "type": "string"}, "date": {"title": "Date", "type": "string", "format": "date-time"}, "attributes": {"title": "Attributes", "type": "object"}, "attribute_hash": {"title": "Attribute Hash", "type": "string"}, "requires": {"title": "Requires", "type": "array", "items": {"type": "string"}}}}, "LatestReleasedResource": {"title": "LatestReleasedResource", "required": ["resource_id", "resource_version_id", "id_details", "requires", "status"], "type": "object", "properties": {"resource_id": {"title": "Resource Id", "type": "string"}, "resource_version_id": {"title": "Resource Version Id", "type": "string"}, "id_details": {"$ref": "#/components/schemas/ResourceIdDetails"}, "requires": {"title": "Requires", "type": "array", "items": {"type": "string"}}, "status": {"$ref": "#/components/schemas/ReleasedResourceState"}}}, "LogLevel": {"title": "LogLevel", "type": "string", "description": "Log levels used for various parts of the inmanta orchestrator.", "enum": ["CRITICAL", "ERROR", "WARNING", "INFO", "DEBUG", "TRACE"]}, "ResourceLog": {"title": "ResourceLog", "required": ["level", "msg", "timestamp", "action_id", "action"], "type": "object", "properties": {"level": {"$ref": "#/components/schemas/LogLevel"}, "msg": {"title": "Msg", "type": "string"}, "args": {"title": "Args", "type": "array", "items": {"nullable": true, "anyOf": [{"$ref": "#/components/schemas/BaseModel"}, {"type": "string", "format": "uuid"}, {"type": "boolean"}, {"type": "integer"}, {"type": "number"}, {"type": "string", "format": "date-time"}, {"type": "string"}, {"type": "array", "items": {"anyOf": [{"$ref": "#/components/schemas/BaseModel"}, {"type": "string", "format": "uuid"}, {"type": "boolean"}, {"type": "integer"}, {"type": "number"}, {"type": "string", "format": "date-time"}, {"type": "string"}]}}, {"type": "object", "additionalProperties": {"anyOf": [{"$ref": "#/components/schemas/BaseModel"}, {"type": "string", "format": "uuid"}, {"type": "boolean"}, {"type": "integer"}, {"type": "number"}, {"type": "string", "format": "date-time"}, {"type": "string"}]}}]}, "default": []}, "kwargs": {"title": "Kwargs", "type": "object", "default": {}}, "timestamp": {"title": "Timestamp", "type": "string", "format": "date-time"}, "action_id": {"title": "Action Id", "type": "string", "format": "uuid"}, "action": {"$ref": "#/components/schemas/ResourceAction"}}}, "VersionedResourceDetails": {"title": "VersionedResourceDetails", "required": ["resource_id", "resource_type", "agent", "id_attribute", "id_attribute_value", "attributes", "resource_version_id", "version"], "type": "object", "properties": {"resource_id": {"title": "Resource Id", "type": "string"}, "resource_type": {"title": "Resource Type", "type": "string"}, "agent": {"title": "Agent", "type": "string"}, "id_attribute": {"title": "Id Attribute", "type": "string"}, "id_attribute_value": {"title": "Id Attribute Value", "type": "string"}, "attributes": {"title": "Attributes", "type": "object"}, "resource_version_id": {"title": "Resource Version Id", "type": "string"}, "version": {"title": "Version", "type": "integer"}}, "description": "The details of a resource version\n:param resource_version_id: The id of the resource\n:param version: The version of the resource"}, "AgentTriggerMethod": {"title": "AgentTriggerMethod", "type": "string", "enum": ["push_incremental_deploy", "push_full_deploy"]}, "DesiredStateLabel": {"title": "DesiredStateLabel", "required": ["name", "message"], "type": "object", "properties": {"name": {"title": "Name", "type": "string"}, "message": {"title": "Message", "type": "string"}}}, "DesiredStateVersion": {"title": "DesiredStateVersion", "required": ["version", "date", "total", "labels", "status"], "type": "object", "properties": {"version": {"title": "Version", "type": "integer"}, "date": {"title": "Date", "type": "string", "format": "date-time"}, "total": {"title": "Total", "type": "integer"}, "labels": {"title": "Labels", "type": "array", "items": {"$ref": "#/components/schemas/DesiredStateLabel"}}, "status": {"$ref": "#/components/schemas/DesiredStateVersionStatus"}}}, "DesiredStateVersionStatus": {"title": "DesiredStateVersionStatus", "type": "string", "enum": ["active", "candidate", "retired", "skipped_candidate"]}, "AttributeDiff": {"title": "AttributeDiff", "required": ["from_value_compare", "to_value_compare"], "type": "object", "properties": {"from_value": {"title": "From Value", "nullable": true}, "to_value": {"title": "To Value", "nullable": true}, "from_value_compare": {"title": "From Value Compare", "type": "string"}, "to_value_compare": {"title": "To Value Compare", "type": "string"}}, "description": ":param from_value: The value of the attribute in the earlier version\n:param to_value: The value of the attribute in the later version\n:param from_value_compare: A stringified, diff-friendly form of the 'from_value' field\n:param to_value_compare: A stringified, diff-friendly form of the 'to_value' field"}, "ResourceDiff": {"title": "ResourceDiff", "required": ["resource_id", "attributes", "status"], "type": "object", "properties": {"resource_id": {"title": "Resource Id", "type": "string"}, "attributes": {"title": "Attributes", "type": "object", "additionalProperties": {"$ref": "#/components/schemas/AttributeDiff"}}, "status": {"$ref": "#/components/schemas/ResourceDiffStatus"}}, "description": ":param resource_id: The id of the resource the diff is about (without version)\n:param attributes: The diff between the attributes of two versions of the resource\n:param status: The kind of diff between the versions of the resource"}, "ResourceDiffStatus": {"title": "ResourceDiffStatus", "type": "string", "enum": ["added", "modified", "deleted", "unmodified", "agent_down", "undefined", "skipped_for_undefined"]}, "PipConfig": {"title": "PipConfig", "type": "object", "properties": {"index-url": {"title": "Index-Url", "type": "string", "nullable": true}, "extra-index-url": {"title": "Extra-Index-Url", "type": "array", "items": {"type": "string"}, "default": []}, "pre": {"title": "Pre", "type": "boolean", "nullable": true}, "use-system-config": {"title": "Use-System-Config", "type": "boolean", "default": false}}, "description": "Base class to represent pip config internally\n\n:param index_url: one pip index url for this project.\n:param extra_index_url:  additional pip index urls for this project. This is generally only\n    recommended if all configured indexes are under full control of the end user to protect against dependency\n    confusion attacks. See the `pip install documentation <https://pip.pypa.io/en/stable/cli/pip_install/>`_ and\n    `PEP 708 (draft) <https://peps.python.org/pep-0708/>`_ for more information.\n:param pre:  allow pre-releases when installing Python packages, i.e. pip --pre.\n    Defaults to None.\n    When None and pip.use-system-config=true we follow the system config.\n    When None and pip.use-system-config=false, we don't allow pre-releases.\n:param use_system_config: defaults to false.\n    When true, sets the pip index url, extra index urls and pre according to the respective settings outlined above\n    but otherwise respect any pip environment variables and/or config in the pip config file,\n    including any extra-index-urls.\n\n    If no indexes are configured in pip.index-url/pip.extra-index-url\n    with this option enabled means to fall back to pip's default behavior:\n    use the pip index url from the environment, the config file, or PyPi, in that order.\n\n    For development, it is recommended to set this option to false, both for portability\n    (and related compatibility with tools like pytest-inmanta-lsm) and for security\n    (dependency confusion attacks could affect users that aren't aware that inmanta installs Python packages)."}, "PromoteTriggerMethod": {"title": "PromoteTriggerMethod", "type": "string", "enum": ["push_incremental_deploy", "push_full_deploy", "no_push"]}, "DryRun": {"title": "DryRun", "required": ["id", "environment", "model"], "type": "object", "properties": {"id": {"title": "Id", "type": "string", "format": "uuid"}, "environment": {"title": "Environment", "type": "string", "format": "uuid"}, "model": {"title": "Model", "type": "integer"}, "date": {"title": "Date", "type": "string", "format": "date-time", "nullable": true}, "total": {"title": "Total", "type": "integer", "default": 0}, "todo": {"title": "Todo", "type": "integer", "default": 0}}}, "DryRunReport": {"title": "DryRunReport", "required": ["summary", "diff"], "type": "object", "properties": {"summary": {"$ref": "#/components/schemas/DryRun"}, "diff": {"title": "Diff", "type": "array", "items": {"$ref": "#/components/schemas/ResourceDiff"}}}}, "Notification": {"title": "Notification", "required": ["id", "environment", "created", "title", "message", "severity", "read", "cleared"], "type": "object", "properties": {"id": {"title": "Id", "type": "string", "format": "uuid"}, "environment": {"title": "Environment", "type": "string", "format": "uuid"}, "created": {"title": "Created", "type": "string", "format": "date-time"}, "title": {"title": "Title", "type": "string"}, "message": {"title": "Message", "type": "string"}, "severity": {"$ref": "#/components/schemas/NotificationSeverity"}, "uri": {"title": "Uri", "type": "string", "nullable": true}, "read": {"title": "Read", "type": "boolean"}, "cleared": {"title": "Cleared", "type": "boolean"}}, "description": ":param id: The id of this notification\n:param environment: The environment this notification belongs to\n:param created: The date the notification was created at\n:param title: The title of the notification\n:param message: The actual text of the notification\n:param severity: The severity of the notification\n:param uri: A link to an api endpoint of the server, that is relevant to the message,\n            and can be used to get further information about the problem.\n            For example a compile related problem should have the uri: `/api/v2/compilereport/<compile_id>`\n:param read: Whether the notification was read or not\n:param cleared: Whether the notification was cleared or not"}, "NotificationSeverity": {"title": "NotificationSeverity", "type": "string", "description": "The possible values determine the styling used by the frontend to show them,\nso notifications with severity 'info' will be shown as informational messages,\nthe ones with 'error' as error messages and so on.\nThe 'message' category corresponds to a generic message, which\nis shown without extra styling on the frontend.", "enum": ["message", "info", "success", "warning", "error"]}, "AuthMethod": {"title": "AuthMethod", "type": "string", "enum": ["database", "oidc"]}, "User": {"title": "User", "required": ["username", "auth_method"], "type": "object", "properties": {"username": {"title": "Username", "type": "string"}, "auth_method": {"$ref": "#/components/schemas/AuthMethod"}}, "description": "A user"}, "CurrentUser": {"title": "CurrentUser", "required": ["username"], "type": "object", "properties": {"username": {"title": "Username", "type": "string"}}, "description": "Information about the current logged in user"}, "LoginReturn": {"title": "LoginReturn", "required": ["token", "user"], "type": "object", "properties": {"token": {"title": "Token", "type": "string"}, "user": {"$ref": "#/components/schemas/User"}}, "description": "Login information\n\n:param token: A token representing the user's authentication session\n:param user: The user object for which the token was created"}, "EnvironmentMetricsResult": {"title": "EnvironmentMetricsResult", "required": ["start", "end", "timestamps", "metrics"], "type": "object", "properties": {"start": {"title": "Start", "type": "string", "format": "date-time"}, "end": {"title": "End", "type": "string", "format": "date-time"}, "timestamps": {"title": "Timestamps", "type": "array", "items": {"type": "string", "format": "date-time"}}, "metrics": {"title": "Metrics", "type": "object", "additionalProperties": {"type": "array", "items": {"nullable": true, "anyOf": [{"type": "number"}, {"type": "object", "additionalProperties": {"type": "number"}}]}}}}, "description": "A container for metrics as returned by the /metrics endpoint.\n\n:param start: The starting of the aggregation interval.\n:param end: The end of the aggregation interval.\n:param timestamps: The timestamps that belongs to the aggregated metrics present in the `metrics` dictionary.\n:param metrics: A dictionary that maps the name of a metric to a list of aggregated datapoints. For metrics that are not\n                grouped on a specific property, this list only contains the values of the metrics. For metrics that\n                are grouped by a specific property, this list contains a dictionary where the key is the grouping\n                attribute and the value is the value of the metric. The value is None when no data is available\n                for that specific time window."}, "AttributeModifier": {"title": "AttributeModifier", "type": "string", "enum": ["r", "rw", "rw+"]}, "AttributeOperation": {"title": "AttributeOperation", "type": "string", "description": "An operation performed on the set of attributes. This class represents\nthe operation using an Enum. The Operation class represents the operation using a string.", "enum": ["clear candidate", "clear active", "clear rollback", "promote", "rollback"]}, "AttributeSetOpt": {"title": "AttributeSetOpt", "type": "string", "enum": ["candidate", "active", "rollback"]}, "EmbeddedServiceEntity": {"title": "EmbeddedServiceEntity", "required": ["name", "attributes"], "type": "object", "properties": {"name": {"title": "Name", "type": "string"}, "description": {"title": "Description", "type": "string", "nullable": true}, "modifier": {"$ref": "#/components/schemas/AttributeModifier", "default": "rw"}, "attribute_annotations": {"title": "Attribute Annotations", "type": "object", "default": {}}, "lower_limit": {"title": "Lower Limit", "type": "integer", "default": 0}, "upper_limit": {"title": "Upper Limit", "type": "integer", "nullable": true}, "attributes": {"title": "Attributes", "type": "array", "items": {"$ref": "#/components/schemas/ServiceAttribute"}}, "embedded_entities": {"title": "Embedded Entities", "type": "array", "items": {"$ref": "#/components/schemas/EmbeddedServiceEntity"}, "default": []}, "inter_service_relations": {"title": "Inter Service Relations", "type": "array", "items": {"$ref": "#/components/schemas/InterServiceRelation"}, "default": []}, "entity_annotations": {"title": "Entity Annotations", "type": "object", "default": {}}, "key_attributes": {"title": "Key Attributes", "type": "array", "items": {"type": "string"}, "default": []}}, "description": ":param key_attributes: List of attributes to use as a key to index this embedded entity."}, "InstanceSummary": {"title": "InstanceSummary", "required": ["by_state", "by_label", "total"], "type": "object", "properties": {"by_state": {"title": "By State", "type": "object", "additionalProperties": {"type": "integer"}}, "by_label": {"$ref": "#/components/schemas/InstancesByLabel"}, "total": {"title": "Total", "type": "integer"}}, "description": "Describes the aggregated status of the instances associated with a service entity\n\n:param by_state: Contains the number of instances according to their current state\n:param by_label: Contains the number of instances according to the label of their current state\n:param total: The total number of instances for the service entity"}, "InstancesByLabel": {"title": "InstancesByLabel", "type": "object", "properties": {"no_label": {"title": "No Label", "type": "integer", "default": 0}, "info": {"title": "Info", "type": "integer", "default": 0}, "success": {"title": "Success", "type": "integer", "default": 0}, "danger": {"title": "Danger", "type": "integer", "default": 0}, "warning": {"title": "Warning", "type": "integer", "default": 0}}, "description": "The number of instances associated with a service entity, according to the label of their current state\n\n:param info: The number of instances in states that have the `info` label\n:param success: The number of instances in states that have the `success` label\n:param danger: The number of instances in states that have the `danger` label\n:param warning: The number of instances in states that have the `warning` label\n:param no_label: The number of instances in states that have no associated label"}, "InterServiceRelation": {"title": "InterServiceRelation", "required": ["name", "entity_type"], "type": "object", "properties": {"name": {"title": "Name", "type": "string"}, "description": {"title": "Description", "type": "string", "nullable": true}, "modifier": {"$ref": "#/components/schemas/AttributeModifier", "default": "rw"}, "attribute_annotations": {"title": "Attribute Annotations", "type": "object", "default": {}}, "lower_limit": {"title": "Lower Limit", "type": "integer", "default": 0}, "upper_limit": {"title": "Upper Limit", "type": "integer", "nullable": true}, "entity_type": {"title": "Entity Type", "type": "string"}}, "description": "Relation to another service instance.\n\n:ivar entity_type: The name of the service entity as declared in the service entity binding."}, "Lifecycle": {"title": "Lifecycle", "required": ["states", "transfers", "initial_state", "name"], "type": "object", "properties": {"states": {"title": "States", "type": "array", "items": {"$ref": "#/components/schemas/LifecycleState"}}, "transfers": {"title": "Transfers", "type": "array", "items": {"$ref": "#/components/schemas/LifecycleTransfer"}}, "initial_state": {"title": "Initial State", "type": "string"}, "name": {"title": "Name", "type": "string"}}}, "LifecycleState": {"title": "LifecycleState", "required": ["name", "export_resources", "purge_resources", "deleted", "values"], "type": "object", "properties": {"name": {"title": "Name", "type": "string"}, "label": {"title": "Label", "type": "string", "nullable": true}, "export_resources": {"title": "Export Resources", "type": "boolean"}, "validate_self": {"$ref": "#/components/schemas/AttributeSetOpt", "nullable": true}, "validate_others": {"$ref": "#/components/schemas/AttributeSetOpt", "nullable": true}, "purge_resources": {"title": "Purge Resources", "type": "boolean"}, "deleted": {"title": "Deleted", "type": "boolean"}, "values": {"title": "Values", "type": "object", "additionalProperties": {"anyOf": [{"type": "boolean"}, {"type": "number"}, {"type": "integer"}, {"type": "string"}]}}}}, "LifecycleTransfer": {"title": "LifecycleTransfer", "required": ["source", "target"], "type": "object", "properties": {"source": {"title": "Source", "type": "string"}, "target": {"title": "Target", "type": "string"}, "error": {"title": "Error", "type": "string", "nullable": true}, "on_update": {"title": "On Update", "type": "boolean", "default": false}, "on_delete": {"title": "On Delete", "type": "boolean", "default": false}, "api_set_state": {"title": "Api Set State", "type": "boolean", "default": false}, "resource_based": {"title": "Resource Based", "type": "boolean", "default": false}, "auto": {"title": "Auto", "type": "boolean", "default": false}, "validate": {"title": "Validate", "type": "boolean", "default": false}, "config_name": {"title": "Config Name", "type": "string", "nullable": true}, "description": {"title": "Description", "type": "string", "nullable": true}, "target_operation": {"$ref": "#/components/schemas/AttributeOperation", "nullable": true}, "error_operation": {"$ref": "#/components/schemas/AttributeOperation", "nullable": true}, "target_same_desired_state": {"title": "Target Same Desired State", "type": "boolean", "default": false}, "error_same_desired_state": {"title": "Error Same Desired State", "type": "boolean", "default": false}}, "description": ":param description: description (or name) of this transition for documentation and debugging purposes.\n\n:param source: source state\n:param target: target state\n:param error: error state, required if validate or resource_based is true else prohibited\n\n:param on_update: this transition is initiated if the parameters are updated\n:param on_delete: this transition is initiated if the instance receives a delete call\n:param api_set_state: this transition is initiated by an explicit API set state call\n:param resource_based: this transition is initiated by deployment of specific resources\n:param auto: this transition is initiated when the source state is reached,\n(unless the config value pointed to by config_name is false)\n\n:param validate: this transition will perform a validation once initiated (allowed on auto or api_set_state)\n:param config_name: name of a configuration value that determines if an auto transition should be done or not\n(implies auto)\n\n:param target_operation: operation to perform upon transfer to the source state\n:param error_operation: operation to perform upon transfer to the error state\n\n:param target_same_desired_state: Does the service instance produce the same (desired) state when following the success edge\n:param error_same_desired_state: Does the service instance produce the same (desired) state when following the failure edge\nFor the two last arguments: if LSM is\n    - not recompiling for state transition not preserving the desired state but exporting resources\n    - is taking resource based transfers without waiting the deployment of the resources\nthe `enable_lsm_transfer_optimisation` feature should be disabled."}, "ServiceAttribute": {"title": "ServiceAttribute", "required": ["name", "type"], "type": "object", "properties": {"name": {"title": "Name", "type": "string"}, "description": {"title": "Description", "type": "string", "nullable": true}, "modifier": {"$ref": "#/components/schemas/AttributeModifier", "default": "rw"}, "attribute_annotations": {"title": "Attribute Annotations", "type": "object", "default": {}}, "type": {"title": "Type", "type": "string"}, "default_value": {"title": "Default Value", "nullable": true, "anyOf": [{"type": "boolean"}, {"type": "number"}, {"type": "integer"}, {"type": "string"}, {"type": "array", "items": {"anyOf": [{"type": "boolean"}, {"type": "number"}, {"type": "integer"}, {"type": "string"}]}}, {"type": "object", "additionalProperties": {"nullable": true, "anyOf": [{"type": "boolean"}, {"type": "number"}, {"type": "integer"}, {"type": "string"}]}}]}, "default_value_set": {"title": "Default Value Set", "type": "boolean", "default": false}, "validation_type": {"title": "Validation Type", "type": "string", "nullable": true}, "validation_parameters": {"title": "Validation Parameters", "type": "object", "nullable": true}}, "description": ":param type: The Inmanta type of this service attribute.\n:param default_value: The default value of this service attribute.\n:param default_value_set: Indicates whether a default value was provided in the service entity definition.\n:param validation_type: When a typedef was used, this parameter specifies the name of the constraint type.\n                        Otherwise this value is equal to type.\n:param validation_parameters: Validation parameters for validation_type."}, "ServiceEntity": {"title": "ServiceEntity", "required": ["attributes", "environment", "name", "lifecycle", "config"], "type": "object", "properties": {"attributes": {"title": "Attributes", "type": "array", "items": {"$ref": "#/components/schemas/ServiceAttribute"}}, "embedded_entities": {"title": "Embedded Entities", "type": "array", "items": {"$ref": "#/components/schemas/EmbeddedServiceEntity"}, "default": []}, "inter_service_relations": {"title": "Inter Service Relations", "type": "array", "items": {"$ref": "#/components/schemas/InterServiceRelation"}, "default": []}, "entity_annotations": {"title": "Entity Annotations", "type": "object", "default": {}}, "environment": {"title": "Environment", "type": "string", "format": "uuid"}, "name": {"title": "Name", "type": "string"}, "version": {"title": "Version", "type": "integer", "default": 0}, "description": {"title": "Description", "type": "string", "nullable": true}, "lifecycle": {"$ref": "#/components/schemas/Lifecycle"}, "config": {"title": "Config", "type": "object", "additionalProperties": {"type": "boolean"}}, "service_identity": {"title": "Service Identity", "type": "string", "nullable": true}, "service_identity_display_name": {"title": "Service Identity Display Name", "type": "string", "nullable": true}, "strict_modifier_enforcement": {"title": "Strict Modifier Enforcement", "type": "boolean", "default": false}, "owner": {"title": "Owner", "type": "string", "nullable": true}, "relation_to_owner": {"title": "Relation To Owner", "type": "string", "nullable": true}, "instance_summary": {"$ref": "#/components/schemas/InstanceSummary", "nullable": true}, "owned_entities": {"title": "Owned Entities", "type": "array", "items": {"type": "string"}, "default": [], "nullable": true}}, "description": "The service entity object including the derived fields.\n\n:param instance_summary: a summary of the states of the instances associated with this entity\n:param owned_entities: derived, names of all ServiceEntities owned by this one"}, "ServiceEntityWrite": {"title": "ServiceEntityWrite", "required": ["attributes", "environment", "name", "lifecycle", "config"], "type": "object", "properties": {"attributes": {"title": "Attributes", "type": "array", "items": {"$ref": "#/components/schemas/ServiceAttribute"}}, "embedded_entities": {"title": "Embedded Entities", "type": "array", "items": {"$ref": "#/components/schemas/EmbeddedServiceEntity"}, "default": []}, "inter_service_relations": {"title": "Inter Service Relations", "type": "array", "items": {"$ref": "#/components/schemas/InterServiceRelation"}, "default": []}, "entity_annotations": {"title": "Entity Annotations", "type": "object", "default": {}}, "environment": {"title": "Environment", "type": "string", "format": "uuid"}, "name": {"title": "Name", "type": "string"}, "version": {"title": "Version", "type": "integer", "default": 0}, "description": {"title": "Description", "type": "string", "nullable": true}, "lifecycle": {"$ref": "#/components/schemas/Lifecycle"}, "config": {"title": "Config", "type": "object", "additionalProperties": {"type": "boolean"}}, "service_identity": {"title": "Service Identity", "type": "string", "nullable": true}, "service_identity_display_name": {"title": "Service Identity Display Name", "type": "string", "nullable": true}, "strict_modifier_enforcement": {"title": "Strict Modifier Enforcement", "type": "boolean", "default": false}, "owner": {"title": "Owner", "type": "string", "nullable": true}, "relation_to_owner": {"title": "Relation To Owner", "type": "string", "nullable": true}}, "description": "A service entity with only the fields defined by the user.\n:param environment: The environment this service entity is defined for\n:param name: A unique name for the service entity.\n:param version: Version of the service entity, if it is not provided, version 0 is used to indicate that a specific\n    service entity version was created using the v1 endpoint that is still version unaware.\n:param service_identity: The name of an attribute to be used as an identity: a value,\n                         which can be used to query the instances\n:param service_identity_display_name: The human readable name of the service identity, used by the frontend\n:param strict_modifier_enforcement: Boolean value to control if strict validation\n                               of embedded entities' attributes with respect to modifiers is on or off\n\n:param owner: the name of the ServiceEntity that owns this ServiceEntity,\n    as defined in https://docs.inmanta.com/inmanta-service-orchestrator/latest/lsm/partial_compiles/partial_compiles.html\n:param relation_to_owner: the inter service relation towards the owner"}, "ServiceEntityVersions": {"title": "ServiceEntityVersions", "required": ["versions", "default_version"], "type": "object", "properties": {"versions": {"title": "Versions", "type": "array", "items": {"$ref": "#/components/schemas/ServiceEntity"}}, "default_version": {"title": "Default Version", "type": "integer"}}, "description": "An object containing the different available versions of a service entity and the default version\nto use when no version is specified (as is the case for v1 endpoints)\n\n:param versions: A list of the different versions of this service entity\n:param default_version: The default version to use when a specific version is not specified"}, "DeploymentProgress": {"title": "DeploymentProgress", "required": ["total", "failed", "deployed", "waiting"], "type": "object", "properties": {"total": {"title": "Total", "type": "integer"}, "failed": {"title": "Failed", "type": "integer"}, "deployed": {"title": "Deployed", "type": "integer"}, "waiting": {"title": "Waiting", "type": "integer"}}, "description": "The current progress of the deployment of resources associated with a service instance\n\n:param total: Total number of resources\n:param failed: Number of resources in failed or unavailable state\n:param deployed: Number of successfully deployed resources\n:param waiting: Number of resources not yet deployed or failed"}, "ServiceInstance": {"title": "ServiceInstance", "required": ["id", "environment", "service_entity", "version", "desired_state_version", "config", "state", "created_at", "last_updated", "callback", "deleted"], "type": "object", "properties": {"id": {"title": "Id", "type": "string", "format": "uuid"}, "environment": {"title": "Environment", "type": "string", "format": "uuid"}, "service_entity": {"title": "Service Entity", "type": "string"}, "service_entity_version": {"title": "Service Entity Version", "type": "integer", "default": 0}, "version": {"title": "Version", "type": "integer"}, "desired_state_version": {"title": "Desired State Version", "type": "integer"}, "config": {"title": "Config", "type": "object", "additionalProperties": {"type": "string"}}, "state": {"title": "State", "type": "string"}, "candidate_attributes": {"title": "Candidate Attributes", "type": "object", "additionalProperties": {"nullable": true, "anyOf": [{"type": "boolean"}, {"type": "number"}, {"type": "integer"}, {"type": "string"}, {"type": "array", "items": {"anyOf": [{"type": "boolean"}, {"type": "number"}, {"type": "integer"}, {"type": "string"}]}}, {"type": "array", "items": {"type": "object"}}, {"type": "object", "additionalProperties": {"nullable": true, "anyOf": [{"type": "boolean"}, {"type": "number"}, {"type": "integer"}, {"type": "string"}]}}, {"type": "object"}]}, "nullable": true}, "active_attributes": {"title": "Active Attributes", "type": "object", "additionalProperties": {"nullable": true, "anyOf": [{"type": "boolean"}, {"type": "number"}, {"type": "integer"}, {"type": "string"}, {"type": "array", "items": {"anyOf": [{"type": "boolean"}, {"type": "number"}, {"type": "integer"}, {"type": "string"}]}}, {"type": "array", "items": {"type": "object"}}, {"type": "object", "additionalProperties": {"nullable": true, "anyOf": [{"type": "boolean"}, {"type": "number"}, {"type": "integer"}, {"type": "string"}]}}, {"type": "object"}]}, "nullable": true}, "rollback_attributes": {"title": "Rollback Attributes", "type": "object", "additionalProperties": {"nullable": true, "anyOf": [{"type": "boolean"}, {"type": "number"}, {"type": "integer"}, {"type": "string"}, {"type": "array", "items": {"anyOf": [{"type": "boolean"}, {"type": "number"}, {"type": "integer"}, {"type": "string"}]}}, {"type": "array", "items": {"type": "object"}}, {"type": "object", "additionalProperties": {"nullable": true, "anyOf": [{"type": "boolean"}, {"type": "number"}, {"type": "integer"}, {"type": "string"}]}}, {"type": "object"}]}, "nullable": true}, "created_at": {"title": "Created At", "type": "string", "format": "date-time"}, "last_updated": {"title": "Last Updated", "type": "string", "format": "date-time"}, "callback": {"title": "Callback", "type": "array", "items": {"type": "string", "format": "uri"}}, "deleted": {"title": "Deleted", "type": "boolean"}, "deployment_progress": {"$ref": "#/components/schemas/DeploymentProgress", "nullable": true}, "service_identity_attribute_value": {"title": "Service Identity Attribute Value", "type": "string", "nullable": true}, "referenced_by": {"title": "Referenced By", "type": "array", "items": {"type": "string", "format": "uuid"}, "nullable": true}}, "description": "An instance of a service entity.\n\n:param id: A unique uuid for this service instance\n:param environment: The environment this service instance belongs to\n:param service_entity: The name of the service entity defined in this environment\n:param service_entity_version: The version of the service entity used for this instance\n:param version: An opaque version identifier that is incremented on every state change. This identifier is strict\n                monotonic and integer.\n:param desired_state_version: internal version identifier that is incremented at least on every change of the desired state\n    expressed by the resources of this service instance. It is used for the lsm_transfer_optimization feature.\n:param config: A dict with flags that override config in the service entity\n:param state: The state of this instance. The state refers to a state defined in the service entity lifecycle\n\n:param candidate_attributes: The set of attributes used when the service instance model state is candidate or designed.\n:param active_attributes: The set of attributes when the model is evaluated with only active instances.\n:param rollback_attributes: The set of attributes that can be used to rollback active attributes that result in an error\n                            state.\n\n:param created_at: The timestamp indicating when this ServiceInstance was created.\n:param last_updated: The timestamp of the last state transition of this ServiceInstance.\n:param callback: A list of callback urls that are notified when the state of this instance changes.\n:param deployment_progress: Summary of the deployment progress of the resources associated with this instance\n:param service_identity_attribute_value: If an identity was specified for the service entity corresponding to this instance,\nthen this field holds identity value of the instance.\n:param referenced_by: If not None, holds the ids of the (non-deleted) service instances that reference\n                      this service instance in their active attributes using an inter-service relationship."}, "AttributeSetName": {"title": "AttributeSetName", "type": "string", "enum": ["candidate_attributes", "active_attributes", "rollback_attributes"]}, "EditOperation": {"title": "EditOperation", "type": "string", "description": "Operations supported by the `lsm_services_patch()` endpoint.", "enum": ["merge", "replace", "remove"]}, "PatchCallEdit": {"title": "PatchCallEdit", "required": ["edit_id", "operation", "target"], "type": "object", "properties": {"edit_id": {"title": "Edit Id", "type": "string"}, "operation": {"$ref": "#/components/schemas/EditOperation"}, "target": {"title": "Target", "type": "string"}, "value": {"title": "Value", "nullable": true, "anyOf": [{"type": "boolean"}, {"type": "number"}, {"type": "integer"}, {"type": "string"}, {"type": "array", "items": {"anyOf": [{"type": "boolean"}, {"type": "number"}, {"type": "integer"}, {"type": "string"}]}}, {"type": "array", "items": {"type": "object"}}, {"type": "object", "additionalProperties": {"nullable": true, "anyOf": [{"type": "boolean"}, {"type": "number"}, {"type": "integer"}, {"type": "string"}]}}, {"type": "object"}]}}, "description": "Represents a patch operation on the attributes of a service instance.\n\n:param edit_id: An identifier for this edit. The server will use this identifier\n                in error messages regarding a specific edit.\n:param operation: The type of edit operation to execute.\n:param target: A dict path expression that references the location in the attribute\n               dictionary, where this edit operation should be applied.\n:param value: The value for this edit operation."}, "Failure": {"title": "Failure", "required": ["instance_version", "model_version", "resource_id", "action", "time", "message"], "type": "object", "properties": {"instance_version": {"title": "Instance Version", "type": "integer"}, "model_version": {"title": "Model Version", "type": "integer"}, "resource_id": {"title": "Resource Id", "type": "string"}, "action": {"$ref": "#/components/schemas/ResourceAction"}, "time": {"title": "Time", "type": "string", "format": "date-time"}, "message": {"title": "Message", "type": "string"}}, "description": ":param instance_version: The instance version before the failure.\n:param model_version: The version of the model where this failure occurred.\n:param resource_id: The resource for which the failure occurred.\n:param action: The resource action that failed.\n:param time: When this error occurred.\n:param message: The error message."}, "FailureGroup": {"title": "FailureGroup", "required": ["resource_id", "failures"], "type": "object", "properties": {"resource_id": {"title": "Resource Id", "type": "string"}, "failures": {"title": "Failures", "type": "array", "items": {"$ref": "#/components/schemas/Failure"}}}, "description": "A collection of similar errors for the same resource."}, "FullDiagnosis": {"title": "FullDiagnosis", "required": ["failures", "rejections"], "type": "object", "properties": {"failures": {"title": "Failures", "type": "array", "items": {"$ref": "#/components/schemas/FailureGroup"}}, "rejections": {"title": "Rejections", "type": "array", "items": {"$ref": "#/components/schemas/Rejection"}}}}, "Rejection": {"title": "Rejection", "required": ["instance_version", "compile_id", "errors"], "type": "object", "properties": {"instance_version": {"title": "Instance Version", "type": "integer"}, "model_version": {"title": "Model Version", "type": "integer", "nullable": true}, "compile_id": {"title": "Compile Id", "type": "string", "format": "uuid"}, "errors": {"title": "Errors", "type": "array", "items": {"$ref": "#/components/schemas/Error"}}, "trace": {"title": "Trace", "type": "string", "nullable": true}}, "description": ":param instance_version: The instance version associated with the failed validation compile.\n:param model_version: The version of the model that got rejected.\n:param compile_id: The id of the validation compile that failed.\n:param errors: The compile errors that caused the rejection.\n:param trace: The full error stream of the validation compile."}, "Event": {"title": "Event", "required": ["id", "service_instance_id", "service_instance_version", "service_desired_state_version", "timestamp", "message", "ignored_transition", "event_correlation_id", "severity", "severity_text", "event_type", "is_error_transition"], "type": "object", "properties": {"id": {"title": "Id", "type": "string", "format": "uuid"}, "service_instance_id": {"title": "Service Instance Id", "type": "string", "format": "uuid"}, "service_instance_version": {"title": "Service Instance Version", "type": "integer"}, "service_desired_state_version": {"title": "Service Desired State Version", "type": "integer"}, "timestamp": {"title": "Timestamp", "type": "string", "format": "date-time"}, "source": {"title": "Source", "type": "string", "nullable": true}, "destination": {"title": "Destination", "type": "string", "nullable": true}, "message": {"title": "Message", "type": "string"}, "ignored_transition": {"title": "Ignored Transition", "type": "boolean"}, "event_correlation_id": {"title": "Event Correlation Id", "type": "string", "format": "uuid"}, "severity": {"title": "Severity", "type": "integer"}, "severity_text": {"title": "Severity Text", "type": "string"}, "id_compile_report": {"title": "Id Compile Report", "type": "string", "format": "uuid", "nullable": true}, "event_type": {"$ref": "#/components/schemas/EventType"}, "is_error_transition": {"title": "Is Error Transition", "type": "boolean"}}, "description": "Event log for the lifecycle manager.\n\n:param id: The unique uuid of the event.\n:param service_instance_id: The id of the service instance this event belongs to.\n:param service_instance_version: The version of the service instance this event belong to.\n:param timestamp: A timestamp indicating when the event happened.\n:param source: The source state of the event.\n:param destination: The destination state of the event. This field is only set when the event reports a successful\ntransition to another state.\n:param message: A message describing the event.\n:param ignored_transition: This flag indicates that the transition request was ignored due because more transition\nrequests were executing concurrently.\n:param event_correlation_id: If this event belongs to previous event, this field contains the id of the associated\nevent. This is used to correlate the event produced on initiation of a transition with the event raised on\ncompletion of transition.\n:param severity: The severity of the message reported by the event.\n:param id_compile_report: When this event reports the outcome of a validate, this field contains the id of\nthe compile report.\n:param event_type: Indicates the type of the event.\n:param is_error_transition: This flag indicates whether this event signals a transition to an error state."}, "EventType": {"title": "EventType", "type": "string", "enum": ["CREATE_TRANSITION", "API_SET_STATE_TRANSITION", "ON_UPDATE_TRANSITION", "ON_DELETE_TRANSITION", "RESOURCE_TRANSITION", "RESOURCE_EVENT", "AUTO_TRANSITION", "ALLOCATION_UPDATE", "FORCE_UPDATE", "FORCE_DELETE", "UPDATE_ENTITY_VERSION"]}, "ServiceInstanceLog": {"title": "ServiceInstanceLog", "required": ["service_instance_id", "environment", "service_entity", "version", "desired_state_version", "timestamp", "config", "state", "created_at", "last_updated", "callback", "deleted", "events"], "type": "object", "properties": {"service_instance_id": {"title": "Service Instance Id", "type": "string", "format": "uuid"}, "environment": {"title": "Environment", "type": "string", "format": "uuid"}, "service_entity": {"title": "Service Entity", "type": "string"}, "service_entity_version": {"title": "Service Entity Version", "type": "integer", "default": 0}, "version": {"title": "Version", "type": "integer"}, "desired_state_version": {"title": "Desired State Version", "type": "integer"}, "timestamp": {"title": "Timestamp", "type": "string", "format": "date-time"}, "config": {"title": "Config", "type": "object", "additionalProperties": {"type": "string"}}, "state": {"title": "State", "type": "string"}, "candidate_attributes": {"title": "Candidate Attributes", "type": "object", "additionalProperties": {"nullable": true, "anyOf": [{"type": "boolean"}, {"type": "number"}, {"type": "integer"}, {"type": "string"}, {"type": "array", "items": {"anyOf": [{"type": "boolean"}, {"type": "number"}, {"type": "integer"}, {"type": "string"}]}}, {"type": "array", "items": {"type": "object"}}, {"type": "object", "additionalProperties": {"nullable": true, "anyOf": [{"type": "boolean"}, {"type": "number"}, {"type": "integer"}, {"type": "string"}]}}, {"type": "object"}]}, "nullable": true}, "active_attributes": {"title": "Active Attributes", "type": "object", "additionalProperties": {"nullable": true, "anyOf": [{"type": "boolean"}, {"type": "number"}, {"type": "integer"}, {"type": "string"}, {"type": "array", "items": {"anyOf": [{"type": "boolean"}, {"type": "number"}, {"type": "integer"}, {"type": "string"}]}}, {"type": "array", "items": {"type": "object"}}, {"type": "object", "additionalProperties": {"nullable": true, "anyOf": [{"type": "boolean"}, {"type": "number"}, {"type": "integer"}, {"type": "string"}]}}, {"type": "object"}]}, "nullable": true}, "rollback_attributes": {"title": "Rollback Attributes", "type": "object", "additionalProperties": {"nullable": true, "anyOf": [{"type": "boolean"}, {"type": "number"}, {"type": "integer"}, {"type": "string"}, {"type": "array", "items": {"anyOf": [{"type": "boolean"}, {"type": "number"}, {"type": "integer"}, {"type": "string"}]}}, {"type": "array", "items": {"type": "object"}}, {"type": "object", "additionalProperties": {"nullable": true, "anyOf": [{"type": "boolean"}, {"type": "number"}, {"type": "integer"}, {"type": "string"}]}}, {"type": "object"}]}, "nullable": true}, "created_at": {"title": "Created At", "type": "string", "format": "date-time"}, "last_updated": {"title": "Last Updated", "type": "string", "format": "date-time"}, "callback": {"title": "Callback", "type": "array", "items": {"type": "string", "format": "uri"}}, "deleted": {"title": "Deleted", "type": "boolean"}, "events": {"title": "Events", "type": "array", "items": {"$ref": "#/components/schemas/Event"}}, "service_identity_attribute_value": {"title": "Service Identity Attribute Value", "type": "string", "nullable": true}}, "description": "This class represent a point-in-time snapshot of a ServiceInstance.\n\n:param timestamp: This field is deprecated in favor of the field `last_updated`.\n:param last_updated: A timestamp indicating when the state transition happened\n                     to this version of the ServiceInstance."}, "Resource": {"title": "Resource", "required": ["resource_id", "resource_state"], "type": "object", "properties": {"resource_id": {"title": "Resource Id", "type": "string"}, "resource_state": {"title": "Resource State", "type": "string"}}}, "Callback": {"title": "Callback", "required": ["callback_id", "environment", "url"], "type": "object", "properties": {"callback_id": {"title": "Callback Id", "type": "string", "format": "uuid"}, "environment": {"title": "Environment", "type": "string", "format": "uuid"}, "url": {"title": "Url", "type": "string", "format": "uri"}, "service_entity": {"title": "Service Entity", "type": "string", "nullable": true}, "service_entity_id": {"title": "Service Entity Id", "type": "string", "format": "uuid", "nullable": true}, "event_types": {"title": "Event Types", "type": "array", "items": {"$ref": "#/components/schemas/EventType"}, "nullable": true}, "minimal_log_level": {"title": "Minimal Log Level", "type": "integer", "nullable": true}, "minimal_log_level_text": {"$ref": "#/components/schemas/LogLevel", "nullable": true}}, "description": "A callback definition"}, "CreateServiceOrderItem": {"title": "CreateServiceOrderItem", "required": ["instance_id", "service_entity", "action", "attributes"], "type": "object", "properties": {"status": {"$ref": "#/components/schemas/OrderItemStatus", "default": {"state": "acknowledged", "failure_type": null, "reason": null, "direct_dependencies": {}, "validation_compile_id": null, "instance_state_label": null}}, "instance_id": {"title": "Instance Id", "type": "string", "format": "uuid"}, "service_entity": {"title": "Service Entity", "type": "string"}, "config": {"title": "Config", "type": "object", "additionalProperties": {"type": "boolean"}, "nullable": true}, "service_entity_version": {"title": "Service Entity Version", "type": "integer", "nullable": true}, "action": {"title": "Action", "type": "string", "enum": ["create"]}, "attributes": {"title": "Attributes", "type": "object", "additionalProperties": {"anyOf": [{"type": "boolean"}, {"type": "number"}, {"type": "integer"}, {"type": "string"}, {"type": "array", "items": {"anyOf": [{"type": "boolean"}, {"type": "number"}, {"type": "integer"}, {"type": "string"}]}}, {"type": "array", "items": {"type": "object"}}, {"type": "object", "additionalProperties": {"nullable": true, "anyOf": [{"type": "boolean"}, {"type": "number"}, {"type": "integer"}, {"type": "string"}]}}, {"type": "object"}]}}, "metadata": {"title": "Metadata", "type": "object", "nullable": true}}}, "DeleteServiceOrderItem": {"title": "DeleteServiceOrderItem", "required": ["instance_id", "service_entity", "action", "service_entity_version"], "type": "object", "properties": {"status": {"$ref": "#/components/schemas/OrderItemStatus", "default": {"state": "acknowledged", "failure_type": null, "reason": null, "direct_dependencies": {}, "validation_compile_id": null, "instance_state_label": null}}, "instance_id": {"title": "Instance Id", "type": "string", "format": "uuid"}, "service_entity": {"title": "Service Entity", "type": "string"}, "config": {"title": "Config", "type": "object", "additionalProperties": {"type": "boolean"}, "nullable": true}, "action": {"title": "Action", "type": "string", "enum": ["delete"]}, "service_entity_version": {"title": "Service Entity Version", "type": "integer"}}}, "OrderItemFailureType": {"title": "OrderItemFailureType", "type": "string", "description": ":param INVALID_ORDER_ITEM: The requested change could not be executed (e.g. The current state of the service instance\n                           doesn't allow the requested action).\n:param VALIDATION_COMPILE_FAILED: The validation compile failed for this order item.\n:param EXECUTION_FAILED: An error occurred while deploying the changes requested by this order item.\n:param EXECUTION_SKIPPED: Order item was skipped because of a failed.", "enum": ["INVALID_ORDER_ITEM", "VALIDATION_COMPILE_FAILED", "EXECUTION_FAILED", "EXECUTION_SKIPPED"]}, "OrderItemState": {"title": "OrderItemState", "type": "string", "description": "The state of a specific service order item in a service order.\n\n:param completed: The item is done (in a stable state)\n:param failed: The item encountered a failure\n:param in_progress: The item is still in a transient state and not done yet\n:param acknowledged: The item passed API validation, but the deployment hasn't started yet.", "enum": ["completed", "failed", "in_progress", "acknowledged"]}, "OrderItemStatus": {"title": "OrderItemStatus", "type": "object", "properties": {"state": {"$ref": "#/components/schemas/OrderItemState", "default": "acknowledged"}, "failure_type": {"$ref": "#/components/schemas/OrderItemFailureType", "nullable": true}, "reason": {"title": "Reason", "type": "string", "nullable": true}, "direct_dependencies": {"title": "Direct Dependencies", "type": "object", "additionalProperties": {"$ref": "#/components/schemas/OrderItemState"}, "default": {}}, "validation_compile_id": {"title": "Validation Compile Id", "type": "string", "format": "uuid", "nullable": true}, "instance_state_label": {"title": "Instance State Label", "type": "string", "nullable": true}}, "description": "Status information about a service order item.\n\n:param state: See :class:`ServiceOrderItemState` for available values.\n:param failure_type: See :class:`ServiceOrderItemFailureType` for available values.\n:param reason: A message providing an explanation for this item's failure.\n:param direct_dependencies: A map of [instance_id, state] of service order items on which this item depends.\n:param validation_compile_id: The id of the validation compile of this order item.\n:param instance_state_label: the label associated to the service_instance"}, "OrderState": {"title": "OrderState", "type": "string", "description": "The state of a complete service order.\n\nWe don't have a state to indicate that the order is created, but not yet executing, because\nwe always start the execution of the order immediately after it's created.\n\n:param success: All order items are in the completed state.\n:param failed: All order items are in the failed state.\n:param in_progress: The deployment of at least one order item is in progress\n                    (i.e. it doesn't have the completed or failed state).\n:param partial: All order items are done deploying and some are in the completed\n    state and some in the failed state.", "enum": ["success", "failed", "in_progress", "partial"]}, "ServiceOrder": {"title": "ServiceOrder", "required": ["id", "environment", "service_order_items", "created_at", "status"], "type": "object", "properties": {"description": {"title": "Description", "type": "string", "default": ""}, "id": {"title": "Id", "type": "string", "format": "uuid"}, "environment": {"title": "Environment", "type": "string", "format": "uuid"}, "service_order_items": {"title": "Service Order Items", "type": "array", "items": {"anyOf": [{"$ref": "#/components/schemas/CreateServiceOrderItem"}, {"$ref": "#/components/schemas/DeleteServiceOrderItem"}, {"$ref": "#/components/schemas/UpdateServiceOrderItem"}]}}, "created_at": {"title": "Created At", "type": "string", "format": "date-time"}, "completed_at": {"title": "Completed At", "type": "string", "format": "date-time", "nullable": true}, "status": {"$ref": "#/components/schemas/ServiceOrderStatus"}}}, "ServiceOrderStatus": {"title": "ServiceOrderStatus", "type": "object", "properties": {"state": {"$ref": "#/components/schemas/OrderState", "default": "in_progress"}}}, "UpdateServiceOrderItem": {"title": "UpdateServiceOrderItem", "required": ["instance_id", "service_entity", "action", "edits", "service_entity_version"], "type": "object", "properties": {"status": {"$ref": "#/components/schemas/OrderItemStatus", "default": {"state": "acknowledged", "failure_type": null, "reason": null, "direct_dependencies": {}, "validation_compile_id": null, "instance_state_label": null}}, "instance_id": {"title": "Instance Id", "type": "string", "format": "uuid"}, "service_entity": {"title": "Service Entity", "type": "string"}, "config": {"title": "Config", "type": "object", "additionalProperties": {"type": "boolean"}, "nullable": true}, "action": {"title": "Action", "type": "string", "enum": ["update"]}, "edits": {"title": "Edits", "type": "array", "items": {"$ref": "#/components/schemas/PatchCallEdit"}}, "service_entity_version": {"title": "Service Entity Version", "type": "integer"}}}, "CreateWritableServiceOrderItem": {"title": "CreateWritableServiceOrderItem", "required": ["instance_id", "service_entity", "action", "attributes"], "type": "object", "properties": {"instance_id": {"title": "Instance Id", "type": "string", "format": "uuid"}, "service_entity": {"title": "Service Entity", "type": "string"}, "config": {"title": "Config", "type": "object", "additionalProperties": {"type": "boolean"}, "nullable": true}, "service_entity_version": {"title": "Service Entity Version", "type": "integer", "nullable": true}, "action": {"title": "Action", "type": "string", "enum": ["create"]}, "attributes": {"title": "Attributes", "type": "object", "additionalProperties": {"anyOf": [{"type": "boolean"}, {"type": "number"}, {"type": "integer"}, {"type": "string"}, {"type": "array", "items": {"anyOf": [{"type": "boolean"}, {"type": "number"}, {"type": "integer"}, {"type": "string"}]}}, {"type": "array", "items": {"type": "object"}}, {"type": "object", "additionalProperties": {"nullable": true, "anyOf": [{"type": "boolean"}, {"type": "number"}, {"type": "integer"}, {"type": "string"}]}}, {"type": "object"}]}}, "metadata": {"title": "Metadata", "type": "object", "nullable": true}}, "description": ":param service_entity_version: The version of the service entity for this instance.\n    If set to None, use the default version of the service entity (at the time of creation)\n:param action: The corresponding action for this order item (always create)\n:param attributes: The attributes of the service instance that should be created.\n:param metadata: Metadata to attach to the service instance."}, "DeleteWritableServiceOrderItem": {"title": "DeleteWritableServiceOrderItem", "required": ["instance_id", "service_entity", "action"], "type": "object", "properties": {"instance_id": {"title": "Instance Id", "type": "string", "format": "uuid"}, "service_entity": {"title": "Service Entity", "type": "string"}, "config": {"title": "Config", "type": "object", "additionalProperties": {"type": "boolean"}, "nullable": true}, "action": {"title": "Action", "type": "string", "enum": ["delete"]}}}, "UpdateWritableServiceOrderItem": {"title": "UpdateWritableServiceOrderItem", "required": ["instance_id", "service_entity", "action", "edits"], "type": "object", "properties": {"instance_id": {"title": "Instance Id", "type": "string", "format": "uuid"}, "service_entity": {"title": "Service Entity", "type": "string"}, "config": {"title": "Config", "type": "object", "additionalProperties": {"type": "boolean"}, "nullable": true}, "action": {"title": "Action", "type": "string", "enum": ["update"]}, "edits": {"title": "Edits", "type": "array", "items": {"$ref": "#/components/schemas/PatchCallEdit"}}}, "description": ":param edits: A list of changes that should be applied on the instance with id instance_id."}, "CollectorModel": {"title": "CollectorModel", "required": ["name"], "type": "object", "properties": {"name": {"title": "Name", "type": "string"}, "options": {"title": "Options", "type": "object", "additionalProperties": {"type": "string"}, "nullable": true}}}}}}