entity-operations-spec.json 5.88 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": {
    "/entityOperations/create": {
      "post": {
canterafonsj's avatar
canterafonsj committed
        "description": "Batch Entity creation",
canterafonsj's avatar
canterafonsj committed
        "operationId": "batchEntityCreation",
canterafonsj's avatar
canterafonsj committed
        "tags": ["Batch Operations"],
canterafonsj's avatar
canterafonsj committed
        "requestBody": {
          "required": true,
          "content": {
            "application/json;application/ld+json": {
              "schema": {
                "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/EntityList.json#/definitions/EntityList"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
canterafonsj's avatar
canterafonsj committed
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/BatchOperationResult.json#/definitions/BatchOperationResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/entityOperations/update": {
      "post": {
        "description": "Batch Entity update",
        "operationId": "batchEntityUpdate",
canterafonsj's avatar
canterafonsj committed
        "tags": ["Batch Operations"],
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": {
canterafonsj's avatar
canterafonsj committed
                "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/EntityList.json#/definitions/EntityList"
canterafonsj's avatar
canterafonsj committed
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/BatchOperationResult.json#/definitions/BatchOperationResult"
                }
              }
            }
canterafonsj's avatar
canterafonsj committed
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
                }
              }
            }
canterafonsj's avatar
canterafonsj committed
          }
canterafonsj's avatar
canterafonsj committed
        }
      }
    },
    "/entityOperations/upsert": {
canterafonsj's avatar
canterafonsj committed
      "post": {
        "description": "Batch Entity upsert",
        "operationId": "batchEntityUpsert",
canterafonsj's avatar
canterafonsj committed
        "tags": ["Batch Operations"],
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": {
                "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/EntityList.json#/definitions/EntityList"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/BatchOperationResult.json#/definitions/BatchOperationResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
                }
              }
            }
          }
        }
      }
canterafonsj's avatar
canterafonsj committed
    },
    "/entityOperations/delete": {
canterafonsj's avatar
canterafonsj committed
      "post": {
        "description": "Batch Entity delete",
        "operationId": "batchEntityDelete",
canterafonsj's avatar
canterafonsj committed
        "tags": ["Batch Operations"],
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": {
                  "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/BatchOperationResult.json#/definitions/BatchOperationResult"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
                }
              }
            }
          }
        }
      }