{
  "openapi": "3.0.1",
  "info": {
    "title": "Command Registrations",
    "description": "Create and administer a collection of registered commands",
    "version": "9.1.20.0",
    "x-introduced": "9.1.0.0"
  },
  "servers": [
    {
      "url": "https://{hostname}:{port}/rest/admin/v2",
      "variables": {
        "port": {
          "default": "443",
          "enum": [
            "443",
            "8000"
          ]
        },
        "hostname": {
          "default": "localhost",
          "enum": [
            "localhost",
            "test.hcl.com"
          ]
        }
      }
    }
  ],
  "tags": [
    {
      "name": "Command Registrations",
      "description": "Provide RESTful services to manage command registrations."
    }
  ],
  "paths": {
    "/command-registrations": {
      "get": {
        "tags": [
          "Command Registrations"
        ],
        "description": "Get a collection of registered commands.",
        "operationId": "getCommandRegistrations",
        "parameters": [
          {
            "name": "storeId",
            "in": "query",
            "description": "The unique numeric ID for identifying the store where the command is registered. A value of 0 means that the command implementation is registered and applicable to all stores.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "interfaceName",
            "in": "query",
            "description": "The command interface name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "className",
            "in": "query",
            "description": "The implementation class name for the command.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "properties",
            "in": "query",
            "description": "The default properties that associated with the command. The properties are in the form \"property1=value1&property2=value2\" where \"property\" is the name of a property and \"value\" is the value for that property.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "The position within the resulting dataset where the query begins returning item records. If the offset is \"5\", the records that returned begin with the sixth record that matches the query parameters. If the offset is \"0\", the records that are returned begin with the first record that matches the query parameters.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "The maximum number of records to return.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "The comma-separated set of properties to be returned. If no properties are specified, all properties are returned.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "description": "The comma-separated set of related resources referenced in the links to be returned. If no related resources are specified, no related resources are returned.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A collection of registered commands.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommandRegistrationCollection"
                }
              }
            }
          },
          "400": {
            "description": "There was a client error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          },
          "500": {
            "description": "There was a server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Command Registrations"
        ],
        "description": "Register a command in the command registry.",
        "operationId": "createCommandRegistration",
        "requestBody": {
          "description": "These services provide classes related to registering commands and managing existing command registrations.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommandRegistrations"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "The operation was successful.",
            "content": {},
            "headers": {
              "Location": {
                "description": "The URI of the Command Registrations.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "links": {
              "GetCommandRegistrationsByInterfaceNameAndStoreId": {
                "operationRef": "#/paths/~1command-registrations~1storeId:{storeId},interfaceName:{interfaceName}/get",
                "parameters": {
                  "storeId": "$request.body#/storeId",
                  "interfaceName": "$request.body#/interfaceName"
                },
                "description": "The `storeId` value used in the request body can be used as the `storeId` parameter in `GET /command-registrations/storeId:{storeId},interfaceName:{interfaceName}`.\n"
              },
              "DeleteCommandRegistrationsByInterfaceNameAndStoreId": {
                "operationRef": "#/paths/~1command-registrations~1storeId:{storeId},interfaceName:{interfaceName}/delete",
                "parameters": {
                  "storeId": "$request.body#/storeId",
                  "interfaceName": "$request.body#/interfaceName"
                },
                "description": "The `storeId` value used in the request body can be used as the `storeId` parameter in `DELETE /command-registrations/storeId:{storeId},interfaceName:{interfaceName}`.\n"
              },
              "UpdateCommandRegistrationsByInterfaceNameAndStoreId": {
                "operationRef": "#/paths/~1command-registrations~1storeId:{storeId},interfaceName:{interfaceName}/patch",
                "parameters": {
                  "storeId": "$request.body#/storeId",
                  "interfaceName": "$request.body#/interfaceName"
                },
                "description": "The `storeid` value used in the request body can be used as the `storeId` parameter in `PATCH /command-registrations/storeId:{storeId},interfaceName:{interfaceName}`.\n"
              }
            }
          },
          "400": {
            "description": "There was a client error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          },
          "500": {
            "description": "There was a server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "CommandRegistration"
      }
    },
    "/command-registrations/storeId:{storeId},interfaceName:{interfaceName}": {
      "get": {
        "tags": [
          "Command Registrations"
        ],
        "description": "Get a registered command from the command registry.",
        "operationId": "getCommandRegistrationById",
        "parameters": [
          {
            "name": "storeId",
            "in": "path",
            "description": "The unique numeric ID for identifying the store where the command is registered. A value of 0 means that the command implementation is registered and applicable to all stores.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "interfaceName",
            "in": "path",
            "description": "The command interface name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "description": "The comma-separated set of properties to be returned. If no properties are specified, all properties are returned.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expand",
            "in": "query",
            "description": "The comma-separated set of related resources referenced in the links to be returned. If no related resources are specified, no related resources are returned.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "These services provide classes related to registering commands and managing existing command registrations.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommandRegistration"
                }
              }
            }
          },
          "400": {
            "description": "There was a client error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {}
          },
          "500": {
            "description": "There was a server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Command Registrations"
        ],
        "description": "Delete a registered command from the command registry.",
        "operationId": "deleteCommandRegistrationById",
        "parameters": [
          {
            "name": "storeId",
            "in": "path",
            "description": "The unique numeric ID for identifying the store where the command is registered. A value of 0 means that the command implementation is registered and applicable to all stores.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "interfaceName",
            "in": "path",
            "description": "The command interface name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "The operation was successful.",
            "content": {}
          },
          "400": {
            "description": "There was a client error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {}
          },
          "500": {
            "description": "There was a server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Command Registrations"
        ],
        "description": "Update a registered command in the command registry.",
        "operationId": "updateCommandRegistrationById",
        "parameters": [
          {
            "name": "storeId",
            "in": "path",
            "description": "The unique numeric ID for identifying the store where the command is registered. A value of 0 means that the command implementation is registered and applicable to all stores.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "interfaceName",
            "in": "path",
            "description": "The command interface name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "These services provide classes related to registering commands and managing existing command registrations.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CommandRegistrations"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The operation was successful.",
            "content": {}
          },
          "400": {
            "description": "There was a client error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          },
          "404": {
            "description": "The resource was not found.",
            "content": {}
          },
          "500": {
            "description": "There was a server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseContainer"
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "CommandRegistration"
      }
    }
  },
  "components": {
    "schemas": {
      "Link": {
        "type": "object",
        "properties": {
          "href": {
            "type": "string",
            "description": "The URL of the link.",
            "format": "uri"
          }
        },
        "description": "Links to related resources."
      },
      "Error": {
        "type": "object",
        "properties": {
          "errorCode": {
            "type": "string",
            "description": "The error message code."
          },
          "errorMessage": {
            "type": "string",
            "description": "The error message."
          },
          "errorKey": {
            "type": "string",
            "description": "The error message key."
          },
          "errorParameters": {
            "type": "array",
            "description": "The arguments used to construct the error message.",
            "items": {
              "type": "object",
              "properties": {}
            }
          },
          "errorLevel": {
            "type": "string",
            "description": "The error level."
          },
          "errorHref": {
            "type": "string",
            "description": "The error hypertext reference."
          }
        },
        "description": "The error message item model."
      },
      "ErrorResponseContainer": {
        "type": "object",
        "properties": {
          "requestId": {
            "type": "string",
            "description": "The request identifier."
          },
          "errors": {
            "type": "array",
            "description": "The errors.",
            "items": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "The error message model."
      },
      "CommandRegistration": {
        "type": "object",
        "properties": {
          "storeId": {
            "type": "integer",
            "description": "The unique numeric ID for identifying the store where the command is registered. A value of 0 means that the command implementation is registered and applicable to all stores.",
            "format": "int32"
          },
          "interfaceName": {
            "type": "string",
            "description": "The command interface name."
          },
          "className": {
            "type": "string",
            "description": "The implementation class name for the command."
          },
          "properties": {
            "type": "string",
            "nullable": true,
            "description": "The default properties that associated with the command. The properties are in the form \"property1=value1&property2=value2\" where \"property\" is the name of a property and \"value\" is the value for that property."
          },
          "links": {
            "type": "object",
            "properties": {
              "self": {
                "type": "object",
                "properties": {
                  "href": {
                    "type": "string",
                    "description": "The URL of the link."
                  }
                },
                "description": "The self link."
              }
            }
          }
        },
        "description": "These services provide classes related to registering commands and managing existing command registrations."
      },
      "CommandRegistrations": {
        "type": "object",
        "properties": {
          "storeId": {
            "type": "integer",
            "description": "The unique numeric ID for identifying the store where the command is registered. A value of 0 means that the command implementation is registered and applicable to all stores.",
            "format": "int32"
          },
          "interfaceName": {
            "type": "string",
            "description": "The command interface name."
          },
          "className": {
            "type": "string",
            "description": "The implementation class name for the command."
          },
          "properties": {
            "type": "string",
            "nullable": true,
            "description": "The default properties that associated with the command. The properties are in the form \"property1=value1&property2=value2\" where \"property\" is the name of a property and \"value\" is the value for that property."
          }
        }
      },
      "CommandRegistrationCollection": {
        "type": "object",
        "properties": {
          "href": {
            "type": "string"
          },
          "count": {
            "type": "integer",
            "description": "The total number of items.",
            "format": "int64"
          },
          "items": {
            "type": "array",
            "description": "The items.",
            "items": {
              "$ref": "#/components/schemas/CommandRegistration"
            }
          }
        },
        "description": "A collection of registered commands."
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "basicAuth": []
    }
  ]
}
