Assets
Updates an asset with the given ID if it exists. If the asset is not found, no further action is taken. DANGER ZONE: Note that updating assets can have unexpected results, especially for contract offers that have been sent out or are ongoing in contract negotiations.
https://w3id.org/edc/v0.0.1/ns/Asset
PUT /assets HTTP/1.1
Host: v3
Content-Type: application/json
Accept: */*
Content-Length: 242
{
"@context": {
"@vocab": "https://w3id.org/edc/v0.0.1/ns/"
},
"@id": "asset-id",
"properties": {
"key": "value"
},
"privateProperties": {
"privateKey": "privateValue"
},
"dataAddress": {
"type": "HttpData",
"baseUrl": "https://jsonplaceholder.typicode.com/todos"
}
}
No content
Creates a new asset together with a data address
https://w3id.org/edc/v0.0.1/ns/Asset
POST /assets HTTP/1.1
Host: v3
Content-Type: application/json
Accept: */*
Content-Length: 242
{
"@context": {
"@vocab": "https://w3id.org/edc/v0.0.1/ns/"
},
"@id": "asset-id",
"properties": {
"key": "value"
},
"privateProperties": {
"privateKey": "privateValue"
},
"dataAddress": {
"type": "HttpData",
"baseUrl": "https://jsonplaceholder.typicode.com/todos"
}
}
{
"@context": {
"@vocab": "https://w3id.org/edc/v0.0.1/ns/"
},
"@id": "id-value",
"createdAt": 1688465655
}
Request all assets according to a particular query
https://w3id.org/edc/v0.0.1/ns/QuerySpec
POST /assets/request HTTP/1.1
Host: v3
Content-Type: application/json
Accept: */*
Content-Length: 164
{
"@context": {
"@vocab": "https://w3id.org/edc/v0.0.1/ns/"
},
"@type": "QuerySpec",
"offset": 5,
"limit": 10,
"sortOrder": "DESC",
"sortField": "fieldName",
"filterExpression": []
}
[
{
"@context": {
"@vocab": "https://w3id.org/edc/v0.0.1/ns/"
},
"@id": "asset-id",
"properties": {
"key": "value"
},
"privateProperties": {
"privateKey": "privateValue"
},
"dataAddress": {
"type": "HttpData",
"baseUrl": "https://jsonplaceholder.typicode.com/todos"
},
"createdAt": 1688465655
}
]
Gets an asset with the given ID
GET /assets/{id} HTTP/1.1
Host: v3
Accept: */*
{
"@context": {
"@vocab": "https://w3id.org/edc/v0.0.1/ns/"
},
"@id": "asset-id",
"properties": {
"key": "value"
},
"privateProperties": {
"privateKey": "privateValue"
},
"dataAddress": {
"type": "HttpData",
"baseUrl": "https://jsonplaceholder.typicode.com/todos"
},
"createdAt": 1688465655
}
Removes an asset with the given ID if possible. Deleting an asset is only possible if that asset is not yet referenced by a contract agreement, in which case an error is returned. DANGER ZONE: Note that deleting assets can have unexpected results, especially for contract offers that have been sent out or ongoing or contract negotiations.
DELETE /assets/{id} HTTP/1.1
Host: v3
Accept: */*
No content
Last updated
Was this helpful?