Skip to content
csource-subscriptions-spec.json 3.2 KiB
Newer Older
canterafonsj's avatar
canterafonsj committed
{
  "openapi": "3.0.1",
  "info": {
    "title": "NGSI-LD Context Source Subscriptions",
    "version": "latest"
  },
  "components": {
    "parameters": {
      "limit": {
        "name": "limit",
        "description": "Pagination limit",
        "in": "query",
        "required": false,
        "schema": {
          "type": "integer",
          "minimum": 1
        }
      }
    }
  },
  "paths": {
    "/csourceSubscriptions/": {
      "get": {
        "description": "Retrieves the context source discovery subscriptions available in an NGSI-LD system",
        "operationId": "retrieveCSourceSubscriptions",
Stefan Wiedemann's avatar
Stefan Wiedemann committed
        "tags": ["Context Sources", "CSourceSubscriptions"],
canterafonsj's avatar
canterafonsj committed
        "parameters": [
          {
            "$ref": "#/components/parameters/limit"
          }
        ],
        "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/subscriptions/SubscriptionList.json#/definitions/SubscriptionList"
canterafonsj's avatar
canterafonsj committed
                },
                "examples": {
                  "simple": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
                    "externalValue": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/examples/SubscriptionList-example.json"
canterafonsj's avatar
canterafonsj 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"
canterafonsj's avatar
canterafonsj committed
                }
              }
            }
          }
        }
      },
      "post": {
        "description": "Creates a context source discovery Subscription within an NGSI-LD system",
        "operationId": "createCSourceSubscription",
Stefan Wiedemann's avatar
Stefan Wiedemann committed
        "tags": ["Context Sources", "CSourceSubscriptions"],
canterafonsj's avatar
canterafonsj committed
        "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/subscriptions/Subscription.json#/definitions/Subscription"
canterafonsj's avatar
canterafonsj committed
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created. Contains the resource URI of the created Subscription"
          },
          "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"
canterafonsj's avatar
canterafonsj 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"