Download OpenAPI specification:Download
Welcome to the adiutaOpt API documentation!
This document specifies all endpoints and schema requirements. If you notice an error, please contact us.
The typical process of an optimization request looks as follows:
The overview site can be found here.
The authentication is performed via AWS Cognito (Developer-Guide). It is recommended to use one of the SKDs provided by AWS to simplify the authentication process considerably. Examples for SDKs:
Authentication provides three tokens: the access-token, the ID-token and the refresh-token. All three are JSON Web Tokens.
Authorization: 'ID-token'
auth_time
) and when it will expire (exp
). Currently, an ID-token expires after one hour and requests with expired ID-tokens are rejected automatically. You can get a new ID-token by using the refresh-token without having to re-enter your credentials.const user = ""; // your username const pw = ""; // your password const userPoolID = ""; // UserPoolID, see configuration details const clientID = ""; // ClientId, see configuration details const AmazonCognitoIdentity = require('amazon-cognito-identity-js'); module.exports.login = () => new Promise((resolve, reject) => { const userPool = new AmazonCognitoIdentity.CognitoUserPool({ UserPoolId: userPoolID, ClientId: clientID }); const authenticationDetails = new AmazonCognitoIdentity.AuthenticationDetails({ Username: user, Password: pw, }); const cognitoUser = new AmazonCognitoIdentity.CognitoUser({ Username: user, Pool: userPool }); cognitoUser.authenticateUser(authenticationDetails, { onSuccess: function (result) { const token = result.getIdToken().getJwtToken(); resolve(token); }, onFailure: function (err) { reject(); } }); })
Post a request to be solved.
If a new optimization request was received and was successfully processed, the endpoint will return 201
and the key with which the solution can be retrieved. This does not mean that calculating a solution will succeed, as logic errors, invalid ids and many other checks are performed later - these kinds of issues will result in an ErrorPlan
, retrievable from the solution endpoint. Only schema violations are being checked in this request, they will result in the request being rejected with code 422
.
If an optimization request was received but an identical request was already posted before, the endpoint will return 200
and the key with which the solution can be retrieved, which is identical to the key from the earlier request.
Request to this endpoint have a content size limit which depends on the used content-type
. Requests with content-type: application/json
must contain a "plain-text" json payload which must be less than 6Mb in size. For sending larger requests, you must use content-type: application/vnd.adiutabyte.adiutaopt.json+[gzip,deflate,br]
. These requests must contain the json data, compressed with gzip, deflate (zlib) or brotli, the payload size limit is 4.5Mb for the compressed data.
required | "application/json" (string) or "application/vnd.adiutabyte.adiutaopt.json+gzip" (string) or "application/vnd.adiutabyte.adiutaopt.json+deflate" (string) or "application/vnd.adiutabyte.adiutaopt.json+br" (string) The |
adiutaopt-version | string (optional) A specific version to process the request under. Valid versions can be retrieved with the /packages-list endpoint ( Using a specific version is not recommended for "general" application but for testing, debugging or other developer actions. Versions represent a specific state of the application, they cannot be changed, bug-fixed or extended in any way. For that reason, support for these requests may be limited. |
object (Client) Contains information about the client which sends this request. | |
required | object (ShiftPlannerMeta) Meta information about what to consider in the optimization. |
required | object (ShiftPlannerOptimizationParameters) Parameters for the optimizer. |
required | Array of objects (ShiftPlannerInputTask) Array of Tasks to be planned by the optimizer. |
required | Array of objects (ShiftPlannerInputWorker) Array of available Workers. |
object (ShiftPlannerHistory) History data. | |
recovery | Array of integers (IDReferences) [ items [ 0 .. 2147483647 ] ] This is a field only used for debugging by internal developers. Content in this field may change depending on the application, input-data and version. The output values can be used as input values. |
Basic blueprint for an optimization data set
{- "meta": {
- "dateFrom": "2019-12-01",
- "dateTo": "2019-12-10",
- "accuracyMode": 1
}, - "parameters": {
- "preset": 0
}, - "tasks": [
- {
- "date": "2019-12-03",
- "duration": 60,
- "taskID": 200,
- "timeEarliest": "0:00",
- "timeLatest": "24:00"
}, - {
- "date": "2019-12-04",
- "duration": 60,
- "taskID": 201,
- "timeEarliest": "0:00",
- "timeLatest": "24:00"
}, - {
- "date": "2019-12-05",
- "duration": 60,
- "taskID": 202,
- "timeEarliest": "06:00",
- "timeLatest": "12:00"
}, - {
- "date": "2019-12-06",
- "duration": 60,
- "taskID": 203,
- "timeEarliest": "06:00",
- "timeLatest": "12:00"
}
], - "workers": [
- {
- "workerID": 1,
- "shifts": [
- {
- "shiftDate": "2019-12-02",
- "shiftStart": "0:00",
- "shiftEnd": "24:00"
}, - {
- "shiftDate": "2019-12-03",
- "shiftStart": "0:00",
- "shiftEnd": "24:00"
}, - {
- "shiftDate": "2019-12-04",
- "shiftStart": "0:00",
- "shiftEnd": "24:00"
}, - {
- "shiftDate": "2019-12-05",
- "shiftStart": "0:00",
- "shiftEnd": "22:00"
}, - {
- "shiftDate": "2019-12-06",
- "shiftStart": "06:00",
- "shiftEnd": "12:00"
}, - {
- "shiftDate": "2019-12-06",
- "shiftStart": "15:00",
- "shiftEnd": "24:00"
}, - {
- "shiftDate": "2019-12-10",
- "shiftStart": "0:00",
- "shiftEnd": "24:00"
}
]
}
]
}
"VGVzdEtleUZvckFQSURvY3VtZW50YXRpb24uYXNk=="
Retrieve the solution from this endpoint with the key you got when posting the request. The solution can either be a solved request or an ErrorPlan
.
planID required | string Key returned in the 200/201 response of the POST request |
"application/json" (string) or "application/vnd.adiutabyte.adiutaopt.json+gzip" (string) or "application/vnd.adiutabyte.adiutaopt.json+deflate" (string) or "application/vnd.adiutabyte.adiutaopt.json+br" (string) (optional) The | |
"identity" (string) or "gzip" (string) or "deflate" (string) (optional) The |
requestID | string The identifier that allows finding input/output data, logs and more. This ID will be asked for in most non-trivial support cases so it should be stored when receiving the data. |
object (Client) Contains information about the client which sends this request. | |
required | object (ShiftPlannerMeta) Meta information about what to consider in the optimization. |
required | object (ShiftPlannerOptimizationParameters) Parameters for the optimizer. |
required | Array of ShiftPlannerOutputTaskAssigned (object) or ShiftPlannerOutputTaskUnassigned (object) (ShiftPlannerOutputTask) Array of assigned and unassigned tasks. |
required | Array of objects (ShiftPlannerOutputWorker) Array of available Workers. |
required | object (ShiftPlannerStatistics) Some statistics about the plan. |
required | object (ShiftPlannerInfo) Some textual information about the plan. |
required | object (BackendVersion) Used validation/ calculation version. |
recovery | Array of integers (IDReferences) [ items [ 0 .. 2147483647 ] ] This is a field only used for debugging by internal developers. Content in this field may change depending on the application, input-data and version. The output values can be used as input values. |
curl \ --request GET \ --url '[see url above]/[key obtained from POST request]' \ --header 'Authorization: Bearer [ID-Token obtained from Authentication (JWT)]'
{- "requestID": "string",
- "client": {
- "clientID": "string"
}, - "meta": {
- "dateFrom": "2020-04-10",
- "dateTo": "2020-04-10",
- "resCategory": false,
- "resQualification": false,
- "accuracyMode": 1.7e+308,
- "outputLanguage": 1,
- "minQualificationOfTaskCoverage": 2147483647,
- "omnipresentCategoriesOfTaskCoverage": [
- 2147483647
], - "enablePlanSplitting": true,
- "allowUnassignedTasks": false,
- "removeInvalidTasks": true,
- "followBiorhythm": false,
- "minConcurrentSolutions": 1,
- "minTaskDuration": 2147483647
}, - "parameters": {
- "preset": 0,
- "fairDistribution": 9,
- "timeliness": 9,
- "workerPrefs": 9,
- "teamPrefs": 9,
- "taskPrefs": 9,
- "worktimePrefs": 9,
- "workerReduction": 9,
- "genderPref": 9,
- "profitability": 9
}, - "tasks": [
- {
- "taskID": 2147483647,
- "externalID": "string",
- "date": "2020-04-10",
- "duration": 2147483647,
- "timeEarliest": "07:25",
- "timeLatest": "07:25",
- "timePriority": 5,
- "prefWorkers": [
- 2147483647
], - "forbWorkers": [
- 2147483647
], - "unpreferredWorkers": [
- 2147483647
], - "antiWorkers": [
- 2147483647
], - "qualification": 2147483647,
- "maxQualification": 2147483647,
- "categories": [
- 2147483647
], - "exchangeableCategories": [
- 2147483647
], - "preassignedWorker": 2147483647,
- "desiredWorker": 2147483647,
- "prefGender": 3,
- "precedingTasks": [
- 2147483647
], - "predecessorTasks": [
- 2147483647
], - "group": 2147483647,
- "groupOrder": 2147483647,
- "revenue": 1.7e+308,
- "initassignedShift": 2147483647,
- "assignmentPriority": 5,
- "initassignedWorker": 2147483647,
- "initassignedOrder": 2147483647,
- "timeScheduled": "07:25",
- "assignedWorker": 2147483647,
- "assignedShift": 2147483647,
- "info": "string",
- "finalassignedOrder": 1,
- "profit": -1.7e+308
}
], - "workers": [
- {
- "workerID": 2147483647,
- "externalID": "string",
- "shifts": [
- {
- "shiftID": 2147483647,
- "shiftDate": "2020-04-10",
- "shiftStart": "07:25",
- "shiftEnd": "07:25",
- "shiftPriority": 3
}
], - "qualification": 2147483647,
- "categories": [
- 2147483647
], - "desiredCategory": 2147483647,
- "prefCategories": [
- 2147483647
], - "prefWeekCategories": [
- 2147483647
], - "prefWeekendCategories": [
- 2147483647
], - "prefWorkers": [
- 2147483647
], - "unpreferredWorkers": [
- 2147483647
], - "antiWorkers": [
- 2147483647
], - "gender": 3,
- "expectedWorkingMinutes": 2147483647,
- "minWorkingMinutes": 2147483647,
- "maxWorkingMinutes": 2147483647,
- "maxConsecutiveWorkdays": 2147483647,
- "minConsecutiveWorkdays": 2147483647,
- "prefConsecutiveWorkdays": 2147483647,
- "carryoverConsecutiveWorkdays": 2147483647,
- "maxConsecutiveOffdays": 2147483647,
- "minConsecutiveOffdays": 2147483647,
- "prefConsecutiveOffdays": 2147483647,
- "carryoverConsecutiveOffdays": 2147483647,
- "minBreakMinutesBetweenTasks": 2147483647,
- "maxDailyWorkingMinutes": 2147483647,
- "maxDailyTasks": 2147483647,
- "minFreeSaturdays": 2147483647,
- "minFreeSundays": 2147483647,
- "maxWeeklyWorkingMinutes": 2147483647,
- "carryoverWorkingMinutesLastWeek": 2147483647,
- "maxTwoWeekWorkingMinutes": 2147483647,
- "carryoverWorkingMinutesSecondLastWeek": 2147483647,
- "dontVary": false,
- "costsPerMinute": 1.7e+308,
- "costsInitial": 1.7e+308,
- "precTaskDate": "2020-04-10",
- "precTaskScheduled": "07:25",
- "precTaskDuration": 2147483647,
- "precNightShifts": 2147483647,
- "maxOrderedGroups": 2147483647,
- "maxDesiredOrderedGroups": 2147483647,
- "maxNightShifts": 2147483647,
- "maxDesiredNightShifts": 2147483647,
- "minFreeWeekends": 2147483647,
- "minDesiredFreeWeekends": 2147483647,
- "maxConsecutiveSameTaskStart": 2147483647,
- "maxDesiredConsecutiveSameTaskStart": 2147483647,
- "maxWeeklyWorkingDays": 2147483647,
- "prefWeeklyWorkingDays": 2147483647,
- "carryoverWorkingDaysLastWeek": 2147483647,
- "minConsecutiveFreeWeekends": 2147483647,
- "minDesiredConsecutiveFreeWeekends": 2147483647,
- "maxConsecutiveFreeWeekends": 2147483647,
- "maxDesiredConsecutiveFreeWeekends": 2147483647,
- "minConsecutiveWorkingWeekends": 2147483647,
- "minDesiredConsecutiveWorkingWeekends": 2147483647,
- "maxConsecutiveWorkingWeekends": 2147483647,
- "maxDesiredConsecutiveWorkingWeekends": 2147483647,
- "precWeekendWorkingDay": "2020-04-10",
- "carryoverConsecutiveWorkingWeekends": 2147483647,
- "consecutiveNightShiftsForOffdays": 2147483647,
- "minOffdaysAfterConsecutiveNightShifts": 2147483647,
- "workdayPattern": [
- 1,
- 1
], - "workdayCycle": {
- "cycleDuration": 1,
- "minFreeWeekends": 1,
- "minDesiredFreeWeekends": 1,
- "minOffdays": 1,
- "minDesiredOffdays": 1
}, - "info": "string",
- "totalTaskTime": 2147483647
}
], - "statistics": {
- "impact": [
- {
- "label": "string",
- "value": 1
}
], - "timeWindowViolationTaskIDs": [
- 2147483647
], - "unassignedTaskIDs": [
- 2147483647
], - "unassignableTaskIDs": [
- 2147483647
], - "history": {
- "workers": [
- {
- "workerID": 2147483647,
- "minConsecutiveWorkdays": 2147483647,
- "maxConsecutiveWorkdays": 2147483647,
- "minConsecutiveOffdays": 2147483647,
- "maxConsecutiveOffdays": 2147483647,
- "minFreeSaturdays": 2147483647,
- "minFreeSundays": 2147483647,
- "minFreeWeekends": 2147483647,
- "maxWeeklyWorkingDays": 2147483647,
- "maxNightShifts": 2147483647,
- "maxConsecutiveSameTaskStart": 2147483647,
- "weeklyShifts": [
- {
- "weekday": 6,
- "shiftStart": "07:25",
- "shiftEnd": "07:25",
- "workPreferenceFactor": -1
}
], - "preferenceFactor": 1.7e+308,
- "cycleStart": "2020-04-10"
}
]
}, - "preferredWorkers": {
- "matched": 2147483647,
- "unmatched": 2147483647,
- "unassigned": 2147483647
}, - "unpreferredWorkers": {
- "matched": 2147483647,
- "unmatched": 2147483647,
- "unassigned": 2147483647
}
}, - "info": {
- "text": "string",
- "feasible": true
}, - "backendVersion": {
- "version": "v1.0.0",
- "optVersion": "1970-01-01_0p0",
- "rev": "strings",
- "schema": "v1.2.3"
}, - "recovery": [
- 2147483647
]
}
Get the currently deployed version.
adiutaopt-version | string (optional) A specific version to process the request under. Valid versions can be retrieved with the /packages-list endpoint ( Using a specific version is not recommended for "general" application but for testing, debugging or other developer actions. Versions represent a specific state of the application, they cannot be changed, bug-fixed or extended in any way. For that reason, support for these requests may be limited. |
schema | string |
version | string |
meta_data | string |
api_scripts | string |
curl \ --request GET \ --url '[see url above]' \ --header 'Authorization: Bearer [ID-Token obtained from Authentication (JWT)]'
{- "schema": "v1.7.0",
- "version": "2024-10-01_0",
- "meta_data": "v19",
- "api_scripts": "v1.6.2"
}
Get a list of all available packages. The Name
of each package can be used in a POST request in header adiutaopt-version
, the algorithm will then run on the specified version.
Name required | string |
LastModified | string |
object (VersionInfo) Example: "[object Object]" |
curl \ --request GET \ --url '[see url above]' \ --header 'Authorization: Bearer [ID-Token obtained from Authentication (JWT)]'
[- {
- "Name": "a6b69c77bedb7",
- "LastModified": "2024-08-16T12:41:09.000Z",
- "Content": {
- "schema": "v2.7.0",
- "version": "2024-10-01_0",
- "meta_data": "v26"
}
}, - {
- "Name": "d63ca460db7bc",
- "LastModified": "2024-08-16T09:16:09.000Z",
- "Content": {
- "schema": "v2.3.0",
- "version": "2024-10-01_0p0",
- "meta_data": "v26"
}
}
]
A string consisting of three parts following the pattern "YYYY-MM-DD":
While the schema does not check for validity, the optimization algorithms do. Including invalid dates (e.g. 2020-02-31) leads to a validation error.
Examples:
"2020-04-10"
A string of either format "hh:mm" or "-hh:mm":
Times are always interpreted relative to a date in the same object as the Time field. This allows times to exceed 24h or even become negative, as the value gets "added" to midnight of the date. For example, the following times applied to the respective date (in Date format) are equivalent:
"07:25"
Values are:
3
A numerical representation of a weekday. Values are:
6
A version consisting of the date of release [0-9]{4}-[0-9]{2}-[0-9]{2}_[0-9]+
, which can have a patch suffix p[0-9]+
.
"1970-01-01_0p0"
See https://semver.org/ for a full description of semantic versioning. The regex here is a subset of allowed semantic versions.
"v1.2.3"
ShiftPlannerInputWorker
: workdayPattern
.workdayCycle
.ShiftPlannerStatisticsHistoryWorkerEntry
:cycleStart
content-type
options in POST requests:application/vnd.adiutabyte.adiutaopt.json+gzip
application/vnd.adiutabyte.adiutaopt.json+deflate
application/vnd.adiutabyte.adiutaopt.json+br
accept-encoding
in GET requests with allowed values:identity
deflate
gzip
accept
in GET requests with allowed values:application/json
application/vnd.adiutabyte.adiutaopt.json+gzip
application/vnd.adiutabyte.adiutaopt.json+deflate
application/vnd.adiutabyte.adiutaopt.json+br
version
to adiutaopt-version
BackendVersion
:version
to be constant "v1.0.0", marked as deprecatedoptVersion
, has the same properties as version
did in v4OPTIONS
requestsOPTIONS
requestsVersion
to paths /[/floor-/shift-]description
and /[/floor-/shift-]version
/[/floor-/shift-]packages-list
/description
, /shift-description
, /floor-description
ShiftPlannerInputWorker
:consecutiveNightShiftsForOffdays
minOffdaysAfterConsecutiveNightShifts
Number_u32
, replaced all occurrences with Number_u64
. Those are:MixedPlannerInputTask
, MixedPlannerOutputTask
:revenue
MixedPlannerInputWorker
, MixedPlannerOutputWorker
:capacity
capacityInitial
volume
volumeInitial
weight
weightInitial
finalCapacityResetThreshold
finalVolumeResetThreshold
finalWeightResetThreshold
costsPerKM
costsPerMinute
costsInitial
ShiftPlannerInputWorker
, ShiftPlannerOutputWorker
:costsPerMinute
costsInitial
Number_s64
Number_s32
, replaced all occurrences with Number_s64
. Those are:MixedPlannerInputTask
, MixedPlannerOutputTask
: capacity
weight
volume
MixedPlannerOutputTaskAssigned
: profit
MixedPlannerStatistics
:planProfitability
ShiftPlannerOutputTaskAssigned
:profit
ShiftPlannerInputTask
/ShiftPlannerOutputTask
: revenue
, changed it from Number_s32
to Number_u64
FloorPlannerInputPlan
, FloorPlannerOutputPlan
, MixedPlannerInputPlan
, MixedPlannerOutputPlan
, ShiftPlannerInputPlan
, ShiftPlannerOutputPlan
recovery
ShiftPlannerMeta
, MixedPlannerMeta
, FloorPlannerMeta
:removeInvalidTasks
ShiftPlannerStatisticsPreferencesMatches
ShiftPlannerStatistics
:preferredWorkers
unpreferredWorkers
ShiftPlannerOutputWorker
:totalTaskTime
MixedPlannerInputTask
, ShiftPlannerInputTask
, ShiftPlannerInputWorker
:unpreferredWorkers
antiWorkers
as deprecated400
, 413
to endpoints for posting new optimization requestsFloorPlannerInputTask
: exclusiveSetID
FloorPlannerInputWorker
: preferredCategories
unpreferredCategories
desiredCategories
undesiredCategories
ErrorEntry
, FloorPlannerInputTask
, FloorPlannerInputWorker
, MixedPlannerInputTask
, MixedPlannerInputWorker
, ShiftPlannerInputTask
, ShiftPlannerInputWorker
ErrorPlan
FloorPlannerOutputTaskAssigned
FloorPlannerOutputTaskUnassigned
FloorPlannerOutputWorker
MixedPlannerConstructionSite
MixedPlannerHistoryAssignment
MixedPlannerHistoryTask
MixedPlannerHistoryWorker
MixedPlannerLocationSite
MixedPlannerOutputPlan
MixedPlannerStatisticsHistoryTask
MixedPlannerStatisticsHistoryWorker
MixedPlannerTravelOverrideDense
MixedPlannerOutputTaskAssigned
MixedPlannerOutputTaskUnassigned
MixedPlannerOutputWorker
ShiftPlannerOutputTaskAssigned
ShiftPlannerOutputTaskUnassigned
ShiftPlannerOutputWorker