Jobs

Update a job's plan

PATCH
Update one or more individual fields on a job's execution plan

Path parameters

jobIdstringRequired
ID of job to return

Request

This endpoint expects an object.
fileId
stringRequired
File ID
jobId
stringRequired
Pipeline Job ID
fieldMapping
list of objectsOptional
programId
stringOptional
unmappedDestinationFields
list of objectsOptional
unmappedSourceFields
list of objectsOptional

Response

This endpoint returns an object
data
object
The job/plan tuple that contains the full plan and the jobs status
PATCH
$curl -X PATCH https://api.x.flatfile.com/v1/jobs/%3AjobId/plan \
> -H "X-Disable-Hooks: true" \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "fileId": "string",
> "jobId": "string"
>}'
Response
1{
2 "data": {
3 "job": {
4 "createdAt": "2023-01-01T00:00:00Z",
5 "id": "string",
6 "operation": "string",
7 "source": "string",
8 "type": "file",
9 "updatedAt": "2023-01-01T00:00:00Z",
10 "destination": "string",
11 "environmentId": "string",
12 "fileId": "string",
13 "finishedAt": "2023-01-01T00:00:00Z",
14 "info": "string",
15 "input": {
16 "string": {}
17 },
18 "managed": true,
19 "mode": "foreground",
20 "outcome": {
21 "string": {}
22 },
23 "outcomeAcknowledgedAt": "2023-01-01T00:00:00Z",
24 "parentId": "string",
25 "part": 0,
26 "partData": {
27 "string": {}
28 },
29 "partExecution": "sequential",
30 "progress": 0,
31 "startedAt": "2023-01-01T00:00:00Z",
32 "status": "created",
33 "subject": {
34 "type": "resource",
35 "id": "string"
36 },
37 "trigger": "manual",
38 "config": {
39 "filter": "valid",
40 "filterField": "string",
41 "searchValue": "string",
42 "searchField": "string",
43 "q": "string",
44 "sheet": "string",
45 "exceptions": [
46 "string"
47 ]
48 }
49 },
50 "plan": {
51 "fieldMapping": [
52 {
53 "sourceField": {
54 "type": "string",
55 "key": "string",
56 "alternativeNames": [
57 "string"
58 ],
59 "appearance": {
60 "size": "xs"
61 },
62 "config": {
63 "size": "tiny"
64 },
65 "constraints": [
66 {
67 "type": "required"
68 }
69 ],
70 "description": "string",
71 "label": "string",
72 "metadata": {},
73 "readonly": true,
74 "treatments": [
75 "string"
76 ]
77 },
78 "destinationField": {
79 "type": "string",
80 "key": "string",
81 "alternativeNames": [
82 "string"
83 ],
84 "appearance": {
85 "size": "xs"
86 },
87 "config": {
88 "size": "tiny"
89 },
90 "constraints": [
91 {
92 "type": "required"
93 }
94 ],
95 "description": "string",
96 "label": "string",
97 "metadata": {},
98 "readonly": true,
99 "treatments": [
100 "string"
101 ]
102 },
103 "preview": [
104 "string"
105 ],
106 "enumDetails": {
107 "mapping": [
108 {
109 "sourceValue": "string",
110 "destinationValue": "string"
111 }
112 ],
113 "unusedSourceValues": [
114 "string"
115 ],
116 "unusedDestinationValues": [
117 "string"
118 ]
119 },
120 "metadata": {
121 "certainty": "absolute",
122 "confidence": 1,
123 "source": "string"
124 }
125 }
126 ],
127 "unmappedSourceFields": [
128 {
129 "sourceField": {
130 "type": "string",
131 "key": "string",
132 "alternativeNames": [
133 "string"
134 ],
135 "appearance": {
136 "size": "xs"
137 },
138 "config": {
139 "size": "tiny"
140 },
141 "constraints": [
142 {
143 "type": "required"
144 }
145 ],
146 "description": "string",
147 "label": "string",
148 "metadata": {},
149 "readonly": true,
150 "treatments": [
151 "string"
152 ]
153 },
154 "preview": [
155 "string"
156 ]
157 }
158 ],
159 "unmappedDestinationFields": [
160 {
161 "destinationField": {
162 "type": "string",
163 "key": "string",
164 "alternativeNames": [
165 "string"
166 ],
167 "appearance": {
168 "size": "xs"
169 },
170 "config": {
171 "size": "tiny"
172 },
173 "constraints": [
174 {
175 "type": "required"
176 }
177 ],
178 "description": "string",
179 "label": "string",
180 "metadata": {},
181 "readonly": true,
182 "treatments": [
183 "string"
184 ]
185 },
186 "preview": [
187 "string"
188 ]
189 }
190 ],
191 "programId": "string"
192 }
193 }
194}