Get the current workspace
workspaces.get() -> Workspace { metadata, spec, status }
GET/v1/workspaces/current
Retrieves the workspace associated with the current API token. Useful for workspace-scoped tokens to identify which workspace they belong to.
Get the current workspace
require "cadenya"
cadenya = Cadenya::Client.new(api_key: "My API Key")
workspace = cadenya.workspaces.get
puts(workspace){
"metadata": {
"id": "id",
"accountId": "accountId",
"name": "name",
"profileId": "profileId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"spec": {
"description": "description"
},
"status": "STATUS_ENABLED"
}Returns Examples
{
"metadata": {
"id": "id",
"accountId": "accountId",
"name": "name",
"profileId": "profileId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"spec": {
"description": "description"
},
"status": "STATUS_ENABLED"
}