csource-registrations-spec.json 4.6 KB
Newer Older
Stefan Wiedemann's avatar
Stefan Wiedemann committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
  "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
19
            "$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
20
21
          },
          {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
22
            "$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
23
24
          },
          {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
25
            "$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
26
27
          },
          {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
28
            "$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
29
30
          },
          {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
31
            "$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
32
33
          },
          {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
34
            "$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
35
36
          },
          {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
37
            "$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
38
39
          },
          {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
40
            "$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
41
42
          },
          {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
43
            "$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
44
45
          },
          {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
46
            "$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
47
48
49
50
51
52
53
54
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
55
                  "$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
56
57
58
                },
                "examples": {
                  "simple": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
59
                    "externalValue": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/examples/ContextSourceRegistrationList-example.json"
Stefan Wiedemann's avatar
Stefan Wiedemann committed
60
61
62
63
64
65
66
67
68
69
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
70
                  "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
Stefan Wiedemann's avatar
Stefan Wiedemann committed
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
                }
              }
            }
          }
        }
      },
      "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
86
                "$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
87
88
89
90
91
92
93
94
95
96
97
98
99
              }
            }
          }
        },
        "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
100
                  "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
Stefan Wiedemann's avatar
Stefan Wiedemann committed
101
102
103
104
105
106
107
108
109
                }
              }
            }
          },
          "409": {
            "description": "Already exists",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
110
                  "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
Stefan Wiedemann's avatar
Stefan Wiedemann committed
111
112
113
114
115
116
117
118
119
                }
              }
            }
          }
        }
      }
    }
  }
}