Skip to main content
GET
/
snippets
/
{id}
Get snippet details
curl --request GET \
  --url https://api.akua.dev/v1/snippets/{id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "j572abc123def456",
  "name": "Cluster Resource Audit",
  "description": "Checks resource requests and limits",
  "code": "async () => { ... }",
  "display_type": "table",
  "agent_session_id": "<string>",
  "agent_turn_id": "<string>",
  "workspace_id": "j572abc123def456",
  "created_by": "<string>",
  "created_at": 1,
  "updated_at": 1,
  "etag": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.akua.dev/llms.txt

Use this file to discover all available pages before exploring further.

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
Example:

"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 V8 isolate. 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
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
Example:

"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