Skip to main content

Marketplace API v0.1.0

Marketplace API v0.1.0

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

Base URLs:

Asset

AssetController_createAsset

Code samples

# You can also use wget
curl -X POST /api/v1/metadata/assets/ddo \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'

POST /api/v1/metadata/assets/ddo HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
"@context": "https://w3id.org/did/v1",
"id": "did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e429",
"created": "2019-02-08T08:13:49Z",
"updated": "2019-02-08T08:13:49Z",
"authentication": [
{
"publicKey": "did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"type": "RsaSignatureAuthentication2018"
}
],
"proof": {
"created": "2022-01-08T16:02:20Z",
"creator": "2022-01-08T16:02:20Z",
"signatureValue": "0xbd7b46b3ac664167bc70ac211b1a1da0baed9ead91613a5f02dfc25c1bb6e3ff40861b455017e8a587fd4e37b703436072598c3a81ec88be28bfe33b61554a471b",
"type": "DDOIntegritySignature"
},
"publicKey": [
{
"id": "did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"owner": "0x00Bd138aBD70e2F00903268F3Db08f2D25677C9e",
"type": "EthereumECDSAKey"
}
],
"service": [
{
"index": 0,
"service": "SecretStore",
"serviceEndpoint": "http://localhost:12001",
"type": "authorization"
},
{
"index": 1,
"purchaseEndpoint": "http://localhost:8030/api/v1/node/services/access/initialize",
"serviceEndpoint": "http://localhost:8030/api/v1/node/services/consume",
"type": "access"
},
{
"attributes": {
"additionalInformation": {
"copyrightHolder": "Met Office",
"description": "Weather information of UK including temperature and humidity",
"inLanguage": "en",
"links": [
{
"name": "Sample of Asset Data",
"type": "sample",
"url": "https://foo.com/sample.csv"
}
],
"tags": [
"weather",
"uk",
"2011",
"temperature",
"humidity"
],
"workExample": "stationId,latitude,longitude,datetime, temperature,humidity/n423432fsd,51.509865,-0.118092, 2011-01-01T10:55:11+00:00,7.2,68"
},
"curation": {
"numVotes": 123,
"rating": 0.93,
"schema": "Binary Voting"
},
"main": {
"author": "Met Office",
"dateCreated": "2012-02-01T10:55:11Z",
"encryptedFiles": "0x098213xzckasdf089723hjgdasfkjgasfv",
"files": [
{
"compression": "zip",
"contentLength": "4535431",
"contentType": "text/csv",
"encoding": "UTF-8",
"index": 0,
"resourceId": "access-log2018-02-13-15-17-29-18386C502CAEA932"
}
],
"license": "CC-BY",
"name": "UK Weather information 2011",
"price": "10",
"type": "dataset"
}
},
"index": 2,
"serviceEndpoint": "http://mymetadata.org/api/v1/provider/assets/metadata/did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"type": "metadata"
}
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};

fetch('/api/v1/metadata/assets/ddo',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});

require 'rest-client'
require 'json'

headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}

result = RestClient.post '/api/v1/metadata/assets/ddo',
params: {
}, headers: headers

p JSON.parse(result)

import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}

r = requests.post('/api/v1/metadata/assets/ddo', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
$response = $client->request('POST','/api/v1/metadata/assets/ddo', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}

// ...

URL obj = new URL("/api/v1/metadata/assets/ddo");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
"bytes"
"net/http"
)

func main() {

headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
}

data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/api/v1/metadata/assets/ddo", data)
req.Header = headers

client := &http.Client{}
resp, err := client.Do(req)
// ...
}

POST /api/v1/metadata/assets/ddo

Create a asset entry

Body parameter

{
"@context": "https://w3id.org/did/v1",
"id": "did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e429",
"created": "2019-02-08T08:13:49Z",
"updated": "2019-02-08T08:13:49Z",
"authentication": [
{
"publicKey": "did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"type": "RsaSignatureAuthentication2018"
}
],
"proof": {
"created": "2022-01-08T16:02:20Z",
"creator": "2022-01-08T16:02:20Z",
"signatureValue": "0xbd7b46b3ac664167bc70ac211b1a1da0baed9ead91613a5f02dfc25c1bb6e3ff40861b455017e8a587fd4e37b703436072598c3a81ec88be28bfe33b61554a471b",
"type": "DDOIntegritySignature"
},
"publicKey": [
{
"id": "did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"owner": "0x00Bd138aBD70e2F00903268F3Db08f2D25677C9e",
"type": "EthereumECDSAKey"
}
],
"service": [
{
"index": 0,
"service": "SecretStore",
"serviceEndpoint": "http://localhost:12001",
"type": "authorization"
},
{
"index": 1,
"purchaseEndpoint": "http://localhost:8030/api/v1/node/services/access/initialize",
"serviceEndpoint": "http://localhost:8030/api/v1/node/services/consume",
"type": "access"
},
{
"attributes": {
"additionalInformation": {
"copyrightHolder": "Met Office",
"description": "Weather information of UK including temperature and humidity",
"inLanguage": "en",
"links": [
{
"name": "Sample of Asset Data",
"type": "sample",
"url": "https://foo.com/sample.csv"
}
],
"tags": [
"weather",
"uk",
"2011",
"temperature",
"humidity"
],
"workExample": "stationId,latitude,longitude,datetime, temperature,humidity/n423432fsd,51.509865,-0.118092, 2011-01-01T10:55:11+00:00,7.2,68"
},
"curation": {
"numVotes": 123,
"rating": 0.93,
"schema": "Binary Voting"
},
"main": {
"author": "Met Office",
"dateCreated": "2012-02-01T10:55:11Z",
"encryptedFiles": "0x098213xzckasdf089723hjgdasfkjgasfv",
"files": [
{
"compression": "zip",
"contentLength": "4535431",
"contentType": "text/csv",
"encoding": "UTF-8",
"index": 0,
"resourceId": "access-log2018-02-13-15-17-29-18386C502CAEA932"
}
],
"license": "CC-BY",
"name": "UK Weather information 2011",
"price": "10",
"type": "dataset"
}
},
"index": 2,
"serviceEndpoint": "http://mymetadata.org/api/v1/provider/assets/metadata/did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"type": "metadata"
}
]
}

Parameters

NameInTypeRequiredDescription
bodybodyCreateAssetDtotruenone

Example responses

201 Response

{
"@context": "https://w3id.org/did/v1",
"authentication": [
{
"publicKey": "did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"type": "RsaSignatureAuthentication2018"
}
],
"created": "2021-02-01T10:55:11Z",
"updated": "2021-02-01T10:55:11Z",
"id": "did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e429",
"proof": {
"created": "2022-01-08T16:02:20Z",
"creator": "2022-01-08T16:02:20Z",
"signatureValue": "0xbd7b46b3ac664167bc70ac211b1a1da0baed9ead91613a5f02dfc25c1bb6e3ff40861b455017e8a587fd4e37b703436072598c3a81ec88be28bfe33b61554a471b",
"type": "DDOIntegritySignature"
},
"publicKey": [
{
"id": "did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"owner": "0x00Bd138aBD70e2F00903268F3Db08f2D25677C9e",
"type": "EthereumECDSAKey"
}
],
"service": [
{
"index": 0,
"service": "SecretStore",
"serviceEndpoint": "http://localhost:12001",
"type": "authorization"
},
{
"index": 1,
"purchaseEndpoint": "http://localhost:8030/api/v1/node/services/access/initialize",
"serviceEndpoint": "http://localhost:8030/api/v1/node/services/consume",
"type": "access"
},
{
"attributes": {
"additionalInformation": {
"copyrightHolder": "Met Office",
"description": "Weather information of UK including temperature and humidity",
"inLanguage": "en",
"links": [
{
"name": "Sample of Asset Data",
"type": "sample",
"url": "https://foo.com/sample.csv"
}
],
"tags": [
"weather",
"uk",
"2011",
"temperature",
"humidity"
],
"workExample": "stationId,latitude,longitude,datetime, temperature,humidity/n423432fsd,51.509865,-0.118092, 2011-01-01T10:55:11+00:00,7.2,68"
},
"curation": {
"numVotes": 123,
"rating": 0.93,
"schema": "Binary Voting"
},
"main": {
"author": "Met Office",
"dateCreated": "2012-02-01T10:55:11Z",
"encryptedFiles": "0x098213xzckasdf089723hjgdasfkjgasfv",
"files": [
{
"compression": "zip",
"contentLength": "4535431",
"contentType": "text/csv",
"encoding": "UTF-8",
"index": 0,
"resourceId": "access-log2018-02-13-15-17-29-18386C502CAEA932"
}
],
"license": "CC-BY",
"name": "UK Weather information 2011",
"price": "10",
"type": "dataset"
}
},
"index": 2,
"serviceEndpoint": "http://mymetadata.org/api/v1/provider/assets/metadata/did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"type": "metadata"
}
]
}

Responses

StatusMeaningDescriptionSchema
201Createdasset is createdGetAssetDto
403ForbiddenBad RequestNone

AssetController_getDDOAllAssets

Code samples

# You can also use wget
curl -X GET /api/v1/metadata/assets/ddo \
-H 'Accept: application/json'

GET /api/v1/metadata/assets/ddo HTTP/1.1

Accept: application/json


const headers = {
'Accept':'application/json'
};

fetch('/api/v1/metadata/assets/ddo',
{
method: 'GET',

headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});

require 'rest-client'
require 'json'

headers = {
'Accept' => 'application/json'
}

result = RestClient.get '/api/v1/metadata/assets/ddo',
params: {
}, headers: headers

p JSON.parse(result)

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('/api/v1/metadata/assets/ddo', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
$response = $client->request('GET','/api/v1/metadata/assets/ddo', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}

// ...

URL obj = new URL("/api/v1/metadata/assets/ddo");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
"bytes"
"net/http"
)

func main() {

headers := map[string][]string{
"Accept": []string{"application/json"},
}

data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/api/v1/metadata/assets/ddo", data)
req.Header = headers

client := &http.Client{}
resp, err := client.Do(req)
// ...
}

GET /api/v1/metadata/assets/ddo

Get DDO of all assets

Parameters

NameInTypeRequiredDescription
queryquerystringfalseexecute directly queries to elasticsearch from the client
textquerystringfalseText to search
offsetquerystringfalsePage Size
pagequerystringfalsePage to retrieve
sortquerystringfalsesort the response by specified parameter

Example responses

200 Response

[
{
"@context": "https://w3id.org/did/v1",
"authentication": [
{
"publicKey": "did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"type": "RsaSignatureAuthentication2018"
}
],
"created": "2021-02-01T10:55:11Z",
"updated": "2021-02-01T10:55:11Z",
"id": "did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e429",
"proof": {
"created": "2022-01-08T16:02:20Z",
"creator": "2022-01-08T16:02:20Z",
"signatureValue": "0xbd7b46b3ac664167bc70ac211b1a1da0baed9ead91613a5f02dfc25c1bb6e3ff40861b455017e8a587fd4e37b703436072598c3a81ec88be28bfe33b61554a471b",
"type": "DDOIntegritySignature"
},
"publicKey": [
{
"id": "did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"owner": "0x00Bd138aBD70e2F00903268F3Db08f2D25677C9e",
"type": "EthereumECDSAKey"
}
],
"service": [
{
"index": 0,
"service": "SecretStore",
"serviceEndpoint": "http://localhost:12001",
"type": "authorization"
},
{
"index": 1,
"purchaseEndpoint": "http://localhost:8030/api/v1/node/services/access/initialize",
"serviceEndpoint": "http://localhost:8030/api/v1/node/services/consume",
"type": "access"
},
{
"attributes": {
"additionalInformation": {
"copyrightHolder": "Met Office",
"description": "Weather information of UK including temperature and humidity",
"inLanguage": "en",
"links": [
{
"name": "Sample of Asset Data",
"type": "sample",
"url": "https://foo.com/sample.csv"
}
],
"tags": [
"weather",
"uk",
"2011",
"temperature",
"humidity"
],
"workExample": "stationId,latitude,longitude,datetime, temperature,humidity/n423432fsd,51.509865,-0.118092, 2011-01-01T10:55:11+00:00,7.2,68"
},
"curation": {
"numVotes": 123,
"rating": 0.93,
"schema": "Binary Voting"
},
"main": {
"author": "Met Office",
"dateCreated": "2012-02-01T10:55:11Z",
"encryptedFiles": "0x098213xzckasdf089723hjgdasfkjgasfv",
"files": [
{
"compression": "zip",
"contentLength": "4535431",
"contentType": "text/csv",
"encoding": "UTF-8",
"index": 0,
"resourceId": "access-log2018-02-13-15-17-29-18386C502CAEA932"
}
],
"license": "CC-BY",
"name": "UK Weather information 2011",
"price": "10",
"type": "dataset"
}
},
"index": 2,
"serviceEndpoint": "http://mymetadata.org/api/v1/provider/assets/metadata/did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"type": "metadata"
}
]
}
]

Responses

StatusMeaningDescriptionSchema
200OKAssets IdsInline
403ForbiddenBad RequestNone

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
anonymous[GetAssetDto]falsenonenone
» @contextstringtruenoneContext of the asset
» authentication[AuthenticationDto]truenoneAuthentication used in the asset
»» publicKeystringtruenonePublic key of ddo
»» typestringtruenoneType of the signature
» createdstringtruenoneDate when the asset is created
» updatedstringtruenoneDate when the asset is created
» idstringtruenoneID of the asset
» proofProofDtotruenoneProof data
»» createdstringtruenoneDate of the proof
»» creatorstringtruenoneWallet address who created the proof signature
»» signatureValuestringtruenoneValue of the signature
»» typestringtruenoneType of the proof
» publicKey[PublicKeyDto]truenonePublic keys that contains the asset
»» idstringtruenoneId of the public key
»» ownerstringtruenoneWallet address who own the public key
»» typestringtruenoneType of the public key
» service[ServiceDto]truenoneServices that contains the asset
»» indexnumbertruenoneindex of the service
»» serviceEndpointstringtruenoneUrl of the service endpoint
»» typestringtruenoneService type
»» servicestringfalsenoneService name
»» purchaseEndpointstringfalsenoneUrl to purchase asset
»» attributesAttributesDtofalsenoneAttribute of the metadata
»»» additionalInformationobjectfalsenoneAditional information of the asset
»»» curationCurationDtotruenonepopularity of the asset
»»»» numVotesnumbertruenoneNumber of votes. 0 is the default value
»»»» ratingnumbertruenoneDecimal value between 0 and 1. 0 is the default value
»»»» schemastringfalsenoneSchema applied to calculate the rating
»»»» isListedbooleanfalsenoneFlag unsuitable content. False by default. If it's true, the content must not be returned
»»» mainMainDtotruenoneMain data of the asset
»»»» authorstringtruenoneName of the entity generating this data (e.g. Tfl, Disney Corp, etc.)
»»»» dateCreatedstringtruenoneThe date on which the asset was created by the originator.ISO 8601 format, Coordinated Universal Time, e.g. 2019-01-31T08:38:32Z
»»»» datePublishedstringfalsenoneThe date on which the asset DDO is registered into the metadata store
»»»» encryptedFilesstringtruenonefiles encrytion signature
»»»» files[FileDto]truenoneArray of File objects including the encrypted file urls. Further metadata about each file is stored
»»»»» checksumstringfalsenoneChecksum of the file using your preferred format (i.e. MD5). Format specified in checksumType.If it's not provided can't be validated if the file was not modified after registering
»»»»» urlstringfalsenoneContent URL. Omitted from the remote metadata. Supports http(s):// and ipfs:// URLs
»»»»» checksumTypestringfalsenoneFormat of the provided checksum. Can vary according to server (i.e Amazon vs. Azure)
»»»»» namestringfalsenoneFile name
»»»»» compressionstringfalsenoneFile compression (e.g. no, gzip, bzip2, etc)
»»»»» contentLengthstringfalsenoneSize of the file in bytes
»»»»» contentTypestringtruenoneFile format
»»»»» encodingstringfalsenoneFile encoding (e.g. UTF-8)
»»»»» indexnumbertruenoneIndex of the file
»»»»» resourceIdstringfalsenoneRemote identifier of the file in the external provider. It is typically the remote id in the cloud provider
»»»»» encryptedbooleanfalsenoneBoolean. Is the file encrypted? If is not set is assumed the file is not encrypted
»»»»» encryptionModestringfalsenoneEncryption mode used. Just valid if encrypted=true
»»»» licensenumbertruenoneShort name referencing the license of the asset (e.g. Public Domain, CC-0, CC-BY, No License Specified, etc.). If it's not specified, the following value will be added: "No License Specified
»»»» namestringtruenoneDescriptive name or title of the asset
»»»» pricestringtruenonePrice of the asset. It must be an integer encoded as a string, e.g. "123000000000000000000"
»»»» typestringtruenoneType of the asset. Helps to filter by the type of asset. It could be for example ("dataset", "algorithm")
»»»» algorithmAlgorithmDtotruenoneAlgorithm used in the asset
»»»»» languagestringfalsenoneLanguage used to implement the software
»»»»» formatstringfalsenonePackaging format of the software
»»»»» versionstringfalsenoneVersion of the software
»»»»» container[ContainerDto]truenoneObject describing the Docker container image
»»»»»» entrypointstringfalsenoneThe command to execute, or script to run inside the Docker image
»»»»»» imagestringfalsenoneName of the Docker image
»»»»»» tagstringfalsenoneTag of the Docker image
»»» serviceAgreementTemplateServiceAgreementTemplateDtofalsenoneService agreement template
»»»» conditionDependency[ConditionDependencyDto]truenonenone
»»»»» access[string]truenoneAccess
»»»»» escrowPayment[string]truenoneEscrow Payment
»»»»» execCompute[string]truenoneExec Compute
»»»»» lockPayment[string]truenoneLock Payment
»»»» conditions[ConditionDto]truenoneConditions
»»»»» contractNamestringtruenoneContract name
»»»»» functionNamestringtruenoneFunction name
»»»»» namestringtruenoneFunction name
»»»»» events[EventDto]truenoneEvents
»»»»»» actionTypestringtruenoneAction Type
»»»»»» handlerHandlerDtotruenoneHandler event
»»»»»»» functionNamestringtruenoneFunction name
»»»»»»» moduleNamestringtruenoneModule name
»»»»»»» versionstringtruenoneVersion of the handler
»»»»»» namestringtruenoneName of the event
»»»»» parameters[ParameterDto]truenoneParameters
»»»»»» namestringtruenoneParameter name
»»»»»» typestringtruenoneParameter type
»»»»»» valueobjecttruenoneParameter value
»»»»» timelocknumbertruenoneTime lock
»»»»» timeoutnumbertruenoneTime out
»»»» contractNamenumbertruenoneContract Name
»»»» events[EventDto]truenoneEvents
»»»» fulfillmentOrderstringfalsenoneFulfillment order

AssetController_deleteAllDDOs

Code samples

# You can also use wget
curl -X DELETE /api/v1/metadata/assets/ddo

DELETE /api/v1/metadata/assets/ddo HTTP/1.1


fetch('/api/v1/metadata/assets/ddo',
{
method: 'DELETE'

})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});

require 'rest-client'
require 'json'

result = RestClient.delete '/api/v1/metadata/assets/ddo',
params: {
}

p JSON.parse(result)

import requests

r = requests.delete('/api/v1/metadata/assets/ddo')

print(r.json())

<?php

require 'vendor/autoload.php';

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
$response = $client->request('DELETE','/api/v1/metadata/assets/ddo', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}

// ...

URL obj = new URL("/api/v1/metadata/assets/ddo");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
"bytes"
"net/http"
)

func main() {

data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "/api/v1/metadata/assets/ddo", data)
req.Header = headers

client := &http.Client{}
resp, err := client.Do(req)
// ...
}

DELETE /api/v1/metadata/assets/ddo

Retire metadata of all assets

Responses

StatusMeaningDescriptionSchema
200OKDeleted all DDOs from marketplaceNone

AssetController_getAllAssetIds

Code samples

# You can also use wget
curl -X GET /api/v1/metadata/assets \
-H 'Accept: application/json'

GET /api/v1/metadata/assets HTTP/1.1

Accept: application/json


const headers = {
'Accept':'application/json'
};

fetch('/api/v1/metadata/assets',
{
method: 'GET',

headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});

require 'rest-client'
require 'json'

headers = {
'Accept' => 'application/json'
}

result = RestClient.get '/api/v1/metadata/assets',
params: {
}, headers: headers

p JSON.parse(result)

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('/api/v1/metadata/assets', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
$response = $client->request('GET','/api/v1/metadata/assets', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}

// ...

URL obj = new URL("/api/v1/metadata/assets");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
"bytes"
"net/http"
)

func main() {

headers := map[string][]string{
"Accept": []string{"application/json"},
}

data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/api/v1/metadata/assets", data)
req.Header = headers

client := &http.Client{}
resp, err := client.Do(req)
// ...
}

GET /api/v1/metadata/assets

Get all asset Ids

Parameters

NameInTypeRequiredDescription
queryquerystringfalseexecute directly queries to elasticsearch from the client
textquerystringfalseText to search
offsetquerystringfalsePage Size
pagequerystringfalsePage to retrieve
sortquerystringfalsesort the response by specified parameter

Example responses

200 Response

[
"did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430"
]

Responses

StatusMeaningDescriptionSchema
200OKAssets IdsInline

Response Schema

AssetController_listDDObyQuery

Code samples

# You can also use wget
curl -X GET /api/v1/metadata/assets/ddo/query \
-H 'Accept: application/json'

GET /api/v1/metadata/assets/ddo/query HTTP/1.1

Accept: application/json


const headers = {
'Accept':'application/json'
};

fetch('/api/v1/metadata/assets/ddo/query',
{
method: 'GET',

headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});

require 'rest-client'
require 'json'

headers = {
'Accept' => 'application/json'
}

result = RestClient.get '/api/v1/metadata/assets/ddo/query',
params: {
}, headers: headers

p JSON.parse(result)

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('/api/v1/metadata/assets/ddo/query', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
$response = $client->request('GET','/api/v1/metadata/assets/ddo/query', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}

// ...

URL obj = new URL("/api/v1/metadata/assets/ddo/query");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
"bytes"
"net/http"
)

func main() {

headers := map[string][]string{
"Accept": []string{"application/json"},
}

data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/api/v1/metadata/assets/ddo/query", data)
req.Header = headers

client := &http.Client{}
resp, err := client.Do(req)
// ...
}

GET /api/v1/metadata/assets/ddo/query

Get a list of DDOs that match with the given text

Parameters

NameInTypeRequiredDescription
queryquerystringfalseexecute directly queries to elasticsearch from the client
textquerystringfalseText to search
offsetquerystringfalsePage Size
pagequerystringfalsePage to retrieve
sortquerystringfalsesort the response by specified parameter

Example responses

200 Response

[
{
"@context": "https://w3id.org/did/v1",
"authentication": [
{
"publicKey": "did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"type": "RsaSignatureAuthentication2018"
}
],
"created": "2021-02-01T10:55:11Z",
"updated": "2021-02-01T10:55:11Z",
"id": "did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e429",
"proof": {
"created": "2022-01-08T16:02:20Z",
"creator": "2022-01-08T16:02:20Z",
"signatureValue": "0xbd7b46b3ac664167bc70ac211b1a1da0baed9ead91613a5f02dfc25c1bb6e3ff40861b455017e8a587fd4e37b703436072598c3a81ec88be28bfe33b61554a471b",
"type": "DDOIntegritySignature"
},
"publicKey": [
{
"id": "did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"owner": "0x00Bd138aBD70e2F00903268F3Db08f2D25677C9e",
"type": "EthereumECDSAKey"
}
],
"service": [
{
"index": 0,
"service": "SecretStore",
"serviceEndpoint": "http://localhost:12001",
"type": "authorization"
},
{
"index": 1,
"purchaseEndpoint": "http://localhost:8030/api/v1/node/services/access/initialize",
"serviceEndpoint": "http://localhost:8030/api/v1/node/services/consume",
"type": "access"
},
{
"attributes": {
"additionalInformation": {
"copyrightHolder": "Met Office",
"description": "Weather information of UK including temperature and humidity",
"inLanguage": "en",
"links": [
{
"name": "Sample of Asset Data",
"type": "sample",
"url": "https://foo.com/sample.csv"
}
],
"tags": [
"weather",
"uk",
"2011",
"temperature",
"humidity"
],
"workExample": "stationId,latitude,longitude,datetime, temperature,humidity/n423432fsd,51.509865,-0.118092, 2011-01-01T10:55:11+00:00,7.2,68"
},
"curation": {
"numVotes": 123,
"rating": 0.93,
"schema": "Binary Voting"
},
"main": {
"author": "Met Office",
"dateCreated": "2012-02-01T10:55:11Z",
"encryptedFiles": "0x098213xzckasdf089723hjgdasfkjgasfv",
"files": [
{
"compression": "zip",
"contentLength": "4535431",
"contentType": "text/csv",
"encoding": "UTF-8",
"index": 0,
"resourceId": "access-log2018-02-13-15-17-29-18386C502CAEA932"
}
],
"license": "CC-BY",
"name": "UK Weather information 2011",
"price": "10",
"type": "dataset"
}
},
"index": 2,
"serviceEndpoint": "http://mymetadata.org/api/v1/provider/assets/metadata/did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"type": "metadata"
}
]
}
]

Responses

StatusMeaningDescriptionSchema
200OKlist of DDOsInline
403ForbiddenBad RequestNone

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
anonymous[GetAssetDto]falsenonenone
» @contextstringtruenoneContext of the asset
» authentication[AuthenticationDto]truenoneAuthentication used in the asset
»» publicKeystringtruenonePublic key of ddo
»» typestringtruenoneType of the signature
» createdstringtruenoneDate when the asset is created
» updatedstringtruenoneDate when the asset is created
» idstringtruenoneID of the asset
» proofProofDtotruenoneProof data
»» createdstringtruenoneDate of the proof
»» creatorstringtruenoneWallet address who created the proof signature
»» signatureValuestringtruenoneValue of the signature
»» typestringtruenoneType of the proof
» publicKey[PublicKeyDto]truenonePublic keys that contains the asset
»» idstringtruenoneId of the public key
»» ownerstringtruenoneWallet address who own the public key
»» typestringtruenoneType of the public key
» service[ServiceDto]truenoneServices that contains the asset
»» indexnumbertruenoneindex of the service
»» serviceEndpointstringtruenoneUrl of the service endpoint
»» typestringtruenoneService type
»» servicestringfalsenoneService name
»» purchaseEndpointstringfalsenoneUrl to purchase asset
»» attributesAttributesDtofalsenoneAttribute of the metadata
»»» additionalInformationobjectfalsenoneAditional information of the asset
»»» curationCurationDtotruenonepopularity of the asset
»»»» numVotesnumbertruenoneNumber of votes. 0 is the default value
»»»» ratingnumbertruenoneDecimal value between 0 and 1. 0 is the default value
»»»» schemastringfalsenoneSchema applied to calculate the rating
»»»» isListedbooleanfalsenoneFlag unsuitable content. False by default. If it's true, the content must not be returned
»»» mainMainDtotruenoneMain data of the asset
»»»» authorstringtruenoneName of the entity generating this data (e.g. Tfl, Disney Corp, etc.)
»»»» dateCreatedstringtruenoneThe date on which the asset was created by the originator.ISO 8601 format, Coordinated Universal Time, e.g. 2019-01-31T08:38:32Z
»»»» datePublishedstringfalsenoneThe date on which the asset DDO is registered into the metadata store
»»»» encryptedFilesstringtruenonefiles encrytion signature
»»»» files[FileDto]truenoneArray of File objects including the encrypted file urls. Further metadata about each file is stored
»»»»» checksumstringfalsenoneChecksum of the file using your preferred format (i.e. MD5). Format specified in checksumType.If it's not provided can't be validated if the file was not modified after registering
»»»»» urlstringfalsenoneContent URL. Omitted from the remote metadata. Supports http(s):// and ipfs:// URLs
»»»»» checksumTypestringfalsenoneFormat of the provided checksum. Can vary according to server (i.e Amazon vs. Azure)
»»»»» namestringfalsenoneFile name
»»»»» compressionstringfalsenoneFile compression (e.g. no, gzip, bzip2, etc)
»»»»» contentLengthstringfalsenoneSize of the file in bytes
»»»»» contentTypestringtruenoneFile format
»»»»» encodingstringfalsenoneFile encoding (e.g. UTF-8)
»»»»» indexnumbertruenoneIndex of the file
»»»»» resourceIdstringfalsenoneRemote identifier of the file in the external provider. It is typically the remote id in the cloud provider
»»»»» encryptedbooleanfalsenoneBoolean. Is the file encrypted? If is not set is assumed the file is not encrypted
»»»»» encryptionModestringfalsenoneEncryption mode used. Just valid if encrypted=true
»»»» licensenumbertruenoneShort name referencing the license of the asset (e.g. Public Domain, CC-0, CC-BY, No License Specified, etc.). If it's not specified, the following value will be added: "No License Specified
»»»» namestringtruenoneDescriptive name or title of the asset
»»»» pricestringtruenonePrice of the asset. It must be an integer encoded as a string, e.g. "123000000000000000000"
»»»» typestringtruenoneType of the asset. Helps to filter by the type of asset. It could be for example ("dataset", "algorithm")
»»»» algorithmAlgorithmDtotruenoneAlgorithm used in the asset
»»»»» languagestringfalsenoneLanguage used to implement the software
»»»»» formatstringfalsenonePackaging format of the software
»»»»» versionstringfalsenoneVersion of the software
»»»»» container[ContainerDto]truenoneObject describing the Docker container image
»»»»»» entrypointstringfalsenoneThe command to execute, or script to run inside the Docker image
»»»»»» imagestringfalsenoneName of the Docker image
»»»»»» tagstringfalsenoneTag of the Docker image
»»» serviceAgreementTemplateServiceAgreementTemplateDtofalsenoneService agreement template
»»»» conditionDependency[ConditionDependencyDto]truenonenone
»»»»» access[string]truenoneAccess
»»»»» escrowPayment[string]truenoneEscrow Payment
»»»»» execCompute[string]truenoneExec Compute
»»»»» lockPayment[string]truenoneLock Payment
»»»» conditions[ConditionDto]truenoneConditions
»»»»» contractNamestringtruenoneContract name
»»»»» functionNamestringtruenoneFunction name
»»»»» namestringtruenoneFunction name
»»»»» events[EventDto]truenoneEvents
»»»»»» actionTypestringtruenoneAction Type
»»»»»» handlerHandlerDtotruenoneHandler event
»»»»»»» functionNamestringtruenoneFunction name
»»»»»»» moduleNamestringtruenoneModule name
»»»»»»» versionstringtruenoneVersion of the handler
»»»»»» namestringtruenoneName of the event
»»»»» parameters[ParameterDto]truenoneParameters
»»»»»» namestringtruenoneParameter name
»»»»»» typestringtruenoneParameter type
»»»»»» valueobjecttruenoneParameter value
»»»»» timelocknumbertruenoneTime lock
»»»»» timeoutnumbertruenoneTime out
»»»» contractNamenumbertruenoneContract Name
»»»» events[EventDto]truenoneEvents
»»»» fulfillmentOrderstringfalsenoneFulfillment order

AssetController_listDDObyQueryPost

Code samples

# You can also use wget
curl -X POST /api/v1/metadata/assets/ddo/query \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'

POST /api/v1/metadata/assets/ddo/query HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
"query": {
"match_all": {}
},
"text": "Eius vel alias.",
"offset": 100,
"page": 0,
"sort": {
"created": "asc"
}
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};

fetch('/api/v1/metadata/assets/ddo/query',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});

require 'rest-client'
require 'json'

headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}

result = RestClient.post '/api/v1/metadata/assets/ddo/query',
params: {
}, headers: headers

p JSON.parse(result)

import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}

r = requests.post('/api/v1/metadata/assets/ddo/query', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
$response = $client->request('POST','/api/v1/metadata/assets/ddo/query', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}

// ...

URL obj = new URL("/api/v1/metadata/assets/ddo/query");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
"bytes"
"net/http"
)

func main() {

headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
}

data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/api/v1/metadata/assets/ddo/query", data)
req.Header = headers

client := &http.Client{}
resp, err := client.Do(req)
// ...
}

POST /api/v1/metadata/assets/ddo/query

Get a list of DDOs that match with the executed query.

Body parameter

{
"query": {
"match_all": {}
},
"text": "Eius vel alias.",
"offset": 100,
"page": 0,
"sort": {
"created": "asc"
}
}

Parameters

NameInTypeRequiredDescription
bodybodyQueryBodyDDOdtotruenone

Example responses

200 Response

[
{
"@context": "https://w3id.org/did/v1",
"authentication": [
{
"publicKey": "did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"type": "RsaSignatureAuthentication2018"
}
],
"created": "2021-02-01T10:55:11Z",
"updated": "2021-02-01T10:55:11Z",
"id": "did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e429",
"proof": {
"created": "2022-01-08T16:02:20Z",
"creator": "2022-01-08T16:02:20Z",
"signatureValue": "0xbd7b46b3ac664167bc70ac211b1a1da0baed9ead91613a5f02dfc25c1bb6e3ff40861b455017e8a587fd4e37b703436072598c3a81ec88be28bfe33b61554a471b",
"type": "DDOIntegritySignature"
},
"publicKey": [
{
"id": "did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"owner": "0x00Bd138aBD70e2F00903268F3Db08f2D25677C9e",
"type": "EthereumECDSAKey"
}
],
"service": [
{
"index": 0,
"service": "SecretStore",
"serviceEndpoint": "http://localhost:12001",
"type": "authorization"
},
{
"index": 1,
"purchaseEndpoint": "http://localhost:8030/api/v1/node/services/access/initialize",
"serviceEndpoint": "http://localhost:8030/api/v1/node/services/consume",
"type": "access"
},
{
"attributes": {
"additionalInformation": {
"copyrightHolder": "Met Office",
"description": "Weather information of UK including temperature and humidity",
"inLanguage": "en",
"links": [
{
"name": "Sample of Asset Data",
"type": "sample",
"url": "https://foo.com/sample.csv"
}
],
"tags": [
"weather",
"uk",
"2011",
"temperature",
"humidity"
],
"workExample": "stationId,latitude,longitude,datetime, temperature,humidity/n423432fsd,51.509865,-0.118092, 2011-01-01T10:55:11+00:00,7.2,68"
},
"curation": {
"numVotes": 123,
"rating": 0.93,
"schema": "Binary Voting"
},
"main": {
"author": "Met Office",
"dateCreated": "2012-02-01T10:55:11Z",
"encryptedFiles": "0x098213xzckasdf089723hjgdasfkjgasfv",
"files": [
{
"compression": "zip",
"contentLength": "4535431",
"contentType": "text/csv",
"encoding": "UTF-8",
"index": 0,
"resourceId": "access-log2018-02-13-15-17-29-18386C502CAEA932"
}
],
"license": "CC-BY",
"name": "UK Weather information 2011",
"price": "10",
"type": "dataset"
}
},
"index": 2,
"serviceEndpoint": "http://mymetadata.org/api/v1/provider/assets/metadata/did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"type": "metadata"
}
]
}
]

Responses

StatusMeaningDescriptionSchema
200OKlist of DDOsInline
403ForbiddenBad RequestNone

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
anonymous[GetAssetDto]falsenonenone
» @contextstringtruenoneContext of the asset
» authentication[AuthenticationDto]truenoneAuthentication used in the asset
»» publicKeystringtruenonePublic key of ddo
»» typestringtruenoneType of the signature
» createdstringtruenoneDate when the asset is created
» updatedstringtruenoneDate when the asset is created
» idstringtruenoneID of the asset
» proofProofDtotruenoneProof data
»» createdstringtruenoneDate of the proof
»» creatorstringtruenoneWallet address who created the proof signature
»» signatureValuestringtruenoneValue of the signature
»» typestringtruenoneType of the proof
» publicKey[PublicKeyDto]truenonePublic keys that contains the asset
»» idstringtruenoneId of the public key
»» ownerstringtruenoneWallet address who own the public key
»» typestringtruenoneType of the public key
» service[ServiceDto]truenoneServices that contains the asset
»» indexnumbertruenoneindex of the service
»» serviceEndpointstringtruenoneUrl of the service endpoint
»» typestringtruenoneService type
»» servicestringfalsenoneService name
»» purchaseEndpointstringfalsenoneUrl to purchase asset
»» attributesAttributesDtofalsenoneAttribute of the metadata
»»» additionalInformationobjectfalsenoneAditional information of the asset
»»» curationCurationDtotruenonepopularity of the asset
»»»» numVotesnumbertruenoneNumber of votes. 0 is the default value
»»»» ratingnumbertruenoneDecimal value between 0 and 1. 0 is the default value
»»»» schemastringfalsenoneSchema applied to calculate the rating
»»»» isListedbooleanfalsenoneFlag unsuitable content. False by default. If it's true, the content must not be returned
»»» mainMainDtotruenoneMain data of the asset
»»»» authorstringtruenoneName of the entity generating this data (e.g. Tfl, Disney Corp, etc.)
»»»» dateCreatedstringtruenoneThe date on which the asset was created by the originator.ISO 8601 format, Coordinated Universal Time, e.g. 2019-01-31T08:38:32Z
»»»» datePublishedstringfalsenoneThe date on which the asset DDO is registered into the metadata store
»»»» encryptedFilesstringtruenonefiles encrytion signature
»»»» files[FileDto]truenoneArray of File objects including the encrypted file urls. Further metadata about each file is stored
»»»»» checksumstringfalsenoneChecksum of the file using your preferred format (i.e. MD5). Format specified in checksumType.If it's not provided can't be validated if the file was not modified after registering
»»»»» urlstringfalsenoneContent URL. Omitted from the remote metadata. Supports http(s):// and ipfs:// URLs
»»»»» checksumTypestringfalsenoneFormat of the provided checksum. Can vary according to server (i.e Amazon vs. Azure)
»»»»» namestringfalsenoneFile name
»»»»» compressionstringfalsenoneFile compression (e.g. no, gzip, bzip2, etc)
»»»»» contentLengthstringfalsenoneSize of the file in bytes
»»»»» contentTypestringtruenoneFile format
»»»»» encodingstringfalsenoneFile encoding (e.g. UTF-8)
»»»»» indexnumbertruenoneIndex of the file
»»»»» resourceIdstringfalsenoneRemote identifier of the file in the external provider. It is typically the remote id in the cloud provider
»»»»» encryptedbooleanfalsenoneBoolean. Is the file encrypted? If is not set is assumed the file is not encrypted
»»»»» encryptionModestringfalsenoneEncryption mode used. Just valid if encrypted=true
»»»» licensenumbertruenoneShort name referencing the license of the asset (e.g. Public Domain, CC-0, CC-BY, No License Specified, etc.). If it's not specified, the following value will be added: "No License Specified
»»»» namestringtruenoneDescriptive name or title of the asset
»»»» pricestringtruenonePrice of the asset. It must be an integer encoded as a string, e.g. "123000000000000000000"
»»»» typestringtruenoneType of the asset. Helps to filter by the type of asset. It could be for example ("dataset", "algorithm")
»»»» algorithmAlgorithmDtotruenoneAlgorithm used in the asset
»»»»» languagestringfalsenoneLanguage used to implement the software
»»»»» formatstringfalsenonePackaging format of the software
»»»»» versionstringfalsenoneVersion of the software
»»»»» container[ContainerDto]truenoneObject describing the Docker container image
»»»»»» entrypointstringfalsenoneThe command to execute, or script to run inside the Docker image
»»»»»» imagestringfalsenoneName of the Docker image
»»»»»» tagstringfalsenoneTag of the Docker image
»»» serviceAgreementTemplateServiceAgreementTemplateDtofalsenoneService agreement template
»»»» conditionDependency[ConditionDependencyDto]truenonenone
»»»»» access[string]truenoneAccess
»»»»» escrowPayment[string]truenoneEscrow Payment
»»»»» execCompute[string]truenoneExec Compute
»»»»» lockPayment[string]truenoneLock Payment
»»»» conditions[ConditionDto]truenoneConditions
»»»»» contractNamestringtruenoneContract name
»»»»» functionNamestringtruenoneFunction name
»»»»» namestringtruenoneFunction name
»»»»» events[EventDto]truenoneEvents
»»»»»» actionTypestringtruenoneAction Type
»»»»»» handlerHandlerDtotruenoneHandler event
»»»»»»» functionNamestringtruenoneFunction name
»»»»»»» moduleNamestringtruenoneModule name
»»»»»»» versionstringtruenoneVersion of the handler
»»»»»» namestringtruenoneName of the event
»»»»» parameters[ParameterDto]truenoneParameters
»»»»»» namestringtruenoneParameter name
»»»»»» typestringtruenoneParameter type
»»»»»» valueobjecttruenoneParameter value
»»»»» timelocknumbertruenoneTime lock
»»»»» timeoutnumbertruenoneTime out
»»»» contractNamenumbertruenoneContract Name
»»»» events[EventDto]truenoneEvents
»»»» fulfillmentOrderstringfalsenoneFulfillment order

AssetController_getDDO

Code samples

# You can also use wget
curl -X GET /api/v1/metadata/assets/ddo/{did} \
-H 'Accept: application/json'

GET /api/v1/metadata/assets/ddo/{did} HTTP/1.1

Accept: application/json


const headers = {
'Accept':'application/json'
};

fetch('/api/v1/metadata/assets/ddo/{did}',
{
method: 'GET',

headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});

require 'rest-client'
require 'json'

headers = {
'Accept' => 'application/json'
}

result = RestClient.get '/api/v1/metadata/assets/ddo/{did}',
params: {
}, headers: headers

