These docs are for v2.6. Click to read the latest docs for v3.2.

Uploading your Dataset

Uploading your dataset via credolab SDK is a straightforward process that allows you to easily integrate with our platform. Here are the two essential steps you'll need to follow:

  1. Login Request: Before uploading your dataset, you'll need to make a login request to the credolab SDK. This request will authenticate your identity and ensure that you have access to upload your data. Once you've logged in successfully, you'll be able to proceed with the upload process.
  2. Upload Request: After successfully logging in, the upload request can be initiated to transfer the dataset to our platform for processing and analysis.

With these two simple steps, you can easily integrate your data with credolab SDK and enjoy the benefits of our platform's powerful insights.

📘

Using Web SDK?

Please note that the documentation provided on this page pertains to mobile platforms. If you have already integrated the Web SDK, you may proceed directly to the guide on 'Collecting your Dataset Insight'.

1. Login for Upload Dataset from a client device

Methods are intended for authentication in the credolab system.


CredoAppLogin Request

POST /api/account/v1/credoAppLogin

CredoAppLogin Description

Obtain security token value by credoapp authentication key. The token expiration time is 60 minutes.

CredoAppLogin Parameters

NameDescription
authKey
[string]
credoapp authentication key

CredoAppLogin Request Body Example (application/json)

{
  	"authKey": "986cc3db-5e1b..."
}

CredoAppLogin Response

Security token information.

CredoAppLogin Response body example (application/json)

{
  	"access_token": "access_token_value",
  	"token_type": "bearer",
  	".issued": "2018-04-15T11:01:41.92Z",
  	".expires": "2018-04-15T11: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.

Using of Authorization Token in Request Header

While sending the access token in the Authorization request header field, the client uses the Bearer authentication scheme to transmit the access token.

Authorization: Bearer access_token_value

2. Upload Dataset from a client device


POST /api/datasets/v1/upload

Upload Request Description

Upload dataset.

Upload Request

NameDescription
referenceNumber
[string]
The parameter which could be used to identify the dataset.

We recommend using alphanumeric characters, dashes "-" and underscores "_" for the referenceNumber.
data
[string]
The mobile dataset collected by credolab SDK
realIp
[string]
Represent the real user IP address from which the dataset was uploaded to the client-server

Upload Request Body Example (application/json):

{
  	"referenceNumber": "#123456789",
  	"data": "H4sIAAAAAAAAAOVc62/bNhC/D/5DjHz...",
  	"realIp": "1.1.1.1"
}

Upload Response

Status code 200 or ProblemDetails Exception