List API keys
Retrieve a list of API keys with the option to limit the number of keys returned and paginate the results.
GET
Parameters
Query Parameters
Name
Filter the list of keys by name.
Limit
Maximum number of keys to return in the response.
Next
Pagination token to retrieve the next page of keys.
| Status code | Description |
|---|---|
| 200 | A list of keys and the next pagination token. |
| 400 | Bad request error - the request contains invalid parameters or malformed data |
| 500 | Internal server error - an unexpected error occurred on the server |
cURL
curl -L \"https://blockv-labs.io/api-keys?name={name}&limit={limit}&next={next}" \-H 'Accept: application/json'
Response
{"keys": [{"id": "string","name": "string","expires_at": "2024-01-01T00:00:00Z","permissions": [{"resource": "api-keys","crud": {"read": false,"create": false,"update": false,"delete": false}}],"when_created": "2024-01-01T00:00:00Z","when_modified": "2024-01-01T00:00:00Z"}],"next": "string"}
json
{"type": "object","required": ["keys"],"properties": {"keys": {"type": "array","items": {"type": "object","description": "Represents an API key.","required": ["id","wallet_id","org_id","fqdn","name","key","expires_at","permissions","when_created","when_modified"],"properties": {"id": {"type": "string","description": "Unique identifier for the API key.","x-oapi-codegen-extra-tags": {"json": "id,omitempty","bson": "_id,omitempty"},"x-go-type": "id.ID","x-go-type-import": {"path": "github.com/vlabsio/smarttoken/pkg/types/id"}},"name": {"type": "string","description": "Descriptive name of the API key.","x-oapi-codegen-extra-tags": {"json": "name,omitempty","bson": "name,omitempty"}},"expires_at": {"type": "string","format": "date-time","description": "Expiration timestamp of the API key, if applicable.","x-oapi-codegen-extra-tags": {"json": "expires_at,omitempty","bson": "expires_at,omitempty"}},"permissions": {"type": "array","items": {"type": "object","required": ["resource","crud"],"properties": {"resource": {"type": "string","x-oapi-codegen-extra-tags": {"bson": "resource,omitempty"},"enum": ["api-keys","ebus.actions","ebus.action-logs","faces","faces.pages","faces.assistant","indexer","notifications.templates","notifications.messages","objects","objects.state-changes","organizations","organizations.members","organizations.roles","sequencer.batches","stats.wallets","stats.objects","stats.actions","storage","templates","wallets","webhooks"]},"crud": {"type": "object","x-oapi-codegen-extra-tags": {"bson": "crud,omitempty"},"required": ["read","create","update","delete"],"properties": {"read": {"type": "boolean","x-oapi-codegen-extra-tags": {"bson": "read,omitempty"}},"create": {"type": "boolean","x-oapi-codegen-extra-tags": {"bson": "create,omitempty"}},"update": {"type": "boolean","x-oapi-codegen-extra-tags": {"bson": "update,omitempty"}},"delete": {"type": "boolean","x-oapi-codegen-extra-tags": {"bson": "delete,omitempty"}}}}}},"x-oapi-codegen-extra-tags": {"bson": "permissions"}},"when_created": {"type": "string","format": "date-time","description": "Timestamp of when the API key was created.","x-oapi-codegen-extra-tags": {"json": "when_created,omitempty","bson": "when_created,omitempty"}},"when_modified": {"type": "string","format": "date-time","description": "Timestamp of when the API key was last modified.","x-oapi-codegen-extra-tags": {"json": "when_modified,omitempty","bson": "when_modified,omitempty"}}}},"description": "List of API keys."},"next": {"type": "string","description": "Pagination token to retrieve the next page of keys.","x-go-type-skip-optional-pointer": true}}}