Flatfile subpackage_jobs API
The subpackage_jobs API from Flatfile — 12 operation(s) for subpackage_jobs.
The subpackage_jobs API from Flatfile — 12 operation(s) for subpackage_jobs.
openapi: 3.1.0
info:
title: API Reference subpackage_accounts subpackage_jobs API
version: 1.0.0
servers:
- url: https://api.x.flatfile.com/v1
tags:
- name: subpackage_jobs
paths:
/jobs:
get:
operationId: list
summary: List jobs
tags:
- subpackage_jobs
parameters:
- name: environmentId
in: query
description: When provided, only jobs for the given environment will be returned
required: false
schema:
$ref: '#/components/schemas/type_commons:EnvironmentId'
- name: spaceId
in: query
description: When provided, only jobs for the given space will be returned
required: false
schema:
$ref: '#/components/schemas/type_commons:SpaceId'
- name: workbookId
in: query
description: When provided, only jobs for the given workbook will be returned
required: false
schema:
$ref: '#/components/schemas/type_commons:WorkbookId'
- name: fileId
in: query
description: When provided, only jobs for the given file will be returned
required: false
schema:
$ref: '#/components/schemas/type_commons:FileId'
- name: parentId
in: query
description: When provided, only jobs that are parts of the given job will be returned
required: false
schema:
$ref: '#/components/schemas/type_commons:JobId'
- name: pageSize
in: query
description: Number of jobs to return in a page (default 20)
required: false
schema:
type: integer
- name: pageNumber
in: query
description: Based on pageSize, which page of jobs to return
required: false
schema:
type: integer
- name: sortDirection
in: query
description: Sort direction - asc (ascending) or desc (descending)
required: false
schema:
$ref: '#/components/schemas/type_commons:SortDirection'
- name: excludeChildJobs
in: query
description: When true, only top-level jobs will be returned unless a parentId is specified
required: false
schema:
type: boolean
- name: source
in: query
description: When provided, only jobs with the given source will be returned
required: false
schema:
type: string
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
- name: X-Disable-Hooks
in: header
required: true
schema:
type: string
enum:
- 'true'
responses:
'200':
description: Response with status 200
content:
application/json:
schema:
$ref: '#/components/schemas/type_jobs:ListJobsResponse'
post:
operationId: create
summary: Create a job
tags:
- subpackage_jobs
parameters:
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
- name: X-Disable-Hooks
in: header
required: true
schema:
type: string
enum:
- 'true'
responses:
'200':
description: Response with status 200
content:
application/json:
schema:
$ref: '#/components/schemas/type_jobs:JobResponse'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/type_jobs:JobConfig'
/jobs/{jobId}:
get:
operationId: get
summary: Get a job
tags:
- subpackage_jobs
parameters:
- name: jobId
in: path
description: The id of the job to return
required: true
schema:
$ref: '#/components/schemas/type_commons:JobId'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
- name: X-Disable-Hooks
in: header
required: true
schema:
type: string
enum:
- 'true'
responses:
'200':
description: Response with status 200
content:
application/json:
schema:
$ref: '#/components/schemas/type_jobs:JobResponse'
patch:
operationId: update
summary: Update a job
tags:
- subpackage_jobs
parameters:
- name: jobId
in: path
description: The id of the job to patch
required: true
schema:
$ref: '#/components/schemas/type_commons:JobId'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
- name: X-Disable-Hooks
in: header
required: true
schema:
type: string
enum:
- 'true'
responses:
'200':
description: Response with status 200
content:
application/json:
schema:
$ref: '#/components/schemas/type_jobs:JobResponse'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/type_jobs:JobUpdate'
delete:
operationId: delete
summary: Delete a job
tags:
- subpackage_jobs
parameters:
- name: jobId
in: path
description: The id of the job to delete
required: true
schema:
$ref: '#/components/schemas/type_commons:JobId'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
- name: X-Disable-Hooks
in: header
required: true
schema:
type: string
enum:
- 'true'
responses:
'200':
description: Response with status 200
content:
application/json:
schema:
$ref: '#/components/schemas/type_commons:Success'
/jobs/{jobId}/execute:
post:
operationId: execute
summary: Execute a job
description: Execute a job and return the job
tags:
- subpackage_jobs
parameters:
- name: jobId
in: path
description: ID of job to return
required: true
schema:
type: string
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
- name: X-Disable-Hooks
in: header
required: true
schema:
type: string
enum:
- 'true'
responses:
'200':
description: Response with status 200
content:
application/json:
schema:
$ref: '#/components/schemas/type_commons:Success'
/jobs/{jobId}/plan:
get:
operationId: get-execution-plan
summary: Get a job's execution plan
description: Returns a single job's execution plan
tags:
- subpackage_jobs
parameters:
- name: jobId
in: path
description: ID of job to return
required: true
schema:
$ref: '#/components/schemas/type_commons:JobId'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
- name: X-Disable-Hooks
in: header
required: true
schema:
type: string
enum:
- 'true'
responses:
'200':
description: Response with status 200
content:
application/json:
schema:
$ref: '#/components/schemas/type_jobs:JobPlanResponse'
put:
operationId: update-execution-plan
summary: Replace a job's plan
description: Update a job's entire execution plan
tags:
- subpackage_jobs
parameters:
- name: jobId
in: path
description: ID of job to return
required: true
schema:
$ref: '#/components/schemas/type_commons:JobId'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
- name: X-Disable-Hooks
in: header
required: true
schema:
type: string
enum:
- 'true'
responses:
'200':
description: Response with status 200
content:
application/json:
schema:
$ref: '#/components/schemas/type_jobs:JobPlanResponse'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/type_jobs:JobExecutionPlanRequest'
patch:
operationId: update-execution-plan-fields
summary: Update a job's plan
description: Update one or more individual fields on a job's execution plan
tags:
- subpackage_jobs
parameters:
- name: jobId
in: path
description: ID of job to return
required: true
schema:
type: string
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
- name: X-Disable-Hooks
in: header
required: true
schema:
type: string
enum:
- 'true'
responses:
'200':
description: Response with status 200
content:
application/json:
schema:
$ref: '#/components/schemas/type_jobs:JobPlanResponse'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/type_jobs:JobExecutionPlanConfigRequest'
/jobs/{jobId}/ack:
post:
operationId: ack
summary: Acknowledge a job
description: Acknowledge a job and return the job
tags:
- subpackage_jobs
parameters:
- name: jobId
in: path
description: ID of job to return
required: true
schema:
$ref: '#/components/schemas/type_commons:JobId'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
- name: X-Disable-Hooks
in: header
required: true
schema:
type: string
enum:
- 'true'
responses:
'200':
description: Response with status 200
content:
application/json:
schema:
$ref: '#/components/schemas/type_jobs:JobResponse'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/type_jobs:JobAckDetails'
/jobs/{jobId}/outcome/ack:
post:
operationId: ack-outcome
summary: Acknowledge a job outcome
description: Acknowledge a job outcome and return the job
tags:
- subpackage_jobs
parameters:
- name: jobId
in: path
description: ID of job to return
required: true
schema:
$ref: '#/components/schemas/type_commons:JobId'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
- name: X-Disable-Hooks
in: header
required: true
schema:
type: string
enum:
- 'true'
responses:
'200':
description: Response with status 200
content:
application/json:
schema:
$ref: '#/components/schemas/type_jobs:JobResponse'
/jobs/{jobId}/complete:
post:
operationId: complete
summary: Complete a job
description: Complete a job and return the job
tags:
- subpackage_jobs
parameters:
- name: jobId
in: path
description: ID of job to return
required: true
schema:
$ref: '#/components/schemas/type_commons:JobId'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
- name: X-Disable-Hooks
in: header
required: true
schema:
type: string
enum:
- 'true'
responses:
'200':
description: Response with status 200
content:
application/json:
schema:
$ref: '#/components/schemas/type_jobs:JobResponse'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/type_jobs:JobCompleteDetails'
/jobs/{jobId}/fail:
post:
operationId: fail
summary: Fail a job
description: Fail a job and return the job
tags:
- subpackage_jobs
parameters:
- name: jobId
in: path
description: ID of job to return
required: true
schema:
$ref: '#/components/schemas/type_commons:JobId'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
- name: X-Disable-Hooks
in: header
required: true
schema:
type: string
enum:
- 'true'
responses:
'200':
description: Response with status 200
content:
application/json:
schema:
$ref: '#/components/schemas/type_jobs:JobResponse'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/type_jobs:JobCompleteDetails'
/jobs/{jobId}/cancel:
post:
operationId: cancel
summary: Cancel a job
description: Cancel a job and return the job
tags:
- subpackage_jobs
parameters:
- name: jobId
in: path
description: ID of job to return
required: true
schema:
$ref: '#/components/schemas/type_commons:JobId'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
- name: X-Disable-Hooks
in: header
required: true
schema:
type: string
enum:
- 'true'
responses:
'200':
description: Response with status 200
content:
application/json:
schema:
$ref: '#/components/schemas/type_jobs:JobResponse'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/type_jobs:JobCancelDetails'
/jobs/{jobId}/retry:
post:
operationId: retry
summary: Retry a failed job
description: Retry a failt job and return the job
tags:
- subpackage_jobs
parameters:
- name: jobId
in: path
description: ID of job to return
required: true
schema:
$ref: '#/components/schemas/type_commons:JobId'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
- name: X-Disable-Hooks
in: header
required: true
schema:
type: string
enum:
- 'true'
responses:
'200':
description: Response with status 200
content:
application/json:
schema:
$ref: '#/components/schemas/type_jobs:JobResponse'
/jobs/preview-mutation:
post:
operationId: preview-mutation
summary: Preview a mutation
description: Preview the results of a mutation
tags:
- subpackage_jobs
parameters:
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
- name: X-Disable-Hooks
in: header
required: true
schema:
type: string
enum:
- 'true'
responses:
'200':
description: Response with status 200
content:
application/json:
schema:
$ref: '#/components/schemas/type_records:DiffRecordsResponse'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/type_jobs:MutateJobConfig'
/jobs/{jobId}/split:
post:
operationId: split
summary: Split a job
description: Split a job and return the job
tags:
- subpackage_jobs
parameters:
- name: jobId
in: path
description: ID of job to return
required: true
schema:
$ref: '#/components/schemas/type_commons:JobId'
- name: Authorization
in: header
description: Bearer authentication
required: true
schema:
type: string
- name: X-Disable-Hooks
in: header
required: true
schema:
type: string
enum:
- 'true'
responses:
'200':
description: Response with status 200
content:
application/json:
schema:
$ref: '#/components/schemas/type_jobs:JobResponse'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/type_jobs:JobSplitDetails'
components:
schemas:
type_jobs:JobOutcomeTriggerAudience:
type: string
enum:
- originator
- all
description: For whom the job outcome's next effect should be triggered automatically
title: JobOutcomeTriggerAudience
type_records:CellConfig:
type: object
properties:
readonly:
type: boolean
description: CellConfig
title: CellConfig
type_property:FieldAppearance:
type: object
properties:
size:
$ref: '#/components/schemas/type_property:FieldSize'
description: Control the appearance of this field when it's displayed in a table or input
title: FieldAppearance
type_records:ValidationSource:
type: string
enum:
- required-constraint
- unique-constraint
- custom-logic
- unlinked
- invalid-option
- is-artifact
title: ValidationSource
type_records:ValidationType:
type: string
enum:
- error
- warn
- info
title: ValidationType
type_data-clips:RemovedFromMainResolution:
type: string
enum:
- ignore
- restore
title: RemovedFromMainResolution
type_jobs:JobPartExecution:
type: string
enum:
- sequential
- parallel
title: JobPartExecution
type_jobs:Driver:
type: string
enum:
- csv
description: The driver to use for extracting data from the file
title: Driver
type_jobs:FlagMutationConfigData:
type: object
properties:
slug:
type: string
description: The flag slug
label:
type: string
description: The flag label
colorHex:
type: string
description: The flag color in hex format
required:
- slug
description: Flag data for mutation operations
title: FlagMutationConfigData
type_jobs:JobType:
type: string
enum:
- file
- workbook
- sheet
- space
- document
- app
- agent
- autobuild
- onboarding
description: The type of job
title: JobType
type_property:ReferenceFilter:
type: object
properties:
refField:
type: string
description: The field key of the reference sheet to filter with
recordField:
type: string
description: The field key of the record used to filter the reference field
required:
- refField
- recordField
description: If provided, the reference filter will narrow the set of records in the reference sheet used as the set of valid values for the record. Only rows where the value in the reference sheet's refField matches the value in this record's recordField will be used.
title: ReferenceFilter
type_commons:Filter:
type: string
enum:
- valid
- error
- all
- none
description: Options to filter records
title: Filter
type_jobs:JobAckDetails:
type: object
properties:
info:
type: string
progress:
type: integer
description: the progress of the job. Whole number between 0 and 100
estimatedCompletionAt:
type: string
format: date-time
description: Details about the user who acknowledged the job
title: JobAckDetails
type_commons:ActionMessage:
type: object
properties:
type:
$ref: '#/components/schemas/type_commons:ActionMessageType'
content:
type: string
required:
- type
- content
title: ActionMessage
type_commons:EnvironmentId:
type: string
description: Environment ID
title: EnvironmentId
type_property:StringConfig:
type: object
properties:
size:
$ref: '#/components/schemas/type_property:StringConfigOptions'
required:
- size
title: StringConfig
type_jobs:JobOutcomeTriggerType:
type: string
enum:
- manual
- automatic
- automatic_silent
description: Whether a job outcome's effect should be triggered automatically
title: JobOutcomeTriggerType
type_commons:ActionConstraint:
oneOf:
- type: object
properties:
type:
type: string
enum:
- hasAllValid
description: 'Discriminator value: hasAllValid'
ignoreSelection:
type: boolean
required:
- type
- type: object
properties:
type:
type: string
enum:
- hasSelection
description: 'Discriminator value: hasSelection'
required:
- type
- type: object
properties:
type:
type: string
enum:
- hasData
description: 'Discriminator value: hasData'
required:
- type
- type: object
properties:
type:
type: string
enum:
- hasColumnEnabled
description: 'Discriminator value: hasColumnEnabled'
required:
- type
discriminator:
propertyName: type
title: ActionConstraint
type_commons:ActionMount:
oneOf:
- type: object
properties:
type:
type: string
enum:
- sheet
description: 'Discriminator value: sheet'
slugs:
type: array
items:
type: string
required:
- type
- type: object
properties:
type:
type: string
enum:
- workbook
description: 'Discriminator value: workbook'
slugs:
type: array
items:
type: string
required:
- type
- type: object
properties:
type:
type: string
enum:
- field
description: 'Discriminator value: field'
keys:
type: array
items:
type: string
required:
- type
- type: object
properties:
type:
type: string
enum:
- document
description: 'Discriminator value: document'
required:
- type
- type: object
properties:
type:
type: string
enum:
- file
description: 'Discriminator value: file'
required:
- type
discriminator:
propertyName: type
title: ActionMount
type_jobs:PipelineJobConfig:
type: object
properties:
sourceSheetId:
$ref: '#/components/schemas/type_commons:SheetId'
destinationSheetId:
$ref: '#/components/schemas/type_commons:SheetId'
runbookId:
$ref: '#/components/schemas/type_commons:RunbookId'
required:
- sourceSheetId
- destinationSheetId
title: PipelineJobConfig
type_jobs:ExportJobConfig:
type: object
properties:
options:
$ref: '#/components/schemas/type_jobs:ExportOptions'
required:
- options
title: ExportJobConfig
type_jobs:JobPartsArray:
type: array
items:
type: object
additionalProperties:
description: Any type
description: Data for each of the job parts
title: JobPartsArray
type_jobs:JobExecutionPlan:
type: object
properties:
fieldMapping:
type: array
items:
$ref: '#/components/schemas/type_jobs:Edge'
unmappedSourceFields:
type: array
items:
$ref: '#/components/schemas/type_jobs:SourceField'
unmappedDestinationFields:
type: array
items:
$ref: '#/components/schemas/type_jobs:DestinationField'
programId:
type: string
required:
- fieldMapping
- unmappedSourceFields
- unmappedDestinationFields
description: The execution plan for a job, for example, for a map job, the execution plan is the mapping of the source sheet to the destination sheet.
title: JobExecutionPlan
type_commons:InputEnumPropertyOption:
type: object
properties:
label:
type: string
description: A visual label for this option, defaults to value if not provided
description:
type: string
description: A short description for this option
color:
type: string
description: An optional color to assign this option
icon:
type: string
description: A reference pointer to a previously registered icon
meta:
type: object
additionalProperties:
description: Any type
description: An arbitrary JSON object to be associated with this option and made available to hooks
value:
description: The value or ID of this option. This value will be sent in egress. The type is a string | integer | boolean.
required:
- value
title: InputEnumPropertyOption
type_commons:Pagination:
type: object
properties:
currentPage:
type: integer
description: current page of results
pageCount:
type: integer
description: total number of pages of results
totalCount:
type: integer
description: total available results
required:
- currentPage
- pageCount
- totalCount
description: pagination info
title: Pagination
type_jobs:MutateJobConfig:
type: object
properties:
sheetId:
$ref: '#/components/schemas/type_commons:SheetId'
mutateRecord:
type: string
description: A JavaScript function that will be run on each record in the sheet, it should return a mutated record.
mutationId:
type: string
description: If the mutation was generated through some sort of id-ed process, this links this job and that process.
snapshotLabel:
type: string
description: If specified, a snapshot will be generated with this label
snapshotId:
type: string
description: The generated snapshotId will be stored here
filter:
$ref: '#/components/schemas/type_commons:Filter'
filterField:
$ref: '#/components/schemas/type_commons:FilterField'
searchValue:
$ref: '#/components/schemas/type_commons:SearchValue'
searchField:
$ref: '#/components/schemas/type_commons:SearchField'
q:
type: string
ids:
type: array
items:
$ref: '#/components/schemas/type_commons:RecordId'
description: The Record Ids param (ids) is a list of record ids that can be passed to several record endpoints allowing the user to identify specific records to INCLUDE in the query, or specific records to EXCLUDE, depending on whether or not filters are being applied. When passing a query param that filters the record dataset, such as 'searchValue', or a 'filter' of 'valid' | 'error' | 'all', the 'ids' param will EXCLUDE those records from the filtered results. For basic queries that do not filter the dataset, passing record ids in the 'ids' param will limit the dataset to INCLUDE just those specific records
required:
- sheetId
- mutateRecord
title: MutateJobConfig
type_jobs:Edge:
type: object
properties:
sourceField:
$ref: '#/components/schemas/type_property:Property'
description: The description of the source field
destinationField:
$ref: '#/components/schemas/type_property:Property'
description: The description of the destination field
preview:
type: array
items:
type: string
description: A list of preview values of the data in the destination field
enumDetails:
$ref: '#/components/schemas/type_jobs:EnumDetails'
description: Only available if one or more of the destination fields is of type enum. Provides category mapping.
metadata:
$ref: '#/components/schemas/type_jobs:Metadata'
description: Metadata about the edge
required:
- sourceField
- destinationField
title: Edge
type_commons:AppId:
type: string
description: App ID
title: AppId
type_commons:SortDirection:
type: string
enum:
- asc
- desc
description: Sort direction - asc (ascending) or desc (descending)
title: SortDirection
type_jobs:JobOutcomeTriggerDetails:
type: object
properties:
type:
$ref: '#/components/schemas/type_jobs:JobOutcomeTriggerType'
audience:
$ref: '#/components/schemas/type_jobs:JobOutcomeTriggerAudience'
required:
- type
description: Details about the trigger for the job outcome
title: JobOutcomeTriggerDetails
type_records:DiffRecord:
type: object
properties:
id:
$ref: '#/components/schemas/type_commons:RecordId'
versionId:
$ref: '#/components/schemas/type_commons:VersionId'
description: Deprecated, use `commitId` instead.
commitId:
$ref: '#/components/schemas/type_commons:CommitId'
valid:
type: boolean
description: Auto-generated value based on whether the record contains a field with an error message. Cannot be set via the API.
messages:
type: array
items:
$ref: '#/components/schemas/type_records:ValidationMessage'
description: This record level `messages` property is deprecated and no longer stored or used. Use the `messages` property on the individual cell values instead. This property will be removed in a future release.
metadata:
type: object
additionalProperties:
description: Any type
config:
$ref: '#/components/schemas/type_records:RecordConfig'
values:
$ref: '#/components/schemas/type_records:DiffData'
resolves:
type: array
items:
$ref: '#/components/schemas/type_data-clips:Resolve'
required:
- id
- values
title: DiffRecord
type_
# --- truncated at 32 KB (105 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/flatfile/refs/heads/main/openapi/flatfile-subpackage-jobs-api-openapi.yml