temporal-entity-attrs-spec.json 6.6 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
25
26
27
    "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": {
          "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/Name"
        }
      },
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
46
47
48
49
50
51
52
53
54
        "parameters": [
          {
            "$ref": "#/components/parameters/entityId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json;application/ld+json": {
              "schema": {
canterafonsj's avatar
canterafonsj committed
55
                "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/temporal/EntityTemporal.json#/definitions/EntityTemporalFragment"
canterafonsj's avatar
canterafonsj committed
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
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "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"
                }
              }
            }
          }
        }
canterafonsj's avatar
canterafonsj committed
85
86
87
88
89
90
      }
    },
    "/temporal/entities/{entityId}/attrs/{attrId}": {
      "delete": {
        "description": "Attribute from Temporal Representation of Entity deletion",
        "operationId": "removeEntityTemporalAttr",
canterafonsj's avatar
canterafonsj committed
91
92
93
        "parameters": [
          {
            "$ref": "#/components/parameters/entityId"
canterafonsj's avatar
canterafonsj committed
94
95
96
          },
          {
            "$ref": "#/components/parameters/attrId"
canterafonsj's avatar
canterafonsj committed
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
          }
        ],
        "responses": {
          "204": {
            "description": "No Content."
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
canterafonsj's avatar
canterafonsj committed
126
    "/temporal/entities/{entityId}/attrs/{attrId}/{instanceId}": {
canterafonsj's avatar
canterafonsj committed
127
      "patch": {
canterafonsj's avatar
canterafonsj committed
128
129
        "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
130
131
132
133
134
135
        "parameters": [
          {
            "$ref": "#/components/parameters/entityId"
          },
          {
            "$ref": "#/components/parameters/attrId"
canterafonsj's avatar
canterafonsj committed
136
137
138
          },
          {
            "$ref": "#/components/parameters/instanceId"
canterafonsj's avatar
canterafonsj committed
139
140
141
142
143
144
145
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json;application/ld+json": {
              "schema": {
canterafonsj's avatar
canterafonsj committed
146
                "$ref": "https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/temporal/EntityTemporal.json#/definitions/EntityTemporalFragment"
canterafonsj's avatar
canterafonsj committed
147
148
149
150
151
152
              }
            }
          }
        },
        "responses": {
          "204": {
canterafonsj's avatar
canterafonsj committed
153
            "description": "No Content"
canterafonsj's avatar
canterafonsj committed
154
155
          },
          "400": {
canterafonsj's avatar
canterafonsj committed
156
            "description": "Bad request",
canterafonsj's avatar
canterafonsj committed
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
            "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
178
179
        "description": "Attribute Instance deletion by instance id.",
        "operationId": "removeEntityTemporalAttrInstance",
canterafonsj's avatar
canterafonsj committed
180
181
182
183
184
185
        "parameters": [
          {
            "$ref": "#/components/parameters/entityId"
          },
          {
            "$ref": "#/components/parameters/attrId"
canterafonsj's avatar
canterafonsj committed
186
187
188
          },
          {
            "$ref": "#/components/parameters/instanceId"
canterafonsj's avatar
canterafonsj committed
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
          }
        ],
        "responses": {
          "204": {
            "description": "No Content."
          },
          "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"
                }
              }
            }
          }
        }
      }
    }
  }
}