Page tree
Skip to end of metadata
Go to start of metadata
{ "swagger": "2.0", "info": { "description": "The XNAT Element Spawner API is primarly consumed internally to create UI templated elements.", "version": "1.7.4.1", "title": "XNAT Spawner API" }, "tags": [ { "name": "spawner-api", "description": "XNAT Spawner API" } ], "definitions": { "SpawnerElement": { "type": "object", "properties": { "created": { "type": "string", "format": "date-time" }, "description": {"type": "string"}, "disabled": { "type": "string", "format": "date-time" }, "elementId": {"type": "string"}, "enabled": {"type": "boolean"}, "id": { "type": "integer", "format": "int64" }, "label": {"type": "string"}, "namespace": {"type": "string"}, "timestamp": { "type": "string", "format": "date-time" }, "yaml": {"type": "string"} } }, "Validated": { "type": "object", "properties": { "message": {"type": "string"}, "valid": {"type": "boolean"} } }, "Map«string,string»": { "type": "object", "additionalProperties": {"type": "string"} } }, "paths": { "/xapi/spawner/element": {"post": { "tags": ["spawner-api"], "summary": "Create a new spawner element in the default namespace.", "description": "Creates a new spawner element in the default namespace from the submitted YAML. This method returns the parsed and validated YAML content of the spawner element on success.", "operationId": "createDefaultElementUsingPOST", "consumes": [ "text/x-yaml", "text/plain" ], "produces": ["text/x-yaml"], "parameters": [{ "in": "body", "name": "yaml", "description": "yaml", "required": true, "schema": {"type": "string"} }], "responses": { "200": { "description": "The new spawner element was successfully created.", "schema": {"type": "string"} }, "201": {"description": "Created"}, "400": {"description": "Bad request, likely an invalid, missing, or duplicated element ID."}, "401": {"description": "Unauthorized"}, "500": {"description": "An unexpected error occurred."}, "403": {"description": "Access denied"}, "404": {"description": "Not Found"} } }}, "/xapi/spawner/element/{elementId}": { "get": { "tags": ["spawner-api"], "summary": "Get the specified spawner element from the default namespace.", "description": "Retrieves the spawner element with the indicated ID from the default namespace.", "operationId": "getDefaultElementUsingGET", "consumes": ["application/json"], "produces": ["application/json"], "parameters": [{ "name": "elementId", "in": "path", "description": "elementId", "required": true, "type": "string" }], "responses": { "200": { "description": "The spawner element with the specified ID from the default namespace.", "schema": {"$ref": "#/definitions/SpawnerElement"} }, "401": {"description": "Unauthorized"}, "500": {"description": "An unexpected error occurred."}, "204": { "description": "Element ID doesn't exist or has no content.", "schema": {"$ref": "#/definitions/SpawnerElement"} }, "403": {"description": "Forbidden"}, "404": {"description": "Not Found"} } }, "put": { "tags": ["spawner-api"], "summary": "Updates the specified spawner element.", "description": "Updates the spawner element in the default namespace with the submitted data. This method returns the parsed and validated YAML content of the spawner element on success.", "operationId": "updateDefaultElementUsingPUT", "consumes": ["application/json"], "produces": ["text/x-yaml"], "parameters": [ { "name": "elementId", "in": "path", "description": "elementId", "required": true, "type": "string" }, { "in": "body", "name": "yaml", "description": "yaml", "required": true, "schema": {"type": "string"} } ], "responses": { "200": { "description": "The specified element was successfully updated.", "schema": {"type": "string"} }, "201": {"description": "Created"}, "401": {"description": "Unauthorized"}, "500": {"description": "An unexpected error occurred."}, "403": {"description": "Access denied"}, "404": {"description": "Namespace or element ID not found"} } }, "delete": { "tags": ["spawner-api"], "summary": "Deletes the specified spawner element.", "description": "Deletes the spawner element in the default namespace.", "operationId": "deleteDefaultElementUsingDELETE", "consumes": ["application/json"], "produces": ["text/x-yaml"], "parameters": [{ "name": "elementId", "in": "path", "description": "elementId", "required": true, "type": "string" }], "responses": { "200": {"description": "The specified element was successfully deleted."}, "401": {"description": "Unauthorized"}, "500": {"description": "An unexpected error occurred."}, "204": {"description": "No Content"}, "403": {"description": "Access denied"}, "404": {"description": "Namespace or element ID not found"} } } }, "/xapi/spawner/element/{namespace}": {"post": { "tags": ["spawner-api"], "summary": "Create a new spawner element in the specified namespace.", "description": "Creates a new spawner element in the specified namespace from the submitted YAML. This method returns the parsed and validated YAML content of the spawner element on success.", "operationId": "createNamespacedElementUsingPOST", "consumes": [ "text/x-yaml", "text/plain" ], "produces": ["text/x-yaml"], "parameters": [ { "name": "namespace", "in": "path", "description": "namespace", "required": true, "type": "string" }, { "in": "body", "name": "yaml", "description": "yaml", "required": true, "schema": {"type": "string"} } ], "responses": { "200": { "description": "The new spawner element was successfully created.", "schema": {"type": "string"} }, "201": {"description": "Created"}, "400": {"description": "Bad request, likely an invalid, missing, or duplicated element ID."}, "401": {"description": "Unauthorized"}, "500": {"description": "An unexpected error occurred."}, "403": {"description": "Access denied"}, "404": {"description": "Not Found"} } }}, "/xapi/spawner/element/{namespace}/{elementId}": { "get": { "tags": ["spawner-api"], "summary": "Get the specified spawner element from the specified namespace.", "description": "Retrieves the spawner element with the indicated ID from the specified namespace.", "operationId": "getNamespacedElementUsingGET", "consumes": ["application/json"], "produces": ["application/json"], "parameters": [ { "name": "namespace", "in": "path", "description": "namespace", "required": true, "type": "string" }, { "name": "elementId", "in": "path", "description": "elementId", "required": true, "type": "string" } ], "responses": { "200": { "description": "The spawner element with the specified ID from the default namespace.", "schema": {"$ref": "#/definitions/SpawnerElement"} }, "401": {"description": "Unauthorized"}, "500": {"description": "An unexpected error occurred."}, "204": { "description": "Namespace or element ID doesn't exist or has no content.", "schema": {"$ref": "#/definitions/SpawnerElement"} }, "403": {"description": "Forbidden"}, "404": {"description": "Not Found"} } }, "put": { "tags": ["spawner-api"], "summary": "Updates the specified spawner element.", "description": "Updates the spawner element in the specified namespace with the submitted data. This method returns the parsed and validated YAML content of the spawner element on success.", "operationId": "updateNamespacedElementUsingPUT", "consumes": ["application/json"], "produces": ["text/x-yaml"], "parameters": [ { "name": "namespace", "in": "path", "description": "namespace", "required": true, "type": "string" }, { "name": "elementId", "in": "path", "description": "elementId", "required": true, "type": "string" }, { "in": "body", "name": "yaml", "description": "yaml", "required": true, "schema": {"type": "string"} } ], "responses": { "200": { "description": "The specified element was successfully updated.", "schema": {"type": "string"} }, "201": {"description": "Created"}, "401": {"description": "Unauthorized"}, "500": {"description": "An unexpected error occurred."}, "403": {"description": "Access denied"}, "404": {"description": "Namespace or element ID not found"} } }, "delete": { "tags": ["spawner-api"], "summary": "Deletes the specified spawner element.", "description": "Deletes the spawner element in the specified namespace.", "operationId": "deleteNamespacedElementUsingDELETE", "consumes": ["application/json"], "produces": ["text/x-yaml"], "parameters": [ { "name": "namespace", "in": "path", "description": "namespace", "required": true, "type": "string" }, { "name": "elementId", "in": "path", "description": "elementId", "required": true, "type": "string" } ], "responses": { "200": {"description": "The specified element was successfully deleted."}, "401": {"description": "Unauthorized"}, "500": {"description": "An unexpected error occurred."}, "204": {"description": "No Content"}, "403": {"description": "Access denied"}, "404": {"description": "Namespace or element ID not found"} } } }, "/xapi/spawner/elements": {"get": { "tags": ["spawner-api"], "summary": "Get list of spawner elements in the system's default namespace.", "description": "The default namespace spawner element function returns a list of all of the spawner elements in the default namespace of the XNAT system.", "operationId": "getDefaultElementsUsingGET", "consumes": ["application/json"], "produces": ["application/json"], "responses": { "200": { "description": "A list of spawner elements from the default namespace.", "schema": { "type": "array", "items": {"$ref": "#/definitions/SpawnerElement"} } }, "401": {"description": "Unauthorized"}, "500": {"description": "An unexpected error occurred."}, "403": {"description": "Forbidden"}, "404": {"description": "Not Found"} } }}, "/xapi/spawner/elements/{namespace}": { "get": { "tags": ["spawner-api"], "summary": "Get list of spawner elements in the specified namespace.", "description": "The namespaced spawner element function returns a list of all of the spawner elements in the specified namespace of the XNAT system.", "operationId": "getNamespacedElementsUsingGET", "consumes": ["application/json"], "produces": ["application/json"], "parameters": [{ "name": "namespace", "in": "path", "description": "namespace", "required": true, "type": "string" }], "responses": { "200": { "description": "A list of spawner elements from the specified namespace.", "schema": { "type": "array", "items": {"$ref": "#/definitions/SpawnerElement"} } }, "401": {"description": "Unauthorized"}, "500": {"description": "An unexpected error occurred."}, "204": { "description": "Namespace not found or no elements exist.", "schema": { "type": "array", "items": {"$ref": "#/definitions/SpawnerElement"} } }, "403": {"description": "Forbidden"}, "404": {"description": "Not Found"} } }, "post": { "tags": ["spawner-api"], "summary": "Purges the existing spawner elements in the specified namespace and refreshes the elements from the corresponding element definition file.", "description": "The refresh spawner namespace updates all of the spawner elements in the specified element definition file of the XNAT system. Any elements that are not specified in the element definition file will be purged from the system.", "operationId": "purgeAndRefreshNamespacedElementsUsingPOST", "consumes": ["application/json"], "produces": ["application/json"], "parameters": [{ "name": "namespace", "in": "path", "description": "namespace", "required": true, "type": "string" }], "responses": { "200": {"description": "The spawner elements in the specified namespace were successfully purged and refreshed."}, "201": {"description": "Created"}, "401": {"description": "Unauthorized"}, "500": {"description": "An unexpected error occurred."}, "403": {"description": "Forbidden"}, "404": {"description": "Namespace not found"} } }, "put": { "tags": ["spawner-api"], "summary": "Refreshes the spawner elements in the specified namespace from the corresponding element definition file.", "description": "The refresh spawner namespace updates all of the spawner elements in the specified element definition file of the XNAT system. This will not delete or update any elements that are not specified in the element definition file", "operationId": "refreshNamespacedElementsUsingPUT", "consumes": ["application/json"], "produces": ["application/json"], "parameters": [{ "name": "namespace", "in": "path", "description": "namespace", "required": true, "type": "string" }], "responses": { "200": {"description": "The spawner elements in the specified namespace were successfully refreshed."}, "201": {"description": "Created"}, "401": {"description": "Unauthorized"}, "500": {"description": "An unexpected error occurred."}, "403": {"description": "Forbidden"}, "404": {"description": "Namespace not found"} } }, "delete": { "tags": ["spawner-api"], "summary": "Deletes all spawner elements in the specified namespace.", "description": "The delete spawner namespace deletes all of the spawner elements in the specified namespace of the XNAT system.", "operationId": "deleteNamespacedElementsUsingDELETE", "consumes": ["application/json"], "produces": ["application/json"], "parameters": [{ "name": "namespace", "in": "path", "description": "namespace", "required": true, "type": "string" }], "responses": { "200": {"description": "The spawner elements in the specified namespace were successfully deleted."}, "401": {"description": "Unauthorized"}, "500": {"description": "An unexpected error occurred."}, "204": {"description": "No Content"}, "403": {"description": "Forbidden"}, "404": {"description": "Namespace not found"} } } }, "/xapi/spawner/ids": {"get": { "tags": ["spawner-api"], "summary": "Get list of element IDs in the system's default namespace.", "description": "The spawner element IDs function returns a list of all the IDs of spawner elements in the default namespace of the XNAT system.", "operationId": "getDefaultElementIdsUsingGET", "consumes": ["application/json"], "produces": ["application/json"], "responses": { "200": { "description": "A list of spawner element IDs in the default namespace.", "schema": { "type": "array", "items": {"type": "string"} } }, "401": {"description": "Unauthorized"}, "500": {"description": "An unexpected error occurred."}, "403": {"description": "Forbidden"}, "404": {"description": "Not Found"} } }}, "/xapi/spawner/ids/{namespace}": {"get": { "tags": ["spawner-api"], "summary": "Get list of element IDs in the specified namespace.", "description": "The spawner element IDs function returns a list of all the IDs of spawner elements in the specified namespace of the XNAT system.", "operationId": "getNamespacedElementIdsUsingGET", "consumes": ["application/json"], "produces": ["application/json"], "parameters": [{ "name": "namespace", "in": "path", "description": "namespace", "required": true, "type": "string" }], "responses": { "200": { "description": "A list of spawner element IDs for the specified namespace.", "schema": { "type": "array", "items": {"type": "string"} } }, "401": {"description": "Unauthorized"}, "500": {"description": "An unexpected error occurred."}, "204": { "description": "Namespace not found or no elements exist.", "schema": { "type": "array", "items": {"type": "string"} } }, "403": {"description": "Forbidden"}, "404": {"description": "Not Found"} } }}, "/xapi/spawner/namespaces": {"get": { "tags": ["spawner-api"], "summary": "Get list of available element namespaces in the system.", "description": "The spawner element namespaces provide organizational separation of spawner elements. This call returns a list of the namespaces in the XNAT system.", "operationId": "getNamespacesUsingGET", "consumes": ["application/json"], "produces": ["application/json"], "responses": { "200": { "description": "A list of spawner element namespaces.", "schema": { "type": "array", "items": {"type": "string"} } }, "401": {"description": "Unauthorized"}, "500": {"description": "An unexpected error occurred."}, "403": {"description": "Forbidden"}, "404": {"description": "Not Found"} } }}, "/xapi/spawner/resolve/{elementId}": {"get": { "tags": ["spawner-api"], "summary": "Resolves the specified spawner element from the default namespace.", "description": "This method retrieves the spawner element with the indicated ID from the default namespace, then resolves all of the referenced child elements as well, and renders a fully resolved YAML document that describes a complete interface.", "operationId": "resolveDefaultElementUsingGET", "consumes": ["application/json"], "produces": ["application/json"], "parameters": [{ "name": "elementId", "in": "path", "description": "elementId", "required": true, "type": "string" }], "responses": { "200": { "description": "The specified element was successfully located and resolved.", "schema": {"type": "string"} }, "401": {"description": "Unauthorized"}, "500": {"description": "An unexpected error occurred."}, "204": { "description": "Element ID doesn't exist or has no content.", "schema": {"type": "string"} }, "403": {"description": "Forbidden"}, "404": {"description": "Not Found"} } }}, "/xapi/spawner/resolve/{namespace}/{elementId}": {"get": { "tags": ["spawner-api"], "summary": "Resolves the specified spawner element from the specified namespace.", "description": "This method retrieves the spawner element with the indicated ID from the specified namespace, then resolves all of the referenced child elements as well, and renders a fully resolved YAML document that describes a complete interface.", "operationId": "resolveNamespacedElementUsingGET", "consumes": ["application/json"], "produces": ["application/json"], "parameters": [ { "name": "namespace", "in": "path", "description": "namespace", "required": true, "type": "string" }, { "name": "elementId", "in": "path", "description": "elementId", "required": true, "type": "string" } ], "responses": { "200": { "description": "The specified element was successfully located and resolved.", "schema": {"type": "string"} }, "401": {"description": "Unauthorized"}, "500": {"description": "An unexpected error occurred."}, "204": { "description": "Namespace or element ID doesn't exist or has no content.", "schema": {"type": "string"} }, "403": {"description": "Forbidden"}, "404": {"description": "Not Found"} } }}, "/xapi/spawner/validate/batch": {"post": { "tags": ["spawner-api"], "summary": "Validates the value in the request body with the indicated validation method.", "description": "Applies the given validation method to the value in the request body.", "operationId": "validateValidationUsingPOST", "consumes": ["application/json"], "produces": ["application/json"], "parameters": [{ "in": "body", "name": "elements", "description": "This is a map of element IDs, with each element ID corresponding to a map containing a value property, validation property, and optional set property. Both set and validation can specified with the validation property by using the form \"validation\": \"set:validation\".", "required": false, "schema": { "type": "object", "additionalProperties": {"$ref": "#/definitions/Map«string,string»"} } }], "responses": { "200": { "description": "Value was successfully validated.", "schema": {"type": "string"} }, "201": {"description": "Created"}, "401": {"description": "Must be authenticated to access the XNAT REST API."}, "500": {"description": "An unexpected error occurred."}, "403": {"description": "Forbidden"}, "404": {"description": "The specified validation method was not found."} } }}, "/xapi/spawner/validate/list": {"get": { "tags": ["spawner-api"], "summary": "Returns all available validation methods.", "description": "This call returns a map keyed by the validation set and ID.", "operationId": "validateListUsingGET", "consumes": ["application/json"], "produces": ["application/json"], "responses": { "200": { "description": "Value was successfully validated.", "schema": {"type": "string"} }, "401": {"description": "Must be authenticated to access the XNAT REST API."}, "500": {"description": "An unexpected error occurred."}, "403": {"description": "Forbidden"}, "404": {"description": "The specified validation method was not found."} } }}, "/xapi/spawner/validate/list/{set}": {"get": { "tags": ["spawner-api"], "summary": "Returns all available validation methods.", "description": "This call returns a map keyed by the validation set and ID.", "operationId": "validateListSetUsingGET", "consumes": ["application/json"], "produces": ["application/json"], "parameters": [{ "name": "set", "in": "path", "description": "The set of validations to retrieve", "required": true, "type": "string" }], "responses": { "200": { "description": "Value was successfully validated.", "schema": {"type": "string"} }, "401": {"description": "Must be authenticated to access the XNAT REST API."}, "500": {"description": "An unexpected error occurred."}, "403": {"description": "Forbidden"}, "404": {"description": "The specified validation method was not found."} } }}, "/xapi/spawner/validate/{set}/{validation}": {"post": { "tags": ["spawner-api"], "summary": "Validates the value in the request body with the indicated validation method.", "description": "Applies the given validation method to the value in the request body.", "operationId": "validateValidationUsingPOST_1", "consumes": ["text/plain"], "produces": ["application/json"], "parameters": [ { "name": "set", "in": "path", "description": "The validation set to reference.", "required": true, "type": "string" }, { "name": "validation", "in": "path", "description": "The validation method to be applied to the input value.", "required": true, "type": "string" }, { "in": "body", "name": "value", "description": "value", "required": true, "schema": {"type": "string"} } ], "responses": { "200": { "description": "Value was successfully validated.", "schema": {"$ref": "#/definitions/Validated"} }, "201": {"description": "Created"}, "401": {"description": "Must be authenticated to access the XNAT REST API."}, "500": {"description": "An unexpected error occurred."}, "403": {"description": "Forbidden"}, "404": {"description": "The specified validation method was not found."} } }}, "/xapi/spawner/validate/{validation}": {"post": { "tags": ["spawner-api"], "summary": "Validates the value in the request body with the indicated validation method.", "description": "Applies the given validation method to the value in the request body.", "operationId": "validateValidationUsingPOST_2", "consumes": ["text/plain"], "produces": ["application/json"], "parameters": [ { "name": "validation", "in": "path", "description": "The validation method to be applied to the input value.", "required": true, "type": "string" }, { "in": "body", "name": "value", "description": "value", "required": true, "schema": {"type": "string"} } ], "responses": { "200": { "description": "Value was successfully validated.", "schema": {"$ref": "#/definitions/Validated"} }, "201": {"description": "Created"}, "401": {"description": "Must be authenticated to access the XNAT REST API."}, "500": {"description": "An unexpected error occurred."}, "403": {"description": "Forbidden"}, "404": {"description": "The specified validation method was not found."} } }}, } }
  • No labels