ETSI NGSI-LD API (ISG CIM)

The NGSI-LD API standardised by ETSI ISG CIM in GS CIM 009, a JSON-LD context information management API for entities, attributes, relationships, subscriptions, temporal queries, entity types, context source registration and distributed federation. It is the API layer beneath most European smart-city and FIWARE deployments and is published as OpenAPI 3.0.3 and 3.1.0.

OpenAPI Specification

ngsi-ld-api-3.0.3.yaml Raw ↑
openapi: 3.0.3
info:
  title: NGSI-LD OAS
  version: 1.7.1
  description: OpenAPI Specification for NGSI-LD API.
  contact:
    url: https://www.etsi.org/committee/cim
  license:
    name: BSD-3-Clause
    url: https://forge.etsi.org/legal-matters

externalDocs:
  description: ETSI GS CIM 009 V1.7.1 Context Information Management (CIM); NGSI-LD API
  url: https://www.etsi.org/deliver/etsi_gs/CIM/001_099/009/01.07.01_60/gs_CIM009v010701p.pdf

servers:
  - url: '{protocol}://{hostname}:{port}/ngsi-ld/v1'
    variables:
      protocol:
        enum:
          - http
          - https
        default: https
      hostname:
        default: localhost
      port:
        default: '443'

paths:
  /entities:
    post:
      tags:
        - Context Information Provision
      summary: |
        Entity creation
      description: |
        5.6.1 Create Entity

        This operation allows creating a new NGSI-LD Entity.
      operationId: createEntity
      parameters:
        # Local Query param
        - $ref: '#/components/parameters/Query.local'
        # Request headers
        - $ref: '#/components/parameters/Headers.Link'
        - $ref: '#/components/parameters/Headers.ngsildTenant'
      requestBody:
        description: |
          Payload body in the request contains a JSON-LD object which represents the entity that is to be created.
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/Entity'
                - required:
                  - id
                  - type
          application/json+ld:
            schema:
              allOf:
                - type: object
                  properties:
                    '@context':
                      $ref:  '#/components/schemas/LdContext'
                - $ref: '#/components/schemas/Entity'
                - required:
                  - id
                  - type
                  - '@context'
      responses:
        '201':
          description: |
            The HTTP response shall include a "Location" HTTP header that contains
            the resource URI of the created entity resource.
          headers:
            Location:
              $ref: '#/components/headers/Location'
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
        '207':
          $ref: '#/components/responses/MultiStatus.BatchOperationResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/Unprocessable'
    get:
      tags:
        - Context Information Consumption
      summary: |
        Query entities
      description: |
        5.7.2 Query Entities (excluding batch entity queries).

        This operation allows querying an NGSI-LD system.
      operationId: queryEntity
      parameters:
        # Query params
        - $ref: '#/components/parameters/Query.id'
        - $ref: '#/components/parameters/Query.type'
        - $ref: '#/components/parameters/Query.idPattern'
        - $ref: '#/components/parameters/Query.attrs'
        - $ref: '#/components/parameters/Query.q'
        - $ref: '#/components/parameters/Query.csf'
        - $ref: '#/components/parameters/Query.geometry'
        - $ref: '#/components/parameters/Query.georel'
        - $ref: '#/components/parameters/Query.coordinates'
        - $ref: '#/components/parameters/Query.geoproperty'
        - $ref: '#/components/parameters/Query.geometryProperty'
        - $ref: '#/components/parameters/Query.lang'
        - $ref: '#/components/parameters/Query.scopeQ'
        - $ref: '#/components/parameters/Query.limit'
        - $ref: '#/components/parameters/Query.count'
        - $ref: '#/components/parameters/Query.options.entities'
        # Local Query param
        - $ref: '#/components/parameters/Query.local'
        # Request headers
        - $ref: '#/components/parameters/Headers.Link'
        - $ref: '#/components/parameters/Headers.ngsildTenant'
      responses:
        '200':
          description: |
            A response body containing the query result as a list of entities, unless the Accept Header
            indicates that the Entities are to be rendered as GeoJSON.

            If the Accept Header indicates that the Entities are to be rendered as GeoJSON, a response body
            containing the query result as GeoJSON FeatureCollection is returned.
          headers:
            NGSILD-Results-Count:
              $ref: '#/components/headers/NGSILD-Results-Count'
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
            NGSILD-Warning:
              $ref: '#/components/headers/NGSILD-Warning'
          content:
            application/json:
              schema:
                type: array
                items:
                  allOf:
                    - $ref: '#/components/schemas/Entity'
                    - required:
                      - id
                      - type
            application/json+ld:
              schema:
                type: array
                items:
                  allOf:
                    - type: object
                      properties:
                        '@context':
                          $ref:  '#/components/schemas/LdContext'
                    - $ref: '#/components/schemas/Entity'
                    - required:
                        - id
                        - type
                        - '@context'
            application/geo+json:
              schema:
                  $ref: '#/components/schemas/FeatureCollection'
        '400':
          $ref: '#/components/responses/BadRequest'
        '501':
          $ref: '#/components/responses/NotImplemented'

  /entities/{entityId}:
    get:
      tags:
        - Context Information Consumption
      summary: |
        Entity retrieval by id
      description:  |
        5.7.1 Retrieve Entity.

        This operation allows retrieving an NGSI-LD Entity.
      operationId: retrieveEntity
      parameters:
        # Path params
        - $ref: '#/components/parameters/Path.entityId'
        # Query params
        - $ref: '#/components/parameters/Query.type'
        - $ref: '#/components/parameters/Query.attrs'
        - $ref: '#/components/parameters/Query.geometryProperty'
        - $ref: '#/components/parameters/Query.lang'
        - $ref: '#/components/parameters/Query.options.entities'
        # Local Query param
        - $ref: '#/components/parameters/Query.local'
        # Request headers
        - $ref: '#/components/parameters/Headers.Link'
        - $ref: '#/components/parameters/Headers.ngsildTenant'
      responses:
        '200':
          description: |
            A response body containing the JSON-LD representation of the target entity containing the selected
            Attributes, unless the Accept Header indicates that the Entity is to be rendered as GeoJSON.

            If the Accept Header indicates that the Entity is to be rendered as GeoJSON, a GeoJSON Feature is returned.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
            NGSILD-Warning:
              $ref: '#/components/headers/NGSILD-Warning'
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Entity'
                  - required:
                    - id
                    - type
            application/json+ld:
              schema:
                allOf:
                  - type: object
                    properties:
                      '@context':
                        $ref:  '#/components/schemas/LdContext'
                  - $ref: '#/components/schemas/Entity'
                  - required:
                      - id
                      - type
                      - '@context'
            application/geo+json:
              schema:
                  $ref: '#/components/schemas/Feature'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '501':
          $ref: '#/components/responses/NotImplemented'
    delete:
      tags:
        - Context Information Provision
      summary: |
        Entity deletion by id
      description: |
        5.6.6 Delete entity.

        This operation allows deleting an NGSI-LD Entity.
      operationId: deleteEntity
      parameters:
        # Path params
        - $ref: '#/components/parameters/Path.entityId'
        # Query params
        - $ref: '#/components/parameters/Query.type'
        # Local Query param
        - $ref: '#/components/parameters/Query.local'
        # Request headers
        - $ref: '#/components/parameters/Headers.Link'
        - $ref: '#/components/parameters/Headers.ngsildTenant'
      responses:
        '204':
          description: |
            No Content.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
        '207':
          $ref: '#/components/responses/MultiStatus.BatchOperationResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      tags:
        - Context Information Provision
      summary: |
        Entity merge by id
      description: |
        5.6.17 Merge Entity.

        This operation allows modification of an existing NGSI-LD Entity aligning to the JSON Merge Patch
        processing rules defined in IETF RFC 7396 by adding new Attributes (Properties or Relationships)
        or modifying or deleting existing Attributes associated with an existing Entity.
      operationId: mergeEntity
      parameters:
        # Path params
        - $ref: '#/components/parameters/Path.entityId'
        # Query params
        - name: options
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              $ref: '#/components/schemas/options.representation'
          required: false
        - $ref: '#/components/parameters/Query.type'
        - $ref: '#/components/parameters/Query.observedAt'
        - $ref: '#/components/parameters/Query.lang'
        # Local Query param
        - $ref: '#/components/parameters/Query.local'
        # Request headers
        - $ref: '#/components/parameters/Headers.Link'
        - $ref: '#/components/parameters/Headers.ngsildTenant'
      requestBody:
        description: |
          Entity Fragment containing a complete representation of the Attributes to be merged.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Entity'
          application/json+ld:
            schema:
              allOf:
                - type: object
                  properties:
                    '@context':
                      $ref:  '#/components/schemas/LdContext'
                - $ref: '#/components/schemas/Entity'
                - required:
                  - '@context'
      responses:
        '204':
          description: |
            All the Attributes were merged successfully.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
        '207':
          $ref: '#/components/responses/MultiStatus.BatchOperationResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
    put:
      tags:
        - Context Information Provision
      summary: |
        Entity replacement by id
      description: |
        5.6.18 Replace Entity.

        This operation allows the modification of an existing NGSI-LD Entity
        by replacing all of the Attributes (Properties or Relationships).
      operationId: replaceEntity
      parameters:
        # Path params
        - $ref: '#/components/parameters/Path.entityId'
        # Query params
        - $ref: '#/components/parameters/Query.type'
        # Local Query param
        - $ref: '#/components/parameters/Query.local'
        # Request headers
        - $ref: '#/components/parameters/Headers.Link'
        - $ref: '#/components/parameters/Headers.ngsildTenant'
      requestBody:
        description: |
          Entity Fragment containing a complete representation of the Entity to be replaced.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Entity'
          application/json+ld:
            schema:
              allOf:
                - type: object
                  properties:
                    '@context':
                      $ref:  '#/components/schemas/LdContext'
                - $ref: '#/components/schemas/Entity'
                - required:
                  - '@context'
      responses:
        '204':
          description: |
            The entity was replaced successfully.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
        '207':
          $ref: '#/components/responses/MultiStatus.BatchOperationResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'

  /entities/{entityId}/attrs:
    post:
      tags:
        - Context Information Provision
      summary: |
        Append Attributes to Entity
      description: |
        5.6.3 Append Entity Attributes.

        This operation allows modifying an NGSI-LD Entity by adding
        new attributes (Properties or Relationships).
      operationId: appendAttrs
      parameters:
        # Path params
        - $ref: '#/components/parameters/Path.entityId'
        # Query params
        - $ref: '#/components/parameters/Query.type'
        - $ref: '#/components/parameters/Query.options.noOverwrite'
        # Local Query param
        - $ref: '#/components/parameters/Query.local'
        # Request headers
        - $ref: '#/components/parameters/Headers.Link'
        - $ref: '#/components/parameters/Headers.ngsildTenant'
      requestBody:
        description: |
          Entity Fragment containing a complete representation of the Attributes to be added.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Entity'
          application/json+ld:
            schema:
              allOf:
                - type: object
                  properties:
                    '@context':
                      $ref:  '#/components/schemas/LdContext'
                - $ref: '#/components/schemas/Entity'
                - required:
                  - '@context'
      responses:
        '204':
          description: |
            All the Attributes were appended successfully.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
        '207':
          $ref: '#/components/responses/MultiStatus.UpdateResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'

    patch:
      tags:
        - Context Information Provision
      summary: |
        Update Attributes of an Entity
      description: |
        5.6.2 Update Entity Attributes.

        This operation allows modifying an existing NGSI-LD Entity by updating
        already existing Attributes (Properties or Relationships).
      operationId: updateEntity
      parameters:
        # Path params
        - $ref: '#/components/parameters/Path.entityId'
        # Local Query param
        - $ref: '#/components/parameters/Query.local'
        - $ref: '#/components/parameters/Query.type'
        # Request headers
        - $ref: '#/components/parameters/Headers.Link'
        - $ref: '#/components/parameters/Headers.ngsildTenant'
      requestBody:
        description: |
          Entity Fragment containing a complete representation of the Attributes to be updated.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Entity'
          application/json+ld:
            schema:
              allOf:
                - type: object
                  properties:
                    '@context':
                      $ref:  '#/components/schemas/LdContext'
                - $ref: '#/components/schemas/Entity'
                - required:
                  - '@context'
      responses:
        '204':
          description: |
            All the Attributes were appended successfully.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
        '207':
          $ref: '#/components/responses/MultiStatus.UpdateResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
  /entities/{entityId}/attrs/{attrId}:
    patch:
      tags:
        - Context Information Provision
      summary: |
        Partial Attribute Update
      description: |
        5.6.4 Partial Attribute Update.

        This operation allows performing a partial update on an NGSI-LD Entity's Attribute (Property or Relationship).
        A partial update only changes the elements provided in an Entity Fragment, leaving the rest as they are.
        This operation supports the deletion of sub-Attributes but not the deletion of the whole Attribute itself.
      operationId: updateAttrs
      parameters:
        # Path params
        - $ref: '#/components/parameters/Path.entityId'
        - $ref: '#/components/parameters/Path.attrId'
        # Local Query param
        - $ref: '#/components/parameters/Query.local'
        - $ref: '#/components/parameters/Query.type'
        # Request headers
        - $ref: '#/components/parameters/Headers.Link'
        - $ref: '#/components/parameters/Headers.ngsildTenant'
      requestBody:
        description: Attribute Fragment containing the elements of the attribute to be updated.
        $ref: '#/components/requestBodies/AttributeFragment'
      responses:
        '204':
          description: |
            The attribute was updated successfully.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
        '207':
          $ref: '#/components/responses/MultiStatus.UpdateResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      tags:
        - Context Information Provision
      summary: |
        Attribute delete
      description: |
        5.6.5 Delete Entity Attribute.

        This operation allows deleting an NGSI-LD Entity's Attribute (Property or Relationship). 
        The Attribute itself and all its children shall be deleted.
      operationId: deleteAttrs
      parameters:
        # Path params
        - $ref: '#/components/parameters/Path.entityId'
        - $ref: '#/components/parameters/Path.attrId'
        # Query params
        - $ref: '#/components/parameters/Query.deleteAll'
        - $ref: '#/components/parameters/Query.datasetId'
        - $ref: '#/components/parameters/Query.type'
        # Local Query param
        - $ref: '#/components/parameters/Query.local'
        # Request headers
        - $ref: '#/components/parameters/Headers.Link'
        - $ref: '#/components/parameters/Headers.ngsildTenant'
      responses:
        '204':
          description: |
            The attribute was deleted successfully.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
        '207':
          $ref: '#/components/responses/MultiStatus.UpdateResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
    put:
      tags:
        - Context Information Provision
      summary: |
        Attribute replace
      description: |
        5.6.19 Attribute Replace.

        This operation allows the replacement of a single Attribute (Property or Relationship)
        within an NGSI-LD Entity.
      operationId: replaceAttrs
      parameters:
        # Path params
        - $ref: '#/components/parameters/Path.entityId'
        - $ref: '#/components/parameters/Path.attrId'
        # Local Query param
        - $ref: '#/components/parameters/Query.local'
        - $ref: '#/components/parameters/Query.type'
        # Request headers
        - $ref: '#/components/parameters/Headers.Link'
        - $ref: '#/components/parameters/Headers.ngsildTenant'
      requestBody:
        description: Attribute Fragment replacing the previous data.
        $ref: '#/components/requestBodies/AttributeFragment'
      responses:
        '204':
          description: |
            The attribute was replaced successfully.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
        '207':
          $ref: '#/components/responses/MultiStatus.UpdateResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
  /csourceRegistrations:
    post:
      tags:
        - Context Source Registration
      summary: |
        Csource registration creation
      description: |
        5.9.2 Register Context Source.

        This operation allows registering a context source within an NGSI-LD system.
      operationId: createCSR
      parameters:
        # Local Query param
        - $ref: '#/components/parameters/Query.local'
        # Request headers
        - $ref: '#/components/parameters/Headers.Link'
        - $ref: '#/components/parameters/Headers.ngsildTenant'
      requestBody:
        description: |
          Payload body in the request contains a JSON-LD object which represents
          the context source registration that is to be created.
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/CsourceRegistration'
                - required:
                  - type
                  - information
                  - endpoint
          application/json+ld:
            schema:
              allOf:
                - type: object
                  properties:
                    '@context':
                      $ref:  '#/components/schemas/LdContext'
                - $ref: '#/components/schemas/CsourceRegistration'
                - required:
                  - type
                  - information
                  - endpoint
                  - '@context'
      responses:
        '201':
          description: |
            The HTTP response shall include a "Location" HTTP header that contains
            the resource URI of the created context source registration resource.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
            Location:
              $ref: '#/components/headers/Location'
        '400':
          $ref: '#/components/responses/BadRequest'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/Unprocessable'
    get:
      tags:
        - Context Source Discovery
      summary: |
        Discover Csource registrations
      description: |
        5.10.2 Query Context Source Registrations.

        This operation allows discovering context source registrations from an NGSI-LD system.
        The behaviour of the discovery of context source registrations differs significantly from
        the querying of entities as described in clause 5.7.2. The approach is that the client
        submits a query for entities as described in clause 5.7.2, but instead of receiving
        the Entity information, it receives a list of Context Source Registrations describing
        Context Sources that possibly have some of the requested Entity information. This means
        that the requested Entities and Attributes are matched against the 'information' property
        as described in clause 5.12.

        If no temporal query is present, only Context Source Registrations for Context Sources
        providing latest information, i.e. without specified time intervals, are considered.
        If a temporal query is present only Context Source Registrations with matching time intervals,
        i.e. observationInterval or managementInterval, are considered.
      operationId: queryCSR
      parameters:
        # Query params
        - $ref: '#/components/parameters/Query.id'
        - $ref: '#/components/parameters/Query.type'
        - $ref: '#/components/parameters/Query.idPattern'
        - $ref: '#/components/parameters/Query.attrs'
        - $ref: '#/components/parameters/Query.q'
        - $ref: '#/components/parameters/Query.csf'
        - $ref: '#/components/parameters/Query.geometry'
        - $ref: '#/components/parameters/Query.georel'
        - $ref: '#/components/parameters/Query.coordinates'
        - $ref: '#/components/parameters/Query.geoproperty'
        - $ref: '#/components/parameters/Query.timeproperty'
        - $ref: '#/components/parameters/Query.timerel'
        - $ref: '#/components/parameters/Query.timeAt'
        - $ref: '#/components/parameters/Query.endTimeAt'
        - $ref: '#/components/parameters/Query.geometryProperty'
        - $ref: '#/components/parameters/Query.lang'
        - $ref: '#/components/parameters/Query.scopeQ'
        - $ref: '#/components/parameters/Query.options.sysAttrs'
        - $ref: '#/components/parameters/Query.limit'
        - $ref: '#/components/parameters/Query.count'
        # Local Query param
        - $ref: '#/components/parameters/Query.local'
        # Request headers
        - $ref: '#/components/parameters/Headers.Link'
        - $ref: '#/components/parameters/Headers.ngsildTenant'
      responses:
        '200':
          description: |
            A response body containing the query result as an array of context source registrations.
          headers:
            NGSILD-Results-Count:
              $ref: '#/components/headers/NGSILD-Results-Count'
            NGSILD-Warning:
              $ref: '#/components/headers/NGSILD-Warning'
          content:
            application/json:
              schema:
                type: array
                items:
                  allOf:
                    - $ref: '#/components/schemas/CsourceRegistration'
                    - required:
                      - id
                      - type
                      - information
                      - endpoint
            application/json+ld:
              schema:
                type: array
                items:
                  allOf:
                    - type: object
                      properties:
                        '@context':
                          $ref:  '#/components/schemas/LdContext'
                    - $ref: '#/components/schemas/CsourceRegistration'
                    - required:
                      - id
                      - type
                      - information
                      - endpoint
                      - '@context'
        '400':
          $ref: '#/components/responses/BadRequest'
  /csourceRegistrations/{registrationId}:
    get:
      tags:
        - Context Source Discovery
      summary: |
        Csource registration retrieval by id
      description: |
        5.10.1 Retrieve Context Source Registration.

        This operation allows retrieving a specific context source registration from an NGSI-LD system.
      operationId: retrieveCSR
      parameters:
        # Query params
        - $ref: '#/components/parameters/Query.options.sysAttrs'
        # Path params
        - $ref: '#/components/parameters/Path.registrationId'
        # Local Query param
        - $ref: '#/components/parameters/Query.local'
        # Request headers
        - $ref: '#/components/parameters/Headers.Link'
        - $ref: '#/components/parameters/Headers.ngsildTenant'
      responses:
        '200':
          description: |
            A response body containing the JSON-LD representation of the target subscription.
          headers:
            NGSILD-Warning:
              $ref: '#/components/headers/NGSILD-Warning'
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/CsourceRegistration'
                  - required:
                    - id
                    - type
                    - information
                    - endpoint
            application/json+ld:
              schema:
                allOf:
                  - type: object
                    properties:
                      '@context':
                        $ref:  '#/components/schemas/LdContext'
                  - $ref: '#/components/schemas/CsourceRegistration'
                  - required:
                    - id
                    - type
                    - information
                    - endpoint
                    - '@context'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      tags:
        - Context Source Registration
      summary: |
        Csource registration update by id
      description: |
        5.9.3 Update Context Source Registration.

        This operation allows updating a Context Source Registration in an NGSI-LD system.
      operationId: updateCSR
      parameters:
        # Path params
        - $ref: '#/components/parameters/Path.registrationId'
        # Local Query param
        - $ref: '#/components/parameters/Query.local'
        # Request headers
        - $ref: '#/components/parameters/Headers.Link'
        - $ref: '#/components/parameters/Headers.ngsildTenant'
      requestBody:
        description: |
          Payload body in the request contains a JSON-LD object which represents
          the context source registration that is to be updated.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CsourceRegistration'
          application/json+ld:
            schema:
              allOf:
                - type: object
                  properties:
                    '@context':
                      $ref:  '#/components/schemas/LdContext'
                - $ref: '#/components/schemas/CsourceRegistration'
                - required:
                  - '@context'
      responses:
        '204':
          description: |
            The context source registration was successfully updated.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
    delete:
      tags:
        - Context Source Registration
      summary: |
        Csource registration deletion by id
      description: |
        5.9.4 Delete Context Source Registration.

        This operation allows deleting a Context Source Registration from an NGSI-LD system.
      operationId: deleteCSR
      parameters:
        # Path params
        - $ref: '#/components/parameters/Path.registrationId'
        # Local Query param
        - $ref: '#/components/parameters/Query.local'
        # Request headers
        - $ref: '#/components/parameters/Headers.Link'
        - $ref: '#/components/parameters/Headers.ngsildTenant'
      responses:
        '204':
          description: |
            No Content.
          headers:
            NGSILD-Tenant:
              $ref: '#/components/headers/NGSILD-Tenant'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
  /subscriptions:
    post:
      tags:
        - Context Information Subscription
      summary: |
        Create Subscription
      description: |
        5.8.1 Create subscription.

        This operation allows creating a new subscription.
      operationId: createSubscription
      parameters:
        # Local Query param
        - $ref: '#/components/parameters/Query.local'
        # Request headers
        - $ref: '#/components/parameters/Headers.Link'
        - $ref: '#/components/parameters/Headers.ngsildTenant'
      requestBody:
        description: |
          Payload body in the request contains a JSON-LD object which represents the subscription that is to be created.
        $ref: '#/components/requestBodies/Subscription'
      responses:
       

# --- truncated at 32 KB (192 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/etsi/refs/heads/main/openapi/ngsi-ld/ngsi-ld-api-3.0.3.yaml