p JSON.parse(result)

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('/api/v1/metadata/assets/ddo/{did}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
$response = $client->request('GET','/api/v1/metadata/assets/ddo/{did}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}

// ...

URL obj = new URL("/api/v1/metadata/assets/ddo/{did}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
"bytes"
"net/http"
)

func main() {

headers := map[string][]string{
"Accept": []string{"application/json"},
}

data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/api/v1/metadata/assets/ddo/{did}", data)
req.Header = headers

client := &http.Client{}
resp, err := client.Do(req)
// ...
}

GET /api/v1/metadata/assets/ddo/{did}

Get DDO of a particular asset

Parameters

NameInTypeRequiredDescription
didpathstringtruenone

Example responses

200 Response

{
"@context": "https://w3id.org/did/v1",
"authentication": [
{
"publicKey": "did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"type": "RsaSignatureAuthentication2018"
}
],
"created": "2021-02-01T10:55:11Z",
"updated": "2021-02-01T10:55:11Z",
"id": "did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e429",
"proof": {
"created": "2022-01-08T16:02:20Z",
"creator": "2022-01-08T16:02:20Z",
"signatureValue": "0xbd7b46b3ac664167bc70ac211b1a1da0baed9ead91613a5f02dfc25c1bb6e3ff40861b455017e8a587fd4e37b703436072598c3a81ec88be28bfe33b61554a471b",
"type": "DDOIntegritySignature"
},
"publicKey": [
{
"id": "did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"owner": "0x00Bd138aBD70e2F00903268F3Db08f2D25677C9e",
"type": "EthereumECDSAKey"
}
],
"service": [
{
"index": 0,
"service": "SecretStore",
"serviceEndpoint": "http://localhost:12001",
"type": "authorization"
},
{
"index": 1,
"purchaseEndpoint": "http://localhost:8030/api/v1/node/services/access/initialize",
"serviceEndpoint": "http://localhost:8030/api/v1/node/services/consume",
"type": "access"
},
{
"attributes": {
"additionalInformation": {
"copyrightHolder": "Met Office",
"description": "Weather information of UK including temperature and humidity",
"inLanguage": "en",
"links": [
{
"name": "Sample of Asset Data",
"type": "sample",
"url": "https://foo.com/sample.csv"
}
],
"tags": [
"weather",
"uk",
"2011",
"temperature",
"humidity"
],
"workExample": "stationId,latitude,longitude,datetime, temperature,humidity/n423432fsd,51.509865,-0.118092, 2011-01-01T10:55:11+00:00,7.2,68"
},
"curation": {
"numVotes": 123,
"rating": 0.93,
"schema": "Binary Voting"
},
"main": {
"author": "Met Office",
"dateCreated": "2012-02-01T10:55:11Z",
"encryptedFiles": "0x098213xzckasdf089723hjgdasfkjgasfv",
"files": [
{
"compression": "zip",
"contentLength": "4535431",
"contentType": "text/csv",
"encoding": "UTF-8",
"index": 0,
"resourceId": "access-log2018-02-13-15-17-29-18386C502CAEA932"
}
],
"license": "CC-BY",
"name": "UK Weather information 2011",
"price": "10",
"type": "dataset"
}
},
"index": 2,
"serviceEndpoint": "http://mymetadata.org/api/v1/provider/assets/metadata/did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"type": "metadata"
}
]
}

Responses

StatusMeaningDescriptionSchema
200OKGet a DDOGetAssetDto
404Not FoundNot foundNone

AssetController_updateDDO

Code samples

# You can also use wget
curl -X PUT /api/v1/metadata/assets/ddo/{did} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'

PUT /api/v1/metadata/assets/ddo/{did} HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
"@context": "https://w3id.org/did/v1",
"updated": "2019-02-08T08:13:49Z",
"authentication": [
{
"publicKey": "did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"type": "RsaSignatureAuthentication2018"
}
],
"proof": {
"created": "2022-01-08T16:02:20Z",
"creator": "2022-01-08T16:02:20Z",
"signatureValue": "0xbd7b46b3ac664167bc70ac211b1a1da0baed9ead91613a5f02dfc25c1bb6e3ff40861b455017e8a587fd4e37b703436072598c3a81ec88be28bfe33b61554a471b",
"type": "DDOIntegritySignature"
},
"publicKey": [
{
"id": "did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"owner": "0x00Bd138aBD70e2F00903268F3Db08f2D25677C9e",
"type": "EthereumECDSAKey"
}
],
"service": [
{
"index": 0,
"service": "SecretStore",
"serviceEndpoint": "http://localhost:12001",
"type": "authorization"
},
{
"index": 1,
"purchaseEndpoint": "http://localhost:8030/api/v1/node/services/access/initialize",
"serviceEndpoint": "http://localhost:8030/api/v1/node/services/consume",
"type": "access"
},
{
"attributes": {
"additionalInformation": {
"copyrightHolder": "Met Office",
"description": "Weather information of UK including temperature and humidity",
"inLanguage": "en",
"links": [
{
"name": "Sample of Asset Data",
"type": "sample",
"url": "https://foo.com/sample.csv"
}
],
"tags": [
"weather",
"uk",
"2011",
"temperature",
"humidity"
],
"workExample": "stationId,latitude,longitude,datetime, temperature,humidity/n423432fsd,51.509865,-0.118092, 2011-01-01T10:55:11+00:00,7.2,68"
},
"curation": {
"numVotes": 123,
"rating": 0.93,
"schema": "Binary Voting"
},
"main": {
"author": "Met Office",
"dateCreated": "2012-02-01T10:55:11Z",
"encryptedFiles": "0x098213xzckasdf089723hjgdasfkjgasfv",
"files": [
{
"compression": "zip",
"contentLength": "4535431",
"contentType": "text/csv",
"encoding": "UTF-8",
"index": 0,
"resourceId": "access-log2018-02-13-15-17-29-18386C502CAEA932"
}
],
"license": "CC-BY",
"name": "UK Weather information 2011",
"price": "10",
"type": "dataset"
}
},
"index": 2,
"serviceEndpoint": "http://mymetadata.org/api/v1/provider/assets/metadata/did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"type": "metadata"
}
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};

fetch('/api/v1/metadata/assets/ddo/{did}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});

require 'rest-client'
require 'json'

headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}

result = RestClient.put '/api/v1/metadata/assets/ddo/{did}',
params: {
}, headers: headers

p JSON.parse(result)

import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}

r = requests.put('/api/v1/metadata/assets/ddo/{did}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
$response = $client->request('PUT','/api/v1/metadata/assets/ddo/{did}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}

// ...

URL obj = new URL("/api/v1/metadata/assets/ddo/{did}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
"bytes"
"net/http"
)

func main() {

headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
}

data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "/api/v1/metadata/assets/ddo/{did}", data)
req.Header = headers

client := &http.Client{}
resp, err := client.Do(req)
// ...
}

PUT /api/v1/metadata/assets/ddo/{did}

Update DDO of an existing asset

Body parameter

{
"@context": "https://w3id.org/did/v1",
"updated": "2019-02-08T08:13:49Z",
"authentication": [
{
"publicKey": "did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"type": "RsaSignatureAuthentication2018"
}
],
"proof": {
"created": "2022-01-08T16:02:20Z",
"creator": "2022-01-08T16:02:20Z",
"signatureValue": "0xbd7b46b3ac664167bc70ac211b1a1da0baed9ead91613a5f02dfc25c1bb6e3ff40861b455017e8a587fd4e37b703436072598c3a81ec88be28bfe33b61554a471b",
"type": "DDOIntegritySignature"
},
"publicKey": [
{
"id": "did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"owner": "0x00Bd138aBD70e2F00903268F3Db08f2D25677C9e",
"type": "EthereumECDSAKey"
}
],
"service": [
{
"index": 0,
"service": "SecretStore",
"serviceEndpoint": "http://localhost:12001",
"type": "authorization"
},
{
"index": 1,
"purchaseEndpoint": "http://localhost:8030/api/v1/node/services/access/initialize",
"serviceEndpoint": "http://localhost:8030/api/v1/node/services/consume",
"type": "access"
},
{
"attributes": {
"additionalInformation": {
"copyrightHolder": "Met Office",
"description": "Weather information of UK including temperature and humidity",
"inLanguage": "en",
"links": [
{
"name": "Sample of Asset Data",
"type": "sample",
"url": "https://foo.com/sample.csv"
}
],
"tags": [
"weather",
"uk",
"2011",
"temperature",
"humidity"
],
"workExample": "stationId,latitude,longitude,datetime, temperature,humidity/n423432fsd,51.509865,-0.118092, 2011-01-01T10:55:11+00:00,7.2,68"
},
"curation": {
"numVotes": 123,
"rating": 0.93,
"schema": "Binary Voting"
},
"main": {
"author": "Met Office",
"dateCreated": "2012-02-01T10:55:11Z",
"encryptedFiles": "0x098213xzckasdf089723hjgdasfkjgasfv",
"files": [
{
"compression": "zip",
"contentLength": "4535431",
"contentType": "text/csv",
"encoding": "UTF-8",
"index": 0,
"resourceId": "access-log2018-02-13-15-17-29-18386C502CAEA932"
}
],
"license": "CC-BY",
"name": "UK Weather information 2011",
"price": "10",
"type": "dataset"
}
},
"index": 2,
"serviceEndpoint": "http://mymetadata.org/api/v1/provider/assets/metadata/did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"type": "metadata"
}
]
}

Parameters

NameInTypeRequiredDescription
didpathstringtruenone
bodybodyUpdateAssetDtotruenone

Example responses

200 Response

{
"@context": "https://w3id.org/did/v1",
"authentication": [
{
"publicKey": "did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"type": "RsaSignatureAuthentication2018"
}
],
"created": "2021-02-01T10:55:11Z",
"updated": "2021-02-01T10:55:11Z",
"id": "did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e429",
"proof": {
"created": "2022-01-08T16:02:20Z",
"creator": "2022-01-08T16:02:20Z",
"signatureValue": "0xbd7b46b3ac664167bc70ac211b1a1da0baed9ead91613a5f02dfc25c1bb6e3ff40861b455017e8a587fd4e37b703436072598c3a81ec88be28bfe33b61554a471b",
"type": "DDOIntegritySignature"
},
"publicKey": [
{
"id": "did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"owner": "0x00Bd138aBD70e2F00903268F3Db08f2D25677C9e",
"type": "EthereumECDSAKey"
}
],
"service": [
{
"index": 0,
"service": "SecretStore",
"serviceEndpoint": "http://localhost:12001",
"type": "authorization"
},
{
"index": 1,
"purchaseEndpoint": "http://localhost:8030/api/v1/node/services/access/initialize",
"serviceEndpoint": "http://localhost:8030/api/v1/node/services/consume",
"type": "access"
},
{
"attributes": {
"additionalInformation": {
"copyrightHolder": "Met Office",
"description": "Weather information of UK including temperature and humidity",
"inLanguage": "en",
"links": [
{
"name": "Sample of Asset Data",
"type": "sample",
"url": "https://foo.com/sample.csv"
}
],
"tags": [
"weather",
"uk",
"2011",
"temperature",
"humidity"
],
"workExample": "stationId,latitude,longitude,datetime, temperature,humidity/n423432fsd,51.509865,-0.118092, 2011-01-01T10:55:11+00:00,7.2,68"
},
"curation": {
"numVotes": 123,
"rating": 0.93,
"schema": "Binary Voting"
},
"main": {
"author": "Met Office",
"dateCreated": "2012-02-01T10:55:11Z",
"encryptedFiles": "0x098213xzckasdf089723hjgdasfkjgasfv",
"files": [
{
"compression": "zip",
"contentLength": "4535431",
"contentType": "text/csv",
"encoding": "UTF-8",
"index": 0,
"resourceId": "access-log2018-02-13-15-17-29-18386C502CAEA932"
}
],
"license": "CC-BY",
"name": "UK Weather information 2011",
"price": "10",
"type": "dataset"
}
},
"index": 2,
"serviceEndpoint": "http://mymetadata.org/api/v1/provider/assets/metadata/did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"type": "metadata"
}
]
}

Responses

StatusMeaningDescriptionSchema
200OKGet a updated DDOGetAssetDto
403ForbiddenBad RequestNone
404Not FoundNot foundNone

AssetController_deleteDDO

Code samples

# You can also use wget
curl -X DELETE /api/v1/metadata/assets/ddo/{did}

DELETE /api/v1/metadata/assets/ddo/{did} HTTP/1.1


fetch('/api/v1/metadata/assets/ddo/{did}',
{
method: 'DELETE'

})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});

require 'rest-client'
require 'json'

result = RestClient.delete '/api/v1/metadata/assets/ddo/{did}',
params: {
}

p JSON.parse(result)

import requests

r = requests.delete('/api/v1/metadata/assets/ddo/{did}')

print(r.json())

<?php

require 'vendor/autoload.php';

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
$response = $client->request('DELETE','/api/v1/metadata/assets/ddo/{did}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}

// ...

URL obj = new URL("/api/v1/metadata/assets/ddo/{did}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
"bytes"
"net/http"
)

func main() {

data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "/api/v1/metadata/assets/ddo/{did}", data)
req.Header = headers

client := &http.Client{}
resp, err := client.Do(req)
// ...
}

DELETE /api/v1/metadata/assets/ddo/{did}

Parameters

NameInTypeRequiredDescription
didpathstringtruenone

Responses

StatusMeaningDescriptionSchema
200OKDeleted DDONone
404Not FoundNot foundNone
defaultDefaultRetire metadata of an assetNone

AssetController_getDDOMetadata

Code samples

# You can also use wget
curl -X GET /api/v1/metadata/assets/metadata/{did} \
-H 'Accept: application/json'

GET /api/v1/metadata/assets/metadata/{did} HTTP/1.1

Accept: application/json


const headers = {
'Accept':'application/json'
};

fetch('/api/v1/metadata/assets/metadata/{did}',
{
method: 'GET',

headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});

require 'rest-client'
require 'json'

headers = {
'Accept' => 'application/json'
}

result = RestClient.get '/api/v1/metadata/assets/metadata/{did}',
params: {
}, headers: headers

p JSON.parse(result)

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('/api/v1/metadata/assets/metadata/{did}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
$response = $client->request('GET','/api/v1/metadata/assets/metadata/{did}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}

// ...

URL obj = new URL("/api/v1/metadata/assets/metadata/{did}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
"bytes"
"net/http"
)

func main() {

headers := map[string][]string{
"Accept": []string{"application/json"},
}

data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/api/v1/metadata/assets/metadata/{did}", data)
req.Header = headers

client := &http.Client{}
resp, err := client.Do(req)
// ...
}

GET /api/v1/metadata/assets/metadata/{did}

Parameters

NameInTypeRequiredDescription
didpathstringtruenone

Example responses

200 Response

{
"additionalInformation": {},
"curation": {
"numVotes": 123,
"rating": 0.93,
"schema": "Binary Voting",
"isListed": false
},
"main": {
"author": "Met Office",
"dateCreated": "2021-02-01T10:55:11Z",
"datePublished": "2021-02-01T10:55:11Z",
"encryptedFiles": "0x098213xzckasdf089723hjgdasfkjgasfv",
"files": [
{
"checksum": "efb2c764274b745f5fc37f97c6b0e761",
"url": "https://raw.githubusercontent.com/tbertinmahieux/MSongsDB/master/Tasks_Demos/CoverSongs/shs_dataset_test.txt",
"checksumType": "md5",
"name": "data.txt",
"compression": "zip",
"contentLength": "4535431",
"contentType": "text/csv",
"encoding": "UTF-8",
"index": 0,
"resourceId": "access-log2018-02-13-15-17-29-18386C502CAEA932",
"encryption": "dtp"
}
],
"license": "CC-BY",
"name": "UK Weather information 2011",
"price": "10",
"type": "dataset",
"algorithm": {
"language": "scala",
"format": "docker-image",
"version": "0.1",
"container": [
{
"entrypoint": "node $ALGO",
"image": "node",
"tag": "10"
}
]
}
},
"serviceAgreementTemplate": {
"conditionDependency": [
{
"access": [],
"escrowPayment": [
"lockPayment",
"access"
],
"execCompute": [],
"lockPayment": []
}
],
"conditions": [
{
"contractName": "LockPaymentCondition",
"functionName": "fulfill",
"name": "lockPayment",
"events": [
{
"actionType": "publisher",
"handler": {
"functionName": "fulfill",
"moduleName": "lockPaymentConditon",
"version": "0.1"
},
"name": "Fulfilled"
}
],
"parameters": [
{
"name": "_rewardAddress",
"type": "address",
"value": "0x886dE2b3F8F27eEd43bA2FD4bC2AabDc14E0d9dD"
}
],
"timelock": 0,
"timeout": 0
}
],
"contractName": "EscrowAccessSecretStoreTemplate",
"events": [
{
"actionType": "publisher",
"handler": {
"functionName": "fulfill",
"moduleName": "lockPaymentConditon",
"version": "0.1"
},
"name": "Fulfilled"
}
],
"fulfillmentOrder": [
"lockPayment.fulfill",
"access.fulfill",
"escrowPayment.fulfill"
]
}
}

Responses

StatusMeaningDescriptionSchema
200OKGet a metadata from assetAttributesDto
404Not FoundNot foundNone
defaultDefaultGet metadata of a particular assetNone

Bookmark

BookmarkController_createBookmark

Code samples

# You can also use wget
curl -X POST /api/v1/ugc/bookmarks \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'

POST /api/v1/ugc/bookmarks HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
"did": "did:12345",
"userId": "u-12345",
"description": "I am interesting in this asset"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};

fetch('/api/v1/ugc/bookmarks',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});

require 'rest-client'
require 'json'

headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}

result = RestClient.post '/api/v1/ugc/bookmarks',
params: {
}, headers: headers

p JSON.parse(result)

import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}

r = requests.post('/api/v1/ugc/bookmarks', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
$response = $client->request('POST','/api/v1/ugc/bookmarks', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}

// ...

URL obj = new URL("/api/v1/ugc/bookmarks");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
"bytes"
"net/http"
)

func main() {

headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
}

data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/api/v1/ugc/bookmarks", data)
req.Header = headers

client := &http.Client{}
resp, err := client.Do(req)
// ...
}

POST /api/v1/ugc/bookmarks

Create a bookmark entry

Body parameter

{
"did": "did:12345",
"userId": "u-12345",
"description": "I am interesting in this asset"
}

Parameters

NameInTypeRequiredDescription
bodybodyCreateBookmarkDtotruenone

Example responses

201 Response

{
"id": "b-123434",
"did": "did:12345",
"userId": "u-12345",
"description": "I am interesting in this asset",
"createdAt": "2022-03-18T13:44:00.931Z"
}

Responses

StatusMeaningDescriptionSchema
201CreatedBookmark is createdGetBookmarkDto
403ForbiddenBad RequestNone

BookmarkController_getBookmarkById

Code samples

# You can also use wget
curl -X GET /api/v1/ugc/bookmarks/{id} \
-H 'Accept: application/json'

GET /api/v1/ugc/bookmarks/{id} HTTP/1.1

Accept: application/json


const headers = {
'Accept':'application/json'
};

fetch('/api/v1/ugc/bookmarks/{id}',
{
method: 'GET',

headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});

require 'rest-client'
require 'json'

headers = {
'Accept' => 'application/json'
}

result = RestClient.get '/api/v1/ugc/bookmarks/{id}',
params: {
}, headers: headers

p JSON.parse(result)

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('/api/v1/ugc/bookmarks/{id}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
$response = $client->request('GET','/api/v1/ugc/bookmarks/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}

// ...

URL obj = new URL("/api/v1/ugc/bookmarks/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
"bytes"
"net/http"
)

func main() {

headers := map[string][]string{
"Accept": []string{"application/json"},
}

data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/api/v1/ugc/bookmarks/{id}", data)
req.Header = headers

client := &http.Client{}
resp, err := client.Do(req)
// ...
}

GET /api/v1/ugc/bookmarks/{id}

Get a bookmark entry

Parameters

NameInTypeRequiredDescription
idpathstringtruenone

Example responses

200 Response

{
"id": "b-123434",
"did": "did:12345",
"userId": "u-12345",
"description": "I am interesting in this asset",
"createdAt": "2022-03-18T13:44:00.931Z"
}

Responses

StatusMeaningDescriptionSchema
200OKReturn a bookmark userGetBookmarkDto
404Not FoundNot foundNone

BookmarkController_updateBookmarkById

Code samples

# You can also use wget
curl -X PUT /api/v1/ugc/bookmarks/{id} \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'

PUT /api/v1/ugc/bookmarks/{id} HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
"description": "I am interesting in this asset"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};

fetch('/api/v1/ugc/bookmarks/{id}',
{
method: 'PUT',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});

require 'rest-client'
require 'json'

headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}

result = RestClient.put '/api/v1/ugc/bookmarks/{id}',
params: {
}, headers: headers

p JSON.parse(result)

import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}

r = requests.put('/api/v1/ugc/bookmarks/{id}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
$response = $client->request('PUT','/api/v1/ugc/bookmarks/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}

// ...

URL obj = new URL("/api/v1/ugc/bookmarks/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
"bytes"
"net/http"
)

func main() {

headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
}

data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("PUT", "/api/v1/ugc/bookmarks/{id}", data)
req.Header = headers

client := &http.Client{}
resp, err := client.Do(req)
// ...
}

PUT /api/v1/ugc/bookmarks/{id}

Update an existing bookmark

Body parameter

{
"description": "I am interesting in this asset"
}

Parameters

NameInTypeRequiredDescription
idpathstringtruenone
bodybodyUpdateBookmarkDtotruenone

Example responses

200 Response

{
"id": "b-123434",
"did": "did:12345",
"userId": "u-12345",
"description": "I am interesting in this asset",
"createdAt": "2022-03-18T13:44:00.931Z"
}

Responses

StatusMeaningDescriptionSchema
200OKReturn a updated bookmarkGetBookmarkDto
403ForbiddenBad RequestNone
404Not FoundNot foundNone

BookmarkController_deleteBookmarkById

Code samples

# You can also use wget
curl -X DELETE /api/v1/ugc/bookmarks/{id}

DELETE /api/v1/ugc/bookmarks/{id} HTTP/1.1


fetch('/api/v1/ugc/bookmarks/{id}',
{
method: 'DELETE'

})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});

require 'rest-client'
require 'json'

result = RestClient.delete '/api/v1/ugc/bookmarks/{id}',
params: {
}

p JSON.parse(result)

import requests

r = requests.delete('/api/v1/ugc/bookmarks/{id}')

print(r.json())

<?php

require 'vendor/autoload.php';

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
$response = $client->request('DELETE','/api/v1/ugc/bookmarks/{id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}

// ...

URL obj = new URL("/api/v1/ugc/bookmarks/{id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
"bytes"
"net/http"
)

func main() {

data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "/api/v1/ugc/bookmarks/{id}", data)
req.Header = headers

client := &http.Client{}
resp, err := client.Do(req)
// ...
}

DELETE /api/v1/ugc/bookmarks/{id}

Delete a bookmark

Parameters

NameInTypeRequiredDescription
idpathstringtruenone

Responses

StatusMeaningDescriptionSchema
200OKreturn bookmark deletedNone
404Not FoundNot foundNone

BookmarkController_getBookmarksByUserId

Code samples

# You can also use wget
curl -X GET /api/v1/ugc/bookmarks/user/{userId} \
-H 'Accept: application/json'

GET /api/v1/ugc/bookmarks/user/{userId} HTTP/1.1

Accept: application/json


const headers = {
'Accept':'application/json'
};

fetch('/api/v1/ugc/bookmarks/user/{userId}',
{
method: 'GET',

headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});

require 'rest-client'
require 'json'

headers = {
'Accept' => 'application/json'
}

result = RestClient.get '/api/v1/ugc/bookmarks/user/{userId}',
params: {
}, headers: headers

p JSON.parse(result)

import requests
headers = {
'Accept': 'application/json'
}

r = requests.get('/api/v1/ugc/bookmarks/user/{userId}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
$response = $client->request('GET','/api/v1/ugc/bookmarks/user/{userId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}

// ...

URL obj = new URL("/api/v1/ugc/bookmarks/user/{userId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
"bytes"
"net/http"
)

func main() {

headers := map[string][]string{
"Accept": []string{"application/json"},
}

data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/api/v1/ugc/bookmarks/user/{userId}", data)
req.Header = headers

client := &http.Client{}
resp, err := client.Do(req)
// ...
}

GET /api/v1/ugc/bookmarks/user/{userId}

Get all the user bookmarks

Parameters

NameInTypeRequiredDescription
userIdpathstringtruenone
queryquerystringfalseexecute directly queries to elasticsearch from the client
textquerystringfalseText to search
offsetquerystringfalsePage Size
pagequerystringfalsePage to retrieve
sortquerystringfalsesort the response by specified parameter

Example responses

200 Response

[
{
"id": "b-123434",
"did": "did:12345",
"userId": "u-12345",
"description": "I am interesting in this asset",
"createdAt": "2022-03-18T13:44:00.931Z"
}
]

Responses

StatusMeaningDescriptionSchema
200OKReturn all bookmark from a userInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
anonymous[GetBookmarkDto]falsenonenone
» idstringtruenoneThe identifier of the bookmark
» didstringtruenoneThe identifier of the asset
» userIdstringtruenoneThe userId who created the bookmark
» descriptionstringtruenoneDescription given by the user
» createdAtstring(date-time)truenoneWhen the UGC was created

Schemas

AuthenticationDto

{
"publicKey": "did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"type": "RsaSignatureAuthentication2018"
}

Properties

NameTypeRequiredRestrictionsDescription
publicKeystringtruenonePublic key of ddo
typestringtruenoneType of the signature

ProofDto

{
"created": "2022-01-08T16:02:20Z",
"creator": "2022-01-08T16:02:20Z",
"signatureValue": "0xbd7b46b3ac664167bc70ac211b1a1da0baed9ead91613a5f02dfc25c1bb6e3ff40861b455017e8a587fd4e37b703436072598c3a81ec88be28bfe33b61554a471b",
"type": "DDOIntegritySignature"
}

Properties

NameTypeRequiredRestrictionsDescription
createdstringtruenoneDate of the proof
creatorstringtruenoneWallet address who created the proof signature
signatureValuestringtruenoneValue of the signature
typestringtruenoneType of the proof

PublicKeyDto

{
"id": "did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"owner": "0x00Bd138aBD70e2F00903268F3Db08f2D25677C9e",
"type": "EthereumECDSAKey"
}

Properties

NameTypeRequiredRestrictionsDescription
idstringtruenoneId of the public key
ownerstringtruenoneWallet address who own the public key
typestringtruenoneType of the public key

CurationDto

{
"numVotes": 123,
"rating": 0.93,
"schema": "Binary Voting",
"isListed": false
}

Properties

NameTypeRequiredRestrictionsDescription
numVotesnumbertruenoneNumber of votes. 0 is the default value
ratingnumbertruenoneDecimal value between 0 and 1. 0 is the default value
schemastringfalsenoneSchema applied to calculate the rating
isListedbooleanfalsenoneFlag unsuitable content. False by default. If it's true, the content must not be returned

FileDto

{
"checksum": "efb2c764274b745f5fc37f97c6b0e761",
"url": "https://raw.githubusercontent.com/tbertinmahieux/MSongsDB/master/Tasks_Demos/CoverSongs/shs_dataset_test.txt",
"checksumType": "md5",
"name": "data.txt",
"compression": "zip",
"contentLength": "4535431",
"contentType": "text/csv",
"encoding": "UTF-8",
"index": 0,
"resourceId": "access-log2018-02-13-15-17-29-18386C502CAEA932",
"encryption": "dtp"
}

Properties

NameTypeRequiredRestrictionsDescription
checksumstringfalsenoneChecksum of the file using your preferred format (i.e. MD5). Format specified in checksumType.If it's not provided can't be validated if the file was not modified after registering
urlstringfalsenoneContent URL. Omitted from the remote metadata. Supports http(s):// and ipfs:// URLs
checksumTypestringfalsenoneFormat of the provided checksum. Can vary according to server (i.e Amazon vs. Azure)
namestringfalsenoneFile name
compressionstringfalsenoneFile compression (e.g. no, gzip, bzip2, etc)
contentLengthstringfalsenoneSize of the file in bytes
contentTypestringtruenoneFile format
encodingstringfalsenoneFile encoding (e.g. UTF-8)
indexnumbertruenoneIndex of the file
resourceIdstringfalsenoneRemote identifier of the file in the external provider. It is typically the remote id in the cloud provider
encryptedbooleanfalsenoneBoolean. Is the file encrypted? If is not set is assumed the file is not encrypted
encryptionModestringfalsenoneEncryption mode used. Just valid if encrypted=true

ContainerDto

{
"entrypoint": "node $ALGO",
"image": "node",
"tag": "10"
}

Properties

NameTypeRequiredRestrictionsDescription
entrypointstringfalsenoneThe command to execute, or script to run inside the Docker image
imagestringfalsenoneName of the Docker image
tagstringfalsenoneTag of the Docker image

AlgorithmDto

{
"language": "scala",
"format": "docker-image",
"version": "0.1",
"container": [
{
"entrypoint": "node $ALGO",
"image": "node",
"tag": "10"
}
]
}

Properties

NameTypeRequiredRestrictionsDescription
languagestringfalsenoneLanguage used to implement the software
formatstringfalsenonePackaging format of the software
versionstringfalsenoneVersion of the software
container[ContainerDto]truenoneObject describing the Docker container image

MainDto

{
"author": "Met Office",
"dateCreated": "2021-02-01T10:55:11Z",
"datePublished": "2021-02-01T10:55:11Z",
"encryptedFiles": "0x098213xzckasdf089723hjgdasfkjgasfv",
"files": [
{
"checksum": "efb2c764274b745f5fc37f97c6b0e761",
"url": "https://raw.githubusercontent.com/tbertinmahieux/MSongsDB/master/Tasks_Demos/CoverSongs/shs_dataset_test.txt",
"checksumType": "md5",
"name": "data.txt",
"compression": "zip",
"contentLength": "4535431",
"contentType": "text/csv",
"encoding": "UTF-8",
"index": 0,
"resourceId": "access-log2018-02-13-15-17-29-18386C502CAEA932",
"encryption": "dtp"
}
],
"license": "CC-BY",
"name": "UK Weather information 2011",
"price": "10",
"type": "dataset",
"algorithm": {
"language": "scala",
"format": "docker-image",
"version": "0.1",
"container": [
{
"entrypoint": "node $ALGO",
"image": "node",
"tag": "10"
}
]
}
}

Properties

NameTypeRequiredRestrictionsDescription
authorstringtruenoneName of the entity generating this data (e.g. Tfl, Disney Corp, etc.)
dateCreatedstringtruenoneThe date on which the asset was created by the originator.ISO 8601 format, Coordinated Universal Time, e.g. 2019-01-31T08:38:32Z
datePublishedstringfalsenoneThe date on which the asset DDO is registered into the metadata store
encryptedFilesstringtruenonefiles encrytion signature
files[FileDto]truenoneArray of File objects including the encrypted file urls. Further metadata about each file is stored
licensenumbertruenoneShort name referencing the license of the asset (e.g. Public Domain, CC-0, CC-BY, No License Specified, etc.). If it's not specified, the following value will be added: "No License Specified
namestringtruenoneDescriptive name or title of the asset
pricestringtruenonePrice of the asset. It must be an integer encoded as a string, e.g. "123000000000000000000"
typestringtruenoneType of the asset. Helps to filter by the type of asset. It could be for example ("dataset", "algorithm")
algorithmAlgorithmDtotruenoneAlgorithm used in the asset

ConditionDependencyDto

{
"access": [],
"escrowPayment": [
"lockPayment",
"access"
],
"execCompute": [],
"lockPayment": []
}

Properties

NameTypeRequiredRestrictionsDescription
access[string]truenoneAccess
escrowPayment[string]truenoneEscrow Payment
execCompute[string]truenoneExec Compute
lockPayment[string]truenoneLock Payment

HandlerDto

{
"functionName": "fulfill",
"moduleName": "lockPaymentConditon",
"version": "0.1"
}

Properties

NameTypeRequiredRestrictionsDescription
functionNamestringtruenoneFunction name
moduleNamestringtruenoneModule name
versionstringtruenoneVersion of the handler

EventDto

{
"actionType": "publisher",
"handler": {
"functionName": "fulfill",
"moduleName": "lockPaymentConditon",
"version": "0.1"
},
"name": "Fulfilled"
}

Properties

NameTypeRequiredRestrictionsDescription
actionTypestringtruenoneAction Type
handlerHandlerDtotruenoneHandler event
namestringtruenoneName of the event

ParameterDto

{
"name": "_rewardAddress",
"type": "address",
"value": "0x886dE2b3F8F27eEd43bA2FD4bC2AabDc14E0d9dD"
}

Properties

NameTypeRequiredRestrictionsDescription
namestringtruenoneParameter name
typestringtruenoneParameter type
valueobjecttruenoneParameter value

ConditionDto

{
"contractName": "LockPaymentCondition",
"functionName": "fulfill",
"name": "lockPayment",
"events": [
{
"actionType": "publisher",
"handler": {
"functionName": "fulfill",
"moduleName": "lockPaymentConditon",
"version": "0.1"
},
"name": "Fulfilled"
}
],
"parameters": [
{
"name": "_rewardAddress",
"type": "address",
"value": "0x886dE2b3F8F27eEd43bA2FD4bC2AabDc14E0d9dD"
}
],
"timelock": 0,
"timeout": 0
}

Properties

NameTypeRequiredRestrictionsDescription
contractNamestringtruenoneContract name
functionNamestringtruenoneFunction name
namestringtruenoneFunction name
events[EventDto]truenoneEvents
parameters[ParameterDto]truenoneParameters
timelocknumbertruenoneTime lock
timeoutnumbertruenoneTime out

ServiceAgreementTemplateDto

{
"conditionDependency": [
{
"access": [],
"escrowPayment": [
"lockPayment",
"access"
],
"execCompute": [],
"lockPayment": []
}
],
"conditions": [
{
"contractName": "LockPaymentCondition",
"functionName": "fulfill",
"name": "lockPayment",
"events": [
{
"actionType": "publisher",
"handler": {
"functionName": "fulfill",
"moduleName": "lockPaymentConditon",
"version": "0.1"
},
"name": "Fulfilled"
}
],
"parameters": [
{
"name": "_rewardAddress",
"type": "address",
"value": "0x886dE2b3F8F27eEd43bA2FD4bC2AabDc14E0d9dD"
}
],
"timelock": 0,
"timeout": 0
}
],
"contractName": "EscrowAccessSecretStoreTemplate",
"events": [
{
"actionType": "publisher",
"handler": {
"functionName": "fulfill",
"moduleName": "lockPaymentConditon",
"version": "0.1"
},
"name": "Fulfilled"
}
],
"fulfillmentOrder": [
"lockPayment.fulfill",
"access.fulfill",
"escrowPayment.fulfill"
]
}

Properties

NameTypeRequiredRestrictionsDescription
conditionDependency[ConditionDependencyDto]truenonenone
conditions[ConditionDto]truenoneConditions
contractNamenumbertruenoneContract Name
events[EventDto]truenoneEvents
fulfillmentOrderstringfalsenoneFulfillment order

AttributesDto

{
"additionalInformation": {},
"curation": {
"numVotes": 123,
"rating": 0.93,
"schema": "Binary Voting",
"isListed": false
},
"main": {
"author": "Met Office",
"dateCreated": "2021-02-01T10:55:11Z",
"datePublished": "2021-02-01T10:55:11Z",
"encryptedFiles": "0x098213xzckasdf089723hjgdasfkjgasfv",
"files": [
{
"checksum": "efb2c764274b745f5fc37f97c6b0e761",
"url": "https://raw.githubusercontent.com/tbertinmahieux/MSongsDB/master/Tasks_Demos/CoverSongs/shs_dataset_test.txt",
"checksumType": "md5",
"name": "data.txt",
"compression": "zip",
"contentLength": "4535431",
"contentType": "text/csv",
"encoding": "UTF-8",
"index": 0,
"resourceId": "access-log2018-02-13-15-17-29-18386C502CAEA932",
"encryption": "dtp"
}
],
"license": "CC-BY",
"name": "UK Weather information 2011",
"price": "10",
"type": "dataset",
"algorithm": {
"language": "scala",
"format": "docker-image",
"version": "0.1",
"container": [
{
"entrypoint": "node $ALGO",
"image": "node",
"tag": "10"
}
]
}
},
"serviceAgreementTemplate": {
"conditionDependency": [
{
"access": [],
"escrowPayment": [
"lockPayment",
"access"
],
"execCompute": [],
"lockPayment": []
}
],
"conditions": [
{
"contractName": "LockPaymentCondition",
"functionName": "fulfill",
"name": "lockPayment",
"events": [
{
"actionType": "publisher",
"handler": {
"functionName": "fulfill",
"moduleName": "lockPaymentConditon",
"version": "0.1"
},
"name": "Fulfilled"
}
],
"parameters": [
{
"name": "_rewardAddress",
"type": "address",
"value": "0x886dE2b3F8F27eEd43bA2FD4bC2AabDc14E0d9dD"
}
],
"timelock": 0,
"timeout": 0
}
],
"contractName": "EscrowAccessSecretStoreTemplate",
"events": [
{
"actionType": "publisher",
"handler": {
"functionName": "fulfill",
"moduleName": "lockPaymentConditon",
"version": "0.1"
},
"name": "Fulfilled"
}
],
"fulfillmentOrder": [
"lockPayment.fulfill",
"access.fulfill",
"escrowPayment.fulfill"
]
}
}

Properties

NameTypeRequiredRestrictionsDescription
additionalInformationobjectfalsenoneAditional information of the asset
curationCurationDtotruenonepopularity of the asset
mainMainDtotruenoneMain data of the asset
serviceAgreementTemplateServiceAgreementTemplateDtofalsenoneService agreement template

ServiceDto

{
"index": 0,
"serviceEndpoint": "http://localhost:8030/api/v1/node/services/consume",
"type": "access",
"service": "SecretStore",
"purchaseEndpoint": "http://localhost:8030/api/v1/node/services/access/initialize",
"attributes": {
"additionalInformation": {},
"curation": {
"numVotes": 123,
"rating": 0.93,
"schema": "Binary Voting",
"isListed": false
},
"main": {
"author": "Met Office",
"dateCreated": "2021-02-01T10:55:11Z",
"datePublished": "2021-02-01T10:55:11Z",
"encryptedFiles": "0x098213xzckasdf089723hjgdasfkjgasfv",
"files": [
{
"checksum": "efb2c764274b745f5fc37f97c6b0e761",
"url": "https://raw.githubusercontent.com/tbertinmahieux/MSongsDB/master/Tasks_Demos/CoverSongs/shs_dataset_test.txt",
"checksumType": "md5",
"name": "data.txt",
"compression": "zip",
"contentLength": "4535431",
"contentType": "text/csv",
"encoding": "UTF-8",
"index": 0,
"resourceId": "access-log2018-02-13-15-17-29-18386C502CAEA932",
"encryption": "dtp"
}
],
"license": "CC-BY",
"name": "UK Weather information 2011",
"price": "10",
"type": "dataset",
"algorithm": {
"language": "scala",
"format": "docker-image",
"version": "0.1",
"container": [
{
"entrypoint": "node $ALGO",
"image": "node",
"tag": "10"
}
]
}
},
"serviceAgreementTemplate": {
"conditionDependency": [
{
"access": [],
"escrowPayment": [
"lockPayment",
"access"
],
"execCompute": [],
"lockPayment": []
}
],
"conditions": [
{
"contractName": "LockPaymentCondition",
"functionName": "fulfill",
"name": "lockPayment",
"events": [
{
"actionType": "publisher",
"handler": {
"functionName": "fulfill",
"moduleName": "lockPaymentConditon",
"version": "0.1"
},
"name": "Fulfilled"
}
],
"parameters": [
{
"name": "_rewardAddress",
"type": "address",
"value": "0x886dE2b3F8F27eEd43bA2FD4bC2AabDc14E0d9dD"
}
],
"timelock": 0,
"timeout": 0
}
],
"contractName": "EscrowAccessSecretStoreTemplate",
"events": [
{
"actionType": "publisher",
"handler": {
"functionName": "fulfill",
"moduleName": "lockPaymentConditon",
"version": "0.1"
},
"name": "Fulfilled"
}
],
"fulfillmentOrder": [
"lockPayment.fulfill",
"access.fulfill",
"escrowPayment.fulfill"
]
}
}
}

Properties

NameTypeRequiredRestrictionsDescription
indexnumbertruenoneindex of the service
serviceEndpointstringtruenoneUrl of the service endpoint
typestringtruenoneService type
servicestringfalsenoneService name
purchaseEndpointstringfalsenoneUrl to purchase asset
attributesAttributesDtofalsenoneAttribute of the metadata

CreateAssetDto

{
"@context": "https://w3id.org/did/v1",
"id": "did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e429",
"created": "2019-02-08T08:13:49Z",
"updated": "2019-02-08T08:13:49Z",
"authentication": [
{
"publicKey": "did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"type": "RsaSignatureAuthentication2018"
}
],
"proof": {
"created": "2022-01-08T16:02:20Z",
"creator": "2022-01-08T16:02:20Z",
"signatureValue": "0xbd7b46b3ac664167bc70ac211b1a1da0baed9ead91613a5f02dfc25c1bb6e3ff40861b455017e8a587fd4e37b703436072598c3a81ec88be28bfe33b61554a471b",
"type": "DDOIntegritySignature"
},
"publicKey": [
{
"id": "did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"owner": "0x00Bd138aBD70e2F00903268F3Db08f2D25677C9e",
"type": "EthereumECDSAKey"
}
],
"service": [
{
"index": 0,
"service": "SecretStore",
"serviceEndpoint": "http://localhost:12001",
"type": "authorization"
},
{
"index": 1,
"purchaseEndpoint": "http://localhost:8030/api/v1/node/services/access/initialize",
"serviceEndpoint": "http://localhost:8030/api/v1/node/services/consume",
"type": "access"
},
{
"attributes": {
"additionalInformation": {
"copyrightHolder": "Met Office",
"description": "Weather information of UK including temperature and humidity",
"inLanguage": "en",
"links": [
{
"name": "Sample of Asset Data",
"type": "sample",
"url": "https://foo.com/sample.csv"
}
],
"tags": [
"weather",
"uk",
"2011",
"temperature",
"humidity"
],
"workExample": "stationId,latitude,longitude,datetime, temperature,humidity/n423432fsd,51.509865,-0.118092, 2011-01-01T10:55:11+00:00,7.2,68"
},
"curation": {
"numVotes": 123,
"rating": 0.93,
"schema": "Binary Voting"
},
"main": {
"author": "Met Office",
"dateCreated": "2012-02-01T10:55:11Z",
"encryptedFiles": "0x098213xzckasdf089723hjgdasfkjgasfv",
"files": [
{
"compression": "zip",
"contentLength": "4535431",
"contentType": "text/csv",
"encoding": "UTF-8",
"index": 0,
"resourceId": "access-log2018-02-13-15-17-29-18386C502CAEA932"
}
],
"license": "CC-BY",
"name": "UK Weather information 2011",
"price": "10",
"type": "dataset"
}
},
"index": 2,
"serviceEndpoint": "http://mymetadata.org/api/v1/provider/assets/metadata/did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"type": "metadata"
}
]
}

Properties

NameTypeRequiredRestrictionsDescription
@contextstringtruenoneContext of the asset
idstringtruenoneID of the asset
createdstringfalsenoneID of the asset
updatedstringfalsenoneID of the asset
authentication[AuthenticationDto]truenoneAuthentication used in the asset
proofProofDtotruenoneProof data
publicKey[PublicKeyDto]truenonePublic keys that contains the asset
service[ServiceDto]truenoneServices that contains the asset

GetAssetDto

{
"@context": "https://w3id.org/did/v1",
"authentication": [
{
"publicKey": "did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"type": "RsaSignatureAuthentication2018"
}
],
"created": "2021-02-01T10:55:11Z",
"updated": "2021-02-01T10:55:11Z",
"id": "did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e429",
"proof": {
"created": "2022-01-08T16:02:20Z",
"creator": "2022-01-08T16:02:20Z",
"signatureValue": "0xbd7b46b3ac664167bc70ac211b1a1da0baed9ead91613a5f02dfc25c1bb6e3ff40861b455017e8a587fd4e37b703436072598c3a81ec88be28bfe33b61554a471b",
"type": "DDOIntegritySignature"
},
"publicKey": [
{
"id": "did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"owner": "0x00Bd138aBD70e2F00903268F3Db08f2D25677C9e",
"type": "EthereumECDSAKey"
}
],
"service": [
{
"index": 0,
"service": "SecretStore",
"serviceEndpoint": "http://localhost:12001",
"type": "authorization"
},
{
"index": 1,
"purchaseEndpoint": "http://localhost:8030/api/v1/node/services/access/initialize",
"serviceEndpoint": "http://localhost:8030/api/v1/node/services/consume",
"type": "access"
},
{
"attributes": {
"additionalInformation": {
"copyrightHolder": "Met Office",
"description": "Weather information of UK including temperature and humidity",
"inLanguage": "en",
"links": [
{
"name": "Sample of Asset Data",
"type": "sample",
"url": "https://foo.com/sample.csv"
}
],
"tags": [
"weather",
"uk",
"2011",
"temperature",
"humidity"
],
"workExample": "stationId,latitude,longitude,datetime, temperature,humidity/n423432fsd,51.509865,-0.118092, 2011-01-01T10:55:11+00:00,7.2,68"
},
"curation": {
"numVotes": 123,
"rating": 0.93,
"schema": "Binary Voting"
},
"main": {
"author": "Met Office",
"dateCreated": "2012-02-01T10:55:11Z",
"encryptedFiles": "0x098213xzckasdf089723hjgdasfkjgasfv",
"files": [
{
"compression": "zip",
"contentLength": "4535431",
"contentType": "text/csv",
"encoding": "UTF-8",
"index": 0,
"resourceId": "access-log2018-02-13-15-17-29-18386C502CAEA932"
}
],
"license": "CC-BY",
"name": "UK Weather information 2011",
"price": "10",
"type": "dataset"
}
},
"index": 2,
"serviceEndpoint": "http://mymetadata.org/api/v1/provider/assets/metadata/did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"type": "metadata"
}
]
}

Properties

NameTypeRequiredRestrictionsDescription
@contextstringtruenoneContext of the asset
authentication[AuthenticationDto]truenoneAuthentication used in the asset
createdstringtruenoneDate when the asset is created
updatedstringtruenoneDate when the asset is created
idstringtruenoneID of the asset
proofProofDtotruenoneProof data
publicKey[PublicKeyDto]truenonePublic keys that contains the asset
service[ServiceDto]truenoneServices that contains the asset

QueryBodyDDOdto

{
"query": {
"match_all": {}
},
"text": "Eius vel alias.",
"offset": 100,
"page": 0,
"sort": {
"created": "asc"
}
}

Properties

NameTypeRequiredRestrictionsDescription
queryobjectfalsenoneexecute directly queries to elasticsearch from the client
textstringfalsenoneText to search
offsetstringfalsenonePage Size
pagestringfalsenonePage to retrieve
sortobjectfalsenonesort the response by specified parameter

UpdateAssetDto

{
"@context": "https://w3id.org/did/v1",
"updated": "2019-02-08T08:13:49Z",
"authentication": [
{
"publicKey": "did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"type": "RsaSignatureAuthentication2018"
}
],
"proof": {
"created": "2022-01-08T16:02:20Z",
"creator": "2022-01-08T16:02:20Z",
"signatureValue": "0xbd7b46b3ac664167bc70ac211b1a1da0baed9ead91613a5f02dfc25c1bb6e3ff40861b455017e8a587fd4e37b703436072598c3a81ec88be28bfe33b61554a471b",
"type": "DDOIntegritySignature"
},
"publicKey": [
{
"id": "did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"owner": "0x00Bd138aBD70e2F00903268F3Db08f2D25677C9e",
"type": "EthereumECDSAKey"
}
],
"service": [
{
"index": 0,
"service": "SecretStore",
"serviceEndpoint": "http://localhost:12001",
"type": "authorization"
},
{
"index": 1,
"purchaseEndpoint": "http://localhost:8030/api/v1/node/services/access/initialize",
"serviceEndpoint": "http://localhost:8030/api/v1/node/services/consume",
"type": "access"
},
{
"attributes": {
"additionalInformation": {
"copyrightHolder": "Met Office",
"description": "Weather information of UK including temperature and humidity",
"inLanguage": "en",
"links": [
{
"name": "Sample of Asset Data",
"type": "sample",
"url": "https://foo.com/sample.csv"
}
],
"tags": [
"weather",
"uk",
"2011",
"temperature",
"humidity"
],
"workExample": "stationId,latitude,longitude,datetime, temperature,humidity/n423432fsd,51.509865,-0.118092, 2011-01-01T10:55:11+00:00,7.2,68"
},
"curation": {
"numVotes": 123,
"rating": 0.93,
"schema": "Binary Voting"
},
"main": {
"author": "Met Office",
"dateCreated": "2012-02-01T10:55:11Z",
"encryptedFiles": "0x098213xzckasdf089723hjgdasfkjgasfv",
"files": [
{
"compression": "zip",
"contentLength": "4535431",
"contentType": "text/csv",
"encoding": "UTF-8",
"index": 0,
"resourceId": "access-log2018-02-13-15-17-29-18386C502CAEA932"
}
],
"license": "CC-BY",
"name": "UK Weather information 2011",
"price": "10",
"type": "dataset"
}
},
"index": 2,
"serviceEndpoint": "http://mymetadata.org/api/v1/provider/assets/metadata/did:nv:0c184915b07b44c888d468be85a9b28253e80070e5294b1aaed81c2f0264e430",
"type": "metadata"
}
]
}

Properties

NameTypeRequiredRestrictionsDescription
@contextstringtruenoneContext of the asset
updatedstringfalsenoneID of the asset
authentication[AuthenticationDto]truenoneAuthentication used in the asset
proofProofDtotruenoneProof data
publicKey[PublicKeyDto]truenonePublic keys that contains the asset
service[ServiceDto]truenoneServices that contains the asset

CreateBookmarkDto

{
"did": "did:12345",
"userId": "u-12345",
"description": "I am interesting in this asset"
}

Properties

NameTypeRequiredRestrictionsDescription
didstringtruenoneThe identifier of the asset
userIdstringtruenoneThe userId who created the bookmark
descriptionstringtruenoneDescription given by the user

GetBookmarkDto

{
"id": "b-123434",
"did": "did:12345",
"userId": "u-12345",
"description": "I am interesting in this asset",
"createdAt": "2022-03-18T13:44:00.931Z"
}

Properties

NameTypeRequiredRestrictionsDescription
idstringtruenoneThe identifier of the bookmark
didstringtruenoneThe identifier of the asset
userIdstringtruenoneThe userId who created the bookmark
descriptionstringtruenoneDescription given by the user
createdAtstring(date-time)truenoneWhen the UGC was created

UpdateBookmarkDto

{
"description": "I am interesting in this asset"
}

Properties

NameTypeRequiredRestrictionsDescription
descriptionstringtruenoneDescription given by the user