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
Asset was updated successfully
No content
Request was malformed, e.g. id was null
Asset could not be updated, because it does not exist.
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
Asset was created successfully. Returns the asset Id and created timestamp
Request body was malformed
Could not create asset, because an asset with that ID already exists
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
The assets matching the query
Request body was malformed
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
The asset
Request was malformed, e.g. id was null
An asset with the given ID does not exist
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.
Asset was deleted successfully
No content
Request was malformed, e.g. id was null
An asset with the given ID does not exist
The asset cannot be deleted, because it is referenced by a contract agreement
DELETE /assets/{id} HTTP/1.1
Host: v3
Accept: */*
No content
Last updated
Was this helpful?