Skip to main content
POST
/
sandbox
/
search
Sandbox search
curl --request POST \
  --url https://apigcp.trynia.ai/v2/sandbox/search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "repository": "<string>",
  "query": "<string>",
  "ref": "<string>",
  "stream": true
}
'
{
  "workspaceKind": "<string>",
  "job": {
    "id": "<string>",
    "status": "<string>",
    "query": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "startedAt": "2023-11-07T05:31:56Z",
    "completedAt": "2023-11-07T05:31:56Z"
  },
  "sandbox": {
    "daytonaSandboxId": "<string>",
    "sandboxName": "<string>",
    "status": "<string>",
    "workspacePath": "<string>",
    "preparedAt": "2023-11-07T05:31:56Z",
    "deletedAt": "2023-11-07T05:31:56Z"
  },
  "repository": {
    "provider": "<string>",
    "canonicalUrl": "<string>",
    "ref": "<string>",
    "commitSha": "<string>",
    "defaultBranch": "<string>",
    "deduplicateKey": "<string>",
    "daytonaVolumeId": "<string>",
    "volumeName": "<string>",
    "cacheSubpath": "<string>",
    "cacheLastRefreshedAt": "2023-11-07T05:31:56Z"
  },
  "result": {
    "answer": "<string>",
    "rawOutput": "<string>",
    "command": "<string>",
    "exitCode": 123,
    "workspacePath": "<string>",
    "volumeName": "<string>",
    "cacheSubpath": "<string>"
  },
  "error": {
    "message": "<string>",
    "name": "<string>",
    "code": "<string>",
    "stack": "<string>",
    "causeMessage": "<string>",
    "details": "<unknown>"
  }
}

Authorizations

Authorization
string
header
required

API key must be provided in the Authorization header

Body

application/json
repository
string
required

Full HTTPS clone URL for a public GitHub, GitLab, or Bitbucket repository (not org/repo shorthand).

Minimum string length: 1
query
string
required

Natural-language question for the read-only agent.

Minimum string length: 1
ref
string

Optional branch, tag, or commit to check out.

Minimum string length: 1
stream
boolean

When true, use SSE unless explicitly set to false (which forces JSON regardless of Accept).

Response

Successful Response (JSON job payload, or text/event-stream when streaming)

Serialized sandbox query job. Optional fields depend on workspace kind and job status.

workspaceKind
string
required
job
SandboxSearchJobInfo · object
required
sandbox
SandboxSearchRuntimeInfo · object
required
repository
SandboxSearchRepositoryInfo · object
result
SandboxSearchExecutionResult · object
error
SandboxSearchJobError · object