Show examples in:
JavascriptHTTP
Endpoint info
Available examples
Dashboard API > Job result

Retrieve a job result

Warning: Experimental API

Please note that the Dashboard API is an experimental, prerelease API. This API method is considered unstable, and should be avoided in production environments and automations. Changes may occur at any time without warning.

If the job was started by an OAuth application, only the tokens of that application with all the scopes of the token that started the job can retrieve its result. Otherwise, only the sessions of the account can retrieve it.

Returns

Returns a resource object of type job_result

Examples

import { buildClient } from "@datocms/dashboard-client";
async function run() {
const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
const jobResultId = "34";
const jobResult = await client.jobResults.find(jobResultId);
// Check the 'Returned output' tab for the result ☝️
console.log(jobResult);
}
run();
{
id: "34",
status: 200,
payload: {
data: { id: 999, type: "item_type", attributes: { some: "attributes" } },
},
}