
Timefold GetDataset
CertifiedRetrieve a dataset from the Timefold Platform by job ID
Timefold GetDataset
Retrieve a dataset from the Timefold Platform by job ID
Fetches the current state of a previously submitted solving job from the Timefold Platform. Returns the modelOutput together with the solverStatus and score as reported by the platform at the time of the call.
Use this task after io.kestra.plugin.timefold.Solve to retrieve the solution once solving has completed. See the Timefold API documentation.
type: io.kestra.plugin.timefold.GetDatasetExamples
Submit a problem and retrieve the solution in a two-task flow.
id: timefold_route
namespace: company.team
tasks:
- id: solve
type: io.kestra.plugin.timefold.Solve
apiKey: "{{ secret('TIMEFOLD_API_KEY') }}"
model: FIELD_SERVICE_ROUTING
solveDuration: PT30S
modelInput:
vehicles:
- id: Ann
shifts:
- id: Ann-2027-02-01
startLocation: [33.68786, -84.18487]
minStartTime: "2027-02-01T09:00:00Z"
visits:
- id: Visit A
location: [33.77301, -84.43838]
serviceDuration: PT1H30M
- id: get_result
type: io.kestra.plugin.timefold.GetDataset
apiKey: "{{ secret('TIMEFOLD_API_KEY') }}"
model: FIELD_SERVICE_ROUTING
jobId: "{{ outputs.solve.jobId }}"
Properties
apiKey *Requiredstring
The Timefold Platform API key
Sent as the X-API-KEY header on every request. Provide it via a secret, for example apiKey: "{{ secret('TIMEFOLD_API_KEY') }}". The key must have access to the selected model.
jobId *Requiredstring
The job ID of the solving run to retrieve
Returned as jobId by io.kestra.plugin.timefold.Solve.
model *Requiredstring
FIELD_SERVICE_ROUTINGEMPLOYEE_SCHEDULINGPICKUP_DELIVERY_ROUTINGThe Timefold model to solve with
Determines the REST resource the dataset is submitted to. FIELD_SERVICE_ROUTING uses the route-plans endpoint and EMPLOYEE_SCHEDULING uses the schedules endpoint.
baseUrl string
https://app.timefold.aiBase URL of the Timefold Platform API
Defaults to the Timefold managed cloud. Override this when running a self-hosted Timefold deployment. The model and resource path segments are appended automatically, so provide only the host, e.g. https://app.timefold.ai.
fetchType string
STORESTOREFETCHFETCH_ONENONEHow to return the modelOutput
STORE(default): writesmodelOutputas a JSON file to Kestra's internal storage and returns its URI inuri. Recommended for large solutions.FETCH/FETCH_ONE: returnsmodelOutputinline in themodelOutputoutput field.NONE: discardsmodelOutputentirely (useful when onlysolverStatusandscoreare needed).
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
Outputs
jobId string
The identifier of the solving job on the Timefold Platform
modelOutput object
The optimized solution (modelOutput) returned inline (populated when fetchType is FETCH or FETCH_ONE)
The modelOutput object returned by the Timefold Platform. Populated when fetchType is FETCH or FETCH_ONE.
score string
The score of the solution at the time of retrieval, e.g. 0hard/0medium/-3603soft
solverStatus string
The solver status at the time of retrieval, e.g. SOLVING_COMPLETED or SOLVING_ACTIVE
uri string
uriURI to the stored modelOutput (populated when fetchType is STORE)
Points to the modelOutput JSON file written to Kestra's internal storage. Populated when fetchType is STORE (the default).