Skip to content
temporal-entity-attrs-spec.json 6.77 KiB
Newer Older
canterafonsj's avatar
canterafonsj committed
{
  "openapi": "3.0.1",
  "info": {
canterafonsj's avatar
canterafonsj committed
    "title": "NGSI-LD Temporal Entity Attributes",
canterafonsj's avatar
canterafonsj committed
    "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": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
          "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/Name"
canterafonsj's avatar
canterafonsj committed
      "instanceId": {
        "name": "instanceId",
        "description": "Instance Id",
        "in": "path",
        "required": true,
canterafonsj's avatar
canterafonsj committed
        "schema": {
          "type": "string",
canterafonsj's avatar
canterafonsj committed
          "format": "uri"
canterafonsj's avatar
canterafonsj committed
        }
      }
    }
  },
  "paths": {
    "/temporal/entities/{entityId}/attrs/": {
      "post": {
canterafonsj's avatar
canterafonsj committed
        "description": "Add new attributes to an existing Temporal Entity within an NGSI-LD system",
        "operationId": "addTemporalEntityAttrs",
Stefan Wiedemann's avatar
Stefan Wiedemann committed
        "tags": ["Temporal Evolution", "Temporal"],
canterafonsj's avatar
canterafonsj committed
        "parameters": [
          {
            "$ref": "#/components/parameters/entityId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json;application/ld+json": {
              "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
                "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/temporal/EntityTemporal.json#/definitions/EntityTemporalFragment"
canterafonsj's avatar
canterafonsj committed
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
                  "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
canterafonsj's avatar
canterafonsj committed
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
                  "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
canterafonsj's avatar
canterafonsj committed
      }
    },
    "/temporal/entities/{entityId}/attrs/{attrId}": {
      "delete": {
        "description": "Attribute from Temporal Representation of Entity deletion",
        "operationId": "removeEntityTemporalAttr",
Stefan Wiedemann's avatar
Stefan Wiedemann committed
         "tags": ["Temporal Evolution", "Temporal"],
canterafonsj's avatar
canterafonsj committed
        "parameters": [
          {
            "$ref": "#/components/parameters/entityId"
canterafonsj's avatar
canterafonsj committed
          },
          {
            "$ref": "#/components/parameters/attrId"
canterafonsj's avatar
canterafonsj committed
          }
        ],
        "responses": {
          "204": {
            "description": "No Content."
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
                  "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
canterafonsj's avatar
canterafonsj committed
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
                  "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
canterafonsj's avatar
canterafonsj committed
    "/temporal/entities/{entityId}/attrs/{attrId}/{instanceId}": {
canterafonsj's avatar
canterafonsj committed
      "patch": {
canterafonsj's avatar
canterafonsj committed
        "description": "Allows modifying a specific Attribute (Property or Relationship) instance, identified by its instanceId, of a Temporal Representation of an Entity.",
        "operationId": "modifyEntityTemporalAttrInstance",
Stefan Wiedemann's avatar
Stefan Wiedemann committed
        "tags": ["Temporal Evolution", "Temporal"],
canterafonsj's avatar
canterafonsj committed
        "parameters": [
          {
            "$ref": "#/components/parameters/entityId"
          },
          {
            "$ref": "#/components/parameters/attrId"
canterafonsj's avatar
canterafonsj committed
          },
          {
            "$ref": "#/components/parameters/instanceId"
canterafonsj's avatar
canterafonsj committed
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json;application/ld+json": {
              "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
                "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/temporal/EntityTemporal.json#/definitions/EntityTemporalFragment"
canterafonsj's avatar
canterafonsj committed
              }
            }
          }
        },
        "responses": {
          "204": {
canterafonsj's avatar
canterafonsj committed
            "description": "No Content"
canterafonsj's avatar
canterafonsj committed
          },
          "400": {
canterafonsj's avatar
canterafonsj committed
            "description": "Bad request",
canterafonsj's avatar
canterafonsj committed
            "content": {
              "application/json;application/ld+json": {
                "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
                  "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
canterafonsj's avatar
canterafonsj committed
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
                  "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
canterafonsj's avatar
canterafonsj committed
        "description": "Attribute Instance deletion by instance id.",
        "operationId": "removeEntityTemporalAttrInstance",
Stefan Wiedemann's avatar
Stefan Wiedemann committed
        "tags": ["Temporal Evolution", "Temporal"],
canterafonsj's avatar
canterafonsj committed
        "parameters": [
          {
            "$ref": "#/components/parameters/entityId"
          },
          {
            "$ref": "#/components/parameters/attrId"
canterafonsj's avatar
canterafonsj committed
          },
          {
            "$ref": "#/components/parameters/instanceId"
canterafonsj's avatar
canterafonsj committed
          }
        ],
        "responses": {
          "204": {
            "description": "No Content."
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
                  "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
canterafonsj's avatar
canterafonsj committed
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json;application/ld+json": {
                "schema": {
Stefan Wiedemann's avatar
Stefan Wiedemann committed
                  "$ref": "https://forge.etsi.org/rep/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"