Skip to main content
GET
/
api
/
v1
/
workflowruns
/
{id}
PromptJuggler PHP SDK
$run = $pj->getWorkflowRun('01J...');
const run = await pj.getWorkflowRun('01J...');
run = pj.get_workflow_run('01J...')
WorkflowRun run = pj.getWorkflowRun("01J...");
run, err := pj.GetWorkflowRun(ctx, "01J...")
curl --request GET \
--url https://promptjuggler.com/api/v1/workflowruns/{id} \
--header 'Authorization: Bearer <token>'
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://promptjuggler.com/api/v1/workflowruns/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
require 'uri'
require 'net/http'

url = URI("https://promptjuggler.com/api/v1/workflowruns/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "createdAt": "2023-11-07T05:31:56Z",
  "outputs": {},
  "errors": [
    "<string>"
  ],
  "finishedAt": "2023-11-07T05:31:56Z",
  "tokenUsage": {
    "input": 123,
    "inputCached": 123,
    "output": 123,
    "reasoning": 123,
    "total": 123
  },
  "cost": {
    "success": {
      "input": 123,
      "cachedInput": 123,
      "output": 123,
      "webSearch": 123,
      "total": 123
    },
    "retries": {
      "input": 123,
      "cachedInput": 123,
      "output": 123,
      "webSearch": 123,
      "total": 123
    },
    "total": 123
  }
}
{
"error": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string<uuid>
required

Workflow run ID

Response

Workflow Run

Workflow run status and results.

id
string<uuid>
required

Workflow run ID.

status
enum<string>
required

Current run status.

Available options:
pending,
completed,
failed
createdAt
string<date-time>
required

Timestamp when the run was created.

outputs
object
required

Map of output node names to their values. Empty object while pending.

errors
string[]
required

List of error messages from failed nodes. Empty array on success.

finishedAt
string<date-time> | null

Timestamp when the run finished. Null while the run is pending.

tokenUsage
object | null

Aggregated token usage across the workflow run. Null while pending.

cost
object | null

Aggregated cost breakdown across the workflow run. Null while pending.