https://promptfoo.dev/ logo
List jobs Issue
# ❓|questions
m
Hey is there any issue going ? I tried fetching all the jobs using below curl
Copy code
curl --location 'https://api.promptfoo.app/api/v1/jobs' \
--header 'Authorization: Bearer sk-'
Its returning 200 with below response
Copy code
<!doctype html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <link rel="icon" type="image/png" href="/favicon.png" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>promptfoo</title>
    <meta name="description" content="LLM testing and evaluation" />
    <meta property="og:image" content="https://www.promptfoo.dev/img/thumbnail.png" />
    <script type="module" crossorigin src="/assets/index-DB_c9Ymr.js"></script>
    <link rel="modulepreload" crossorigin href="/assets/vendor-react-CYTXikOz.js">
    <link rel="modulepreload" crossorigin href="/assets/vendor-mui-B9XhjAP5.js">
    <link rel="modulepreload" crossorigin href="/assets/vendor-editor-BaxJImcM.js">
    <link rel="modulepreload" crossorigin href="/assets/vendor-data-CeVXz3sW.js">
    <link rel="modulepreload" crossorigin href="/assets/vendor-forms-CJih_EwR.js">
    <link rel="stylesheet" crossorigin href="/assets/vendor-mui-BU3nLhQd.css">
    <link rel="stylesheet" crossorigin href="/assets/index-BMjnLQnQ.css">
</head>

<body>
    <div id="root"></div>
    <script src="/scripts/polyfills/scroll-timeline.js"></script>
</body>

</html>
I am expecting a json with job details. Can someone help me ?
m
The HTML response you're seeing indicates the endpoint doesn't exist on our cloud platform - here's no bug here, but I understand the response is confusing (we're working on returning a proper JSON 404 error instead). The
/jobs
endpoint is designed for self-hosted deployments where users run red team evaluation jobs locally and need to: - Start jobs via API - Monitor execution progress in real-time (via SSE) - Stop running jobs On the cloud platform, job orchestration is handled internally, so this endpoint isn't exposed. To list and retrieve your evaluations on cloud, use these endpoints: | Use Case | Endpoint | |----------|----------| | List all evaluations |
GET /api/v1/results
| | Get specific evaluation |
GET /api/v1/results/:id
| Example:
Copy code
bash
curl --location 'https://api.promptfoo.app/api/v1/results' \
  --header 'Authorization: Bearer sk-...'
This returns your completed evaluations with their results, which is likely what you're looking for. Let us know if you have any questions!