Skip to main content

Description

In the Nevermined ecosystem, the Nevermined Node is the technical component executed by the Publishers allowing them to provide extended data services (e.g. storage and compute).

Nevermined Node, as part of the Publisher ecosystem, includes the credentials to interact with the infrastructure (initially cloud, but could be on-premise).

Nevermined Node v0.1.5

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:

Authentication

  • HTTP Authentication, scheme: bearer

Info

InfoController_getInfo

Code samples

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

GET / HTTP/1.1

Accept: application/json


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

fetch('/',
{
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 '/',
params: {
}, headers: headers

p JSON.parse(result)

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

r = requests.get('/', 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','/', 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("/");
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", "/", data)
req.Header = headers

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

GET /

Public

Get API info

Example responses

200 Response

{
"APIversion": "1.0.4",
"docs": "http://localhost:3100/api/v1/docs"
}

Responses

StatusMeaningDescriptionSchema
200OKReturn API InfoGetInfoDto

Encrypt

EncryptController_doEncrypt

Code samples

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

POST /api/v1/node/services/encrypt HTTP/1.1

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

const inputBody = '{
"method": "PSK-ECDSA",
"message": "Hello!"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};

fetch('/api/v1/node/services/encrypt',
{
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/node/services/encrypt',
params: {
}, headers: headers

p JSON.parse(result)

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

r = requests.post('/api/v1/node/services/encrypt', 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/node/services/encrypt', 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/node/services/encrypt");
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/node/services/encrypt", data)
req.Header = headers

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

POST /api/v1/node/services/encrypt

Public

Encrypt

Body parameter

{
"method": "PSK-ECDSA",
"message": "Hello!"
}

Parameters

NameInTypeRequiredDescription
bodybodyEncryptDtotruenone

Example responses

200 Response

{}

Responses

StatusMeaningDescriptionSchema
200OKReturn encrypted stuffEncryptResult

Access

AccessController_doAccess

Code samples

# You can also use wget
curl -X GET /api/v1/node/services/access/{agreement_id}/{index} \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'

GET /api/v1/node/services/access/{agreement_id}/{index} HTTP/1.1

Accept: application/json


const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};

fetch('/api/v1/node/services/access/{agreement_id}/{index}',
{
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',
'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get '/api/v1/node/services/access/{agreement_id}/{index}',
params: {
}, headers: headers

p JSON.parse(result)

import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}

r = requests.get('/api/v1/node/services/access/{agreement_id}/{index}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

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

try {
$response = $client->request('GET','/api/v1/node/services/access/{agreement_id}/{index}', 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/node/services/access/{agreement_id}/{index}");
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"},
"Authorization": []string{"Bearer {access-token}"},
}

data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/api/v1/node/services/access/{agreement_id}/{index}", data)
req.Header = headers

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

GET /api/v1/node/services/access/{agreement_id}/{index}

Public

Access asset

Parameters

NameInTypeRequiredDescription
indexpathnumbertruenone

Example responses

200 Response

{}

Responses

StatusMeaningDescriptionSchema
200OKReturn the url of assetStreamableFile

AccessController_doAccessProof

Code samples

# You can also use wget
curl -X GET /api/v1/node/services/access-proof/{agreement_id}/{index} \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'

GET /api/v1/node/services/access-proof/{agreement_id}/{index} HTTP/1.1

Accept: application/json


const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};

fetch('/api/v1/node/services/access-proof/{agreement_id}/{index}',
{
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',
'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get '/api/v1/node/services/access-proof/{agreement_id}/{index}',
params: {
}, headers: headers

p JSON.parse(result)

import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}

r = requests.get('/api/v1/node/services/access-proof/{agreement_id}/{index}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

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

try {
$response = $client->request('GET','/api/v1/node/services/access-proof/{agreement_id}/{index}', 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/node/services/access-proof/{agreement_id}/{index}");
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"},
"Authorization": []string{"Bearer {access-token}"},
}

data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/api/v1/node/services/access-proof/{agreement_id}/{index}", data)
req.Header = headers

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

GET /api/v1/node/services/access-proof/{agreement_id}/{index}

Public

Access asset w/ DTP proof

Parameters

NameInTypeRequiredDescription
indexpathnumbertruenone

Example responses

200 Response

"string"

Responses

StatusMeaningDescriptionSchema
200OKReturn the url of assetstring

AccessController_doNftAccess

Code samples

# You can also use wget
curl -X GET /api/v1/node/services/nft-access/{agreement_id}/{index} \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'

GET /api/v1/node/services/nft-access/{agreement_id}/{index} HTTP/1.1

Accept: application/json


const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};

fetch('/api/v1/node/services/nft-access/{agreement_id}/{index}',
{
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',
'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get '/api/v1/node/services/nft-access/{agreement_id}/{index}',
params: {
}, headers: headers

p JSON.parse(result)

import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}

r = requests.get('/api/v1/node/services/nft-access/{agreement_id}/{index}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

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

try {
$response = $client->request('GET','/api/v1/node/services/nft-access/{agreement_id}/{index}', 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/node/services/nft-access/{agreement_id}/{index}");
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"},
"Authorization": []string{"Bearer {access-token}"},
}

data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "/api/v1/node/services/nft-access/{agreement_id}/{index}", data)
req.Header = headers

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

GET /api/v1/node/services/nft-access/{agreement_id}/{index}

Public

Access asset

Parameters

NameInTypeRequiredDescription
indexpathnumbertruenone

Example responses

200 Response

{}

Responses

StatusMeaningDescriptionSchema
200OKReturn the url of assetStreamableFile

AccessController_doNftTransfer

Code samples

# You can also use wget
curl -X POST /api/v1/node/services/nft-transfer \
-H 'Content-Type: application/json'

POST /api/v1/node/services/nft-transfer HTTP/1.1

Content-Type: application/json

const inputBody = '{
"agreementId": "0x...",
"nftHolder": "0x...",
"nftReceiver": "0x...",
"nftAmount": "1",
"nftType": "721"
}';
const headers = {
'Content-Type':'application/json'
};

fetch('/api/v1/node/services/nft-transfer',
{
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'
}

result = RestClient.post '/api/v1/node/services/nft-transfer',
params: {
}, headers: headers

p JSON.parse(result)

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

r = requests.post('/api/v1/node/services/nft-transfer', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

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

$client = new \GuzzleHttp\Client();

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

try {
$response = $client->request('POST','/api/v1/node/services/nft-transfer', 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/node/services/nft-transfer");
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"},
}

data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/api/v1/node/services/nft-transfer", data)
req.Header = headers

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

POST /api/v1/node/services/nft-transfer

Public

Access asset

Body parameter

{
"agreementId": "0x...",
"nftHolder": "0x...",
"nftReceiver": "0x...",
"nftAmount": "1",
"nftType": "721"
}

Parameters

NameInTypeRequiredDescription
bodybodyTransferDtotruenone

Responses

StatusMeaningDescriptionSchema
200OKReturn "success" if transfer workedNone

AccessController_doDownload

Code samples

# You can also use wget
curl -X GET /api/v1/node/services/download/{index} \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'

GET /api/v1/node/services/download/{index} HTTP/1.1

Accept: application/json


const headers = {
'Accept':'application/json',
'Authorization':'Bearer {access-token}'
};

fetch('/api/v1/node/services/download/{index}',
{
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',
'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get '/api/v1/node/services/download/{index}',
params: {
}, headers: headers

p JSON.parse(result)

import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}

r = requests.get('/api/v1/node/services/download/{index}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

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

try {
$response = $client->request('GET','/api/v1/node/services/download/{index}', 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/node/services/download/{index}");
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"},
"Authorization": []string{"Bearer {access-token}"},
}

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

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

GET /api/v1/node/services/download/{index}

Public

Download asset

Parameters

NameInTypeRequiredDescription
indexpathnumbertruenone

Example responses

200 Response

{}

Responses

StatusMeaningDescriptionSchema
200OKReturn the assetStreamableFile

AccessController_doUpload

Code samples

# You can also use wget
curl -X POST /api/v1/node/services/upload/{backend} \
-H 'Content-Type: application/json'

POST /api/v1/node/services/upload/{backend} HTTP/1.1

Content-Type: application/json

const inputBody = '{
"encrypt": "false"
}';
const headers = {
'Content-Type':'application/json'
};

fetch('/api/v1/node/services/upload/{backend}',
{
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'
}

result = RestClient.post '/api/v1/node/services/upload/{backend}',
params: {
}, headers: headers

p JSON.parse(result)

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

r = requests.post('/api/v1/node/services/upload/{backend}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

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

$client = new \GuzzleHttp\Client();

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

try {
$response = $client->request('POST','/api/v1/node/services/upload/{backend}', 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/node/services/upload/{backend}");
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"},
}

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

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

POST /api/v1/node/services/upload/{backend}

Public

Access asset

Body parameter

{
"encrypt": "false"
}

Parameters

NameInTypeRequiredDescription
backendpathstringtruenone
bodybodyUploadDtotruenone

Responses

StatusMeaningDescriptionSchema
200OKReturn the url of assetNone

Auth

AuthController_token

Code samples

# You can also use wget
curl -X POST /api/v1/node/services/oauth/token \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'

POST /api/v1/node/services/oauth/token HTTP/1.1

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

const inputBody = '{
"grant_type": "urn:ietf:params:oauth:grant-type:jwt-bearer",
"assertion": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjIyIn0.eyJpc3Mi[...omitted for brevity...]"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};

fetch('/api/v1/node/services/oauth/token',
{
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/node/services/oauth/token',
params: {
}, headers: headers

p JSON.parse(result)

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

r = requests.post('/api/v1/node/services/oauth/token', 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/node/services/oauth/token', 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/node/services/oauth/token");
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/node/services/oauth/token", data)
req.Header = headers

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

POST /api/v1/node/services/oauth/token

Public

Login using a JWT claim for client authentication

Body parameter

{
"grant_type": "urn:ietf:params:oauth:grant-type:jwt-bearer",
"assertion": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjIyIn0.eyJpc3Mi[...omitted for brevity...]"
}

Parameters

NameInTypeRequiredDescription
bodybodyClientAssertionDtotruenone

Example responses

201 Response

{
"access_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjIyIn0.eyJpc3Mi[...omitted for brevity...]"
}

Responses

StatusMeaningDescriptionSchema
201CreatedThe access_tokenLoginDto
401UnauthorizedUnauthorized accessNone

Schemas

GetInfoDto

{
"APIversion": "1.0.4",
"docs": "http://localhost:3100/api/v1/docs"
}

Properties

NameTypeRequiredRestrictionsDescription
APIversionstringtruenoneMarketplace API Version
docsstringtruenoneAPI docs url

EncryptDto

{
"method": "PSK-ECDSA",
"message": "Hello!"
}

Properties

NameTypeRequiredRestrictionsDescription
methodstringtruenoneEncryption method
messagestringtruenoneEncrypted message

EncryptResult

{}

Properties

None

StreamableFile

{}

Properties

None

TransferDto

{
"agreementId": "0x...",
"nftHolder": "0x...",
"nftReceiver": "0x...",
"nftAmount": "1",
"nftType": "721"
}

Properties

NameTypeRequiredRestrictionsDescription
agreementIdstringtruenoneThe agreement for NFT transfer
nftHolderstringtruenoneNFT holder address
nftReceiverstringtruenoneNFT receiver address
nftAmountnumbertruenoneNumber of NFTs to transfer
nftTypenumbertruenoneType of NFT

UploadDto

{
"encrypt": "false"
}

Properties

NameTypeRequiredRestrictionsDescription
encryptstringfalsenoneEncrypt uploaded data

ClientAssertionDto

{
"grant_type": "urn:ietf:params:oauth:grant-type:jwt-bearer",
"assertion": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjIyIn0.eyJpc3Mi[...omitted for brevity...]"
}

Properties

NameTypeRequiredRestrictionsDescription
grant_typestringtruenoneType type of JWT client assertion. Must be urn:ietf:params:oauth:grant-type:jwt-bearer
assertionstringtruenoneA single JWT

LoginDto

{
"access_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjIyIn0.eyJpc3Mi[...omitted for brevity...]"
}

Properties

NameTypeRequiredRestrictionsDescription
access_tokenstringtruenoneThe Authorization Bearer token