Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NGSI-LD API
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CIM - Context Information Management
NGSI-LD API
Commits
47846e2c
Commit
47846e2c
authored
6 years ago
by
canterafonsj
Browse files
Options
Downloads
Patches
Plain Diff
Fixing enumeration
parent
6602d101
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
schema/common.json
+2
-2
2 additions, 2 deletions
schema/common.json
spec/updated/entities-spec.json
+123
-179
123 additions, 179 deletions
spec/updated/entities-spec.json
spec/updated/entity-operations-spec.json
+147
-9
147 additions, 9 deletions
spec/updated/entity-operations-spec.json
with
272 additions
and
190 deletions
schema/common.json
+
2
−
2
View file @
47846e2c
...
...
@@ -141,7 +141,7 @@
},
"geometry"
:
{
"type"
:
"string"
,
"enum
eration
"
:
[
"enum"
:
[
"Point"
,
"MultiPoint"
,
"LineString"
,
...
...
@@ -152,7 +152,7 @@
},
"timerel"
:
{
"type"
:
"string"
,
"enum
eration
"
:
[
"enum"
:
[
"before"
,
"after"
,
"between"
...
...
This diff is collapsed.
Click to expand it.
spec/updated/entities-spec.json
+
123
−
179
View file @
47846e2c
{
"openapi"
:
"3.0.1"
,
"info"
:
{
"title"
:
"NGSI-LD Entit
ie
s"
,
"version"
:
"
latest
"
"title"
:
"NGSI-LD Entit
y Operation
s"
,
"version"
:
"
0.1
"
},
"components"
:
{
"parameters"
:
{
"id"
:
{
"name"
:
"id"
,
"description"
:
"Comma separated list of URIs to be retrieved"
,
"in"
:
"query"
,
"required"
:
false
,
"components"
:
{},
"paths"
:
{
"/entityOperations/create"
:
{
"post"
:
{
"description"
:
"Batch Entity creation"
,
"operationId"
:
"batchEntityCreation"
,
"requestBody"
:
{
"required"
:
true
,
"content"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"type"
:
"string"
,
"format"
:
"uri"
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/EntityList.json#/definitions/EntityList"
}
},
"type"
:
{
"name"
:
"type"
,
"description"
:
"Comma separated list of Entity type names to be retrieved"
,
"in"
:
"query"
,
"required"
:
false
,
"schema"
:
{
"type"
:
"string"
,
"minLength"
:
1
}
},
"idPattern"
:
{
"name"
:
"idPattern"
,
"description"
:
"Regular expression that must be matched by Entity ids"
,
"in"
:
"query"
,
"required"
:
false
,
"schema"
:
{
"type"
:
"string"
,
"format"
:
"regexp"
}
},
"attr
s"
:
{
"name"
:
"attrs"
,
"description"
:
"
Comma separated list of attribute names (properties or relationships) to be retrieved
"
,
"in"
:
"query"
,
"required"
:
false
,
"response
s"
:
{
"200"
:
{
"description"
:
"
Success
"
,
"content"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"type"
:
"string"
,
"minLength"
:
1
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/BatchOperationResult.json#/definitions/BatchOperationResult"
}
},
"q"
:
{
"name"
:
"q"
,
"description"
:
"Query"
,
"in"
:
"query"
,
"required"
:
false
,
"schema"
:
{
"type"
:
"string"
,
"minLength"
:
1
}
},
"georel"
:
{
"name"
:
"georel"
,
"description"
:
"Geo-relationship"
,
"in"
:
"query"
,
"required"
:
false
,
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/georel"
}
},
"geometry"
:
{
"name"
:
"geometry"
,
"description"
:
"Geometry"
,
"in"
:
"query"
,
"required"
:
false
,
"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/geometry"
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
}
}
},
"coordinates"
:
{
"name"
:
"coordinates"
,
"description"
:
"Coordinates serialized as a string"
,
"in"
:
"query"
,
"required"
:
false
,
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/coordinates"
}
},
"geoproperty"
:
{
"name"
:
"geoproperty"
,
"description"
:
"The name of the property that contains the geo-spatial data that will be used to resolve the geoquery"
,
"in"
:
"query"
,
"required"
:
false
,
"schema"
:
{
"type"
:
"string"
,
"minLength"
:
1
}
},
"csf"
:
{
"name"
:
"csf"
,
"description"
:
"Context Source Filter"
,
"in"
:
"query"
,
"required"
:
false
,
"schema"
:
{
"type"
:
"string"
,
"minLength"
:
1
}
},
"limit"
:
{
"name"
:
"limit"
,
"description"
:
"Pagination limit"
,
"in"
:
"query"
,
"required"
:
false
,
"schema"
:
{
"type"
:
"integer"
,
"minimum"
:
1
}
},
"options"
:{
"/entityOperations/update"
:
{
"post"
:
{
"description"
:
"Batch Entity update"
,
"operationId"
:
"batchEntityUpdate"
,
"parameters"
:
[
{
"name"
:
"options"
,
"description"
:
"Options dictionary"
,
"in"
:
"query"
,
"required"
:
false
,
"schema"
:
{
"type"
:
"string"
,
"enum"
:
[
"keyValues"
,
"sysAttrs"
]
"enum"
:
[
"noOverwrite"
]
}
}
],
"requestBody"
:
{
"required"
:
true
,
"content"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/EntityList.json#/definitions/EntityList"
}
},
"paths"
:
{
"/entities/"
:
{
"get"
:
{
"description"
:
"Retrieve a set of entities which matches a specific query from an NGSI-LD system"
,
"operationId"
:
"queryEntities"
,
"parameters"
:
[
{
"$ref"
:
"#/components/parameters/id"
},
{
"$ref"
:
"#/components/parameters/idPattern"
},
{
"$ref"
:
"#/components/parameters/type"
},
{
"$ref"
:
"#/components/parameters/attrs"
},
{
"$ref"
:
"#/components/parameters/q"
},
{
"$ref"
:
"#/components/parameters/georel"
},
{
"$ref"
:
"#/components/parameters/geometry"
},
{
"$ref"
:
"#/components/parameters/coordinates"
},
{
"$ref"
:
"#/components/parameters/geoproperty"
},
{
"$ref"
:
"#/components/parameters/csf"
},
{
"$ref"
:
"#/components/parameters/limit"
},
{
"$ref"
:
"#/components/parameters/options"
}
],
}
},
"responses"
:
{
"200"
:
{
"description"
:
"
OK
"
,
"description"
:
"
Success
"
,
"content"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/EntityList.json#/definitions/EntityList"
},
"examples"
:
{
"simple"
:
{
"externalValue"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/examples/EntityList-example.json"
}
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/BatchOperationResult.json#/definitions/BatchOperationResult"
}
}
}
...
...
@@ -195,23 +93,46 @@
}
}
}
}
},
"/entityOperations/upsert"
:
{
"post"
:
{
"description"
:
"Create a new Entity within an NGSI-LD system"
,
"operationId"
:
"createEntity"
,
"description"
:
"Batch Entity upsert"
,
"operationId"
:
"batchEntityUpsert"
,
"parameters"
:
[
{
"name"
:
"options"
,
"in"
:
"query"
,
"required"
:
false
,
"schema"
:
{
"type"
:
"string"
,
"enum"
:
[
"replace"
,
"update"
]
}
}
],
"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/Entity"
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/Entity
List
.json#/definitions/Entity
List
"
}
}
}
},
"responses"
:
{
"201"
:
{
"description"
:
"Created. Contains the resource URI of the created Entity"
"200"
:
{
"description"
:
"Success"
,
"content"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/BatchOperationResult.json#/definitions/BatchOperationResult"
}
}
}
},
"400"
:
{
"description"
:
"Bad request"
,
...
...
@@ -222,19 +143,42 @@
}
}
}
}
}
}
},
"409"
:
{
"description"
:
"Already exists"
,
"/entityOperations/delete"
:
{
"post"
:
{
"description"
:
"Batch Entity delete"
,
"operationId"
:
"batchEntityDelete"
,
"requestBody"
:
{
"required"
:
true
,
"content"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/common.json#/definitions/ProblemDetails"
"type"
:
"array"
,
"items"
:
{
"type"
:
"string"
,
"format"
:
"uri"
},
"minItems"
:
1
}
}
}
},
"responses"
:
{
"200"
:
{
"description"
:
"Success"
,
"content"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/BatchOperationResult.json#/definitions/BatchOperationResult"
}
}
}
},
"4
22
"
:
{
"description"
:
"
Unprocessable Entity
"
,
"4
00
"
:
{
"description"
:
"
Bad request
"
,
"content"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
...
...
This diff is collapsed.
Click to expand it.
spec/updated/entity-operations-spec.json
+
147
−
9
View file @
47846e2c
...
...
@@ -2,10 +2,9 @@
"openapi"
:
"3.0.1"
,
"info"
:
{
"title"
:
"NGSI-LD Entity Operations"
,
"version"
:
"latest"
},
"components"
:
{
"version"
:
"0.1"
},
"components"
:
{},
"paths"
:
{
"/entityOperations/create"
:
{
"post"
:
{
...
...
@@ -41,16 +40,155 @@
}
}
}
},
}
}
}
},
"/entityOperations/update"
:
{
"post"
:
{
"description"
:
"Batch Entity update"
,
"operationId"
:
"batchEntityUpdate"
,
"parameters"
:
[
{
"name"
:
"options"
,
"in"
:
"query"
,
"required"
:
false
,
"schema"
:
{
"type"
:
"string"
,
"enum"
:
[
"noOverwrite"
]
}
}
],
"requestBody"
:
{
"required"
:
true
,
"content"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/EntityList.json#/definitions/EntityList"
}
}
}
},
"responses"
:
{
"200"
:
{
"description"
:
"Success"
,
"content"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/BatchOperationResult.json#/definitions/BatchOperationResult"
}
}
}
},
"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"
}
}
}
}
}
}
},
"/entityOperations/upsert"
:
{
"post"
:
{
"description"
:
"Batch Entity upsert"
,
"operationId"
:
"batchEntityUpsert"
,
"parameters"
:
[
{
"name"
:
"options"
,
"in"
:
"query"
,
"required"
:
false
,
"schema"
:
{
"type"
:
"string"
,
"enum"
:
[
"replace"
,
"update"
]
}
}
],
"requestBody"
:
{
"required"
:
true
,
"content"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/EntityList.json#/definitions/EntityList"
}
}
}
},
"responses"
:
{
"200"
:
{
"description"
:
"Success"
,
"content"
:
{
"application/json;application/ld+json"
:
{
"schema"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/BatchOperationResult.json#/definitions/BatchOperationResult"
}
}
}
},
"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"
}
}
}
}
}
}
},
"/entityOperations/delete"
:
{
"post"
:
{
"description"
:
"Batch Entity delete"
,
"operationId"
:
"batchEntityDelete"
,
"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"
:
{
"$ref"
:
"https://forge.etsi.org/gitlab/NGSI-LD/NGSI-LD/raw/master/schema/BatchOperationResult.json#/definitions/BatchOperationResult"
}
}
}
},
"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"
}
}
}
}
}
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment