Help Center/ Web3 Node Engine Service/ API Reference/ API/ API Keys/ Obtaining All API Keys of a User
Updated on 2023-08-08 GMT+08:00

Obtaining All API Keys of a User

Description

This API is used to obtain all API keys of a specified user.

URI

GET /v1/{project_id}/node-provider/credentials

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID.

Minimum length: 32 characters

Maximum length: 32 characters

Table 2 Query parameters

Parameter

Mandatory

Type

Description

offset

No

Integer

Start position of pagination query.

Minimum value: 0

Maximum value: 1000

limit

No

Integer

Number of items returned on each page.

Minimum value: 1

Maximum value: 1000

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

Minimum length: 1 character

Maximum length: 65,535 characters

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

credentials

Array of Credential objects

List of API keys.

count

Integer

Number of records.

Minimum value: 0

Maximum value: 1000

Table 5 Credential

Parameter

Type

Description

id

String

API key ID.

Minimum length: 36 characters

Maximum length: 36 characters

description

String

API key description.

Minimum length: 1 character

Maximum length: 100 characters

create_time

String

Time when the API key was created.

Minimum length: 0 characters

Maximum length: 100 characters

update_time

String

Time when the credential was used for the last time.

Minimum length: 0 characters

Maximum length: 100 characters

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

code

String

Status code.

Minimum length: 3 characters

Maximum length: 3 characters

error_code

String

Error code.

Minimum length: 12 characters

Maximum length: 12 characters

error_msg

String

Error message.

Minimum length: 1 character

Maximum length: 65,535 characters

message

String

Error details.

Minimum length: 0 characters

Maximum length: 65,535 characters

Status code: 401

Table 7 Response body parameters

Parameter

Type

Description

code

String

Status code.

Minimum length: 3 characters

Maximum length: 3 characters

error_code

String

Error code.

Minimum length: 12 characters

Maximum length: 12 characters

error_msg

String

Error message.

Minimum length: 1 character

Maximum length: 65,535 characters

message

String

Error details.

Minimum length: 0 characters

Maximum length: 65,535 characters

Status code: 500

Table 8 Response body parameters

Parameter

Type

Description

code

String

Status code.

Minimum length: 3 characters

Maximum length: 3 characters

error_code

String

Error code.

Minimum length: 12 characters

Maximum length: 12 characters

error_msg

String

Error message.

Minimum length: 1 character

Maximum length: 65,535 characters

message

String

Error details.

Minimum length: 0 characters

Maximum length: 65,535 characters

Example Request

None

Example Response

Status code: 200

Request successful.

{
  "credentials" : [ {
    "id" : "3bca624c-0468-11ee-8322-0255ac100043",
    "description" : "test",
    "create_time" : "2023-06-06T20:47:02.15507+08:00",
    "update_time" : "2023-06-06T20:47:02.15507+08:00"
  } ],
  "count" : 1
}

Status code: 400

Verify parameter failed.

{
  "code" : 400,
  "error_code" : "BCS.03400001",
  "error_msg" : "Invalid request.",
  "message" : "unmarshal request data error"
}

Status code: 401

Authentication failed.

{
  "code" : 401,
  "error_code" : "BCS.03401001",
  "error_msg" : "Authorization failed.",
  "message" : "request token is not valid"
}

Status code: 500

Internal service error.

{
  "code" : 500,
  "error_code" : "BCS.03500001",
  "error_msg" : "Internal error.",
  "message" : "project [xxx] node [xxx] get service bearer user token error"
}

Status Code

Status Code

Description

200

Request successful.

400

Verify parameter failed.

401

Authentication failed.

500

Internal service error.

Error Code

For details, see Error Codes.