Assets

This section provides an overview of all available APIs that adhere to the OpenAPI specification. All APIs are loaded from the OpenAPI specification file: Link. Please note that the API base-paths may differ depending on the connector, the specific API base-path can be seen in the UI dashboard.









put

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.

Body
@contextobjectRequired
@idstringOptional
@typestringOptionalExample: https://w3id.org/edc/v0.0.1/ns/Asset
privatePropertiesobjectOptional
propertiesobjectRequired
Responses
204
Asset was updated successfully
put
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


post

Creates a new asset together with a data address

Body
@contextobjectRequired
@idstringOptional
@typestringOptionalExample: https://w3id.org/edc/v0.0.1/ns/Asset
privatePropertiesobjectOptional
propertiesobjectRequired
Responses
200
Asset was created successfully. Returns the asset Id and created timestamp
application/json
post
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
}

post

Request all assets according to a particular query

Body
@typestringOptionalExample: https://w3id.org/edc/v0.0.1/ns/QuerySpec
limitinteger · int32Optional
offsetinteger · int32Optional
sortFieldstringOptional
sortOrderstring · enumOptionalPossible values:
Responses
200
The assets matching the query
application/json
post
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
  }
]

get

Gets an asset with the given ID

Path parameters
idstringRequired
Responses
200
The asset
application/json
get
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
}

delete

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.

Path parameters
idstringRequired
Responses
204
Asset was deleted successfully
delete
DELETE /assets/{id} HTTP/1.1
Host: v3
Accept: */*

No content

Last updated

Was this helpful?