Skip to content

Commit 9ad321e

Browse files
committed
Update responses
1 parent a61063d commit 9ad321e

2 files changed

Lines changed: 19 additions & 15 deletions

File tree

docs/ld-subscriptions-registrations.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ git checkout NGSI-v2
137137
138138
## Using Subscriptions with NGSI-LD
139139
140+
> [!NOTE]
141+
>
142+
> A full tutorial on NGSI-LD subscriptions can be found within the [NGSI-LD tutorial](https://ngsi-ld-tutorials.readthedocs.io/) documentation.
143+
140144
Goto `http://localhost:3000/app/store/urn:ngsi-ld:Building:store001` to display and interact with the Supermarket data.
141145
142146
### Create a Subscription (Store 1) - Low Stock

docs/relationships-linked-data.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -708,7 +708,7 @@ passed in the previous request.
708708
"@context": "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.6.jsonld",
709709
"id": "urn:ngsi-ld:Shelf:unit001",
710710
"type": "https://fiware.github.io/tutorials.Step-by-Step/schema/Shelf",
711-
"http://schema.org/name": {
711+
"https://schema.org/name": {
712712
"type": "Property",
713713
"value": "Corner Unit"
714714
},
@@ -827,14 +827,18 @@ curl -G -X GET \
827827
'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Shelf:unit001/' \
828828
-d 'attrs=locatedIn' \
829829
-d 'options=keyValues' \
830+
-H 'Accept: application/ld+json' \
830831
-H 'Link: <http://context/user-context.jsonld>; rel="http://www.w3.org/ns/json-ld#context"; type="application/ld+json"'
831832
```
832833

833834
#### Response:
834835

835836
```json
836837
{
837-
"@context": "http://context/user-context.jsonld",
838+
"@context": [
839+
"http://context/user-context.jsonld",
840+
"https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context-v1.6.jsonld",
841+
],
838842
"id": "urn:ngsi-ld:Shelf:unit001",
839843
"type": "Shelf",
840844
"locatedIn": "urn:ngsi-ld:Building:store001"
@@ -885,18 +889,13 @@ This is the reciprocal relationship to the `locatedIn` attribute on **Shelf**:
885889
curl -L -X POST 'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:Building:store001/attrs' \
886890
-H 'Content-Type: application/ld+json' \
887891
--data-raw '{
888-
"furniture": [
889-
{
890-
"type": "Relationship",
891-
"datasetId": "urn:ngsi-ld:Relationship:1",
892-
"object": "urn:ngsi-ld:Shelf:001"
893-
},
894-
{
895-
"type": "Relationship",
896-
"datasetId": "urn:ngsi-ld:Relationship:2",
897-
"object": "urn:ngsi-ld:Shelf:002"
898-
}
899-
],
892+
"furniture": {
893+
"type": "Relationship",
894+
"object": [
895+
"urn:ngsi-ld:Shelf:001",
896+
"urn:ngsi-ld:Shelf:002"
897+
]
898+
},
900899
"@context": "http://context/user-context.jsonld"
901900
}'
902901
```
@@ -943,7 +942,7 @@ The **StockOrder** is created as a standard NGSI-LD data entity.
943942

944943
```bash
945944
curl -X POST \
946-
http://localhost:1026/ngsi-ld/v1/entities/ \
945+
'http://localhost:1026/ngsi-ld/v1/entities/' \
947946
-H 'Content-Type: application/ld+json' \
948947
-d '{
949948
"id": "urn:ngsi-ld:StockOrder:001",
@@ -1056,6 +1055,7 @@ adding the appropriate URN.
10561055
```bash
10571056
curl -G -X GET \
10581057
'http://localhost:1026/ngsi-ld/v1/entities/urn:ngsi-ld:StockOrder:001' \
1058+
-H 'Accept: application/ld+json' \
10591059
-d 'options=keyValues'
10601060
```
10611061

0 commit comments

Comments
 (0)