full_api.json 99 KB
Newer Older
{
  "openapi": "3.0.1",
  "info": {
    "description": "This OAS file describes the NGSI-LD API defined by the ETSI ISG CIM group. This Cross-domain Context Information Management API allows to provide, consume and subscribe to context information in multiple scenarios and involving multiple stakeholders",
    "version": "latest",
    "title": "ETSI ISG CIM / NGSI-LD API",
    "contact": {
      "email": "NGSI-LD@etsi.org"
    }
  },
  "externalDocs": {
    "description": "Find out more about the ETSI ISG Context Information Management",
    "url": "https://portal.etsi.org/tb.aspx?tbid=854&SubTB=854"
  },
  "tags": [
    {
      "name": "ETSI",
      "description": "European Telecommunications Standards Institute",
      "externalDocs": {
        "description": "Find out more",
        "url": "http://www.etsi.org"
      }
    },
    {
      "name": "CIM",
      "description": "Context Information Management",
      "externalDocs": {
        "description": "Find out more",
        "url": "https://portal.etsi.org/tb.aspx?tbid=854&SubTB=854"
      }
    },
    {
      "name": "JSON-LD",
canterafonsj's avatar
canterafonsj committed
      "description": "JSON for Linked Data",
      "externalDocs": {
        "description": "Find out more",
        "url": "https://json-ld.org/"
      }
    },
    {
      "name": "NGSI-LD API",
      "description": "API defined by the ETSI ISG CIM",
      "externalDocs": {
canterafonsj's avatar
canterafonsj committed
        "description": "Preliminary Specification",
        "url": "http://www.etsi.org/deliver/etsi_gs/CIM/001_099/004/01.01.01_60/gs_CIM004v010101p.pdf"
      }
    }
  ],
  "paths": {
    "/entities/": {
      "get": {
        "description": "Retrieve a set of entities which matches a specific query from an NGSI-LD system",
        "operationId": "queryEntities",
        "parameters": [
          {
            "name": "id",
            "description": "Comma separated list of URIs to be retrieved",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "uri"
            }
          },
          {
            "name": "idPattern",
            "description": "Regular expression that must be matched by Entity ids",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "regexp"
            }
          },
          {
            "name": "type",
            "description": "Comma separated list of Entity type names to be retrieved",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "attrs",
            "description": "Comma separated list of attribute names (properties or relationships) to be retrieved",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "q",
            "description": "Query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "georel",
            "description": "Geo-relationship",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "equals",
                    "disjoint",
                    "intersects",
                    "within",
                    "contains",
                    "overlaps"
                  ]
                },
                {
                  "type": "string",
                  "pattern": "^near;((maxDistance==\\d+)|(minDistance==\\d+))$"
                }
              ]
            }
          },
          {
            "name": "geometry",
            "description": "Geometry",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
canterafonsj's avatar
canterafonsj committed
              "enum": [
                "Point",
                "MultiPoint",
                "LineString",
                "MultiLineString",
                "Polygon",
                "MultiPolygon"
              ]
            }
          },
          {
            "name": "coordinates",
            "description": "Coordinates serialized as a string",
            "in": "query",
            "required": false,
            "schema": {
              "oneOf": [
                {
canterafonsj's avatar
canterafonsj committed
                  "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location/definitions/position"
canterafonsj's avatar
canterafonsj committed
                  "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location/definitions/positionArray"
canterafonsj's avatar
canterafonsj committed
                  "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location/definitions/lineString"
canterafonsj's avatar
canterafonsj committed
                  "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location/definitions/polygon"
                }
              ]
            }
          },
          {
            "name": "geoproperty",
            "description": "The name of the property that contains the geo-spatial data that will be used to resolve the geoquery",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "csf",
            "description": "Context Source Filter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "limit",
            "description": "Pagination limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
canterafonsj's avatar
canterafonsj committed
          },
          {
            "name": "options",
            "description": "Options dictionary",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "keyValues",
                "sysAttrs"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
canterafonsj's avatar
canterafonsj committed
                  "$ref": "#/paths/~1entityOperations~1create/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                },
                "examples": {
                  "simple": {
                    "externalValue": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/examples/EntityList-example.json"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "format": "uri"
                    },
                    "title": {
                      "type": "string"
                    },
                    "detail": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type"
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "description": "Create a new Entity within an NGSI-LD system",
        "operationId": "createEntity",
        "requestBody": {
          "required": true,
          "content": {
            "application/json;application/ld+json": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uri"
                      },
                      "type": {
canterafonsj's avatar
canterafonsj committed
                        "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema"
                      },
                      "createdAt": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "modifiedAt": {
                        "type": "string",
                        "format": "date-time"
                      }
                    }
                  },
                  {
                    "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created. Contains the resource URI of the created Entity"
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "409": {
            "description": "Already exists",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      }
    },
    "/entities/{entityId}": {
      "get": {
        "description": "Retrieve an specific Entity from an NGSI-LD system. It's possible to specify the Entity attributes to be retrieved by using query parameters",
        "operationId": "retrieveEntityById",
        "parameters": [
          {
            "name": "entityId",
            "description": "Entity Id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uri"
            }
          },
          {
            "name": "attrs",
            "description": "Comma separated list of attribute names (properties or relationships) to be retrieved",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "type",
            "description": "Entity Type",
            "in": "query",
            "required": false,
            "schema": {
canterafonsj's avatar
canterafonsj committed
              "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema"
canterafonsj's avatar
canterafonsj committed
          },
          {
            "$ref": "#/paths/~1entities~1/get/parameters/11"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                },
                "examples": {
                  "simple": {
                    "externalValue": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/examples/Entity-example.json"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      },
      "delete": {
        "description": "Removes an specific Entity from an NGSI-LD system",
        "operationId": "removeEntityById",
        "parameters": [
          {
            "$ref": "#/paths/~1entities~1%7BentityId%7D/get/parameters/0"
          },
          {
            "$ref": "#/paths/~1entities~1%7BentityId%7D/get/parameters/2"
          }
        ],
        "responses": {
          "204": {
            "description": "No Content. The entity was removed successfully"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      }
    },
    "/entities/{entityId}/attrs/": {
      "post": {
        "description": "Append new Entity attributes to an existing Entity within an NGSI-LD system",
        "operationId": "appendEntityAttrs",
        "parameters": [
          {
            "name": "entityId",
            "description": "Entity Id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uri"
            }
          },
          {
            "name": "options",
            "description": "Indicates that no attribute overwrite shall be performed",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "noOverwrite"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json;application/ld+json": {
              "schema": {
                "type": "object",
                "properties": {
                  "@context": {
                    "anyOf": [
                      {
                        "type": "object"
                        "type": "string",
                        "format": "uri"
                      },
                      {
                        "type": "array",
                        "minItems": 1,
                        "items": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uri"
                            },
                            {
                              "type": "object"
                            }
                          ]
                  "location": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "GeoProperty"
                      },
                      "value": {
canterafonsj's avatar
canterafonsj committed
                        "$ref": "#/paths/~1csourceRegistrations~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/location"
                        "type": "string",
                        "format": "date-time"
                        "$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/createdAt"
                        "$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/modifiedAt"
                        "type": "string",
                        "format": "uri"
                        "type": "string",
                        "format": "uri"
                      }
                    },
                    "required": [
                      "type",
                      "value"
                    ],
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/additionalProperties/anyOf/0"
                          "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/additionalProperties/anyOf/1"
                  "observationSpace": {
                    "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location"
                  },
                  "operationSpace": {
                    "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location"
                  }
                },
                "required": [
                  "id",
                  "type"
                ],
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "Property"
                        },
                        "value": {
                          "type": [
                            "string",
                            "number",
                            "boolean",
                            "array",
                            "object"
                          ]
                        },
                        "observedAt": {
                          "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location/properties/observedAt"
                        },
                        "createdAt": {
                          "$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/createdAt"
                        },
                        "modifiedAt": {
                          "$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/modifiedAt"
                        },
                        "datasetId": {
                          "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location/properties/datasetId"
                        },
                        "instanceId": {
                          "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location/properties/instanceId"
                        }
                      "required": [
                        "type",
                        "value"
                      ],
                      "additionalProperties": {
                            "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/additionalProperties/anyOf/0"
                            "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/additionalProperties/anyOf/1"
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "Relationship"
                        "object": {
                          "type": "string",
                          "format": "uri"
                        "observedAt": {
                          "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location/properties/observedAt"
                        },
                        "createdAt": {
                          "$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/createdAt"
                        },
                        "modifiedAt": {
                          "$ref": "#/paths/~1entities~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/allOf/0/properties/modifiedAt"
                        },
                        "datasetId": {
                          "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location/properties/datasetId"
                        },
                        "instanceId": {
                          "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location/properties/instanceId"
                      },
                      "required": [
                        "type",
                        "object"
                      ],
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/additionalProperties/anyOf/0"
                          },
                          {
                            "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/additionalProperties/anyOf/1"
                          }
                        ]
                      }
                    {
                      "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema/properties/location"
                "propertyNames": {
                  "type": "string",
                  "pattern": "^((\\d|[a-zA-Z]|_)+(#\\d+)?)$|^(@context)$"
                }
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "207": {
            "description": "Partial Success. Only the attributes included in the response payload were successfully appended",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$schema": "http://json-schema.org/schema#",
                  "id": "https://uri.etsi.org/ngsi-ld/schema/UpdateResult.json",
                  "title": "NGSI-LD Update Result",
                  "description": "NGSI-LD Update Result",
                  "definitions": {
                    "UnchangedDetails": {
                      "attributeName": {
                        "type": "string",
                        "pattern": ""
                      },
                      "reason": {
                        "type": "string",
                        "minLenght": 1
                      }
                    }
                  },
                  "type": "object",
                  "properties": {
                    "updated": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": ""
                      }
                    },
                    "unchanged": {
                      "type": "array",
                      "items": {
                        "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/responses/207/content/application~1json%3Bapplication~1ld%2Bjson/schema/definitions/UnchangedDetails"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      },
      "patch": {
        "description": "Update existing Entity attributes within an NGSI-LD system",
        "operationId": "updateEntityAttrs",
        "parameters": [
          {
            "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/parameters/0"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json;application/ld+json": {
              "schema": {
                "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content."
          },
          "207": {
            "description": "Partial Success. Only the attributes included in the response payload were successfully updated",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/responses/207/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      }
    },
    "/entities/{entityId}/attrs/{attrId}": {
      "patch": {
        "description": "Update existing Entity attributes within an NGSI-LD system",
        "operationId": "partialAttrUpdate",
        "parameters": [
          {
            "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/parameters/0"
          },
          {
            "name": "attrId",
            "description": "Attribute Id",
            "in": "path",
            "required": true,
            "schema": {
canterafonsj's avatar
canterafonsj committed
              "$ref": "#/paths/~1temporal~1entities~1/get/parameters/10/schema"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json;application/ld+json": {
              "schema": {
                "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content."
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      },
      "delete": {
        "description": "Removes an existing Entity attribute within an NGSI-LD system",
        "operationId": "removeEntityAttr",
        "parameters": [
          {
            "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1/post/parameters/0"
          },
          {
            "$ref": "#/paths/~1entities~1%7BentityId%7D~1attrs~1%7BattrId%7D/patch/parameters/1"
          }
        ],
        "responses": {
          "204": {
            "description": "No Content."
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      }
canterafonsj's avatar
canterafonsj committed
    },
    "/subscriptions/": {
      "get": {
        "description": "Retrieves the subscriptions available in an NGSI-LD system",
        "operationId": "retrieveSubscriptions",
        "parameters": [
          {
            "name": "limit",
            "description": "Pagination limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/paths/~1subscriptions~1/post/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                  }
                },
                "examples": {
                  "simple": {
                    "externalValue": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/examples/SubscriptionList-example.json"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "#/paths/~1entities~1/get/responses/400/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                }
              }
            }
          }
        }
      },
      "post": {
        "description": "Creates a new Subscription within an NGSI-LD system",
        "operationId": "createSubscription",
        "requestBody": {
          "required": true,
          "content": {
            "application/json;application/ld+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/paths/~1subscriptions~1%7BsubscriptionId%7D/patch/requestBody/content/application~1json%3Bapplication~1ld%2Bjson/schema"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "format": "uri"
                      },
                      "type": {
                        "type": "string",
                        "const": "Subscription"
                      },
                      "notification": {
                        "type": "object",
                        "properties": {
                          "attributes": {
                            "type": "array",
                            "minItems": 1,
                            "items": {
                              "type": "string",
                              "minLength": 1
                            },
                            "uniqueItems": true
                          },
                          "format": {
                            "type": "string"
                          },
                          "endpoint": {
                            "type": "object",
                            "required": [
                              "uri"
                            ],
                            "properties": {
                              "uri": {
                                "type": "string",
                                "format": "uri"
                              },
                              "accept": {
                                "type": "string",
                                "enum": [
                                  "application/json",
                                  "application/ld+json"
                                ]
                              }
                            }
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "ok",
                              "failed"
                            ]
                          },
                          "timesSent": {
                            "type": "number",
                            "minimum": 1
                          },
                          "lastNotification": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "lastFailure": {
                            "type": "string",
                            "format": "date-time"
                          },