csource-registrations-spec.json 4.1 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
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
{
  "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": [
          {
            "$ref": "http://localhost:8090/spec/updated/entities/entities-spec.json#/components/parameters/id"
          },
          {
            "$ref": "http://localhost:8090/spec/updated/entities/entities-spec.json#/components/parameters/idPattern"
          },
          {
            "$ref": "http://localhost:8090/spec/updated/entities/entities-spec.json#/components/parameters/type"
          },
          {
            "$ref": "http://localhost:8090/spec/updated/entities/entities-spec.json#/components/parameters/attrs"
          },
          {
            "$ref": "http://localhost:8090/spec/updated/entities/entities-spec.json#/components/parameters/q"
          },
          {
            "$ref": "http://localhost:8090/spec/updated/entities/entities-spec.json#/components/parameters/georel"
          },
          {
            "$ref": "http://localhost:8090/spec/updated/entities/entities-spec.json#/components/parameters/geometry"
          },
          {
            "$ref": "http://localhost:8090/spec/updated/entities/entities-spec.json#/components/parameters/coordinates"
          },
          {
            "$ref": "http://localhost:8090/spec/updated/entities/entities-spec.json#/components/parameters/geoproperty"
          },
          {
            "$ref": "http://localhost:8090/spec/updated/entities/entities-spec.json#/components/parameters/limit"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "http://localhost:8090/schema/registrations/ContextSourceRegistrationList.json#/definitions/ContextSourceRegistrationList"
                },
                "examples": {
                  "simple": {
                    "externalValue": "http://localhost:8090/examples/ContextSourceRegistrationList-example.json"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "http://localhost:8090/schema/common.json#/definitions/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "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": {
                "$ref": "http://localhost:8090/schema/registrations/ContextSourceRegistration.json#/definitions/ContextSourceRegistration"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created. Contains the resource URI of the created Registration"
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "http://localhost:8090/schema/common.json#/definitions/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Already exists",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
                  "$ref": "http://localhost:8090/schema/common.json#/definitions/ProblemDetails"
                }
              }
            }
          }
        }
      }
    }
  }
}