Skip to main content

Setup EasyCruit Public API

Updated over a month ago

Required setup from the tenant integration admin

  1. Support should first share the Visma Connect tenant ID and EasyCruit tenant ID for your user admin, as these are required to setup the connection

  2. After the user has been provisioned it is required to setup the account by following the link and instructions in the email. It is a simple Visma Connect account setup. If the tenant already used Visma Connect and this user was already provisioned - this step won't be required as user will already have the account in Visma Connect.

  3. When the account is ready the user can access the Visma Connect Portal to setup the integration: https://oauth.developers.visma.com/

  4. To set up the integration the user will first need to create a new application by accessing "My applications" menu:

  5. For the application we will need to use the "Machine-to-Machine" type:

  6. All the required information should be set for the application. Please note: "Test application" toggle should not be enabled, this was done just for the demo purposes. When done - click "Save as draft"

  7. After you have created the draft, click "Create" to create the application:

  8. Navigate to the "Integrations" tab and click "New integration":

  9. Select "Visma EasyCruit Public API" and click continue:

  10. Select the scopes. If you are planning to use one type of data extract - select the only corresponding scope, if you are planning to use multiple select multiple or generic one to access all of the reports. Please note: it is always better to keep the scope limited.

  11. Write the integration reason, describing why and what for the integration will be used for:

  12. After you confirm the integration EasyCruit team will receive the notification to approve the integration:

  13. You can keep the progress of the integrations and appovals on the start page of the Visma Connect portal:

  14. After the integration is approved you will receive an email notification. Then you can go under you application's "Credentials" tab and create new credentials:

  15. Enter the description, select the expiration for the secret and click "Generate secret":

  16. Copy and store you secret and the application ID, as those are the credentials that are used to get the authentication token for EasyCruit public API.

  17. Afterwards you can try receiving the token using the following command:

curl -X POST "https://connect.visma.com/connect/token" -H "Content-Type: application/x-www-form-urlencoded" -d "grant_type=client_credentials&client_id=<your application ID>&client_secret=<your secret>&tenant_id=<Visma Connect tenant ID received from support>&scope=<comma-separated list of scopes>"

In the reponse you will receive the JSON with the access token you can use to access the EasyCruit public API.

18. Now setup is done and you are ready to work with the API.

Connecting to API

After the application in Visma Connect is set up we can continue with the actual API usage. EasyCruit API support authentication using the Bearer token from Visma Connect. Currently only the reporting API is available for public usage. You can find the reporting API swagger here: https://easycruit.com/api/reporting/swagger/index.html

Swagger contains all required information on how to use the API, what models and response types are supported and the authentication methods.

Setting up the BI tool

As an example for the BI tool we will be using Grafana. Grafana has an "Infinity" plugin allowing to connect to the HTTP data sources. Please check you BI tool documentation to find a similar connector.

  1. Set authentication:

    1. Select OAuth2 authentication

    2. Set "Client ID" to you application ID in Visma Connect

    3. Set "Client Secret" to the generated secret in Visma Connect

    4. Token URL should always be set to https://connect.visma.com/connect/token

    5. Set the scopes you configured the application for, e.g. easycruit-public-api:reporting:read

    6. Important! add a custom parameter "tenant_id" and set it to the Visma Connect Tenant ID you received from EasyCruit Support.

    7. If applicable, add https://easycruit.com to the list of allowed hosts

  2. Now you can use the datasource to query the data:

    1. Select newly created datasource

    2. Select the data type (in our example CSV) but API supports different data types, please check the swagger documentation for the latest information

    3. Set the HTTP method and the URL. Method will usually be GET, the URL will be the URL for one of the reports, in our example:

    4. Important! set the Accept HTTP header to the correct value so that API returns the valid data type. Accept header is mandatory for all requests.

    5. Run the query. You should get the response from the API with the requested report.

  3. Now you can setup some graphs with your data, e.g. to get the bar chart of the applications added from the different sources:

Useful links


​

Did this answer your question?