Jobs

Create a job

POST

Request

This endpoint expects an object.
type
enumRequired
The type of job
Allowed values: fileworkbooksheetspacedocument
operation
stringRequired
the type of operation to perform on the data. For example, "export".
source
stringRequired
The id of a file, workbook, or sheet
destination
stringOptional
The id of the workbook where extracted file data will be sent
trigger
enumOptional
the type of trigger to use for this job
Allowed values: manualimmediate
status
enumOptional
the status of the job
progress
integerOptional
the progress of the job. Whole number between 0 and 100
fileId
stringOptional
File ID
mode
enumOptional
the mode of the job
Allowed values: foregroundbackgroundtoolbarBlocking
input
map from strings to anyOptional
Input parameters for this job type.
subject
unionOptional
Subject parameters for this job type.
outcome
map from strings to anyOptional
Outcome summary of job.
info
stringOptional
Current status of job in text
managed
booleanOptional
Indicates if Flatfile is managing the control flow of this job or if it is being manually tracked.
environmentId
stringOptional
The id of the environment this job belongs to
part
integerOptional
The part number of this job
partData
map from strings to anyOptional
The data for this part of the job
partExecution
enumOptional
The execution mode for this part of the job
Allowed values: sequentialparallel
parentId
stringOptional
The id of the parent job
config
unionOptionalDeprecated

Response

This endpoint returns an object
data
object
A single unit of work that will execute asynchronously
POST
$curl -X POST https://api.x.flatfile.com/v1/jobs \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "type": "workbook",
> "operation": "submitAction",
> "source": "us_wb_YOUR_ID"
>}'
Response
1{
2 "data": {
3 "createdAt": "2023-10-30T20:04:28.556Z",
4 "id": "us_jb_YOUR_ID",
5 "operation": "submitAction",
6 "source": "us_wb_YOUR_ID",
7 "type": "workbook",
8 "updatedAt": "2023-10-30T20:04:32.075Z",
9 "destination": "us_wb_YOUR_ID",
10 "environmentId": "us_env_YOUR_ID",
11 "fileId": "us_fl_YOUR_ID",
12 "finishedAt": "2023-10-30T20:04:32.074Z",
13 "info": "Starting job to submit action to webhook.site",
14 "input": {},
15 "managed": true,
16 "mode": "foreground",
17 "outcome": {
18 "message": "Data was successfully submitted to Webhook.site. Go check it out at https://example.site/example."
19 },
20 "progress": 100,
21 "startedAt": "2023-10-30T20:04:29.453Z",
22 "status": "complete",
23 "subject": {
24 "type": "resource",
25 "id": "us_wb_YOUR_ID"
26 },
27 "trigger": "immediate",
28 "config": {}
29 }
30}