Quickstart
Let's get you started with requesting access to the API through Visma Developer Portal
Getting API Access
-
Log in to Visma Developer Portal
- Stage environment (for testing): https://oauth.developers.stagaws.visma.com
- Production environment (when making it available for end-users): https://oauth.developers.visma.com
-
Go to "My Applications" and click "Add Application" > "Service (Machine-to-Machine)."
-
Fill in the required details and save your application. Make sure to note your
client_id
. -
Publish the application.
-
Open the application and add a new integration.
-
Select the API you want to integrate with:
- For the stage environment, select
automatic-rostering-stage
. - For the production environment, select
automatic-rostering-prod
.
- For the stage environment, select
-
Select the appropriate scope for your integration:
- For the stage environment, select
automatic-rostering-stage
. - For the production environment, select
automatic-rostering-prod
.
- For the stage environment, select
-
Wait for the integration to be accepted. Feel free to contact the Automatic Rostering team to expedite the process.
-
Open the application, generate credentials, and securely store the
client_secret
.
Run your first job
-
To authenticate, create a POST request to the Visma Connect API - see API Reference for instructions.
-
Before running your first job, you need to specify the problem to be solved. Feel free to use the example payload as a starting point and check out the API reference for configurations. Use the
/feasibility
endpoint to evaluate the configuration. See the Feasibility section for what is being evaluated. -
Now you are ready to generate your first roster! Use the
/jobs
endpoint to start a job. The response will contain a 'statusCode' and a 'jobId' for your job. -
Use the
/jobs/{jobId}
to get status of the job. -
Use the
/jobs/{jobId}/result
to get the current best result of the job. This will always be updated with the best result as long as the job is running.
Generate code from OpenAPI Specification
The Automatic Rostering API is built on the OpenAPI Specification. You can generate code for your preferred programming language using the OpenAPI Specification.
The easiest way to get some hands-on experience with running the API is to follow our getting-started guides, so if you haven't checked those out yet, we highly recommend starting there.
Once you have some experience with designing the payloads, we highly recommend using code-generation tools to help you get started with the API through the OpenAPI specification.
-
The OpenAPI specification for the Automatic Rostering service can be found here.
-
The OpenAPI Generator or Swagger Codegen can be used to generate code for your preferred programming language.
-
For example, to generate a C# client with the OpenAPI Generator, you can use the following command:
$ npx @openapitools/openapi-generator-cli generate -i ./openapi.yml -g csharp
-
There seems to be some conflicts if attempting to use the hosted resource directly
(i.e to call with the input:
-i https://docs.optimization-rostering.prod.visma.net/openapi.yml
)so it is recommended to download the file and use it locally.
-