Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
NGSI Linked Data
NGSI-LD
Commits
09538f0b
Commit
09538f0b
authored
Nov 22, 2018
by
canterafonsj
Browse files
Entity Temporal First Stab
parent
960f7f5a
Changes
5
Hide whitespace changes
Inline
Side-by-side
schema/temporal/EntityTemporal.json
View file @
09538f0b
{
"$schema"
:
"http://json-schema.org/schema#"
,
"id"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/EntityTemporal.json"
,
"id"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/
temporal/
EntityTemporal.json"
,
"title"
:
"NGSI-LD Entity"
,
"description"
:
"NGSI-LD Temporal Representation of an Entity"
,
"type"
:
"object"
,
"properties"
:
{
"id"
:
{
"type"
:
"string"
,
"format"
:
"uri"
},
"type"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/Name"
},
"@context"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/LdContext"
},
"location"
:
{
"type"
:
"array"
,
"items"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Entity.json#/definitions/GeoProperty"
},
"minItems"
:
1
},
"createdAt"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/createdAt"
},
"modifiedAt"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/modifiedAt"
}
},
"required"
:
[
"id"
,
"type"
],
"additionalProperties"
:
{
"anyOf"
:
[
{
"type"
:
"array"
,
"items"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Entity.json#/definitions/Property"
"definitions"
:
{
"EntityTemporalFragment"
:
{
"type"
:
"object"
,
"properties"
:
{
"@context"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/LdContext"
},
"
minItems
"
:
1
}
,
{
"type"
:
"arra
y"
,
"items"
:
{
"
$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Entity.json#/definitions/Relationship"
"
location
"
:
{
"type"
:
"array"
,
"items"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Entity.json#/definitions/GeoPropert
y"
},
"
minItems"
:
1
},
"
minItems
"
:
1
}
,
{
"type"
:
"arra
y"
,
"items"
:
{
"
$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Entity.json#/definitions/GeoProperty"
"
observationSpace
"
:
{
"type"
:
"array"
,
"items"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Entity.json#/definitions/GeoPropert
y"
},
"
minItems"
:
1
},
"minItems"
:
1
"operationSpace"
:
{
"type"
:
"array"
,
"items"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Entity.json#/definitions/GeoProperty"
},
"minItems"
:
1
}
},
"additionalProperties"
:
{
"anyOf"
:
[
{
"type"
:
"array"
,
"items"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Entity.json#/definitions/Property"
},
"minItems"
:
1
},
{
"type"
:
"array"
,
"items"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Entity.json#/definitions/Relationship"
},
"minItems"
:
1
},
{
"type"
:
"array"
,
"items"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Entity.json#/definitions/GeoProperty"
},
"minItems"
:
1
}
]
},
"propertyNames"
:
{
"type"
:
"string"
,
"pattern"
:
"^((
\\
d|[a-zA-Z]|_)+(#
\\
d+)?)$|^(@context)$"
}
]
},
"EntityTemporal"
:
{
"allOf"
:
[
{
"type"
:
"object"
,
"properties"
:
{
"id"
:
{
"type"
:
"string"
,
"format"
:
"uri"
},
"type"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/Name"
},
"createdAt"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/createdAt"
},
"modifiedAt"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/modifiedAt"
}
},
"required"
:
[
"id"
,
"type"
]
},
{
"$ref"
:
"#/definitions/EntityTemporalFragment"
}
]
}
},
"propertyNames"
:
{
"type"
:
"string"
,
"pattern"
:
"^((
\\
d|[a-zA-Z]|_)+(#
\\
d+)?)$|^(@context)$"
}
"allOf"
:
[
{
"$ref"
:
"#/definitions/EntityTemporal"
}
]
}
schema/temporal/EntityTemporalList.json
View file @
09538f0b
{
"$schema"
:
"http://json-schema.org/schema#"
,
"id"
:
"https://uri.etsi.org/ngsi-ld/schema/EntityTemporalList.json"
,
"id"
:
"https://uri.etsi.org/ngsi-ld/schema/
temporal/
EntityTemporalList.json"
,
"title"
:
"NGSI-LD Entity"
,
"description"
:
"NGSI-LD Temporal Representation List"
,
"type"
:
"array"
,
"items"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/EntityTemporal.json#"
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/
temporal/
EntityTemporal.json#"
}
}
spec/updated/temporal/temporal-entities-spec.json
0 → 100644
View file @
09538f0b
{
"openapi"
:
"3.0.1"
,
"info"
:
{
"title"
:
"NGSI-LD Temporal Entities"
,
"version"
:
"latest"
},
"components"
:
{
"parameters"
:
{
"timerel"
:
{
"name"
:
"timerel"
,
"description"
:
"Time relationship"
,
"in"
:
"query"
,
"required"
:
false
,
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/timerel"
}
},
"time"
:
{
"name"
:
"time"
,
"description"
:
"start time for temporal query"
,
"in"
:
"query"
,
"required"
:
false
,
"schema"
:
{
"type"
:
"string"
,
"format"
:
"date-time"
}
},
"endTime"
:
{
"name"
:
"endTime"
,
"description"
:
"end time for temporal query"
,
"in"
:
"query"
,
"required"
:
false
,
"schema"
:
{
"type"
:
"string"
,
"format"
:
"date-time"
}
},
"timeproperty"
:
{
"name"
:
"timeproperty"
,
"description"
:
"The name of the property that contains the temporal data that will be used to resolve the temporal query"
,
"in"
:
"query"
,
"required"
:
false
,
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/Name"
}
},
"options"
:
{
"name"
:
"options"
,
"description"
:
"Options dictionary"
,
"in"
:
"query"
,
"required"
:
false
,
"schema"
:
{
"type"
:
"string"
,
"enum"
:
[
"temporalValues"
,
"sysAttrs"
]
}
}
}
},
"paths"
:
{
"/temporal/entities/"
:
{
"get"
:
{
"description"
:
"Query temporal evolution of Entities from an NGSI-LD system"
,
"operationId"
:
"queryTemporalEntities"
,
"parameters"
:
[
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities-spec.json#/components/parameters/id"
},
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities-spec.json#/components/parameters/idPattern"
},
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities-spec.json#/components/parameters/type"
},
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities-spec.json#/components/parameters/attrs"
},
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities-spec.json#/components/parameters/q"
},
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities-spec.json#/components/parameters/georel"
},
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities-spec.json#/components/parameters/geometry"
},
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities-spec.json#/components/parameters/coordinates"
},
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities-spec.json#/components/parameters/geoproperty"
},
{
"$ref"
:
"#/components/parameters/timerel"
},
{
"$ref"
:
"#/components/parameters/temporalproperty"
},
{
"$ref"
:
"#/components/parameters/time"
},
{
"$ref"
:
"#/components/parameters/endTime"
},
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities-spec.json#/components/parameters/csf"
},
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/spec/updated/entities-spec.json#/components/parameters/limit"
},
{
"$ref"
:
"#/components/parameters/options"
}
],
"responses"
:
{
"200"
:
{
"description"
:
"OK"
,
"content"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/EntityTemporalList.json#/definitions/EntityTemporalList"
},
"examples"
:
{
"simple"
:
{
"externalValue"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/examples/EntityTemporalList-example.json"
}
}
}
}
},
"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"
}
}
}
}
}
},
"post"
:
{
"description"
:
"Create temporal representation of an Entity within an NGSI-LD system"
,
"operationId"
:
"createEntityTemporal"
,
"requestBody"
:
{
"required"
:
true
,
"content"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/EntityTemporal.json#/definitions/EntityTemporal"
}
}
}
},
"responses"
:
{
"201"
:
{
"description"
:
"Created. Contains the resource URI of the created Entity"
},
"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"
}
}
}
},
"409"
:
{
"description"
:
"Already exists"
,
"content"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
}
}
}
},
"422"
:
{
"description"
:
"Unprocessable Entity"
,
"content"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
}
}
}
}
}
}
}
}
}
spec/updated/temporal/temporal-entity-attrs-spec.json
0 → 100644
View file @
09538f0b
{
"openapi"
:
"3.0.1"
,
"info"
:
{
"title"
:
"NGSI-LD Entity Attributes"
,
"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"
}
},
"options"
:
{
"name"
:
"options"
,
"description"
:
"Indicates that no attribute overwrite shall be performed"
,
"in"
:
"query"
,
"required"
:
false
,
"schema"
:
{
"type"
:
"string"
,
"enum"
:
[
"noOverwrite"
]
}
}
}
},
"paths"
:
{
"/temporal/entities/{entityId}/attrs/"
:
{
"post"
:
{
"description"
:
"Append new Entity attributes to an existing Entity within an NGSI-LD system"
,
"operationId"
:
"appendEntityAttrs"
,
"parameters"
:
[
{
"$ref"
:
"#/components/parameters/entityId"
},
{
"$ref"
:
"#/components/parameters/options"
}
],
"requestBody"
:
{
"required"
:
true
,
"content"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Entity.json#/definitions/EntityFragment"
}
}
}
},
"responses"
:
{
"204"
:
{
"description"
:
"No Content"
},
"207"
:
{
"description"
:
"Partial Success. Only the attributes included in the response payload were successfully appended"
,
"content"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/UpdateResult.json#"
}
}
}
},
"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"
}
}
}
}
}
},
"patch"
:
{
"description"
:
"Update existing Entity attributes within an NGSI-LD system"
,
"operationId"
:
"updateEntityAttrs"
,
"parameters"
:
[
{
"$ref"
:
"#/components/parameters/entityId"
}
],
"requestBody"
:
{
"required"
:
true
,
"content"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Entity.json#/definitions/EntityFragment"
}
}
}
},
"responses"
:
{
"204"
:
{
"description"
:
"No Content."
},
"207"
:
{
"description"
:
"Partial Success. Only the attributes included in the response payload were successfully updated"
,
"content"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/UpdateResult.json#"
}
}
}
},
"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"
}
}
}
}
}
}
},
"/temporal/entities/{entityId}/attrs/{attrId}"
:
{
"patch"
:
{
"description"
:
"Update existing Entity attributes within an NGSI-LD system"
,
"operationId"
:
"partialAttrUpdate"
,
"parameters"
:
[
{
"$ref"
:
"#/components/parameters/entityId"
},
{
"$ref"
:
"#/components/parameters/attrId"
}
],
"requestBody"
:
{
"required"
:
true
,
"content"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Entity.json#/definitions/EntityFragment"
}
}
}
},
"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"
}
}
}
}
}
},
"delete"
:
{
"description"
:
"Removes an existing Entity attribute within an NGSI-LD system"
,
"operationId"
:
"removeEntityAttr"
,
"parameters"
:
[
{
"$ref"
:
"#/components/parameters/entityId"
},
{
"$ref"
:
"#/components/parameters/attrId"
}
],
"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"