from boxrouter import BoxRouter
with BoxRouter() as client:
result = client.api.key.get()
import { BoxRouter } from '@boxrouter/sdk';
await using client = new BoxRouter();
const result = await client.api.key.get();
boxrouter api key get
curl "https://api.boxrouter.ai/api/v1/key" \
-H "Authorization: Bearer $BOXROUTER_API_KEY"
{
"key": {
"id": "<string>",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"revoked": true,
"permissions": [
"sandbox:execute"
],
"owner_kind": "person",
"owner_user_id": "<string>",
"created_by": "<string>"
},
"organization": {
"id": "<string>",
"kind": "<string>",
"name": "<string>"
},
"workspace": {
"id": "<string>",
"name": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"outcome": "not_started",
"retry": "safe",
"retry_after_seconds": 1,
"details": {
"selection_version": 1,
"considered": 1,
"excluded": [
{
"provider": "<string>"
}
],
"closest": {},
"nearest": [
{}
],
"purchase_id": "<string>",
"preview": {
"unused": 1,
"held_excluded": 1,
"fee": 1,
"principal": 1,
"tax": 1,
"total": 1,
"card": {
"brand": "<string>",
"last4": "<string>",
"type": "card",
"email": "jsmith@example.com"
}
},
"quote": {
"amount": 2,
"tax": 1,
"total": 2,
"address_required": true,
"fee_minor": 1,
"missing": [
"<string>"
]
},
"redemption": {
"code": "<string>",
"amount_nanodollars": "<string>",
"description": "<string>",
"redeemed_at": "2023-11-07T05:31:56Z"
},
"scope": "workspace",
"period": "total",
"limit_nanodollars": 2,
"requested_nanodollars": 2,
"sign_in_method": "<string>",
"masked_email": "<string>",
"failure_reason": "<string>",
"names": [
"<string>"
],
"fields": [
"preferences.order"
],
"volume_id": "<string>",
"writer_sandbox_id": "<string>",
"checkpoint": 2,
"limit_bytes": 1,
"observed_bytes": 1,
"mismatch": {
"field": "image",
"recorded": "<string>",
"requested": "<string>",
"eligible": [
"<string>"
]
},
"volume_phase": "check",
"phase": "code",
"command": "<string>",
"exit_code": 123,
"stderr_tail": "<string>",
"stdout_tail": "<string>",
"port": 32768,
"revoked": true,
"preview_id": "<string>",
"url": "<string>",
"reason": "provider_account_disconnected",
"build_output": "<string>",
"path": "<string>",
"known": [
"<string>"
],
"limit": 123,
"unit": "<string>",
"usage": 123,
"limit_source": "workspace_spend_limit",
"spent_nanodollars": 1,
"available_nanodollars": 1,
"account_caps": [
{
"provider": "<string>",
"account_id": "<string>",
"limit": 2
}
],
"step_mismatches": [
{
"provider": "<string>",
"account_id": "<string>",
"step": 2
}
],
"providers": [
"<string>"
],
"retry_after_seconds": 1,
"reset_at": "2023-11-07T05:31:56Z",
"requirements": {},
"gate": "<string>",
"missing": {},
"still_eligible": 1,
"fits_here": true,
"exclusion": {
"provider": "<string>",
"kinds": [
"health_hidden"
],
"reasons": [
"provider_hidden"
]
},
"attempts": [
{
"provider": "<string>",
"outcome": "completed",
"native_code": "<string>",
"native_status": 123,
"route_id": "<string>",
"account_id": "<string>",
"supply": "<string>",
"cause": "key_rejected"
}
],
"fallbacks_allowed": true,
"stopped_reason": "fallbacks_disabled",
"state": "<string>",
"state_reason": "<string>",
"ended_at": "2023-11-07T05:31:56Z",
"sandbox_id": "<string>",
"sandbox_ids": [
"<string>"
],
"operations": [
{
"id": "<string>",
"operation": "<string>",
"sandbox_id": "<string>"
}
],
"cleanup": "confirmed",
"recovery_id": "<string>",
"upload_ids": [
"<string>"
],
"prerequisite": "<string>",
"command_started": false
},
"doc_url": "<string>",
"fix": "<string>",
"operation_id": "<string>",
"owner": "provider",
"provider": "<string>",
"provider_code": "<string>",
"native_code": "<string>",
"native_status": 123,
"native_message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"outcome": "not_started",
"retry": "safe",
"retry_after_seconds": 1,
"details": {
"selection_version": 1,
"considered": 1,
"excluded": [
{
"provider": "<string>"
}
],
"closest": {},
"nearest": [
{}
],
"purchase_id": "<string>",
"preview": {
"unused": 1,
"held_excluded": 1,
"fee": 1,
"principal": 1,
"tax": 1,
"total": 1,
"card": {
"brand": "<string>",
"last4": "<string>",
"type": "card",
"email": "jsmith@example.com"
}
},
"quote": {
"amount": 2,
"tax": 1,
"total": 2,
"address_required": true,
"fee_minor": 1,
"missing": [
"<string>"
]
},
"redemption": {
"code": "<string>",
"amount_nanodollars": "<string>",
"description": "<string>",
"redeemed_at": "2023-11-07T05:31:56Z"
},
"scope": "workspace",
"period": "total",
"limit_nanodollars": 2,
"requested_nanodollars": 2,
"sign_in_method": "<string>",
"masked_email": "<string>",
"failure_reason": "<string>",
"names": [
"<string>"
],
"fields": [
"preferences.order"
],
"volume_id": "<string>",
"writer_sandbox_id": "<string>",
"checkpoint": 2,
"limit_bytes": 1,
"observed_bytes": 1,
"mismatch": {
"field": "image",
"recorded": "<string>",
"requested": "<string>",
"eligible": [
"<string>"
]
},
"volume_phase": "check",
"phase": "code",
"command": "<string>",
"exit_code": 123,
"stderr_tail": "<string>",
"stdout_tail": "<string>",
"port": 32768,
"revoked": true,
"preview_id": "<string>",
"url": "<string>",
"reason": "provider_account_disconnected",
"build_output": "<string>",
"path": "<string>",
"known": [
"<string>"
],
"limit": 123,
"unit": "<string>",
"usage": 123,
"limit_source": "workspace_spend_limit",
"spent_nanodollars": 1,
"available_nanodollars": 1,
"account_caps": [
{
"provider": "<string>",
"account_id": "<string>",
"limit": 2
}
],
"step_mismatches": [
{
"provider": "<string>",
"account_id": "<string>",
"step": 2
}
],
"providers": [
"<string>"
],
"retry_after_seconds": 1,
"reset_at": "2023-11-07T05:31:56Z",
"requirements": {},
"gate": "<string>",
"missing": {},
"still_eligible": 1,
"fits_here": true,
"exclusion": {
"provider": "<string>",
"kinds": [
"health_hidden"
],
"reasons": [
"provider_hidden"
]
},
"attempts": [
{
"provider": "<string>",
"outcome": "completed",
"native_code": "<string>",
"native_status": 123,
"route_id": "<string>",
"account_id": "<string>",
"supply": "<string>",
"cause": "key_rejected"
}
],
"fallbacks_allowed": true,
"stopped_reason": "fallbacks_disabled",
"state": "<string>",
"state_reason": "<string>",
"ended_at": "2023-11-07T05:31:56Z",
"sandbox_id": "<string>",
"sandbox_ids": [
"<string>"
],
"operations": [
{
"id": "<string>",
"operation": "<string>",
"sandbox_id": "<string>"
}
],
"cleanup": "confirmed",
"recovery_id": "<string>",
"upload_ids": [
"<string>"
],
"prerequisite": "<string>",
"command_started": false
},
"doc_url": "<string>",
"fix": "<string>",
"operation_id": "<string>",
"owner": "provider",
"provider": "<string>",
"provider_code": "<string>",
"native_code": "<string>",
"native_status": 123,
"native_message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"outcome": "not_started",
"retry": "safe",
"retry_after_seconds": 1,
"details": {
"selection_version": 1,
"considered": 1,
"excluded": [
{
"provider": "<string>"
}
],
"closest": {},
"nearest": [
{}
],
"purchase_id": "<string>",
"preview": {
"unused": 1,
"held_excluded": 1,
"fee": 1,
"principal": 1,
"tax": 1,
"total": 1,
"card": {
"brand": "<string>",
"last4": "<string>",
"type": "card",
"email": "jsmith@example.com"
}
},
"quote": {
"amount": 2,
"tax": 1,
"total": 2,
"address_required": true,
"fee_minor": 1,
"missing": [
"<string>"
]
},
"redemption": {
"code": "<string>",
"amount_nanodollars": "<string>",
"description": "<string>",
"redeemed_at": "2023-11-07T05:31:56Z"
},
"scope": "workspace",
"period": "total",
"limit_nanodollars": 2,
"requested_nanodollars": 2,
"sign_in_method": "<string>",
"masked_email": "<string>",
"failure_reason": "<string>",
"names": [
"<string>"
],
"fields": [
"preferences.order"
],
"volume_id": "<string>",
"writer_sandbox_id": "<string>",
"checkpoint": 2,
"limit_bytes": 1,
"observed_bytes": 1,
"mismatch": {
"field": "image",
"recorded": "<string>",
"requested": "<string>",
"eligible": [
"<string>"
]
},
"volume_phase": "check",
"phase": "code",
"command": "<string>",
"exit_code": 123,
"stderr_tail": "<string>",
"stdout_tail": "<string>",
"port": 32768,
"revoked": true,
"preview_id": "<string>",
"url": "<string>",
"reason": "provider_account_disconnected",
"build_output": "<string>",
"path": "<string>",
"known": [
"<string>"
],
"limit": 123,
"unit": "<string>",
"usage": 123,
"limit_source": "workspace_spend_limit",
"spent_nanodollars": 1,
"available_nanodollars": 1,
"account_caps": [
{
"provider": "<string>",
"account_id": "<string>",
"limit": 2
}
],
"step_mismatches": [
{
"provider": "<string>",
"account_id": "<string>",
"step": 2
}
],
"providers": [
"<string>"
],
"retry_after_seconds": 1,
"reset_at": "2023-11-07T05:31:56Z",
"requirements": {},
"gate": "<string>",
"missing": {},
"still_eligible": 1,
"fits_here": true,
"exclusion": {
"provider": "<string>",
"kinds": [
"health_hidden"
],
"reasons": [
"provider_hidden"
]
},
"attempts": [
{
"provider": "<string>",
"outcome": "completed",
"native_code": "<string>",
"native_status": 123,
"route_id": "<string>",
"account_id": "<string>",
"supply": "<string>",
"cause": "key_rejected"
}
],
"fallbacks_allowed": true,
"stopped_reason": "fallbacks_disabled",
"state": "<string>",
"state_reason": "<string>",
"ended_at": "2023-11-07T05:31:56Z",
"sandbox_id": "<string>",
"sandbox_ids": [
"<string>"
],
"operations": [
{
"id": "<string>",
"operation": "<string>",
"sandbox_id": "<string>"
}
],
"cleanup": "confirmed",
"recovery_id": "<string>",
"upload_ids": [
"<string>"
],
"prerequisite": "<string>",
"command_started": false
},
"doc_url": "<string>",
"fix": "<string>",
"operation_id": "<string>",
"owner": "provider",
"provider": "<string>",
"provider_code": "<string>",
"native_code": "<string>",
"native_status": 123,
"native_message": "<string>"
}
}Describe the API Key Making This Request
Returns the calling key’s ID, name and permissions, the organization it belongs to (the name the dashboard’s organization switcher shows) and that organization’s workspace, so a person holding keys for more than one organization can tell which one a key is for. A key reads only itself, and needs the sandbox:execute permission like every other workspace read; a key without it gets 403 naming that permission. The key secret is never returned. A sandbox, launch or terminal ID from another workspace answers 404, and comparing this workspace with the one the ID came from finds the mismatch.
from boxrouter import BoxRouter
with BoxRouter() as client:
result = client.api.key.get()
import { BoxRouter } from '@boxrouter/sdk';
await using client = new BoxRouter();
const result = await client.api.key.get();
boxrouter api key get
curl "https://api.boxrouter.ai/api/v1/key" \
-H "Authorization: Bearer $BOXROUTER_API_KEY"
{
"key": {
"id": "<string>",
"name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"revoked": true,
"permissions": [
"sandbox:execute"
],
"owner_kind": "person",
"owner_user_id": "<string>",
"created_by": "<string>"
},
"organization": {
"id": "<string>",
"kind": "<string>",
"name": "<string>"
},
"workspace": {
"id": "<string>",
"name": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"outcome": "not_started",
"retry": "safe",
"retry_after_seconds": 1,
"details": {
"selection_version": 1,
"considered": 1,
"excluded": [
{
"provider": "<string>"
}
],
"closest": {},
"nearest": [
{}
],
"purchase_id": "<string>",
"preview": {
"unused": 1,
"held_excluded": 1,
"fee": 1,
"principal": 1,
"tax": 1,
"total": 1,
"card": {
"brand": "<string>",
"last4": "<string>",
"type": "card",
"email": "jsmith@example.com"
}
},
"quote": {
"amount": 2,
"tax": 1,
"total": 2,
"address_required": true,
"fee_minor": 1,
"missing": [
"<string>"
]
},
"redemption": {
"code": "<string>",
"amount_nanodollars": "<string>",
"description": "<string>",
"redeemed_at": "2023-11-07T05:31:56Z"
},
"scope": "workspace",
"period": "total",
"limit_nanodollars": 2,
"requested_nanodollars": 2,
"sign_in_method": "<string>",
"masked_email": "<string>",
"failure_reason": "<string>",
"names": [
"<string>"
],
"fields": [
"preferences.order"
],
"volume_id": "<string>",
"writer_sandbox_id": "<string>",
"checkpoint": 2,
"limit_bytes": 1,
"observed_bytes": 1,
"mismatch": {
"field": "image",
"recorded": "<string>",
"requested": "<string>",
"eligible": [
"<string>"
]
},
"volume_phase": "check",
"phase": "code",
"command": "<string>",
"exit_code": 123,
"stderr_tail": "<string>",
"stdout_tail": "<string>",
"port": 32768,
"revoked": true,
"preview_id": "<string>",
"url": "<string>",
"reason": "provider_account_disconnected",
"build_output": "<string>",
"path": "<string>",
"known": [
"<string>"
],
"limit": 123,
"unit": "<string>",
"usage": 123,
"limit_source": "workspace_spend_limit",
"spent_nanodollars": 1,
"available_nanodollars": 1,
"account_caps": [
{
"provider": "<string>",
"account_id": "<string>",
"limit": 2
}
],
"step_mismatches": [
{
"provider": "<string>",
"account_id": "<string>",
"step": 2
}
],
"providers": [
"<string>"
],
"retry_after_seconds": 1,
"reset_at": "2023-11-07T05:31:56Z",
"requirements": {},
"gate": "<string>",
"missing": {},
"still_eligible": 1,
"fits_here": true,
"exclusion": {
"provider": "<string>",
"kinds": [
"health_hidden"
],
"reasons": [
"provider_hidden"
]
},
"attempts": [
{
"provider": "<string>",
"outcome": "completed",
"native_code": "<string>",
"native_status": 123,
"route_id": "<string>",
"account_id": "<string>",
"supply": "<string>",
"cause": "key_rejected"
}
],
"fallbacks_allowed": true,
"stopped_reason": "fallbacks_disabled",
"state": "<string>",
"state_reason": "<string>",
"ended_at": "2023-11-07T05:31:56Z",
"sandbox_id": "<string>",
"sandbox_ids": [
"<string>"
],
"operations": [
{
"id": "<string>",
"operation": "<string>",
"sandbox_id": "<string>"
}
],
"cleanup": "confirmed",
"recovery_id": "<string>",
"upload_ids": [
"<string>"
],
"prerequisite": "<string>",
"command_started": false
},
"doc_url": "<string>",
"fix": "<string>",
"operation_id": "<string>",
"owner": "provider",
"provider": "<string>",
"provider_code": "<string>",
"native_code": "<string>",
"native_status": 123,
"native_message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"outcome": "not_started",
"retry": "safe",
"retry_after_seconds": 1,
"details": {
"selection_version": 1,
"considered": 1,
"excluded": [
{
"provider": "<string>"
}
],
"closest": {},
"nearest": [
{}
],
"purchase_id": "<string>",
"preview": {
"unused": 1,
"held_excluded": 1,
"fee": 1,
"principal": 1,
"tax": 1,
"total": 1,
"card": {
"brand": "<string>",
"last4": "<string>",
"type": "card",
"email": "jsmith@example.com"
}
},
"quote": {
"amount": 2,
"tax": 1,
"total": 2,
"address_required": true,
"fee_minor": 1,
"missing": [
"<string>"
]
},
"redemption": {
"code": "<string>",
"amount_nanodollars": "<string>",
"description": "<string>",
"redeemed_at": "2023-11-07T05:31:56Z"
},
"scope": "workspace",
"period": "total",
"limit_nanodollars": 2,
"requested_nanodollars": 2,
"sign_in_method": "<string>",
"masked_email": "<string>",
"failure_reason": "<string>",
"names": [
"<string>"
],
"fields": [
"preferences.order"
],
"volume_id": "<string>",
"writer_sandbox_id": "<string>",
"checkpoint": 2,
"limit_bytes": 1,
"observed_bytes": 1,
"mismatch": {
"field": "image",
"recorded": "<string>",
"requested": "<string>",
"eligible": [
"<string>"
]
},
"volume_phase": "check",
"phase": "code",
"command": "<string>",
"exit_code": 123,
"stderr_tail": "<string>",
"stdout_tail": "<string>",
"port": 32768,
"revoked": true,
"preview_id": "<string>",
"url": "<string>",
"reason": "provider_account_disconnected",
"build_output": "<string>",
"path": "<string>",
"known": [
"<string>"
],
"limit": 123,
"unit": "<string>",
"usage": 123,
"limit_source": "workspace_spend_limit",
"spent_nanodollars": 1,
"available_nanodollars": 1,
"account_caps": [
{
"provider": "<string>",
"account_id": "<string>",
"limit": 2
}
],
"step_mismatches": [
{
"provider": "<string>",
"account_id": "<string>",
"step": 2
}
],
"providers": [
"<string>"
],
"retry_after_seconds": 1,
"reset_at": "2023-11-07T05:31:56Z",
"requirements": {},
"gate": "<string>",
"missing": {},
"still_eligible": 1,
"fits_here": true,
"exclusion": {
"provider": "<string>",
"kinds": [
"health_hidden"
],
"reasons": [
"provider_hidden"
]
},
"attempts": [
{
"provider": "<string>",
"outcome": "completed",
"native_code": "<string>",
"native_status": 123,
"route_id": "<string>",
"account_id": "<string>",
"supply": "<string>",
"cause": "key_rejected"
}
],
"fallbacks_allowed": true,
"stopped_reason": "fallbacks_disabled",
"state": "<string>",
"state_reason": "<string>",
"ended_at": "2023-11-07T05:31:56Z",
"sandbox_id": "<string>",
"sandbox_ids": [
"<string>"
],
"operations": [
{
"id": "<string>",
"operation": "<string>",
"sandbox_id": "<string>"
}
],
"cleanup": "confirmed",
"recovery_id": "<string>",
"upload_ids": [
"<string>"
],
"prerequisite": "<string>",
"command_started": false
},
"doc_url": "<string>",
"fix": "<string>",
"operation_id": "<string>",
"owner": "provider",
"provider": "<string>",
"provider_code": "<string>",
"native_code": "<string>",
"native_status": 123,
"native_message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"outcome": "not_started",
"retry": "safe",
"retry_after_seconds": 1,
"details": {
"selection_version": 1,
"considered": 1,
"excluded": [
{
"provider": "<string>"
}
],
"closest": {},
"nearest": [
{}
],
"purchase_id": "<string>",
"preview": {
"unused": 1,
"held_excluded": 1,
"fee": 1,
"principal": 1,
"tax": 1,
"total": 1,
"card": {
"brand": "<string>",
"last4": "<string>",
"type": "card",
"email": "jsmith@example.com"
}
},
"quote": {
"amount": 2,
"tax": 1,
"total": 2,
"address_required": true,
"fee_minor": 1,
"missing": [
"<string>"
]
},
"redemption": {
"code": "<string>",
"amount_nanodollars": "<string>",
"description": "<string>",
"redeemed_at": "2023-11-07T05:31:56Z"
},
"scope": "workspace",
"period": "total",
"limit_nanodollars": 2,
"requested_nanodollars": 2,
"sign_in_method": "<string>",
"masked_email": "<string>",
"failure_reason": "<string>",
"names": [
"<string>"
],
"fields": [
"preferences.order"
],
"volume_id": "<string>",
"writer_sandbox_id": "<string>",
"checkpoint": 2,
"limit_bytes": 1,
"observed_bytes": 1,
"mismatch": {
"field": "image",
"recorded": "<string>",
"requested": "<string>",
"eligible": [
"<string>"
]
},
"volume_phase": "check",
"phase": "code",
"command": "<string>",
"exit_code": 123,
"stderr_tail": "<string>",
"stdout_tail": "<string>",
"port": 32768,
"revoked": true,
"preview_id": "<string>",
"url": "<string>",
"reason": "provider_account_disconnected",
"build_output": "<string>",
"path": "<string>",
"known": [
"<string>"
],
"limit": 123,
"unit": "<string>",
"usage": 123,
"limit_source": "workspace_spend_limit",
"spent_nanodollars": 1,
"available_nanodollars": 1,
"account_caps": [
{
"provider": "<string>",
"account_id": "<string>",
"limit": 2
}
],
"step_mismatches": [
{
"provider": "<string>",
"account_id": "<string>",
"step": 2
}
],
"providers": [
"<string>"
],
"retry_after_seconds": 1,
"reset_at": "2023-11-07T05:31:56Z",
"requirements": {},
"gate": "<string>",
"missing": {},
"still_eligible": 1,
"fits_here": true,
"exclusion": {
"provider": "<string>",
"kinds": [
"health_hidden"
],
"reasons": [
"provider_hidden"
]
},
"attempts": [
{
"provider": "<string>",
"outcome": "completed",
"native_code": "<string>",
"native_status": 123,
"route_id": "<string>",
"account_id": "<string>",
"supply": "<string>",
"cause": "key_rejected"
}
],
"fallbacks_allowed": true,
"stopped_reason": "fallbacks_disabled",
"state": "<string>",
"state_reason": "<string>",
"ended_at": "2023-11-07T05:31:56Z",
"sandbox_id": "<string>",
"sandbox_ids": [
"<string>"
],
"operations": [
{
"id": "<string>",
"operation": "<string>",
"sandbox_id": "<string>"
}
],
"cleanup": "confirmed",
"recovery_id": "<string>",
"upload_ids": [
"<string>"
],
"prerequisite": "<string>",
"command_started": false
},
"doc_url": "<string>",
"fix": "<string>",
"operation_id": "<string>",
"owner": "provider",
"provider": "<string>",
"provider_code": "<string>",
"native_code": "<string>",
"native_status": 123,
"native_message": "<string>"
}
}Authorizations
Response
The calling key and its workspace.
The calling key and where it belongs. organization.name is the label the dashboard's organization switcher shows ("Personal", or the team's name); the workspace's own name is "Default Workspace" for almost everyone, so it cannot tell two keys apart.