Skip to main content
GET
Get snippet details

Authorizations

Authorization
string
header
required

workspace API token (sk_akua_...) or OAuth2 JWT. Create tokens at https://akua.dev/developers/api-tokens

Path Parameters

id
string
required

Snippet ID

Required string length: 1 - 54

Response

Snippet details

id
string
required
Required string length: 1 - 54
Example:

"snp_j572abc123def456"

html_url
string<uri>
required

Absolute dashboard URL for this resource. OUTPUT_ONLY.

Maximum string length: 2048
Example:

"https://akua.dev/dashboards/snippets/snp_j572abc123def456"

name
string
required
Example:

"Cluster Resource Audit"

description
string | null
required
Example:

"Checks resource requests and limits"

code
string
required

Async JavaScript function body executed in a sandboxed runtime. Has access to platform.request() for API calls.

Example:

"async () => { ... }"

display_type
enum<string>
required

Controls how the snippet result is rendered in dashboard widgets

Available options:
table,
stat,
json,
logs,
timeseries
Example:

"table"

visibility
enum<string>
required

Whether the snippet is reusable workspace state or scoped to an agent session.

Available options:
workspace,
session
origin
enum<string>
required

Who authored the snippet descriptor.

Available options:
user,
agent,
system
agent_session_id
string | null
required
Required string length: 1 - 54
agent_turn_id
string | null
required
Required string length: 1 - 54
purpose
enum<string>
required
Available options:
general,
prepared_action,
reactive_read,
widget
workspace_id
string
required
Required string length: 1 - 53
Example:

"ws_j572abc123def456"

created_by
string
required

User ID of the snippet creator

created_at
integer
required

Unix timestamp (seconds)

Required range: x >= 0
updated_at
integer
required

Unix timestamp (seconds)

Required range: x >= 0
etag
string
required