Onedata API Reference

REST API references for Onezone, Oneprovider, and Onepanel.

List the Space Marketplace

POST /spaces/marketplace/list

List spaces advertised in the Marketplace.

Example cURL requests

List spaces advertised in the Marketplace

curl -H "x-auth-token: $TOKEN" -H "Content-type: application/json" \
-X POST -d '{ "limit" : 2 }' \
https://$ZONE_HOST/api/v3/onezone/spaces/marketplace/list

{
  "spaces": [
    {
      "spaceId": "d6ee1aecf03b23f09756d6a49e435455", 
      "index": "aqua@d6ee1aecf03b23f09756d6a49e435455"
    },
    {
      "spaceId": "3b23a49e1aecf06d6555d6e4354f097e", 
      "index": "terra@3b23a49e1aecf06d6555d6e4354f097e"
    }
  ],
  "isLast": false,
  "nextPageToken": "UkdseU1qWTBNak16TXpNNU5qUXpNak0yTXpZMk1UWTFOalEyTXpZMU5qSTJOalky"
}

Request body

application/json

Space Marketplace listing options.

PropertyType & Description
tags
array of strings

A list of tags to be used as listing filter. The resulting list will contain only the spaces that have at least one of the specified tags. Available space tags can be retrieved from the configuration endpoint.

limit
integer

Allows specifying maximum number of spaces that should be returned. If there are more spaces, they can be retrieved using the token or index options in the consecutive call.

token
string

Determines the starting point for listing. The listing will start from the next page (batch) of entries which follows the page previously obtained along with the corresponding nextPageToken. Cannot be provided alongside the index parameter.

index
string

Determines the starting point for listing - it will be started from given space (inclusively). Cannot be provided alongside the token parameter.

offset
integer

Expressed in number of entries, further adjusts the starting point of listing indicated by index or token parameters. The value can be negative, in such case entries preceding the starting point will be returned.

Request Examples

Shell
onezone-rest-cli listMarketplace

Responses

application/json
200

List of spaces advertised in the Marketplace.

PropertyType & Description
spaces required
array of objects

The list of Ids of spaces advertised in the Marketplace.

spaceId
string

Unique Id of the space.

index
string

Indicates the position of this space in the Marketplace list (can be used to specify a custom listing starting point).

isLast required
boolean

Flag indicating whether the last batch of spaces in the Marketplace was listed.

nextPageToken required
string

A token in the listing response that can be passed in the consecutive request to start listing from the next page of entries. When end of list is reached, the token is returned with a null value.

Example

application/json
{
  "spaces": [
    "1d24c36707d99197c6cd995810a43aca",
    "6825604b0eb6a47b8b7a04b6369eb24d"
  ],
  "isLast": true,
  "nextPageToken": null
}
400

Invalid request.

PropertyType & Description
error
object

Object describing an error.

id required
string

String identifying the error type. Does not change between error instances.

description required
string

Human readable error description. May contain information specific to given error instance.

details
object

Details about the error instance. The object schema is specific to each error type.

Example

application/json
{
  "error": {
    "id": "badValueString",
    "details": {
      "key": "name"
    },
    "description": "Bad value: provided \"name\" must be a string."
  }
}
401

Authentication error.

PropertyType & Description
error
object

Object describing an error.

id required
string

String identifying the error type. Does not change between error instances.

description required
string

Human readable error description. May contain information specific to given error instance.

details
object

Details about the error instance. The object schema is specific to each error type.

Example

application/json
{
  "error": {
    "id": "badValueString",
    "details": {
      "key": "name"
    },
    "description": "Bad value: provided \"name\" must be a string."
  }
}
403

Authorization error.

PropertyType & Description
error
object

Object describing an error.

id required
string

String identifying the error type. Does not change between error instances.

description required
string

Human readable error description. May contain information specific to given error instance.

details
object

Details about the error instance. The object schema is specific to each error type.

Example

application/json
{
  "error": {
    "id": "badValueString",
    "details": {
      "key": "name"
    },
    "description": "Bad value: provided \"name\" must be a string."
  }
}
404

Resource not found.

PropertyType & Description
error
object

Object describing an error.

id required
string

String identifying the error type. Does not change between error instances.

description required
string

Human readable error description. May contain information specific to given error instance.

details
object

Details about the error instance. The object schema is specific to each error type.

Example

application/json
{
  "error": {
    "id": "badValueString",
    "details": {
      "key": "name"
    },
    "description": "Bad value: provided \"name\" must be a string."
  }
}
500

Internal server Error.

PropertyType & Description
error
object

Object describing an error.

id required
string

String identifying the error type. Does not change between error instances.

description required
string

Human readable error description. May contain information specific to given error instance.

details
object

Details about the error instance. The object schema is specific to each error type.

Example

application/json
{
  "error": {
    "id": "badValueString",
    "details": {
      "key": "name"
    },
    "description": "Bad value: provided \"name\" must be a string."
  }
}