entity-operations-spec.json 5.89 KB
Newer Older
canterafonsj's avatar
canterafonsj committed
1
2
3
4
{
  "openapi": "3.0.1",
  "info": {
    "title": "NGSI-LD Entity Operations",
canterafonsj's avatar
canterafonsj committed
5
    "version": "0.1"
canterafonsj's avatar
canterafonsj committed
6
  },
canterafonsj's avatar
canterafonsj committed
7
  "components": {},
canterafonsj's avatar
canterafonsj committed
8
  "paths": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
9
    "/entityOperations/create": {
canterafonsj's avatar
canterafonsj committed
10
      "post": {
canterafonsj's avatar
canterafonsj committed
11
        "description": "Batch Entity creation",
canterafonsj's avatar
canterafonsj committed
12
        "operationId": "batchEntityCreation",
Stefan Wiedemann's avatar
Stefan Wiedemann committed
13
        "tags": ["Batch Operations", "Entities"],
canterafonsj's avatar
canterafonsj committed
14
15
16
17
18
        "requestBody": {
          "required": true,
          "content": {
            "application/json;application/ld+json": {
              "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
19
                "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/EntityList.json#/definitions/EntityList"
canterafonsj's avatar
canterafonsj committed
20
21
22
23
24
25
26
27
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
canterafonsj's avatar
canterafonsj committed
28
29
              "application/json;application/ld+json": {
                "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
30
                  "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/BatchOperationResult.json#/definitions/BatchOperationResult"
canterafonsj's avatar
canterafonsj committed
31
32
33
34
35
36
37
38
39
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
40
                  "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
canterafonsj's avatar
canterafonsj committed
41
42
43
44
45
46
47
                }
              }
            }
          }
        }
      }
    },
Stefan Wiedemann's avatar
Stefan Wiedemann committed
48
    "/entityOperations/update": {
canterafonsj's avatar
canterafonsj committed
49
50
51
      "post": {
        "description": "Batch Entity update",
        "operationId": "batchEntityUpdate",
Stefan Wiedemann's avatar
Stefan Wiedemann committed
52
        "tags": ["Batch Operations", "Entities"],
canterafonsj's avatar
canterafonsj committed
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
        "parameters": [
          {
            "name": "options",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "noOverwrite"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
canterafonsj's avatar
canterafonsj committed
69
70
            "application/json;application/ld+json": {
              "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
71
                "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/EntityList.json#/definitions/EntityList"
canterafonsj's avatar
canterafonsj committed
72
73
74
              }
            }
          }
canterafonsj's avatar
canterafonsj committed
75
76
77
78
79
80
81
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
82
                  "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/BatchOperationResult.json#/definitions/BatchOperationResult"
canterafonsj's avatar
canterafonsj committed
83
84
85
                }
              }
            }
canterafonsj's avatar
canterafonsj committed
86
87
88
89
90
91
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
92
                  "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
canterafonsj's avatar
canterafonsj committed
93
94
95
                }
              }
            }
canterafonsj's avatar
canterafonsj committed
96
          }
canterafonsj's avatar
canterafonsj committed
97
98
99
        }
      }
    },
Stefan Wiedemann's avatar
Stefan Wiedemann committed
100
    "/entityOperations/upsert": {
canterafonsj's avatar
canterafonsj committed
101
102
103
      "post": {
        "description": "Batch Entity upsert",
        "operationId": "batchEntityUpsert",
Stefan Wiedemann's avatar
Stefan Wiedemann committed
104
        "tags": ["Batch Operations", "Entities"],
canterafonsj's avatar
canterafonsj committed
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
        "parameters": [
          {
            "name": "options",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "replace",
                "update"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json;application/ld+json": {
              "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
124
                "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/EntityList.json#/definitions/EntityList"
canterafonsj's avatar
canterafonsj committed
125
126
127
128
129
130
131
132
133
134
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
135
                  "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/BatchOperationResult.json#/definitions/BatchOperationResult"
canterafonsj's avatar
canterafonsj committed
136
137
138
139
140
141
142
143
144
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
145
                  "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
canterafonsj's avatar
canterafonsj committed
146
147
148
149
150
151
                }
              }
            }
          }
        }
      }
canterafonsj's avatar
canterafonsj committed
152
    },
Stefan Wiedemann's avatar
Stefan Wiedemann committed
153
    "/entityOperations/delete": {
canterafonsj's avatar
canterafonsj committed
154
155
156
      "post": {
        "description": "Batch Entity delete",
        "operationId": "batchEntityDelete",
Stefan Wiedemann's avatar
Stefan Wiedemann committed
157
        "tags": ["Batch Operations", "Entities"],
canterafonsj's avatar
canterafonsj committed
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
        "requestBody": {
          "required": true,
          "content": {
            "application/json;application/ld+json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uri"
                },
                "minItems": 1
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
179
                  "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/BatchOperationResult.json#/definitions/BatchOperationResult"
canterafonsj's avatar
canterafonsj committed
180
181
182
183
184
185
186
187
188
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
189
                  "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
canterafonsj's avatar
canterafonsj committed
190
191
192
193
194
195
                }
              }
            }
          }
        }
      }
canterafonsj's avatar
canterafonsj committed
196
197
198
    }
  }
}