Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: Update documentation / postman collections with v3 assets API #167

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 11 additions & 14 deletions mxd/3.2_MXD_tutorial2_Access_policies.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,20 @@ Bob will once again be the data provider and Alice is interested in Bob’s data
Action (Bob): Create an asset using the following `curl` command:

```shell
curl --location 'http://localhost/bob/management/v2/assets' \
curl --location 'http://localhost/bob/management/v3/assets' \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: password' \
--data-raw '{
"@context": {},
"asset": {
"@type": "Asset",
"@id": "4",
"properties": {
"description": "Product EDC Demo Asset 4"
}
},
"dataAddress": {
"@type": "DataAddress",
"type": "HttpData",
"baseUrl": "https://jsonplaceholder.typicode.com/todos/4"
}
"@context": {},
"@id": "4",
"properties": {
"description": "Product EDC Demo Asset 4"
},
"dataAddress": {
"@type": "DataAddress",
"type": "HttpData",
"baseUrl": "https://jsonplaceholder.typicode.com/todos/4"
}
}'
```

Expand Down
25 changes: 11 additions & 14 deletions mxd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -740,23 +740,20 @@ Let's insert some data into `Trudy` connector.
#### 7.6.1 Create Asset
Create an asset using the following `curl` command:
```shell
curl --location 'http://localhost/trudy/management/v2/assets' \
curl --location 'http://localhost/trudy/management/v3/assets' \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: password' \
--data-raw '{
"@context": {},
"asset": {
"@type": "Asset",
"@id": "1",
"properties": {
"description": "Product EDC Demo Asset 1"
}
},
"dataAddress": {
"@type": "DataAddress",
"type": "HttpData",
"baseUrl": "https://jsonplaceholder.typicode.com/todos/1"
}
"@context": {},
"@id": "1",
"properties": {
"description": "Product EDC Demo Asset 1"
},
"dataAddress": {
"@type": "DataAddress",
"type": "HttpData",
"baseUrl": "https://jsonplaceholder.typicode.com/todos/1"
}
}'
```
This `curl` command can be used to fetch Trudy's assets:
Expand Down
4 changes: 2 additions & 2 deletions mxd/postman/management_api_tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -557,12 +557,12 @@
},
{
"key": "BOB_MANAGEMENT_URL",
"value": "http://localhost/bob/management/v2",
"value": "http://localhost/bob/management",
"type": "string"
},
{
"key": "Alice_MANAGEMENT_URL",
"value": "http://localhost/alice/management/v2",
"value": "http://localhost/alice/management",
"type": "string"
},
{
Expand Down
11 changes: 7 additions & 4 deletions mxd/postman/mxd-management-apis.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"info": {
"_postman_id": "54c1f694-b885-4b7d-b069-5d394be398fa",
"_postman_id": "ee10f4ab-1bdb-464a-8418-f7f6e3325a2d",
"name": "tractusx-edc-mgmt-api",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "27652630"
"_exporter_id": "252261",
"_collection_link": "https://winter-rocket-884715.postman.co/workspace/SAP~ff4cf631-05f4-48ab-a1e0-f716cf2efc25/collection/252261-ee10f4ab-1bdb-464a-8418-f7f6e3325a2d?action=share&source=collection_link&creator=252261"
},
"item": [
{
Expand All @@ -23,7 +24,9 @@
{
"listen": "prerequest",
"script": {
"exec": [],
"exec": [
""
],
"type": "text/javascript"
}
}
Expand All @@ -33,7 +36,7 @@
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"@context\": {},\n \"asset\": {\n \"@type\": \"Asset\",\n \"@id\": \"{{ASSET_ID}}\", \n \"properties\": {\n \"description\": \"Product EDC Demo Asset\"\n }\n },\n \"dataAddress\": {\n \"@type\": \"DataAddress\",\n \"type\": \"HttpData\",\n \"baseUrl\": \"https://jsonplaceholder.typicode.com/todos\"\n }\n}",
"raw": "{\n \"@context\": {},\n \"@id\": \"{{ASSET_ID}}\", \n \"properties\": {\n \"description\": \"Product EDC Demo Asset\"\n },\n \"dataAddress\": {\n \"@type\": \"DataAddress\",\n \"type\": \"HttpData\",\n \"baseUrl\": \"https://jsonplaceholder.typicode.com/todos\"\n }\n}",
"options": {
"raw": {
"language": "json"
Expand Down