Table of Contents

    API

    Mock Server

    Use this URL to access a mockup of the API server. Your traffic will be recorded and compared to the documentation. You'll find your traffic analysis in the inspector or directly here in the documentation, right next to each resource.

Datafield API v1

Remember that you need an API Key prior to being able to use the APIs.

To receive an API Key, please contact us at contact@data-field.com

Get Token

POST

/apis/v1/tokens

A token is mandatory to call an API successfully. The provided user must be an account admin.

Response

200 (OK)
Content-Type: application/json; charset=utf-8
{
    "token": "{TOKEN}"
}

Surveys

GET

/apis/v1/surveys/{id}

Get Detail of Survey

Get the details of a survey where you know the SurveyID

Response

200 (OK)
Content-Type: application/json; charset=utf-8
{
    ... // Surveys detail
}

GET

/apis/v1/surveys/

Get List of Surveys

Get the list of Surveys for your account

Response

200 (OK)
Content-Type: application/json; charset=utf-8
{
    ... // Survey list
}

GET

/apis/v1/surveys/{id}/results?after={timestamp}

Get Results of a Campaign

Get results of a campaign

Response

200 (OK)
Content-Type: application/json; charset=utf-8
{
    ... // Results
}

Users

POST

/apis/v1/users

Create a user

Create a user

Response

200 (OK)
Content-Type: application/json; charset=utf-8
{
    ... // Results
}

GET

/apis/v1/users/{id}

Details of a user

Get details of a user

Response

200 (OK)
Content-Type: application/json; charset=utf-8
{
    ... // Results
}

GET

/apis/v1/users

List users

List users from an account

Response

200 (OK)
Content-Type: application/json; charset=utf-8
{
    ... // Results
}

GET

/apis/v1/users/{id}

Update a user details

Update the details of a user

Response

200 (OK)
Content-Type: application/json; charset=utf-8
{
    ... // Results
}

DELETE

/apis/v1/users/{id}

Delete a user

Delete a user

Response

200 (OK)
Content-Type: application/json; charset=utf-8
{
    ... // Confirmation
}

Teams

POST

/apis/v1/teams

Create a team

Create a team

Response

200 (OK)
Content-Type: application/json; charset=utf-8
{
    ... // Confirmation
}

GET

/apis/v1/teams/{id}

Get team details

Get team details

Response

200 (OK)
Content-Type: application/json; charset=utf-8
{
    "name": "staff", 
    "members": [1,2,3]
}

GET

/apis/v1/teams/{id}

Update a team details

Update team details

Response

200 (OK)
Content-Type: application/json; charset=utf-8
{
    ... // Results
}

GET

/apis/v1/teams

List teams in an account

List teams in an account

Response

200 (OK)
Content-Type: application/json; charset=utf-8
{
    ... // Results
}

DELETE

/apis/v1/teams/{id}

Delete a team

Delete a team

Response

200 (OK)
Content-Type: application/json; charset=utf-8
{
    ... // Results
}