csource-registrations-spec.json 4.6 KB
Newer Older
Stefan Wiedemann's avatar
Stefan Wiedemann committed
{
  "openapi": "3.0.1",
  "info": {
    "title": "NGSI-LD Registrations",
    "version": "latest"
  },
  "components": {
    "parameters": {
    }
  },
  "paths": {
    "/csourceRegistrations/": {
      "get": {
        "description": "Retrieve a set of context sources which matches a specific query from an NGSI-LD system",
        "operationId": "queryCsources",
        "tags": ["Context Sources", "CSourceRegistrations"],
        "parameters": [
          {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
            "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entities-spec.json#/components/parameters/id"
Stefan Wiedemann's avatar
Stefan Wiedemann committed
          },
          {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
            "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entities-spec.json#/components/parameters/idPattern"
Stefan Wiedemann's avatar
Stefan Wiedemann committed
          },
          {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
            "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entities-spec.json#/components/parameters/type"
Stefan Wiedemann's avatar
Stefan Wiedemann committed
          },
          {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
            "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entities-spec.json#/components/parameters/attrs"
Stefan Wiedemann's avatar
Stefan Wiedemann committed
          },
          {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
            "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entities-spec.json#/components/parameters/q"
Stefan Wiedemann's avatar
Stefan Wiedemann committed
          },
          {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
            "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entities-spec.json#/components/parameters/georel"
Stefan Wiedemann's avatar
Stefan Wiedemann committed
          },
          {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
            "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entities-spec.json#/components/parameters/geometry"
Stefan Wiedemann's avatar
Stefan Wiedemann committed
          },
          {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
            "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entities-spec.json#/components/parameters/coordinates"
Stefan Wiedemann's avatar
Stefan Wiedemann committed
          },
          {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
            "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entities-spec.json#/components/parameters/geoproperty"
Stefan Wiedemann's avatar
Stefan Wiedemann committed
          },
          {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
            "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities/entities-spec.json#/components/parameters/limit"
Stefan Wiedemann's avatar
Stefan Wiedemann committed
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
                  "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/registrations/ContextSourceRegistrationList.json#/definitions/ContextSourceRegistrationList"
Stefan Wiedemann's avatar
Stefan Wiedemann committed
                },
                "examples": {
                  "simple": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
                    "externalValue": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/examples/ContextSourceRegistrationList-example.json"
Stefan Wiedemann's avatar
Stefan Wiedemann committed
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
                  "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
Stefan Wiedemann's avatar
Stefan Wiedemann committed
                }
              }
            }
          }
        }
      },
      "post": {
        "description": "Registers a new context source within an NGSI-LD system",
        "operationId": "registerCsource",
        "tags": ["Context Sources", "CSourceRegistrations"],
        "requestBody": {
          "required": true,
          "content": {
            "application/json;application/ld+json": {
              "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
                "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/registrations/ContextSourceRegistration.json#/definitions/ContextSourceRegistration"
Stefan Wiedemann's avatar
Stefan Wiedemann committed
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created. Contains the resource URI of the created Registration"
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
                  "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
Stefan Wiedemann's avatar
Stefan Wiedemann committed
                }
              }
            }
          },
          "409": {
            "description": "Already exists",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
                  "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"