Collecting your Dataset Insight

This document outlines the two-step process for accessing dataset insights from the Credolab Portal after the successful client-side integration.

  1. Log in to credolab Portal: To access the full range of features, you must log in to the Credolab Portal. Provide your credentials and the system will verify and authenticate them. Upon successful authentication, you will be granted access to the platform's tools and resources.
  2. Request Dataset Insights: After logging in, you can request insights for each dataset. The response can be fully customized based on your request.

1. Log in to Credolab Portal

POST /api/account/v1/login

Login Request Description

This API call obtains a security token value with the provided subscription credentials.
Unless agreed differently, the token has a standard expiration time of 60 minutes.

Login Request Parameters

NameDescription
userEmail User email
password Password

Login Request Body Example (application/json)

{
    "userEmail": "[email protected]",
    "password": "TestPasswordValue"
}

Login Response

The API call returns the security token information.

Login Response Body Example (application/json)

{
    "access_token": "access_token_value",
    "token_type": "bearer",
    ".issued": "2018-04-08T11:01:41.92Z",
    ".expires": "2018-04-08T11:01:41.92Z",
  	"refresh_token": "refresh_token_value"
}

📘

Date and time field format

The ISO 8601 standard is an International Standard for the representation of dates and times. This format contains date, time, as well as the T character that designates the start of the time and the he time zone designator Z (UTC - Coordinated Universal Time). Z stands for Zulu time. Zulu Time Zone is 0 hours ahead of Greenwich Mean Time. The pattern for this date and time format is yyyy-mm-ddThh:mm:ssZ

For Login endpoints responses credolab treats and returns mixed date and time values in UTC.

Sending the Access Token in the Request Header

When sending the access token in the request header field, the client must use the Bearer authentication scheme to transmit the access token.

Authorization: Bearer access_token


2. Request Dataset Insights from Credolab Portal

GET /api/insights/v1/{referencenumber}?codes={code1}&{code2}

Dataset Insight Request Description

This API returns scores and insights calculated based on the data collected from a mobile device or a web session. The API is fully modular and returns a response only for requested product codes. If the code parameter is missing the response returns all scores and insights configured on the subscription.

📘

The list of available product codes will be provided by your CSM manager.

NOTE: if you use v6 API please check documentation here

Dataset Insight Request Parameters

NameDescription
referenceNumber
[string]
from route
Unique identifier of the dataset registered on the credolab server.
codes
[string]
from query
A unique set of insight codes configured in the subscription

Dataset Insight Response Result

The API call returns the Insight Request details for the provided reference number. The result contains the following attributes:

Main entityEntityNameDescriptionExample
Result AttributesreferenceNumber
[string]
Unique identifier of the dataset registered on the credolab server."12345678"
Result AttributesrequestedDate
[timestamp]
Date/time when the API is triggered by the requester. Timestamp ISO 8601 format: yyyy-mm-ddThh:mm:ss.ffffffZ and expressed in UTC."2020-12-16T02:39:24.986424Z"
Result Attributesrequester
[string]
E-mail of the user who triggered the API."[email protected]"
Result Attributesinsights
[array of insights]
A set of insight results that were calculated by the credolab scoring engine
Result Attributesinsightscode
[string]
Insight code that is defined by credolab."SC01"
Result Attributesinsightsvalue
[object]
Insights value based on the dataset captured and scorecard configured by credolab. Can be of two types: Score or Fragment.{ "score":535.0, "probability":0.1066 }
Result AttributesinsightscalculatedDate
[timestamp]
Date/time when the insights were calculated by the credolab scoring engine. Timestamp ISO 8601 format: yyyy-mm-ddThh:mm:ss.ffffffZ and expressed in UTC."2020-12-16T02:39:24.986424Z"