Skip to content
csource-subscription-by-id-spec.json 4.83 KiB
Newer Older
canterafonsj's avatar
canterafonsj committed
{
  "openapi": "3.0.1",
  "info": {
    "title": "NGSI-LD Context Source Subscription By Id",
    "version": "latest"
  },
  "components": {
    "parameters": {
      "subscriptionId": {
        "name": "subscriptionId",
        "description": "Subscription Id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uri"
        }
      }
    }
  },
  "paths": {
    "/csourceSubscriptions/{subscriptionId}": {
      "get": {
         "description": "Retrieves a specific Subscription from an NGSI-LD system",
         "operationId": "retrieveSubscription",
canterafonsj's avatar
canterafonsj committed
         "tags": ["Context Sources"],
canterafonsj's avatar
canterafonsj committed
        "parameters": [
          {
            "$ref": "#/components/parameters/subscriptionId"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/subscriptions/Subscription.json#/definitions/Subscription"
                },
                "examples": {
                  "simple": {
                    "externalValue": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/examples/Subscription-example_C.4.json"
                  }
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "patch": {
        "description": "Updates a specific context source discovery Subscription within an NGSI-LD system",
        "operationId": "updateCSourceSubscription",
canterafonsj's avatar
canterafonsj committed
        "tags": ["Context Sources"]
canterafonsj's avatar
canterafonsj committed
        "parameters": [
          {
            "$ref": "#/components/parameters/subscriptionId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json;application/ld+json": {
              "schema": {
                "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/subscriptions/Subscription.json#/definitions/SubscriptionFragment"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content. The Subscription was updated successfully"
          },
          "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"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "delete": {
canterafonsj's avatar
canterafonsj committed
        "description": "Removes a specific Context Source Subscription from an NGSI-LD system",
        "operationId": "removeCSourceSubscription",
        "tags": ["Context Sources"]
canterafonsj's avatar
canterafonsj committed
        "parameters": [
          {
            "$ref": "#/components/parameters/subscriptionId"
          }
        ],
        "responses": {
          "204": {
            "description": "No Content. The Subscription was removed successfully"
          },
          "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"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
                }
              }
            }
          }
        }
      }
    }
  }
}