GET /artifacts/{jobId}/{kind}
A read-only download URL, valid for 15 minutes, for one published file of a capture item.
Syntax
GET https://grid-lab.zyxio.xyz/artifacts/<jobId>/<kind>
x-api-key: <key>
Request
| Name | Where | Required | Meaning |
|---|---|---|---|
x-api-key | header | yes, or Authorization | Your API key, or Authorization: Bearer <token> from Zyxio sign-in. |
jobId | path | yes | A capture item's id. |
kind | path | yes | screenshot, html, body or meta. |
Which kinds an item has depends on its script and outcome:
| Item | Kinds |
|---|---|
capture, completed | screenshot, html, meta |
render-fetch, completed | html, meta |
fetch or browser-fetch, completed | body, meta |
| Any failed item | meta only, with outcome: "failure" |
Response
200 OK
| Field | Meaning |
|---|---|
url | An HTTPS URL that downloads the file without further credentials for 15 minutes from now. |
Ask again for a fresh URL rather than storing one. A URL is given only once the item's whole set of files is published and checked, so you never download half a result.
Errors
| Status | Body | When | What to do |
|---|---|---|---|
400 | The message naming the four kinds, below. | Another kind. | Use one of the four. |
401 | {"error": "unauthorized"} | No credential, or a key that is revoked, expired, wrong, or of a suspended account. | Send a valid key. |
503 | {"error": "accounting_unavailable"} | Your key or Zyxio sign-in could not be checked because the account database did not answer in time. Nothing was done. | Retry shortly; the same request is safe to resend. |
403 | {"error": "forbidden"} | A valid Zyxio sign-in token whose identity has no account here, or whose account is suspended. | Accept your invitation first, or use a key. |
404 | {"error": "unknown job"} | No such item, or it belongs to another identity. | Check the id. |
404 | {"error": "artifact not present", "reason": "job has no complete published artifact family for this kind"} | The item is not finished, or this kind does not exist for it. | Wait for the item to finish, or ask for a kind it has. |
The 400 body is exactly:
{"error": "kind must be screenshot|html|body|meta"}
Example
curl -s https://grid-lab.zyxio.xyz/artifacts/0b6c8f8e-2f3a-4c1d-9e5f-7a8b9c0d1e2f/meta \
-H "x-api-key: $BROWSERGRID_API_KEY"
{"url": "<a signed HTTPS URL, valid for 15 minutes>"}
curl -s -o meta.json '<the url>'
Billing
Free, as often as you like. The item was charged once, when it was published.