CommunityCreate AccountSign in
  • Overview
    • Welcome
    • Authentication
    • Using Environments
  • API Reference
LogoLogo
LogoLogo
CommunityCreate AccountSign in
API ReferenceJobs

Fail a job

POST
https://api.x.flatfile.com/v1/jobs/:jobId/fail
POST
/v1/jobs/:jobId/fail
1curl -X POST https://api.x.flatfile.com/v1/jobs/us_jb_YOUR_ID/fail \
2 -H "X-Disable-Hooks: true" \
3 -H "Authorization: Bearer <token>" \
4 -H "Content-Type: application/json" \
5 -d '{
6 "outcome": {
7 "acknowledge": true,
8 "buttonText": "Acknowledge",
9 "next": {
10 "type": "id",
11 "id": "us_jb_YOUR_ID"
12 },
13 "heading": "Failed",
14 "message": "Job failed"
15 },
16 "info": "Job was failed"
17}'
Try it
200Example0
1{
2 "data": {
3 "createdAt": "2023-10-30T20:04:28.556Z",
4 "createdBy": "us_usr_YOUR_ID",
5 "id": "us_jb_YOUR_ID",
6 "operation": "submitAction",
7 "source": "us_wb_YOUR_ID",
8 "type": "workbook",
9 "updatedAt": "2023-10-30T20:04:32.075Z",
10 "config": {},
11 "destination": "us_wb_YOUR_ID",
12 "environmentId": "us_env_YOUR_ID",
13 "fileId": "us_fl_YOUR_ID",
14 "finishedAt": "2023-10-30T20:04:32.074Z",
15 "info": "Starting job to submit action to webhook.site",
16 "input": {},
17 "managed": true,
18 "mode": "foreground",
19 "outcome": {
20 "message": "Data was successfully submitted to Webhook.site. Go check it out at https://example.site/example."
21 },
22 "progress": 100,
23 "spaceId": "us_sp_YOUR_ID",
24 "startedAt": "2023-10-30T20:04:29.453Z",
25 "status": "complete",
26 "subject": {
27 "type": "resource",
28 "id": "us_wb_YOUR_ID"
29 },
30 "trigger": "immediate"
31 }
32}
Fail a job and return the job
Was this page helpful?
Previous

Cancel a job

Next
Built with
Cancel a job
Fail a job and return the job

Authentication

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

Path parameters

jobIdstringRequired
ID of job to return

Headers

X-Disable-Hooks"true"RequiredDefaults to true

Request

This endpoint expects an optional object.
outcomeobjectOptional
Outcome summary of a job
infostringOptional

Response

This endpoint returns an object.
dataobject
A single unit of work that will execute asynchronously

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