Work

Inspect your worker queue and results

Inspect EHQ-owned worker requests and configured projects through a personal platform-admin connection. Read one request by requestId, or recent requests filtered by actionId and request statuses. mayHaveMore means older matches may be omitted. Worker mode is saved policy, not proof the worker is online. Action phase, execution receipts and reported results are separate; a completed run does not prove accepted work. Show the EHQ review link when review is required. Requires opt-in work:read.

Method

POST

Path

/v1/work/inspect

Required scope

work:read

Request

curl -X POST "https://api.endurancehq.app/v1/work/inspect" \
  -H "Authorization: Bearer $EHQ_API_KEY"

JSON body schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "requestId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "actionId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "statuses": {
      "minItems": 1,
      "maxItems": 8,
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "pending",
          "approved",
          "dispatching",
          "dispatched",
          "completed",
          "rejected",
          "failed",
          "expired"
        ]
      }
    },
    "limit": {
      "default": 30,
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    }
  },
  "required": [
    "limit"
  ],
  "additionalProperties": false
}

Response

Success status: 200

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "requests": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "revision": {
                "type": "string"
              },
              "followUp": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "requestId": {
                        "type": "string"
                      },
                      "attempt": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "actionId": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "requestId",
                      "attempt",
                      "actionId"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "continuedByRequestId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "kind": {
                "type": "string",
                "enum": [
                  "worker",
                  "computer_use"
                ]
              },
              "requestStatus": {
                "type": "string",
                "enum": [
                  "pending",
                  "approved",
                  "dispatching",
                  "dispatched",
                  "completed",
                  "rejected",
                  "failed",
                  "expired"
                ]
              },
              "title": {
                "type": "string"
              },
              "summary": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "project": {
                "type": "string"
              },
              "product": {
                "type": "string"
              },
              "instructions": {
                "type": "string"
              },
              "sourceUrl": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "targetId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "payloadHash": {
                "type": "string"
              },
              "attempt": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "expiresAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
              },
              "error": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "action": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "url": {
                        "type": "string",
                        "format": "uri"
                      },
                      "mode": {
                        "type": "string",
                        "enum": [
                          "execute",
                          "prepare"
                        ]
                      },
                      "phase": {
                        "type": "string"
                      },
                      "message": {
                        "type": "string"
                      },
                      "changedAt": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                      },
                      "resultHash": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "acceptedAt": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "url",
                      "mode",
                      "phase",
                      "message",
                      "changedAt",
                      "resultHash",
                      "acceptedAt"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "execution": {
                "type": "object",
                "properties": {
                  "provider": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "harness": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "model": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "reasoningEffort": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "threadId": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "url": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "startedAt": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "completedAt": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "provider",
                  "harness",
                  "model",
                  "reasoningEffort",
                  "threadId",
                  "url",
                  "startedAt",
                  "completedAt"
                ],
                "additionalProperties": false
              },
              "result": {
                "type": "object",
                "properties": {
                  "delegatedDecisions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "credentialId": {
                          "type": "string"
                        },
                        "credentialType": {
                          "type": "string",
                          "enum": [
                            "api_key",
                            "oauth_token"
                          ]
                        },
                        "decision": {
                          "type": "string",
                          "enum": [
                            "approve",
                            "reject",
                            "retry",
                            "accept",
                            "request_changes"
                          ]
                        },
                        "payloadHash": {
                          "type": "string"
                        },
                        "inputHash": {
                          "type": "string"
                        },
                        "attempt": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "recordedAt": {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                        }
                      },
                      "required": [
                        "credentialId",
                        "credentialType",
                        "decision",
                        "payloadHash",
                        "inputHash",
                        "attempt",
                        "recordedAt"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "reportedOutcome": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "accepted",
                          "needs_review",
                          "blocked"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "criteria": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "criterion": {
                          "type": "string"
                        },
                        "passed": {
                          "type": "boolean"
                        },
                        "evidence": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "criterion",
                        "passed",
                        "evidence"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "remaining": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "finalMessage": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "delegatedDecisions",
                  "reportedOutcome",
                  "criteria",
                  "remaining",
                  "finalMessage"
                ],
                "additionalProperties": false
              },
              "previousAttempts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "attempt": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "requestStatus": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "approved",
                        "dispatching",
                        "dispatched",
                        "completed",
                        "rejected",
                        "failed",
                        "expired"
                      ]
                    },
                    "error": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "result": {
                      "type": "object",
                      "properties": {
                        "delegatedDecisions": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "credentialId": {
                                "type": "string"
                              },
                              "credentialType": {
                                "type": "string",
                                "enum": [
                                  "api_key",
                                  "oauth_token"
                                ]
                              },
                              "decision": {
                                "type": "string",
                                "enum": [
                                  "approve",
                                  "reject",
                                  "retry",
                                  "accept",
                                  "request_changes"
                                ]
                              },
                              "payloadHash": {
                                "type": "string"
                              },
                              "inputHash": {
                                "type": "string"
                              },
                              "attempt": {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              "recordedAt": {
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
                              }
                            },
                            "required": [
                              "credentialId",
                              "credentialType",
                              "decision",
                              "payloadHash",
                              "inputHash",
                              "attempt",
                              "recordedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "reportedOutcome": {
                          "anyOf": [
                            {
                              "type": "string",
                              "enum": [
                                "accepted",
                                "needs_review",
                                "blocked"
                              ]
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "criteria": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "criterion": {
                                "type": "string"
                              },
                              "passed": {
                                "type": "boolean"
                              },
                              "evidence": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "criterion",
                              "passed",
                              "evidence"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "remaining": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "finalMessage": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "delegatedDecisions",
                        "reportedOutcome",
                        "criteria",
                        "remaining",
                        "finalMessage"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "attempt",
                    "requestStatus",
                    "error",
                    "result"
                  ],
                  "additionalProperties": false
                }
              },
              "review": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "format": "uri"
                  },
                  "required": {
                    "type": "boolean"
                  },
                  "reason": {
                    "type": "string"
                  },
                  "authority": {
                    "type": "string",
                    "enum": [
                      "ehq_owner",
                      "delegated_connection"
                    ]
                  }
                },
                "required": [
                  "url",
                  "required",
                  "reason",
                  "authority"
                ],
                "additionalProperties": false
              },
              "attention": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "approval",
                      "running",
                      "blocked",
                      "result",
                      "closed"
                    ]
                  },
                  "message": {
                    "type": "string"
                  },
                  "url": {
                    "type": "string",
                    "format": "uri"
                  },
                  "canFollowUp": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "kind",
                  "message",
                  "url",
                  "canFollowUp"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "revision",
              "followUp",
              "continuedByRequestId",
              "kind",
              "requestStatus",
              "title",
              "summary",
              "project",
              "product",
              "instructions",
              "sourceUrl",
              "targetId",
              "payloadHash",
              "attempt",
              "createdAt",
              "expiresAt",
              "error",
              "action",
              "execution",
              "result",
              "previousAttempts",
              "review",
              "attention"
            ],
            "additionalProperties": false
          }
        },
        "mayHaveMore": {
          "type": "boolean"
        },
        "configuration": {
          "type": "object",
          "properties": {
            "configured": {
              "type": "boolean"
            },
            "targetId": {
              "type": [
                "string",
                "null"
              ]
            },
            "projects": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "project": {
                    "type": "string"
                  },
                  "product": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "allowCode": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "project",
                  "product",
                  "description",
                  "allowCode"
                ],
                "additionalProperties": false
              }
            },
            "workerMode": {
              "type": "object",
              "properties": {
                "mode": {
                  "type": "string",
                  "enum": [
                    "normal",
                    "hold",
                    "plow"
                  ]
                },
                "until": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "setAt": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "mode",
                "until",
                "setAt"
              ],
              "additionalProperties": false
            },
            "reserve": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "resetsAt": {
                      "type": "string"
                    },
                    "notice": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "resetsAt",
                    "notice"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "null"
                }
              ]
            },
            "reviewUrl": {
              "type": "string",
              "format": "uri"
            }
          },
          "required": [
            "configured",
            "targetId",
            "projects",
            "workerMode",
            "reserve",
            "reviewUrl"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "requests",
        "mayHaveMore",
        "configuration"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false
}

Other surfaces

CLI: ehq work inspect [request_id] [--action <task_id>] [--statuses <comma_separated>] [--limit <n>]

MCP tool: ehq_work_inspect