NAV
javascript

Introduction

Welcome to the api documentation of adiutaByte!

Since we offer solutions to multiple core optimization problems, the documentation is split into use cases. Please read the description to find out which fits your problem better or contact us to get a recommendation by us.

MixedPlanner Optimization

The MixedPlanner is the optimization core for all tour planning use cases (VRP). The planning horizon is usually one day, most tasks have a location and must be assigned to workers who move on a map. Typical use cases are:

The full documentation can be found here.

ShiftPlanner Optimization

The MixedPlanner is the optimization core for scheduling cases. Workers have time slots which they can carry out tasks in, restrictions focus for example on legal constraints regarding working time, biorhythm or team dynamics. Typical use cases are:

The full documentation can be found here.

FloorPlanner Optimization

The FloorPlanner is the optimization core for route planning without relevant travel times or distances.

The full documentation can be found here.

Authentication

To authorize, use this code:

const AmazonCognitoIdentity = require('amazon-cognito-identity-js');
const CognitoUserPool = AmazonCognitoIdentity.CognitoUserPool;
const poolData = {
  UserPoolId: "eu-central-1_0nXRn1JFH", // Your user pool ID here
  ClientId: "5n75tqsegshum2i9o0bgavmmuf" // Your client ID here
};
const userPool = new AmazonCognitoIdentity.CognitoUserPool(poolData);
const authenticationDetails = new AmazonCognitoIdentity.AuthenticationDetails({
  Username : 'abc@xyz.de', // Your username here
  Password : '*****', // Your password here
});

const userData = {
  Username : 'abc@xyz.de', // Your username again here
  Pool : userPool
};

const cognitoUser = new AmazonCognitoIdentity.CognitoUser(userData);
cognitoUser.authenticateUser(authenticationDetails, {
  onSuccess: function (result) {
  ...
  },
  onFailure: function(err) {
  console.log(err);
  },
});

Make sure to replace with your authentication data.

We are using personalized accounts to provide access to the API. You can request an account by contacting us.

Through the authentication you get three tokens: the access-token, the ID-token and the refresh-token. The tokens are jwt-tokens (JSON Web Tokens). The access-token is currently not used in the API. The ID-token has to be proposed in every request in the header as follows:

Authorization: 'ID-token'

The ID-token contains a timestamp when the token has been authorized (auth_time) and when it will expire (exp). Currently an ID-token expires after one hour. With these parameters you are able to check if the token is still valid. If a request with an expired token is sent, it will be rejected with status code 401. You can easily get a new ID-token by using the refresh-token without having to re-enter your credentials.

Currently the method SRP (Secure Remote Password protocol) is used for authentication. This method does not need to pass the password to the backend. Instead, a multiway handshake is used to proof the authentication. Implementations of this procedure can be found on the Wikipedia-Page.

The authentication is performed via AWS Cognito (Developer-Guide). AWS provides SDKs for some languages which simplifies the authentication process. For example, when you are using JavaScript you can use the amazon-cognito-identity-js to easily integrate the authentication. However, not all SDKs provide full support for this method.

Easily supported languages by AWS are:

If you are using a language that is not directly supported, feel free to contact us. Even if an AWS-SDK exists for your language, often the SRP-methods have to be implemented by yourself. Here you can try one of the implementations linked on Wikipedia.

Configurations

Basing on your id-token you are able to determine the user configuration.

User-Authentication

You authenticate yourself against this user pool with your account details to do calculations. When you have a managed account you have to provide a client id.

dev-usr UserPoolId eu-central-1_0nXRn1JFH
ClientId 5n75tqsegshum2i9o0bgavmmuf
prod-usr UserPoolId eu-central-1_xEyq6Mu6P
ClientId 3gv7fads00h2fdbrpjbfsl0e8k

Management-User-Authentication

You authenticate yourself against this user pool with you account details to alter limitation for your clients.

dev-mgmt UserPoolId eu-central-1_esw8SOukA
ClientId 7vqnjalt4k4op5ffhqf8uramvi
prod-mgmt UserPoolId eu-central-1_mzjLoYqqn
ClientId 5h4c5ngfm8atclqcvuqcnpj6v7