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-08T11:01:41.9286886+03:00",
    ".expires": "2018-04-08T11:01:41.9286886+03:00"
}

Using of Authorisation Token in Request Header

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

Authorisation: 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.
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