Onedata API Reference

REST API references for Onezone, Oneprovider, and Onepanel.

List named tokens of a provider

GET /providers/{id}/tokens/named

Returns the list of specific provider's named tokens.

This operation is available for the subject provider (id), or the provider's cluster member with cluster_update privilege. Otherwise requires oz_tokens_manage admin privilege.

You can learn more about named and temporary tokens here.

Example cURL requests

List named tokens of a provider

curl -H "x-auth-token: $TOKEN" -X GET \
https://$HOST/api/v3/onezone/providers/$PROVIDER_ID/tokens/named

{
  "tokens": [
    "2b5d0dd5aa6443a69277b5ce0544fec2",
    "818bf8d4404c2bcee2b47f024f6c0890",
    "4a5e5dabcd55e03f1e9237eeca2548ff",
    "81336b59656653a481d1e65168f3f213"
  ]
}

Path parameters

Parameter Type & Description
id required
string

Provider Id

Request Examples

Shell
onezone-rest-cli listNamedTokensOfProvider id=6ebe7ac282e0188b5336b5d8cfa564d5

Responses

application/json
200

The list of all provider named tokens

PropertyType & Description
tokens
array of strings

List of token ids.

Example

application/json
{
  "tokens": [
    "2b5d0dd5aa6443a69277b5ce0544fec2",
    "818bf8d4404c2bcee2b47f024f6c0890",
    "4a5e5dabcd55e03f1e9237eeca2548ff",
    "81336b59656653a481d1e65168f3f213"
  ]
}
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."
  }
}