temporal-entity-attrs-spec.json 6.72 KB
Newer Older
canterafonsj's avatar
canterafonsj committed
1
2
3
{
  "openapi": "3.0.1",
  "info": {
canterafonsj's avatar
canterafonsj committed
4
    "title": "NGSI-LD Temporal Entity Attributes",
canterafonsj's avatar
canterafonsj committed
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
    "version": "latest"
  },
  "components": {
    "parameters": {
      "entityId": {
        "name": "entityId",
        "description": "Entity Id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uri"
        }
      },
      "attrId": {
        "name": "attrId",
        "description": "Attribute Id",
        "in": "path",
        "required": true,
        "schema": {
André Costa's avatar
André Costa committed
25
          "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/Name"
canterafonsj's avatar
canterafonsj committed
26
27
        }
      },
canterafonsj's avatar
canterafonsj committed
28
29
30
31
32
      "instanceId": {
        "name": "instanceId",
        "description": "Instance Id",
        "in": "path",
        "required": true,
canterafonsj's avatar
canterafonsj committed
33
34
        "schema": {
          "type": "string",
canterafonsj's avatar
canterafonsj committed
35
          "format": "uri"
canterafonsj's avatar
canterafonsj committed
36
37
38
39
40
41
42
        }
      }
    }
  },
  "paths": {
    "/temporal/entities/{entityId}/attrs/": {
      "post": {
canterafonsj's avatar
canterafonsj committed
43
44
        "description": "Add new attributes to an existing Temporal Entity within an NGSI-LD system",
        "operationId": "addTemporalEntityAttrs",
canterafonsj's avatar
canterafonsj committed
45
        "tags": ["Temporal Evolution"],
canterafonsj's avatar
canterafonsj committed
46
47
48
49
50
51
52
53
54
55
        "parameters": [
          {
            "$ref": "#/components/parameters/entityId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json;application/ld+json": {
              "schema": {
André Costa's avatar
André Costa committed
56
                "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/temporal/EntityTemporal.json#/definitions/EntityTemporalFragment"
canterafonsj's avatar
canterafonsj committed
57
58
59
60
61
62
63
64
65
66
67
68
69
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
André Costa's avatar
André Costa committed
70
                  "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
canterafonsj's avatar
canterafonsj committed
71
72
73
74
75
76
77
78
79
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
André Costa's avatar
André Costa committed
80
                  "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
canterafonsj's avatar
canterafonsj committed
81
82
83
84
85
                }
              }
            }
          }
        }
canterafonsj's avatar
canterafonsj committed
86
87
88
89
90
91
      }
    },
    "/temporal/entities/{entityId}/attrs/{attrId}": {
      "delete": {
        "description": "Attribute from Temporal Representation of Entity deletion",
        "operationId": "removeEntityTemporalAttr",
canterafonsj's avatar
canterafonsj committed
92
         "tags": ["Temporal Evolution"],
canterafonsj's avatar
canterafonsj committed
93
94
95
        "parameters": [
          {
            "$ref": "#/components/parameters/entityId"
canterafonsj's avatar
canterafonsj committed
96
97
98
          },
          {
            "$ref": "#/components/parameters/attrId"
canterafonsj's avatar
canterafonsj committed
99
100
101
102
103
104
105
106
107
108
109
          }
        ],
        "responses": {
          "204": {
            "description": "No Content."
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
André Costa's avatar
André Costa committed
110
                  "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
canterafonsj's avatar
canterafonsj committed
111
112
113
114
115
116
117
118
119
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
André Costa's avatar
André Costa committed
120
                  "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
canterafonsj's avatar
canterafonsj committed
121
122
123
124
125
126
127
                }
              }
            }
          }
        }
      }
    },
canterafonsj's avatar
canterafonsj committed
128
    "/temporal/entities/{entityId}/attrs/{attrId}/{instanceId}": {
canterafonsj's avatar
canterafonsj committed
129
      "patch": {
canterafonsj's avatar
canterafonsj committed
130
131
        "description": "Allows modifying a specific Attribute (Property or Relationship) instance, identified by its instanceId, of a Temporal Representation of an Entity.",
        "operationId": "modifyEntityTemporalAttrInstance",
canterafonsj's avatar
canterafonsj committed
132
        "tags": ["Temporal Evolution"],
canterafonsj's avatar
canterafonsj committed
133
134
135
136
137
138
        "parameters": [
          {
            "$ref": "#/components/parameters/entityId"
          },
          {
            "$ref": "#/components/parameters/attrId"
canterafonsj's avatar
canterafonsj committed
139
140
141
          },
          {
            "$ref": "#/components/parameters/instanceId"
canterafonsj's avatar
canterafonsj committed
142
143
144
145
146
147
148
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json;application/ld+json": {
              "schema": {
André Costa's avatar
André Costa committed
149
                "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/temporal/EntityTemporal.json#/definitions/EntityTemporalFragment"
canterafonsj's avatar
canterafonsj committed
150
151
152
153
154
155
              }
            }
          }
        },
        "responses": {
          "204": {
canterafonsj's avatar
canterafonsj committed
156
            "description": "No Content"
canterafonsj's avatar
canterafonsj committed
157
158
          },
          "400": {
canterafonsj's avatar
canterafonsj committed
159
            "description": "Bad request",
canterafonsj's avatar
canterafonsj committed
160
161
162
            "content": {
              "application/json;application/ld+json": {
                "schema": {
André Costa's avatar
André Costa committed
163
                  "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
canterafonsj's avatar
canterafonsj committed
164
165
166
167
168
169
170
171
172
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
André Costa's avatar
André Costa committed
173
                  "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
canterafonsj's avatar
canterafonsj committed
174
175
176
177
178
179
180
                }
              }
            }
          }
        }
      },
      "delete": {
canterafonsj's avatar
canterafonsj committed
181
182
        "description": "Attribute Instance deletion by instance id.",
        "operationId": "removeEntityTemporalAttrInstance",
canterafonsj's avatar
canterafonsj committed
183
        "tags": ["Temporal Evolution"],
canterafonsj's avatar
canterafonsj committed
184
185
186
187
188
189
        "parameters": [
          {
            "$ref": "#/components/parameters/entityId"
          },
          {
            "$ref": "#/components/parameters/attrId"
canterafonsj's avatar
canterafonsj committed
190
191
192
          },
          {
            "$ref": "#/components/parameters/instanceId"
canterafonsj's avatar
canterafonsj committed
193
194
195
196
197
198
199
200
201
202
203
          }
        ],
        "responses": {
          "204": {
            "description": "No Content."
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
André Costa's avatar
André Costa committed
204
                  "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
canterafonsj's avatar
canterafonsj committed
205
206
207
208
209
210
211
212
213
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
André Costa's avatar
André Costa committed
214
                  "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
canterafonsj's avatar
canterafonsj committed
215
216
217
218
219
220
221
222
223
                }
              }
            }
          }
        }
      }
    }
  }
}