entity-operations-spec.json 5.55 KB
Newer Older
canterafonsj's avatar
canterafonsj committed
{
  "openapi": "3.0.1",
  "info": {
    "title": "NGSI-LD Entity Operations",
canterafonsj's avatar
canterafonsj committed
    "version": "0.1"
canterafonsj's avatar
canterafonsj committed
  },
canterafonsj's avatar
canterafonsj committed
  "components": {},
canterafonsj's avatar
canterafonsj committed
  "paths": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
    "/entityOperations/create": {
canterafonsj's avatar
canterafonsj committed
      "post": {
canterafonsj's avatar
canterafonsj committed
        "description": "Batch Entity creation",
canterafonsj's avatar
canterafonsj committed
        "operationId": "batchEntityCreation",
Stefan Wiedemann's avatar
Stefan Wiedemann committed
        "tags": ["Batch Operations", "Entities"],
canterafonsj's avatar
canterafonsj committed
        "requestBody": {
          "required": true,
          "content": {
            "application/json;application/ld+json": {
              "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
                "$ref": "http://localhost:8090/schema/EntityList.json#/definitions/EntityList"
canterafonsj's avatar
canterafonsj committed
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
canterafonsj's avatar
canterafonsj committed
              "application/json;application/ld+json": {
                "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
                  "$ref": "http://localhost:8090/schema/BatchOperationResult.json#/definitions/BatchOperationResult"
canterafonsj's avatar
canterafonsj committed
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
                  "$ref": "http://localhost:8090/schema/common.json#/definitions/ProblemDetails"
Stefan Wiedemann's avatar
Stefan Wiedemann committed
    "/entityOperations/update": {
canterafonsj's avatar
canterafonsj committed
      "post": {
        "description": "Batch Entity update",
        "operationId": "batchEntityUpdate",
Stefan Wiedemann's avatar
Stefan Wiedemann committed
        "tags": ["Batch Operations", "Entities"],
canterafonsj's avatar
canterafonsj committed
        "parameters": [
          {
            "name": "options",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "noOverwrite"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
canterafonsj's avatar
canterafonsj committed
            "application/json;application/ld+json": {
              "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
                "$ref": "http://localhost:8090/schema/EntityList.json#/definitions/EntityList"
canterafonsj's avatar
canterafonsj committed
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
                  "$ref": "http://localhost:8090/schema/BatchOperationResult.json#/definitions/BatchOperationResult"
canterafonsj's avatar
canterafonsj committed
                }
              }
            }
canterafonsj's avatar
canterafonsj committed
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
                  "$ref": "http://localhost:8090/schema/common.json#/definitions/ProblemDetails"
canterafonsj's avatar
canterafonsj committed
          }
Stefan Wiedemann's avatar
Stefan Wiedemann committed
    "/entityOperations/upsert": {
canterafonsj's avatar
canterafonsj committed
      "post": {
        "description": "Batch Entity upsert",
        "operationId": "batchEntityUpsert",
Stefan Wiedemann's avatar
Stefan Wiedemann committed
        "tags": ["Batch Operations", "Entities"],
canterafonsj's avatar
canterafonsj committed
        "parameters": [
          {
            "name": "options",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "replace",
                "update"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json;application/ld+json": {
              "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
                "$ref": "http://localhost:8090/schema/EntityList.json#/definitions/EntityList"
canterafonsj's avatar
canterafonsj committed
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
                  "$ref": "http://localhost:8090/schema/BatchOperationResult.json#/definitions/BatchOperationResult"
canterafonsj's avatar
canterafonsj committed
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
                  "$ref": "http://localhost:8090/schema/common.json#/definitions/ProblemDetails"
canterafonsj's avatar
canterafonsj committed
    },
Stefan Wiedemann's avatar
Stefan Wiedemann committed
    "/entityOperations/delete": {
canterafonsj's avatar
canterafonsj committed
      "post": {
        "description": "Batch Entity delete",
        "operationId": "batchEntityDelete",
Stefan Wiedemann's avatar
Stefan Wiedemann committed
        "tags": ["Batch Operations", "Entities"],
canterafonsj's avatar
canterafonsj committed
        "requestBody": {
          "required": true,
          "content": {
            "application/json;application/ld+json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uri"
                },
                "minItems": 1
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
                  "$ref": "http://localhost:8090/schema/BatchOperationResult.json#/definitions/BatchOperationResult"
canterafonsj's avatar
canterafonsj committed
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
                  "$ref": "http://localhost:8090/schema/common.json#/definitions/ProblemDetails"