{
  "swagger": "2.0",
  "info": {
    "description": "Microservice which expose the action ontology CRUD",
    "version": "0.0.1",
    "title": "Actions Microservice API",
    "contact": {}
  },
  "host": "dev-motion.cwbyminsait.com",
  "basePath": "/actions",
  "tags": [
    {
      "name": "action-controller",
      "description": "Action Controller"
    }
  ],
  "schemes": [
    "http",
    "https"
  ],
  "produces": [
    "application/json",
    "application/yaml",
    "text/plain"
  ],
  "paths": {
    "/v1/actions": {
      "get": {
        "tags": [
          "action-controller"
        ],
        "summary": "Get actions",
        "description": "Return the actions",
        "operationId": "getActionsUsingGET",
        "parameters": [
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "actionId",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "fromCreationDate",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "toCreationDate",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "affectedAssetId",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "responsible",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Request Successful, review the resulting object. ",
            "schema": {
              "$ref": "#/definitions/Action model"
            }
          },
          "400": {
            "description": "Bad request, review the request param"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "500": {
            "description": "Unexpected exception (Internal Server Error)"
          }
        }
      },
      "post": {
        "tags": [
          "action-controller"
        ],
        "summary": "Action creation",
        "description": "Create a new action",
        "operationId": "createActionUsingPOST",
        "consumes": [
          "application/json"
        ],
        "parameters": [
          {
            "in": "body",
            "name": "action",
            "description": "action",
            "required": true,
            "schema": {
              "$ref": "#/definitions/Action model"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Request Successful, review the resulting object. If infoError is not null, then a functional error has occurred in the back-end ",
            "schema": {
              "$ref": "#/definitions/Action model"
            }
          },
          "201": {
            "description": "Created"
          },
          "400": {
            "description": "Bad request, review the request param"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "500": {
            "description": "Unexpected exception (Internal Server Error)"
          }
        }
      }
    },
    "/v1/actions/{actionId}": {
      "get": {
        "tags": [
          "action-controller"
        ],
        "summary": "Get action by actionId",
        "description": "Get action by actionId",
        "operationId": "getByIdUsingGET",
        "parameters": [
          {
            "name": "actionId",
            "in": "path",
            "description": "actionId",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Updated Successful, review the resulting object.",
            "schema": {
              "$ref": "#/definitions/Action model"
            }
          },
          "400": {
            "description": "Bad request, review the request param"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Action not found."
          },
          "500": {
            "description": "Unexpected exception (Internal Server Error)"
          }
        }
      },
      "put": {
        "tags": [
          "action-controller"
        ],
        "summary": "Update an action",
        "description": "Update the action",
        "operationId": "putActionUsingPUT",
        "consumes": [
          "application/json"
        ],
        "parameters": [
          {
            "in": "body",
            "name": "action",
            "description": "action",
            "required": true,
            "schema": {
              "$ref": "#/definitions/Action model"
            }
          },
          {
            "name": "actionId",
            "in": "path",
            "description": "actionId",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "201": {
            "description": "Created"
          },
          "204": {
            "description": "Updated Successful, review the resulting object.",
            "schema": {
              "$ref": "#/definitions/Action model"
            }
          },
          "400": {
            "description": "Bad request, review the request param"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "500": {
            "description": "Unexpected exception (Internal Server Error)"
          }
        }
      },
      "delete": {
        "tags": [
          "action-controller"
        ],
        "summary": "Delete action",
        "description": "Deleting the action",
        "operationId": "deleteByIdUsingDELETE",
        "parameters": [
          {
            "name": "actionId",
            "in": "path",
            "description": "actionId",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "204": {
            "description": "Deleted Successful, review the resulting object.",
            "schema": {
              "$ref": "#/definitions/Action model"
            }
          },
          "400": {
            "description": "Bad request, review the request param"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "500": {
            "description": "Unexpected exception (Internal Server Error)"
          }
        }
      }
    }
  },
  "definitions": {
    "Action model": {
      "type": "object",
      "properties": {
        "actionId": {
          "type": "string",
          "description": "Action id",
          "allowEmptyValue": false
        },
        "affectedAssetId": {
          "type": "string",
          "description": "Affected asset id by this action",
          "allowEmptyValue": false
        },
        "creationDate": {
          "type": "string",
          "description": "Action creation date",
          "allowEmptyValue": false
        },
        "extrainfo": {
          "description": "Action extra info (no default fields)",
          "allowEmptyValue": false,
          "$ref": "#/definitions/JsonNode"
        },
        "responsible": {
          "type": "string",
          "description": "Responsible for this action",
          "allowEmptyValue": false
        },
        "status": {
          "type": "string",
          "description": "Action status",
          "allowEmptyValue": false
        },
        "type": {
          "type": "string",
          "description": "Action type",
          "allowEmptyValue": false
        }
      },
      "title": "Action model"
    },
    "DataWrapperDTO«Action model»": {
      "type": "object",
      "properties": {
        "data": {
          "$ref": "#/definitions/Action model"
        }
      },
      "title": "DataWrapperDTO«Action model»"
    },
    "JsonNode": {
      "type": "object",
      "properties": {
        "array": {
          "type": "boolean"
        },
        "bigDecimal": {
          "type": "boolean"
        },
        "bigInteger": {
          "type": "boolean"
        },
        "binary": {
          "type": "boolean"
        },
        "boolean": {
          "type": "boolean"
        },
        "containerNode": {
          "type": "boolean"
        },
        "double": {
          "type": "boolean"
        },
        "float": {
          "type": "boolean"
        },
        "floatingPointNumber": {
          "type": "boolean"
        },
        "int": {
          "type": "boolean"
        },
        "integralNumber": {
          "type": "boolean"
        },
        "long": {
          "type": "boolean"
        },
        "missingNode": {
          "type": "boolean"
        },
        "nodeType": {
          "type": "string",
          "enum": [
            "ARRAY",
            "BINARY",
            "BOOLEAN",
            "MISSING",
            "NULL",
            "NUMBER",
            "OBJECT",
            "POJO",
            "STRING"
          ]
        },
        "null": {
          "type": "boolean"
        },
        "number": {
          "type": "boolean"
        },
        "object": {
          "type": "boolean"
        },
        "pojo": {
          "type": "boolean"
        },
        "short": {
          "type": "boolean"
        },
        "textual": {
          "type": "boolean"
        },
        "valueNode": {
          "type": "boolean"
        }
      },
      "title": "JsonNode"
    },
    "LinksDTO": {
      "type": "object",
      "properties": {
        "first": {
          "type": "string"
        },
        "last": {
          "type": "string"
        },
        "next": {
          "type": "string"
        },
        "previous": {
          "type": "string"
        },
        "self": {
          "type": "string"
        }
      },
      "title": "LinksDTO"
    },
    "PaginationDTO": {
      "type": "object",
      "properties": {
        "links": {
          "$ref": "#/definitions/LinksDTO"
        }
      },
      "title": "PaginationDTO"
    },
    "PaginationDataWrapperDTO«Action model»": {
      "type": "object",
      "properties": {
        "data": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Action model"
          }
        },
        "pagination": {
          "$ref": "#/definitions/PaginationDTO"
        }
      },
      "title": "PaginationDataWrapperDTO«Action model»"
    }
  }
}
