-
Notifications
You must be signed in to change notification settings - Fork 60
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
docs(asset): Add documentation of asset creation on new management API #361
docs(asset): Add documentation of asset creation on new management API #361
Conversation
…of assets on the new management api Signed-off-by: Sascha Isele <[email protected]>
added values table to asset creation, started with terminology entries and expanded assets examples to asset entry examples Signed-off-by: Sascha Isele <[email protected]>
Signed-off-by: Sascha Isele <[email protected]>
Signed-off-by: Sascha Isele <[email protected]>
…amples Signed-off-by: Sascha Isele <[email protected]>
Signed-off-by: Sascha Isele <[email protected]>
Signed-off-by: Sascha Isele <[email protected]>
additionally adjusted the examples lean more towards real use-cases Signed-off-by: Sascha Isele <[email protected]>
Still needs some work but it should be enough for a proper review now. |
Kudos, SonarCloud Quality Gate passed! |
|
||
## 1. Optional - Local Setup | ||
|
||
TODO link to a 0.4.x example setup. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When will this be available?
|
||
## 2. Terminology | ||
|
||
With the migration to a new protocol and with it new specifications, DCAT Catalogs in the context of assets, there is a need to clarify the terminology that is used. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additionally, can we provide links to the new protocol and the specification?
With the migration to a new protocol and with it new specifications, DCAT Catalogs in the context of assets, there is a need to clarify the terminology that is used. | |
With the migration to the new protocol and with its new specification, DCAT Catalogs in the context of assets, there is a need to clarify the terminology that is used. |
| Key | Description | | ||
|----------|--------------------------------------------------------------------------------------------------------------------------------------| | ||
| @context | JSON-LD context aims to enable the local usage of compact and meaningful names which are later still identifiable in a larger scope. | | ||
| @vocab | The value of `@vocab` is added as prefix to any key consisting of a plain string without any other prefix. | | ||
| edc | `edc` defines a specific prefix for the connector. | | ||
| @id | `@id` contains a distinct identifier enabling global references to this field, also called a Node. | | ||
| @type | Specifies the path to the schema which describes this Node. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Key | Description | | |
|----------|--------------------------------------------------------------------------------------------------------------------------------------| | |
| @context | JSON-LD context aims to enable the local usage of compact and meaningful names which are later still identifiable in a larger scope. | | |
| @vocab | The value of `@vocab` is added as prefix to any key consisting of a plain string without any other prefix. | | |
| edc | `edc` defines a specific prefix for the connector. | | |
| @id | `@id` contains a distinct identifier enabling global references to this field, also called a Node. | | |
| @type | Specifies the path to the schema which describes this Node. | | |
| Key | Description | | |
|------------|--------------------------------------------------------------------------------------------------------------------------------------| | |
| `@context` | JSON-LD context aims to enable the local usage of compact and meaningful names which are later still identifiable in a larger scope. | | |
| `@vocab` | The value of `@vocab` is added as prefix to any key consisting of a plain string without any other prefix. | | |
| `edc` | `edc` defines a specific prefix for the connector. | | |
| `@id` | `@id` contains a distinct identifier enabling global references to this field, also called a Node. | | |
| `@type` | Specifies the path to the schema which describes this Node. | |
| @context | JSON-LD context aims to enable the local usage of compact and meaningful names which are later still identifiable in a larger scope. | | ||
| @vocab | The value of `@vocab` is added as prefix to any key consisting of a plain string without any other prefix. | | ||
| edc | `edc` defines a specific prefix for the connector. | | ||
| @id | `@id` contains a distinct identifier enabling global references to this field, also called a Node. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
field or object?
|----------|--------------------------------------------------------------------------------------------------------------------------------------| | ||
| @context | JSON-LD context aims to enable the local usage of compact and meaningful names which are later still identifiable in a larger scope. | | ||
| @vocab | The value of `@vocab` is added as prefix to any key consisting of a plain string without any other prefix. | | ||
| edc | `edc` defines a specific prefix for the connector. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whats the purpose of this prefix?
| Key | Description | | ||
|----------|--------------------------------------------------------------------------------------------------------------------------------------| | ||
| @context | JSON-LD context aims to enable the local usage of compact and meaningful names which are later still identifiable in a larger scope. | | ||
| @vocab | The value of `@vocab` is added as prefix to any key consisting of a plain string without any other prefix. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whats the purpose of this?
"edc:dataAddress": { | ||
"@type": "edc:dataAddress", | ||
"type": "test-type", | ||
"keyName": "test-key-name" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my opinion using a real type of dataAddress would be more beneficial. E.g. HttpData
|
||
The asset entry is then sent to the management API of the connector through a POST request. | ||
|
||
**CON_DATAMGMT_URL** specifies the URL of the management API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**CON_DATAMGMT_URL** specifies the URL of the management API. | |
**CON_DATAMGMT_URL** specifies the base URL of the connector context, where the management API is available. |
"edc:version": "0.2.1", | ||
"contenttype": "application/json" | ||
}, | ||
"edc:privateProperties": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we have here the edc
prefix and on the "normale" properties not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it, because the edc stores everything which is prefixed with edc:
separately?
An example is the `payload` field and its contents. | ||
Here the `payload` contains the name and age of a person. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can it be anything? Because then I wouldn't use the term payload
. This sounds like, that I can store the to be transmitted data within this field.
"edc": "https://w3id.org/edc/v0.0.1/ns/" | ||
}, | ||
"edc:asset": { | ||
"@type": "edc:asset", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"@type": "edc:asset", | |
"@type": "Asset", |
"@id": "some-asset-id" | ||
}, | ||
"edc:dataAddress": { | ||
"@type": "edc:dataAddress", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"@type": "edc:dataAddress", | |
"@type": "DataAddress", |
|
||
The asset entry is then sent to the management API of the connector through a POST request. | ||
|
||
**CON_DATAMGMT_URL** specifies the URL of the management API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
**CON_DATAMGMT_URL** specifies the URL of the management API. | |
**MANAGEMENT_URL** specifies the URL of the management API. |
The asset entry is then sent to the management API of the connector through a POST request. | ||
|
||
**CON_DATAMGMT_URL** specifies the URL of the management API. | ||
The path `/management/v2` allows access to the functionality of the new management API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The path `/management/v2` allows access to the functionality of the new management API. | |
The path `/v2` allows access to the functionality of the new management API. |
> Once that is done, the new management API can be reached through `/management`. | ||
|
||
```bash | ||
curl -X POST "${CON_DATAMGMT_URL}/management/v2/assets" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
curl -X POST "${CON_DATAMGMT_URL}/management/v2/assets" \ | |
curl -X POST "${MANAGEMENT_URL}/v2/assets" \ |
as /management
should be already part of the MANAGEMENT_URL (and, in fact, it is configurable)
"properties": { | ||
"name": "some-asset-name", | ||
"description": "some description", | ||
"edc:version": "0.2.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please either namespace all the properties of none of them, unless we'd want/need to add tractusx specific properties, that could be namespaced accordingly
WHAT
Adds a documentation with examples for the new management API.
WHY
With extensive changes to the API and the migration to a new protocol, both the requests and the terminology change significantly.
This documentation aims to alleviate the confusion.