{"openapi": "3.0.2", "info": {"title": "Inmanta Service Orchestrator", "version": "2024.1.3.dev20240329042524", "description": "Back to Main documentation for more information"}, "servers": [{"url": "http://"}], "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"}], "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.=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 \":\". 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=.`, 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.", "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.", "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 `;base64,`, where\n is one of: 'image/png', 'image/jpeg', 'image/webp', 'image/svg+xml', and 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 `;base64,` , where\n is one of: 'image/png', 'image/jpeg', 'image/webp', 'image/svg+xml', and 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/` and `/parameters/` 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", "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"}], "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 `.`, 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.=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 '!', for example\n`filter.status=!orphaned` will return all the resources that are not in 'orphaned' state\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 `.`, 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.=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 \":\". 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`.`, 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.", "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/login": {"post": {"operationId": "login", "summary": "Login a user. 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"]}}}, "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}}}, "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}}}, "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": ["id", "name", "value", "environment", "source"], "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}}}, "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}}}, "Server": {"title": "Server", "required": ["url"], "type": "object", "properties": {"url": {"title": "Url", "type": "string", "format": "uri"}, "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": {"default": "runtime_error", "allOf": [{"$ref": "#/components/schemas/ErrorCategory"}]}, "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 `__"}, "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 `__"}, "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 `__"}, "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 environment."}, "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"], "type": "object", "properties": {"discovered_resource_id": {"title": "Discovered Resource Id", "type": "string"}, "values": {"title": "Values", "type": "object"}}, "description": ":param discovered_resource_id: The name of the resource\n:param values: The actual 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": ["unavailable", "skipped", "dry", "deployed", "failed", "deploying", "available", "cancelled", "undefined", "skipped_for_undefined"]}, "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 `_ and\n `PEP 708 (draft) `_ 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/`\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"}, "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."}}}}