NAV
javascript

Introduction

What can you do with Jexia?

Jexia is a backend as a service for your data driven applications. With Jexia you can create and retrieve data using simple APIs. To see how simple Jexia can be used by you, create an account right now.

Quick Start

To experience how easy it is to create an application with Jexia just login and use the UI screen. Then create a Data App and create a Dataset. The fields created in the dataset will be directly available for you as developer by generated APIs. To use your data four REST APIs methods are available. These methods correspond to the HTTPS request that will be used to execute them. For example GET will retrieve existing records, POST will create a new record, PUT will update an existing record and DELETE will remove an existing record. This corresponds also to the CRUD methods (Create/Read/Update/Delete).

So to retrieve data using the GET for your defined dataset you can use:

[GET] [api_url]/[your-dataset-name]

The [api_url] that must be used can be retrieved from the UI (Click on button ‘Get API URL’).

Fetch one record by id: /[your-dataset-name]/[id] Example:

/[your-dataset-name]/555f2476716d857e53dd9796

Fetching specific records using the where [string] value as JSON: Usage:

/[your-dataset-name]?where={"FIELDNAME":{"[contains|startswith]":"VALUE AS STRING"}}

Examples:

To limit [number] set max. number of records to return (can be useful for pagination).

/[your-dataset-name]?limit=100 By default this is 300.

To skip [number] a number of records (can be useful for pagination), use:

/[your-dataset-name]?skip=100

By default, returned records are sorted by primary key ascending order.This can be changed by:

/[your-dataset-name]?sort=FIELDNAME[space '%20']ASC|DESC

You can also sort on fields within your dataset:

/[your-dataset-name]?sort=lastName%20ASC

More information on how you can use your APIs for your APP can be found in the section “How to use your APIs”. In the section “API Management” information can be found on how to manage and control all APIs that Jexia offers for managing your application(s).

How to use your APIs

This section describes how to use your APIs.

Authentication

To access a Jexia DataSet, an Authentication Token must be provided with each request.

Acquire Token

To acquire an Authentication Token, you send a POST request to your DataApp supplying the Key and Secret. The Key and Secret define what privileges the generated Authentication Token has.

Acquire a new Authentication Token

Acquiring a new Authentication token is very simple. You must supply your Key and the secret in the POST request.

The Javascript sample code fragment (see right, and click the tab javascript) shows how to use JQuery to get a new Authentication Token.

This Javascript code fragment shows how to use JQuery to get a new Authentication Token:

    $.ajax({
        url: 'https://9d37e080-7969-11e5-a4e2-afadb3154965.app.jexia.com/',
        type: 'post',
        data: {
            key: 'f6ce68a0fad723b76c12770cfbb0b86f',                    
            secret: '890b94a63e0eccc22fcbf3bc139dff105985fdd1e15ce56e'
        }}).
        done(function(data) {
            console.log(data.token);
        });

Simple authentication

Simple authentication allows you to authenticate your DataApp by sending the key and secret on each request as query parameters. This removes the need to first acquire a token and then send it in the Authorization header on every request.

In order to use Simple authentication , it must be enabled for the key you want to use it for. Enabling can be done within the Jexia UI or by using the REST API for the key, as described in section ‘Working with REST API keys’ ( “simpleAuthentication”: true).

By default, simple authentication is disabled.

To use Simple authentication you need to send requests like:

<app_url>/<data_set_name>?key=<key>&secret=<secret>

So if, for example, you have a data app with a data set called my_cool_data_set, to use simple authentication you need to request something like:

06766440-d171-11e5-afd4-1dafb1c482be.app.jexia.com/my_cool_data_set?key=7f86190e4c248f56193bd01f4b191188&secret=e637bb38fe34e131a9cc58d1ced23607f4e9566cea3110b1

The same permissions as defined on the key for data app, data set and fields apply when using simple authentication.

Session Management

The JWT_access_token you receive expires after two hours. You can only refresh the token before it has expired. When you refresh the token, you will get a new one. You will not be able to use the old token anymore.

Refresh Authentication Token


`PATCH https://app_url`

Request:

{
    "refresh_token": "<refresh_token that you got when you started the session>"
}

Response:

{
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE0NDYyMTYyNjAsImV4cCI6MTQ0NjIyMzQ2MH0.0tFOaYp8bvzFBYDTM-rGokPBVM-7aPtc8GDzn0lrWPg",
    "refresh_token": "388b2bc6-f7b7-4a3f-97b2-dbdef5b1c83f"
}

The access token is valid for 2 hours. If you want to prolong it you can you can refresh it using the refresh_token. After refreshing the refresh_token and the token are no longer valid. Note that you cannot refresh a token after it has expired.

When you authenticate you get an object like:

{
  "token": <your token>,  
  "refresh_token": <the refresh token>
}

When you refresh the token you need to have your token in the header and refresh_token in the body.

The Javascript sample code fragment (see right, and click the tab javascript) shows how to use JQuery to refresh a expired Authentication Token:

    $.ajax({
        url: 'https://9d37e080-7969-11e5-a4e2-afadb3154965.app.jexia.com/',
        type: 'patch',
        data: {
            refresh_token: 'CURRENT_REFRESH_TOKEN',
            headers: {
                'Authorization': 'Bearer ' + 'YOUR_CURRENT_TOKEN'
            }    
        }}).
        done(function(data) {
            console.log(data.token);
        });

To refresh a session, use:

    PATCH <app_url>/
    {
    "refresh_token": "<refresh_token that you got when you started the session>"
    }

Don’t forget the Authorization header! You will get back something just like when you started the session:

{ "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE0NDYyMTY yNjAsImV4cCI6MTQ0NjIyMzQ2MH0.0tFOaYp8bvzFBYDTM-rGokPBVM-7aPtc8GDzn0lrWPg", "refresh_token": "388b2bc6-f7b7-4a3f-97b2-dbdef5b1c83f" }

Working with the REST API keys

Keys

Whenever you want to manipulate your data stored in your Data App, you need to start a session. The session is started when an access token was sent back to you. In each request you make, you need to send the access token along in the header of the request. When you do not send a valid access token along with your request you will get a 403 error message.

Starting a session

    POST <app_url>/
    {
    "key": "xyz...",
    "secret": "abc..."
    }

You will get back something like:

    {
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE0NDYyMTQ1M
            TMsImV4cCI6MTQ0NjIyMTcxM30.Sp1KkLQoSZNWk36ceLLJHdu2ROMuFbhT_GhIqEfZPQo",
    "refresh_token": "d56f3145-943c-4aee-8a57-b4a706c4bfb9"
    }

Every other request that you send to the DataApp must contain an “Authorization” header with the value “Bearer ”. A token is valid for only 2 hours. If you want to prolong it you can refresh it.

Simple authentication

Keys can also allow simple authentication, meaning that instead of fetching a token first and then sending it the Authorization header, you can send the key and secret as query parameters when requesting your data set endpoints.

To create a key that allows simple authentication you can set simpleAuthentication to true. See code sample on the right.

Activating Simple authentication

POST https://services.jexia.com/key
{
    ...
    "simpleAuthentication": true, // defaults to false
    ...
}

By default, simple authentication will be disabled.

Using keys on the Data Apps

Request: { "key": "xyz...", "secret": "abc..." }

Response:

    {
        "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE0NDYyMTQ1MTMsImV4cCI6MTQ0NjIyMTcxM30.Sp1KkLQoSZNWk36ceLLJHdu2ROMuFbhT_GhIqEfZPQo",
        "refresh_token": "d56f3145-943c-4aee-8a57-b4a706c4bfb9"
    }

To start a session post to App Url the key and the secret, which you can find in the dashboard under the tab “Api Keys”. You will get back an access token and a refresh token. Every other request you make to the Data App needs to contain Bearer in the Authorization header. POST and GET request don’t require the Authorization Header.

Endpoint

POST https://app_url

Parameters

Parameters Type Description
key String The key you want the access token from
secret String The secret

Success 200

Parameters Type Description
token String The JWT Bearer access token
refresh_token String The refresh token

Endpoint

PATCH https://app_url

Field Type Description
Authorization String JWT Token Bearer acces_token

.

Parameters

Parameters Type Description
refresh_token String The refresh token you got

.

Success 200

Parameters Type Description
token String The new JWT Token Bearer access_token
refresh_token String The new refresh token

Using data relations

It is possible to create relations between datasets

Imagine that we have two data sets belonging to the same data app:


Person:
{
    "id": "111",
    "name": "Person",
    "app": "123"
}
and Pet:
{
    "id": "222",
    "name": "Pet",
    "app": "123"
}

We can create a relation between them:

Request


{
    "fromId": "111",
    "fromType": "one",
    "toId": "222",
    "toType": "many"
}

This creates a one-to-many relation between the Person and Pet data sets. This means that a Person can have many pets and a Pet belongs to only one Person.

There are two main ways of relating a Person and a Pet. See the samples provided at the right of the screen.

Request


`POST <your-data-app-url>/person`


{
    "name": "Shaggy",
    ...
    "rel_pet": [
        {
            "name": "Scooby Doo",
            "age": 7,
            ...
        }
    ]
}

Or you can do:

`POST <your-data-app-url>/pet`


{
    "name": "Scooby Doo",
    ...
    "rel_person": {
        "name": "Shaggy",
        ...
    }
}

Either one of these methods will create both a record in Person and in Pet, related to each other.

Note: if the data app has 'populateAll’ set to true, all related records will be populated automatically. Relations that can be created are: 1. One-to-one 2. one-to-many 3. many-to-many

REST API Query Options

When using REST calls to your data you can make use of data query options. These can be used to find, filter and sort the output from your dataset. This section outlines query options for your Jexia dataset. You do not have to use query options, all parameters are optional, but they can make your code a lot simpler.

Find

Parameter Type Details
* string Filter results based on a particular string attribute. Specify a query parameter with a field name as occurs in your dataset. E.g. GET [APPURL]/[datasetname]?[fieldname]=value
where string Instead of filtering based on a specific attribute, you may choose to provide a where parameter with a WHERE criteria object, encoded as a JSON string. This allows you to take advantage of contains, startsWith, and other sub-attribute criteria modifiers for more powerful find() queries.e.g. ?where={“name”:{“contains”:“highscore”}}
limit number The maximum number of records to send back (useful for pagination). Defaults to 30. e.g. /[your-dataset-name]?limit=30
skip number The number of records to skip in a GET (e.g. useful for pagination). e.g. /[your-dataset-name]?skip=30
sort string The sort order. By default, returned records are sorted by primary key value in ascending order. E.g. ?sort=jexiaDeveloperName%20ASC

Where parameter

You have several ways to put constraints on documents retrieved when you use the GET parameter. The value of the where parameter must be encoded JSON.

Key Operation
$lt Less Than
$lte Less Than Or Equal To
$gt Greater Than
$gte Greater Than Or Equal To
$ne Not Equal To
$in Contained In
$nin Not Contained in
$exists A value is set for the key
$select This matches a value for a key in the result of a different query
$dontSelect Requires that a key’s value not match a value for a key in the result of a different query
$all Contains all of the given values
$regex Requires that a key’s value match a regular expression

Examples

Fetching specific records using the where [string] value as JSON: Usage: /[your-dataset-name]?where={"name":{"startsWith":"Jex"}}

Real Time Communication

With Jexia you can make use of Real Time Communication based on your events that relate to your dataset. This means by whenever there are changes in your dataset you will be notified.

Note that for this to work you need to make sure real time communication is enabled (it is on by default).

Start a session in your data app

See Using keys on Data Apps

Connect to the RTC server.

In order to connect to the RTC server you need to use a Faye client. If you are using Jexia in the browser directly you can just get the client from /rtc/client.js.

We are going to assume throughout this document that we are using the javascript client provided above. Only ruby and javascript/node have officially supported Faye clients. Clients for other languages also exist, just Google.

Subscribe to the channels of the dataset.


<script type="text/javascript" src="<rtc_url>/rtc/client.js"></script>
<script type="text/javascript">
    ...
    // assuming that you have already successfully started a session on your data app and have a token...

    var rtcUrl = '<rtc_url>/rtc';

    var client = new Faye.Client(rtcUrl);

    // We need to make the Faye client send the token every time it subscribes to a channel
    client.addExtension({
        outgoing: function(message, callback) {
            // optional (but recommended), check that this is a subscription message
            if (message.channel !== '/meta/subscribe') return callback(message);

            // convention is to put custom data in message.ext
            message.ext = message.ext || {};
            message.ext.token = token;

            callback(message);
        }
    });

    var channel = '/' + dataAppId + '/' + dataSetName + '/' + key;

    // 3. and 4.: Subscribe to the data set channel and get your events
    client.subscribe(channel, function(msg) {
        console.log(msg);
        // output:
        // {
        //      type: 'created'/'updated'/'deleted',
        //      data: <the record that went through the transformation>
        // }
    });
</script>

At the right you will find a code example of how to subscribe to a channel.

As you can see, channels have this structure:

/data_app_id/data_set_name/key

So, my channel might look something like this:

/2b0db000-9450-11e5-aaf3-1f9b46e41454/my_awesome_data_set/468b3f828bee10e53ce2ecc4426aeb9b

Also, note that channel names are case sensitive, so you need to use the exact name of your data set.

Each data set that you want to get live updates for you need to subscribe to it’s channel.

Get your events

Messages have 3 types: created, updated and deleted

The record that was created/updated/deleted can be found in the data attribute of the message you get.

Possible errors when trying to subscribe (found in msg.message):

API Management

This section describes all APIs you can use to manage your APIs and control your app. Jexia provides APIs which makes it easy to do all thinkable actions for creating and managing applications by using simple APIs.

Authentication

Login


POST "https://services.jexia.com/user/login"

Request:

{

    "email" : "test@jexia.com",
    "password": "test"

}

Response:

{
  "status": "success",
  "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOiJhMzllZGIyMS0xNWNkLTQ1OTUtOTk0Ny03NWNmZjFhY2VhMzciLCJ1dWlkIjoiN2FjYTZkYTAtN2VlNy0xMWU1LWI0NWItMjc0MTI1N2M5MGE4Iiwicm9sZXMiOlsidXNlciJdLCJpYXQiOjE0NDYxOTgyMDcwNjAsImV4cCI6MTQ0NjIwMTgwNzA2MCwiaXNzIjoiamV4aWEuY29tIn0.7wW5jOKgVg51EaADeyj-0QmCPbo20AyuyHzLMbAQyi0",
  "refresh_token": "d4515467-e62d-4f07-bf9b-eb0489961905",
  "data": {
    "userId": "a39edb21-15cd-4595-9947-75cff1acea37",
    "uuid": "7aca6da0-7ee7-11e5-b45b-2741257c90a8",
    "firstname": null,
    "lastname": null,
    "company": null,
    "country": null,
    "email": "test@jexia.com",
    "email2": null,
    "jobtitle": null,
    "company_url": null,
    "image_url": null,
    "timezone": null
  }
}


When login is successful the access_token will be send back along with a refresh_token. Subsequent requests to the Jexia User Management system (UMS) must contain this token within the Authorization header: Authorization: Bearer JWT_access_token . When the access_token reaches its expiration time the client can use the refresh token to receive a new access_token.

Endpoint

POST https://services.jexia.com/user/login

This user login is for the superuser that will be able to manage the created APIs including creating keys for setting up fine-grained authorization on created APIs.

Query Parameters

Parameter Type Description
email String Email of the user.
password String Password of the user.

Success 200

Parameter Type Description
status String Statuscode
message String Status message
acces_token String The access token (JWT)
refresh_token String The refresh token
data Object Object containing the User Profile
userID String UUID of the user
uuid String Jexia Manager UUID of the user
firstname String Firstname of the user
lastname String Lastname of the user
company String Company of the user
country String Country of the user
email String Email of the user
email2 String Secondary email of the user
jobtitle String Jobtitle of the user
company_url String Company url of the user
image_url String Image url of the user
timezone String Timezone of the User
createdAt String Creation time of the user
updatedAt String Last update time of the user

Logout

The /logout endpoint will logout the user based on the JWT received within the authorization header field.


GET https://services.jexia.com/user/logout
Field Type Description
Authorization String JWT Token Bearer authentication

Success 200

Field Type Description
status String Status code

Error 4XX

Field Description
UserNotFound The id of the User was not found.
TokenError Error related to the token
MissingParameterError A required parameter is missing

Send e-mail to reset the users password

The email will contain a reset url which can be followed to specify a new password. This token must be used within the expiration time, which is set to one hour.


POST https://services.jexia.com/user/password/forgot`

Request:

{

    "email":"test@jexia.com"

}

Response:

{
  "status": "success",
  "message": "An email to reset the password was send to email@email.com",
  "expiration": 1446805862990
}


Endpoint

This endpoint will send an email with a token to reset the password.

POST https://services.jexia.com/user/password/forgot

Parameters

Field Type Description
email String Email of the user

Success 200

Field Type Description
status String Status code
message String The message that an e-mail was sent
expiration String Remember token expiration time.

Error 4XX

Field Description
UserNotFound The id of the User was not found.
ValidationError Validation failed
MissingParameterError A required parameter is missing.

Reset password

This endpoint resets the password using the reset token which you have previously retrieved by sending a request to /password/forgot

POST https://services.jexia.com/user/password/reset

Request:

{

    "email":"email@email.com",
    "password":"00000",
    "password_confirmation":"00000",
    "token": "2460718e-afdc-46e4-a26b-9cff59eed022"

}

Response:

{
  "status": "success"
}


Endpoint

POST https://services.jexia.com/user/password/reset

Parameters

Field Type Description
email String Email of the user
password String New password of the user
password_confirmation String New password confirmation
token String Password reset token from e-mail

Success

Field Type Description
status String Status code

Error 4XX

Field Description
UserNotFound The id of the User was not found.
ValidationError Validation failed
MissingParameterError A required parameter is missing.

Update password

Updates the user’s password.

POST https://services.jexia.com/user/password/updatePassword

Put the JWT Token in de header of the request:

Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOiJhMzllZGIyMS0xNWNkLTQ1OTUtOTk0Ny03NWNmZjFhY2VhMzciLCJ1dWlkIjoiN2FjYTZkYTAtN2VlNy0xMWU1LWI0NWItMjc0MTI1N2M5MGE4Iiwicm9sZXMiOlsidXNlciJdLCJpYXQiOjE0NDYyMTExMDczMjcsImV4cCI6MTQ0NjIxNDcwNzMyNywiaXNzIjoiamV4aWEuY29tIn0.QvBXn5kqgHdlQAk-IikBTK_D_q1bDkHMtkiNvEe5nzE

Request:

{

    "email":"email@email.com",
    "password":"00000",
    "password_new":"00000"

}

Response:

{
  "status": "success"
}


Endpoint

POST https://services.jexia.com/user/updatePassword
Field Type Description
Authorization String JWT Token Bearer authentication

Parameter

Field Type Description
email String Email of the User
password String Current user password
password_new String New user password

Success 200

Field Type Description
status String Status Code

Profile

This endpoint gives information about the user profile of a specific user.

GET https://services.jexia.com/profile/ID

Put the JWT Token in de header of the request:


Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOiJhMzllZGIyMS0xNWNkLTQ1OTUtOTk0Ny03NWNmZjFhY2VhMzciLCJ1dWlkIjoiN2FjYTZkYTAtN2VlNy0xMWU1LWI0NWItMjc0MTI1N2M5MGE4Iiwicm9sZXMiOlsidXNlciJdLCJpYXQiOjE0NDYyMTExMDczMjcsImV4cCI6MTQ0NjIxNDcwNzMyNywiaXNzIjoiamV4aWEuY29tIn0.QvBXn5kqgHdlQAk-IikBTK_D_q1bDkHMtkiNvEe5nzE

Response:

{
  "userId": "11eeeeb0-f58e-11e4-b670-cd51c29c5410",
  "uuid": "11eeeeb0-f58e-11e4-b670-cd51c29c5410",
  "firstname": "",
  "lastname": "",
  "company": "",
  "country": "nl_NL",
  "email": "email@email.com",
  "email2": null,
  "jobtitle": "",
  "company_url": "",
  "image_url": null,
  "timezone": "Europe/Amsterdam"
}


Endpoint

GET https://services.jexia.com/profile/id

Field Type Description
Authorization String JWT Token Bearer authentication

Parameter

Field Type Description
id Number Users unique ID

Success 200

Field Type Description
firstname String Firstname of the User
lastname String Lastname of the User
company String Company of the User
country String Country of the User
email String First email of the User
email2 String Secondary email of the User
jobtitle String Jobtitle of the User
company_url String Company url of the User
image_url String Image url of the User
timezone String Timezone of the User

Error 4XX

Field Description
UserNotFound The id of the User was not found

Update user information

Update the user information

Endpoint

PUT https://services.jexia.com/profile/id

Field Type Description
Authorization String JWT Token Bearer authentication

Parameter

Field Type Description
firstname String Firstname of the User
lastname String Lastname of the User
company String Company of the User
country String Country of the User
email String First email of the User
email2 String Secondary email of the User
jobtitle String Jobtitle of the User
company_url String Company url of the User
image_url String Image url of the User
timezone String Timezone of the User

Success 200

Field Type Description
firstname String Firstname of the User
lastname String Lastname of the User
company String Company of the User
country String Country of the User
email String First email of the User
email2 String Secondary email of the User
jobtitle String Jobtitle of the User
company_url String Company url of the User
image_url String Image url of the User
timezone String Timezone of the User

Authorisation

Keys give access to data apps based on user defined permissions on data app, data set and field levels. A data app can have several keys, each with different permissions. A key belongs to only one data app.

Permission levels:

write - grants full access to a data app/data set/field; read - only allows fetching data from a data app/data set/field, but not creating, updating or deleting; none - allows none of the CRUD actions on the data set/field;

Keys cannot have none permission on data app level because they would be useless.

By default, when creating a new data app, a key with full write permissions is created for the app as well.

POST

Request


`POST https://services.jexia.com/key`


{
    "data_app_id": "my-cool-app_data_app_id",
    "name": "Read key",
    "description": "This is a key that has read access to my cool data app", // OPTIONAL
    "dataAppPermission": "read" // defaults to "write"
}

Response


{
  "id": 2,
  "name": "Read key",
  "description": "This is a key that has read access to my cool data app",
  "key": "55591915806d00cda66481ff0c76f9c0",
  "secret": "eef5381ba1df5d940ee6c73b542c69688e72947a66073181",
  "active": true,
  "rootKey": false,
  "dataAppPermission": "read",
  "data_app_id": "my-cool-app_data_app_id",
  "createdAt": "2015-09-23T13:48:41.000Z",
  "updatedAt": "2015-09-23T13:48:41.000Z",
  "dataSetPermissions": []
}

If we want to create a key that grants read access to everything, see the example on the right.

As you can see, you don’t need to specify permissions for each data set and field because they will default to the data app permission. If a permission is not mentioned, it will default it’s parent permission.

However, if you would like a key with more detailed permissions:

Take a look at the second more detailed request in the screen on the right.

Request


`POST https://services.jexia.com/key`


{
    "data_app_id": "my-cool-app_data_app_id",
    "name": "Detailed key",
    "dataAppPermission": "write",
    "dataSetPermissions": [
        {
            "data_set_id": "house_data_set_id",
            "dataSetPermission": "read"
        },
        {
            "data_set_id": "pet_data_set_id",
            "dataSetPermission": "write",
            "fieldPermissions": [
                    {
                        "field_id": "age_field_id",
                        "fieldPermission": "read"
                    },
                    {
                        "field_id": "legs_field_id",
                        "fieldPermission": "none"
                    }
            ]
        }
    ]
}

Response


{
  "id": 3,
  "name": "Read key",
  "description": null,
  "key": "01583402d41ba2aedcb4c144ae206cbe",
  "secret": "9f636ddb59787d31aa0dcd6522138d8c4bd9bd2a6034df12",
  "dataAppPermission": "write",
  "active": true,
  "rootKey": false,
  "data_app_id": "data_app_id",
  "createdAt": "2015-09-23T14:20:45.000Z",
  "updatedAt": "2015-09-23T14:20:45.000Z",
  "dataSetPermissions": [
    {
      "id": 2,
      "dataSetPermission": "write",
      "key_id": 3,
      "data_set_id": "pet_data_set_id",
      "createdAt": "2015-09-23T14:20:45.000Z",
      "updatedAt": "2015-09-23T14:20:45.000Z",
      "fieldPermissions": [
        {
          "id": 1,
          "fieldPermission": "read",
          "data_set_permission_id": 2,
          "field_id": "age_field_id",
          "createdAt": "2015-09-23T14:20:45.000Z",
          "updatedAt": "2015-09-23T14:20:45.000Z"
        },
        {
          "id": 2,
          "fieldPermission": "none",
          "data_set_permission_id": 2,
          "field_id": "legs_field_id",
          "createdAt": "2015-09-23T14:20:45.000Z",
          "updatedAt": "2015-09-23T14:20:45.000Z"
        }
      ]
    },
    {
      "id": 1,
      "dataSetPermission": "read",
      "key_id": 3,
      "data_set_id": "house_data_set_id",
      "createdAt": "2015-09-23T14:20:45.000Z",
      "updatedAt": "2015-09-23T14:20:45.000Z",
      "fieldPermissions": []
    }
  ]
}

The rules for a valid key are: * Data app, all data sets and fields must exist. * All data sets must belong to the same data app as the key. * All fields must belong to the same data set as their parent permission. * You can only set one permission for each data set and each field. * Permissions cannot be higher than parent permissions (field permissions cannot be higher than data set permissions and data set permissions cannot be higher than the data app permission). * Name must be specified. * dataAppPermission can only be “read” or “write” * dataSetPermission and fieldPermission can only be “none”, “read” or “write”.

PATCH

Request


`PATCH https://services.jexia.com/key`


PATCH <services_url>/key/<key_id>
{
    "name": "Different name",
    "description": "Some new description"

}


Response


{
    "name": "Different name",
    "description": "Some new description",
    "key": "refresh", // anything else will be ignored
    "secret": "refresh", // same
    "active": false, // will deactivate the key
    "dataAppPermission": "write",
    "dataSetPermissions": [
        {
            "data_set_id": "pet_data_set_id",
            "dataSetPermission": "write",
            "fieldPermissions": [
                    {
                        "field_id": "age_field_id",
                        "fieldPermission": "read"
                    },
                    {
                        "field_id": "legs_field_id",
                        "fieldPermission": "none"
                    }
            ]
        }
    ]
}

Note that you don’t need to send everything, only the fields that you want to change. Also note that for data set and field permissions it is not required to send the id but only the data_set_id or field_id

How it works:

Query Parameters

Parameter Type Description
name String The new name of the key
key String Gets the value “refresh”
secret String Gets the value “refresh”
active Boolean If the key is active or not
dataAppPermissions Object Holds the new data set permissions

DataAppPermissions

Parameter Type Description
data_set_id String The id of the dataset
dataSetPermission String The new dataset permission

fieldPermissions

Parameter Type Description
field_id String The id of the field
fieldPermission String The new field permission

DELETE

DELETE https://services.jexia.com/key/keyID

Please not that it’s the key id and not the key attribute.

Fetching the keys

GET https://services.jexia.com/key/

Will fetch all the keys

GET https://services.jexia.com/key/keyID

Will fetch the key with a specific ID

GET https://services.jexia.com/app?populate=keys

Will fetch the data App(’s) with nested keys

Just like all the other GET apis, any query parameters will filter the results. For example, if you want to fetch all the keys of data app with id “123app” that have read permissions on data app level:

GET https://services.jexia.com/key?data_app_id=123app&dataAppPermission=read

Root Keys

Root keys have full write access to all the resource of a data app. They cannot be deleted or created by the user. Trying to do so will result in an error. Each data app gets a root key when it is created. You can update the active flag and refresh the key and secret of a root key, but nothing else.

Active/Inactive

Obviously, a key that has active: false will not be usable. It’s like temporarily deleting the key (until you reactivate it).

Creating new datasets and fields

Newly created data sets will get “none” permission on all existing non-root keys. Newly created fields will also get “none” permission on all existing non-root keys. If the field’s parent data set doesn’t have an explicitly defined permission on a given key, one (data set permission) will be created with the same permission level as the dataAppPermission of the key.

Session Management

The JWT_access_token expires after two hours. You can only refresh the token before it has expired. When you refresh the token, you will get a new one. You will not be able to use the old token anymore.

Token

Refresh, revoke and validate the token

Refresh token


`POST https://services.jexia.com/token/refresh`

Request:

{

    "access_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOiIxMWVlZWViMC1mNThlLTExZTQtYjY3MC1jZDUxYzI5YzU0MTAiLCJ1dWlkIjoiMTFlZWVlYjAtZjU4ZS0xMWU0LWI2NzAtY2Q1MWMyOWM1NDEwIiwicm9sZXMiOlsidXNlciJdLCJpYXQiOjE0NDcwNjk2NzgwMjEsImV4cCI6MTQ0NzA3MzI3ODAyMSwiaXNzIjoiamV4aWEuY29tIn0.hyIp8yExjbGewYy57v-NYic8YhemEp3r7GQF-tlxh9E",
    "refresh_token":"794a9b77-2107-4200-86f1-2c76b994a0fc"

}

Response:

{
  "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOiIxMWVlZWViMC1mNThlLTExZTQtYjY3MC1jZDUxYzI5YzU0MTAiLCJ1dWlkIjoiMTFlZWVlYjAtZjU4ZS0xMWU0LWI2NzAtY2Q1MWMyOWM1NDEwIiwicm9sZXMiOlsidXNlciJdLCJpYXQiOjE0NDcwNzAyNzMyMzksImV4cCI6MTQ0NzA3Mzg3MzIzOSwiaXNzIjoiamV4aWEuY29tIn0.bUdoCEr0rcNR5PiR7qgIpvtPg-sIxuthYIfNapVKDpY",
  "expiration": 1447073873239
}

Endpoint:

POST https://services.jexia.com/token/refresh

Field Type Description
Authorization String JWT Token Bearer authentication

Parameter

Field Type Description
access_token String Access token
refresh_token String Refresh token

Success 200

Field Type Description
access_token String Access token (JWT)
expiration Number Expiration time

Revoke token


`POST https://services.jexia.com/token/revoke`

Request:

{

    "access_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOiIxMWVlZWViMC1mNThlLTExZTQtYjY3MC1jZDUxYzI5YzU0MTAiLCJ1dWlkIjoiMTFlZWVlYjAtZjU4ZS0xMWU0LWI2NzAtY2Q1MWMyOWM1NDEwIiwicm9sZXMiOlsidXNlciJdLCJpYXQiOjE0NDcwNzc3NDQ4NTMsImV4cCI6MTQ0NzA4MTM0NDg1MywiaXNzIjoiamV4aWEuY29tIn0.R2tfusPDIZ22v2wKNVJqg79UqmInkRLhTB5N7FwaLx8"

}

Response:

{
  "status": "success",
  "message": "token revoked"
}

Endpoint

POST https://services.jexia.com/token/revoke

Field Type Description
Authorization String JWT Token Bearer authentication

Parameter

Field Type Description
acces_token String Access token

Success 200

Field Type Description
message String Status message

Validate token

POST https://services.jexia.com/token/validate`

Request:

{

    "access_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOiIxMWVlZWViMC1mNThlLTExZTQtYjY3MC1jZDUxYzI5YzU0MTAiLCJ1dWlkIjoiMTFlZWVlYjAtZjU4ZS0xMWU0LWI2NzAtY2Q1MWMyOWM1NDEwIiwicm9sZXMiOlsidXNlciJdLCJpYXQiOjE0NDcwNzg3ODE1OTEsImV4cCI6MTQ0NzA4MjM4MTU5MSwiaXNzIjoiamV4aWEuY29tIn0.d0jHcqVhOPk4CgJVTizoFVXTrgx5d-iVUBFn7xL-8C8"

}

Response:

{
  "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOiIxMWVlZWViMC1mNThlLTExZTQtYjY3MC1jZDUxYzI5YzU0MTAiLCJ1dWlkIjoiMTFlZWVlYjAtZjU4ZS0xMWU0LWI2NzAtY2Q1MWMyOWM1NDEwIiwicm9sZXMiOlsidXNlciJdLCJpYXQiOjE0NDcwNzg3ODE1OTEsImV4cCI6MTQ0NzA4MjM4MTU5MSwiaXNzIjoiamV4aWEuY29tIn0.d0jHcqVhOPk4CgJVTizoFVXTrgx5d-iVUBFn7xL-8C8",
  "userId": "11eeeeb0-f58e-11e4-b670-cd51c29c5410",
  "uuid": "11eeeeb0-f58e-11e4-b670-cd51c29c5410",
  "roles": [
    "user"
  ],
  "iat": 1447078781591,
  "exp": 1447082381591,
  "iss": "jexia.com"
}

Endpoint

POST https://services.jexia.com/token/validate

Field Type Description
Authorization String JWT Token Bearer authentication

Parameter

Field Type Description
access_token String Access token

Success200

Field Type Description
token String JWT access token
userID String The ID of the user
uuid String The ID of the user
roles Object Role of the user
iat Number Issued at
exp Number Expiration time
iss String Issuer

Validation

Field validation

Fields

Parameter Type Description
validations Object The object holding the information about validations.
id String The id of the field
name String The name of the field
type String The field type
validation_alpha Boolean Whether the field should only contain letters
validation_alphanumeric Boolean Whether the field should only contain letters and numbers
validation_email Boolean Whether the field should be an email
validation_lowercase Boolean Whether the field should only contain lowercase characters
validation_max Number The maximum value that a number type field can get
validation_maxLength Number The minimum required length of the value in this field
validation_min Number The minimum value that a number type field (integer/float) can get
validation_minLength Number The minimum required length of the value in this field
validation_numeric Boolean Whether the string in this field should only contain numbers
validation_regex String Some regex to validate this field against
validation_required Boolean Whether this field is required or not
validation_uppercase Boolean Whether the field should only contain uppercase characters
createdAt String The datetime the field was created
updatedAt String The datetime the field was updated
data_set_id String The data set the field belongs to

Validations

Parameter Type Description
alpha Boolean Whether the field should only contain letters
alphanumeric Boolean hether the field should only contain letters and numbers
email Boolean Whether the field should be an email
equals Boolean Something the field should be equal to
len Number The required length of the field
lowercase Boolean Whether the field should only contain lowercase characters.
min Number The minimum value that a number type field (integer/float) can get.
minLength Number The minimum required length of the value in this field
max Number The maximum value that a number type field can get
maxLength Number The maximum accepted length of the value in this field
notEmpty Boolean Whether the field can be empty or not
numeric Boolean Whether the string in this field should only contain numbers
regex String Some regex to validate this field against
required Boolean Whether this field is required or not
uppercase Boolean Whether the field should only contain uppercase characters

API Management

APP

With this API you can access all information about an App.

GET

Request


`GET https://services.jexia.com/app`


Response:



  {
    "_id": "0961a9a0-5096-11e5-8090-8770e89bf4e8",
    "varId": "_0961a9a0_5096_11e5_8090_8770e89bf4e8",
    "id": "0961a9a0-5096-11e5-8090-8770e89bf4e8",
    "name": "demoapp",
    "user_id": "fa962040-5095-11e5-8090-8770e89bf4e8",
    "running": true,
    "defaultDomain": "0961a9a0-5096-11e5-8090-8770e89bf4e8.test.jexia.com",
    "customDomain": null,
    "active": true,
    "strictSchema": false,
    "populateAll": true,
    "createdAt": "2015-09-01T10:41:45.000Z",
    "updatedAt": "2015-09-02T13:46:02.000Z",
    "user": "fa962040-5095-11e5-8090-8770e89bf4e8"
  },
  {
    "_id": "16777690-f75b-11e4-b5e8-fde9cfe3a44a",
    "varId": "_16777690_f75b_11e4_b5e8_fde9cfe3a44a",
    "id": "16777690-f75b-11e4-b5e8-fde9cfe3a44a",
    "name": "das",
    "user_id": "91b53b70-f752-11e4-b5e8-fde9cfe3a44a",
    "running": true,
    "defaultDomain": "api.16777690-f75b-11e4-b5e8-fde9cfe3a44a.test.jexia.com",
    "customDomain": null,
    "active": true,
    "strictSchema": false,
    "populateAll": true,
    "createdAt": "2015-05-10T23:25:33.000Z",
    "updatedAt": "2015-05-10T23:25:33.000Z",
    "user": "91b53b70-f752-11e4-b5e8-fde9cfe3a44a"
  }


Endpoint

Get an overview of all apps

GET https://services.jexia.com/app

Field Type Description
Authorization String JWT Token Bearer authentication

Success200

Parameter Type Description
id String Data App id
name String Name of the Data App
user_id String The Id of the user the Data App belongs to
running Boolean The running status of the Data App
defaultDomain String The default domain the Data App uses
customDomain String The custom domain the Data App uses
active Boolean If the Data App is active or not
strictSchema Boolean If the Data App uses a strict schema.
populateAll Boolean If the Data App uses populate all.

Search on id

GET https://services.jexia.com/app/appID`

Response:


{
  "_id": "26566280-0492-11e5-8c2d-798c6b0699e0",
  "varId": "_26566280_0492_11e5_8c2d_798c6b0699e0",
  "id": "26566280-0492-11e5-8c2d-798c6b0699e0",
  "name": "Ping_Pong_App",
  "user_id": "c6d36670-edc9-11e4-aa5e-aff60d2469f2",
  "running": true,
  "defaultDomain": "26566280-0492-11e5-8c2d-798c6b0699e0.test.jexia.com",
  "customDomain": null,
  "active": true,
  "strictSchema": false,
  "populateAll": true,
  "createdAt": "2015-05-27T19:02:27.000Z",
  "updatedAt": "2015-09-18T10:14:42.000Z",
  "user": "c6d36670-edc9-11e4-aa5e-aff60d2469f2"
}


If you want to get the record from an app with a specific id, use /app/id

Field Type Description
Authorization String JWT Token Bearer authentication

Success200

Parameter Type Description
id String Data App id
name String Name of the Data App
user_id String The Id of the user the Data App belongs to
running Boolean The running status of the Data App
defaultDomain String The default domain the Data App uses
customDomain String The custom domain the Data App uses
active Boolean If the Data App is active or not
strictSchema Boolean If the Data App uses a strict schema.
populateAll Boolean If the Data App uses populate all.

Populate Request

To populate you need to send a query parameter with the fields to populate.

Parameter Value
populate user
populate user.apps
populate user.apps.apis
populate apis

Populate with User

Request


`GET https://services.jexia.com/app/id/populate=user`

Response


{
  "_id": "71183da0-4fe4-11e5-92dd-05d823229c00",
  "varId": "_71183da0_4fe4_11e5_92dd_05d823229c00",
  "id": "71183da0-4fe4-11e5-92dd-05d823229c00",
  "name": "contactlist",
  "user_id": "11eeeeb0-f58e-11e4-b670-cd51c29c5410",
  "running": true,
  "defaultDomain": "71183da0-4fe4-11e5-92dd-05d823229c00.test.jexia.com",
  "customDomain": null,
  "active": true,
  "strictSchema": false,
  "populateAll": true,
  "createdAt": "2015-08-31T13:30:28.000Z",
  "updatedAt": "2015-11-03T10:15:22.000Z",
  "user": {
    "_id": "11eeeeb0-f58e-11e4-b670-cd51c29c5410",
    "id": "11eeeeb0-f58e-11e4-b670-cd51c29c5410",
    "name": "Nande",
    "path": "/home/11eeeeb0-f58e-11e4-b670-cd51c29c5410",
    "createdAt": "2015-05-08T16:25:26.000Z",
    "updatedAt": "2015-05-08T16:25:26.000Z"
  }
}

GET https://services.jexia.com/app/<app_id>?populate=user

Field Type Description
Authorization String JWT Token Bearer authentication

Success200

Parameter Type Description
id String Data App id
name String Name of the Data App
user_id String The Id of the user the Data App belongs to
running Boolean The running status of the Data App
defaultDomain String The default domain the Data App uses
customDomain String The custom domain the Data App uses
active Boolean If the Data App is active or not
strictSchema Boolean If the Data App uses a strict schema.
populateAll Boolean If the Data App uses populate all.
createdAt String The date the Data App was created.
updatedAt String The date the Data App was updated.
user Object The user object containing information about the user.
id String The user id
name String The name of the user
path String The path created for the user
createdAt String The date the user account was created
updatedAt String The date the user account was updatedAt

Populate with User.apps

Request


`GET https://services.jexia.com/app/id/populate=user.apps`

Response


{
  "_id": "71183da0-4fe4-11e5-92dd-05d823229c00",
  "varId": "_71183da0_4fe4_11e5_92dd_05d823229c00",
  "id": "71183da0-4fe4-11e5-92dd-05d823229c00",
  "name": "contactlist",
  "user_id": "11eeeeb0-f58e-11e4-b670-cd51c29c5410",
  "running": true,
  "defaultDomain": "71183da0-4fe4-11e5-92dd-05d823229c00.test.jexia.com",
  "customDomain": null,
  "active": true,
  "strictSchema": false,
  "populateAll": true,
  "createdAt": "2015-08-31T13:30:28.000Z",
  "updatedAt": "2015-11-03T10:15:22.000Z",
  "user": {
    "_id": "11eeeeb0-f58e-11e4-b670-cd51c29c5410",
    "id": "11eeeeb0-f58e-11e4-b670-cd51c29c5410",
    "name": "Nande",
    "path": "/home/11eeeeb0-f58e-11e4-b670-cd51c29c5410",
    "createdAt": "2015-05-08T16:25:26.000Z",
    "updatedAt": "2015-05-08T16:25:26.000Z",
    "apps": [
      {
        "_id": "71183da0-4fe4-11e5-92dd-05d823229c00",
        "varId": "_71183da0_4fe4_11e5_92dd_05d823229c00",
        "id": "71183da0-4fe4-11e5-92dd-05d823229c00",
        "name": "contactlist",
        "path": "/home/11eeeeb0-f58e-11e4-b670-cd51c29c5410/71183da0-4fe4-11e5-92dd-05d823229c00",
        "createdAt": "2015-08-31T13:30:28.000Z",
        "updatedAt": "2015-11-03T10:15:22.000Z"
      },
      {
        "_id": "c57571f0-8f8c-11e5-8829-cd5de2187ceb",
        "varId": "_c57571f0_8f8c_11e5_8829_cd5de2187ceb",
        "id": "c57571f0-8f8c-11e5-8829-cd5de2187ceb",
        "name": "test-app",
        "path": "/home/11eeeeb0-f58e-11e4-b670-cd51c29c5410/c57571f0-8f8c-11e5-8829-cd5de2187ceb",
        "createdAt": "2015-11-20T13:44:09.000Z",
        "updatedAt": "2015-11-20T14:51:05.000Z"
      },
      {
        "_id": "d1c2ffa0-65e2-11e5-ac43-61d9ca5c8f4f",
        "varId": "_d1c2ffa0_65e2_11e5_ac43_61d9ca5c8f4f",
        "id": "d1c2ffa0-65e2-11e5-ac43-61d9ca5c8f4f",
        "name": "Documentation",
        "path": "/home/11eeeeb0-f58e-11e4-b670-cd51c29c5410/d1c2ffa0-65e2-11e5-ac43-61d9ca5c8f4f",
        "createdAt": "2015-09-28T13:14:17.000Z",
        "updatedAt": "2015-11-03T10:15:38.000Z"
      }
    ]
  }
}

GET https://services.jexia.com/app/<app_id>?populate=user.apps

Field Type Description
Authorization String JWT Token Bearer authentication

Success200

Parameter Type Description
id String Data App id
name String Name of the Data App
user_id String The Id of the user the Data App belongs to
running Boolean The running status of the Data App
defaultDomain String The default domain the Data App uses
customDomain String The custom domain the Data App uses
active Boolean If the Data App is active or not
strictSchema Boolean If the Data App uses a strict schema.
populateAll Boolean If the Data App uses populate all.
createdAt String The date the Data App was created.
updatedAt String The dat the Data App was updated.
user Object The object containing information about the user.
id String The user id
name String The name of the user
path String The path to the user
createdAt String The date the user account was created
updatedAt String The date the user account was updatedAt
apps Object The object containing information about the Data Apps of a user
id String The id of the Data App
name String Name of the Data App
path String The path to the Data App
createdAt String The date the Data App was created
updatedAt String The date the Data App was updatedAt

Populate with user.apps.apis

Request


GET https://services.jexia.com/app/id/populate=user.apps.apis

Response


{
  "_id": "71183da0-4fe4-11e5-92dd-05d823229c00",
  "varId": "_71183da0_4fe4_11e5_92dd_05d823229c00",
  "id": "71183da0-4fe4-11e5-92dd-05d823229c00",
  "name": "contactlist",
  "user_id": "11eeeeb0-f58e-11e4-b670-cd51c29c5410",
  "running": true,
  "defaultDomain": "71183da0-4fe4-11e5-92dd-05d823229c00.test.jexia.com",
  "customDomain": null,
  "active": true,
  "strictSchema": false,
  "populateAll": true,
  "createdAt": "2015-08-31T13:30:28.000Z",
  "updatedAt": "2015-11-03T10:15:22.000Z",
  "user": {
    "_id": "11eeeeb0-f58e-11e4-b670-cd51c29c5410",
    "id": "11eeeeb0-f58e-11e4-b670-cd51c29c5410",
    "name": "Nande",
    "path": "/home/11eeeeb0-f58e-11e4-b670-cd51c29c5410",
    "createdAt": "2015-05-08T16:25:26.000Z",
    "updatedAt": "2015-05-08T16:25:26.000Z",
    "apps": [
      {
        "_id": "71183da0-4fe4-11e5-92dd-05d823229c00",
        "varId": "_71183da0_4fe4_11e5_92dd_05d823229c00",
        "id": "71183da0-4fe4-11e5-92dd-05d823229c00",
        "name": "contactlist",
        "user_id": "11eeeeb0-f58e-11e4-b670-cd51c29c5410",
        "running": true,
        "defaultDomain": "71183da0-4fe4-11e5-92dd-05d823229c00.test.jexia.com",
        "customDomain": null,
        "active": true,
        "strictSchema": false,
        "populateAll": true,
        "createdAt": "2015-08-31T13:30:28.000Z",
        "updatedAt": "2015-11-03T10:15:22.000Z",
        "apis": [
          {
            "_id": "89f6d160-4fe4-11e5-92dd-05d823229c00",
            "relationName": "rel_Contacts",
            "id": "89f6d160-4fe4-11e5-92dd-05d823229c00",
            "name": "Contacts",
            "data_app_id": "71183da0-4fe4-11e5-92dd-05d823229c00",
            "createdAt": "2015-08-31T13:31:09.000Z",
            "updatedAt": "2015-09-11T14:00:48.000Z",
            "fields": [
              {
                "_id": "7b127b70-588d-11e5-896a-f3f1c31d8410",
                "validations": {
                  "alpha": null,
                  "alphanumeric": null,
                  "email": null,
                  "lowercase": null,
                  "max": null,
                  "maxLength": null,
                  "min": null,
                  "minLength": null,
                  "numeric": null,
                  "regex": null,
                  "required": null,
                  "uppercase": null
                },
                "id": "7b127b70-588d-11e5-896a-f3f1c31d8410",
                "name": "name",
                "type": "string",
                "validation_alpha": null,
                "validation_alphanumeric": null,
                "validation_email": null,
                "validation_lowercase": null,
                "validation_max": null,
                "validation_maxLength": null,
                "validation_min": null,
                "validation_minLength": null,
                "validation_numeric": null,
                "validation_regex": null,
                "validation_required": null,
                "validation_uppercase": null,
                "createdAt": "2015-09-11T14:00:38.000Z",
                "updatedAt": "2015-09-11T14:00:48.000Z",
                "data_set_id": "89f6d160-4fe4-11e5-92dd-05d823229c00"
              },
              {
                "_id": "7b127b71-588d-11e5-896a-f3f1c31d8410",
                "validations": {
                  "alpha": null,
                  "alphanumeric": null,
                  "email": null,
                  "lowercase": null,
                  "max": null,
                  "maxLength": null,
                  "min": null,
                  "minLength": null,
                  "numeric": null,
                  "regex": null,
                  "required": null,
                  "uppercase": null
                },
                "id": "7b127b71-588d-11e5-896a-f3f1c31d8410",
                "name": "email",
                "type": "string",
                "validation_alpha": null,
                "validation_alphanumeric": null,
                "validation_email": null,
                "validation_lowercase": null,
                "validation_max": null,
                "validation_maxLength": null,
                "validation_min": null,
                "validation_minLength": null,
                "validation_numeric": null,
                "validation_regex": null,
                "validation_required": null,
                "validation_uppercase": null,
                "createdAt": "2015-09-11T14:00:38.000Z",
                "updatedAt": "2015-09-11T14:00:48.000Z",
                "data_set_id": "89f6d160-4fe4-11e5-92dd-05d823229c00"
              },
              {
                "_id": "7b127b72-588d-11e5-896a-f3f1c31d8410",
                "validations": {
                  "alpha": null,
                  "alphanumeric": null,
                  "email": null,
                  "lowercase": null,
                  "max": null,
                  "maxLength": null,
                  "min": null,
                  "minLength": null,
                  "numeric": null,
                  "regex": null,
                  "required": null,
                  "uppercase": null
                },
                "id": "7b127b72-588d-11e5-896a-f3f1c31d8410",
                "name": "number",
                "type": "integer",
                "validation_alpha": null,
                "validation_alphanumeric": null,
                "validation_email": null,
                "validation_lowercase": null,
                "validation_max": null,
                "validation_maxLength": null,
                "validation_min": null,
                "validation_minLength": null,
                "validation_numeric": null,
                "validation_regex": null,
                "validation_required": null,
                "validation_uppercase": null,
                "createdAt": "2015-09-11T14:00:38.000Z",
                "updatedAt": "2015-09-11T14:00:48.000Z",
                "data_set_id": "89f6d160-4fe4-11e5-92dd-05d823229c00"
              }
            ],
            "relationsTo": [
              {
                "id": 158,
                "fromId": "a23f3fa0-4fe4-11e5-92dd-05d823229c00",
                "fromType": "one",
                "toId": "89f6d160-4fe4-11e5-92dd-05d823229c00",
                "toType": "many",
                "createdAt": "2015-08-31T13:33:16.000Z",
                "updatedAt": "2015-08-31T13:33:16.000Z"
              }
            ],
            "relationsFrom": []
          },
          {
            "_id": "a23f3fa0-4fe4-11e5-92dd-05d823229c00",
            "relationName": "rel_Department",
            "id": "a23f3fa0-4fe4-11e5-92dd-05d823229c00",
            "name": "Department",
            "data_app_id": "71183da0-4fe4-11e5-92dd-05d823229c00",
            "createdAt": "2015-08-31T13:31:50.000Z",
            "updatedAt": "2015-09-11T14:01:30.000Z",
            "fields": [
              {
                "_id": "9a4256a0-588d-11e5-bf3c-51be00c9390b",
                "validations": {
                  "alpha": null,
                  "alphanumeric": null,
                  "email": null,
                  "lowercase": null,
                  "max": null,
                  "maxLength": null,
                  "min": null,
                  "minLength": null,
                  "numeric": null,
                  "regex": null,
                  "required": null,
                  "uppercase": null
                },
                "id": "9a4256a0-588d-11e5-bf3c-51be00c9390b",
                "name": "department",
                "type": "string",
                "validation_alpha": null,
                "validation_alphanumeric": null,
                "validation_email": null,
                "validation_lowercase": null,
                "validation_max": null,
                "validation_maxLength": null,
                "validation_min": null,
                "validation_minLength": null,
                "validation_numeric": null,
                "validation_regex": null,
                "validation_required": null,
                "validation_uppercase": null,
                "createdAt": "2015-09-11T14:01:30.000Z",
                "updatedAt": "2015-09-11T14:01:30.000Z",
                "data_set_id": "a23f3fa0-4fe4-11e5-92dd-05d823229c00"
              }
            ],
            "relationsTo": [],
            "relationsFrom": [
              {
                "id": 158,
                "fromId": "a23f3fa0-4fe4-11e5-92dd-05d823229c00",
                "fromType": "one",
                "toId": "89f6d160-4fe4-11e5-92dd-05d823229c00",
                "toType": "many",
                "createdAt": "2015-08-31T13:33:16.000Z",
                "updatedAt": "2015-08-31T13:33:16.000Z"
              }
            ]
          }
        ]
      },
      {
        "_id": "c57571f0-8f8c-11e5-8829-cd5de2187ceb",
        "varId": "_c57571f0_8f8c_11e5_8829_cd5de2187ceb",
        "id": "c57571f0-8f8c-11e5-8829-cd5de2187ceb",
        "name": "test-app",
        "user_id": "11eeeeb0-f58e-11e4-b670-cd51c29c5410",
        "running": true,
        "defaultDomain": "c57571f0-8f8c-11e5-8829-cd5de2187ceb.test.jexia.com",
        "customDomain": null,
        "active": true,
        "strictSchema": false,
        "populateAll": true,
        "createdAt": "2015-11-20T13:44:09.000Z",
        "updatedAt": "2015-11-20T14:51:05.000Z",
        "apis": []
      },
      {
        "_id": "d1c2ffa0-65e2-11e5-ac43-61d9ca5c8f4f",
        "varId": "_d1c2ffa0_65e2_11e5_ac43_61d9ca5c8f4f",
        "id": "d1c2ffa0-65e2-11e5-ac43-61d9ca5c8f4f",
        "name": "Documentation",
        "user_id": "11eeeeb0-f58e-11e4-b670-cd51c29c5410",
        "running": true,
        "defaultDomain": "d1c2ffa0-65e2-11e5-ac43-61d9ca5c8f4f.test.jexia.com",
        "customDomain": null,
        "active": true,
        "strictSchema": false,
        "populateAll": true,
        "createdAt": "2015-09-28T13:14:17.000Z",
        "updatedAt": "2015-11-03T10:15:38.000Z",
        "apis": [
          {
            "_id": "dcc6f9b0-65e2-11e5-9a2c-7f9be7c22762",
            "relationName": "rel_Data-Docs",
            "id": "dcc6f9b0-65e2-11e5-9a2c-7f9be7c22762",
            "name": "Data-Docs",
            "data_app_id": "d1c2ffa0-65e2-11e5-ac43-61d9ca5c8f4f",
            "createdAt": "2015-09-28T13:14:34.000Z",
            "updatedAt": "2015-09-28T14:56:20.000Z",
            "fields": [
              {
                "_id": "14561e20-65f1-11e5-aba3-e5e259c580d4",
                "validations": {
                  "alpha": null,
                  "alphanumeric": null,
                  "email": null,
                  "lowercase": null,
                  "max": null,
                  "maxLength": null,
                  "min": null,
                  "minLength": null,
                  "numeric": null,
                  "regex": null,
                  "required": null,
                  "uppercase": null
                },
                "id": "14561e20-65f1-11e5-aba3-e5e259c580d4",
                "name": "post_example",
                "type": "string",
                "validation_alpha": null,
                "validation_alphanumeric": null,
                "validation_email": null,
                "validation_lowercase": null,
                "validation_max": null,
                "validation_maxLength": null,
                "validation_min": null,
                "validation_minLength": null,
                "validation_numeric": null,
                "validation_regex": null,
                "validation_required": null,
                "validation_uppercase": null,
                "createdAt": "2015-09-28T14:56:20.000Z",
                "updatedAt": "2015-09-28T14:56:20.000Z",
                "data_set_id": "dcc6f9b0-65e2-11e5-9a2c-7f9be7c22762"
              }
        }
    }
}

GET https://services.jexia.com/app/<app_id>?populate=user.apps.apis

Field Type Description
Authorization String JWT Token Bearer authentication

Success200

Parameter Type Description
id String Data App id
name String Name of the Data App
user_id String The Id of the user the Data App belongs to
running Boolean The running status of the Data App
defaultDomain String The default domain the Data App uses
customDomain String The custom domain the Data App uses
active Boolean This field is not used right now
strictSchema Boolean If the Data App uses a strict schema.
populateAll Boolean If the Data App uses populate all.
createdAt String The date the Data App was created.
updatedAt String The dat the Data App was updated.
user Object The object containing information about the user.

User

Parameter Type Description
id String The user id
name String The name of the user
path String The path to the user
createdAt String The date the user account was created
updatedAt String The date the user account was updatedAt
apps Object The object containing information about the Data Apps of a user

Apps

Parameter Type Description
id String The id of the Data App
name String Name of the Data App
path String The path to the Data App
createdAt String The date the Data App was created
updatedAt String The date the Data App was updatedAt

Populate with Apis

Request

`https://services.jexia.com/app/id?populate=apis`

Response

{
  "_id": "71183da0-4fe4-11e5-92dd-05d823229c00",
  "varId": "_71183da0_4fe4_11e5_92dd_05d823229c00",
  "id": "71183da0-4fe4-11e5-92dd-05d823229c00",
  "name": "contactlist",
  "user_id": "11eeeeb0-f58e-11e4-b670-cd51c29c5410",
  "running": true,
  "defaultDomain": "71183da0-4fe4-11e5-92dd-05d823229c00.test.jexia.com",
  "customDomain": null,
  "active": true,
  "strictSchema": false,
  "populateAll": true,
  "createdAt": "2015-08-31T13:30:28.000Z",
  "updatedAt": "2015-11-03T10:15:22.000Z",
  "apis": [
    {
      "_id": "89f6d160-4fe4-11e5-92dd-05d823229c00",
      "relationName": "rel_Contacts",
      "id": "89f6d160-4fe4-11e5-92dd-05d823229c00",
      "name": "Contacts",
      "data_app_id": "71183da0-4fe4-11e5-92dd-05d823229c00",
      "createdAt": "2015-08-31T13:31:09.000Z",
      "updatedAt": "2015-09-11T14:00:48.000Z",
      "fields": [
        {
          "_id": "7b127b70-588d-11e5-896a-f3f1c31d8410",
          "validations": {
            "alpha": null,
            "alphanumeric": null,
            "email": null,
            "lowercase": null,
            "max": null,
            "maxLength": null,
            "min": null,
            "minLength": null,
            "numeric": null,
            "regex": null,
            "required": null,
            "uppercase": null
          },
          "id": "7b127b70-588d-11e5-896a-f3f1c31d8410",
          "name": "name",
          "type": "string",
          "validation_alpha": null,
          "validation_alphanumeric": null,
          "validation_email": null,
          "validation_lowercase": null,
          "validation_max": null,
          "validation_maxLength": null,
          "validation_min": null,
          "validation_minLength": null,
          "validation_numeric": null,
          "validation_regex": null,
          "validation_required": null,
          "validation_uppercase": null,
          "createdAt": "2015-09-11T14:00:38.000Z",
          "updatedAt": "2015-09-11T14:00:48.000Z",
          "data_set_id": "89f6d160-4fe4-11e5-92dd-05d823229c00"
        },
        {
          "_id": "7b127b71-588d-11e5-896a-f3f1c31d8410",
          "validations": {
            "alpha": null,
            "alphanumeric": null,
            "email": null,
            "lowercase": null,
            "max": null,
            "maxLength": null,
            "min": null,
            "minLength": null,
            "numeric": null,
            "regex": null,
            "required": null,
            "uppercase": null
          },
          "id": "7b127b71-588d-11e5-896a-f3f1c31d8410",
          "name": "email",
          "type": "string",
          "validation_alpha": null,
          "validation_alphanumeric": null,
          "validation_email": null,
          "validation_lowercase": null,
          "validation_max": null,
          "validation_maxLength": null,
          "validation_min": null,
          "validation_minLength": null,
          "validation_numeric": null,
          "validation_regex": null,
          "validation_required": null,
          "validation_uppercase": null,
          "createdAt": "2015-09-11T14:00:38.000Z",
          "updatedAt": "2015-09-11T14:00:48.000Z",
          "data_set_id": "89f6d160-4fe4-11e5-92dd-05d823229c00"
        },
        {
          "_id": "7b127b72-588d-11e5-896a-f3f1c31d8410",
          "validations": {
            "alpha": null,
            "alphanumeric": null,
            "email": null,
            "lowercase": null,
            "max": null,
            "maxLength": null,
            "min": null,
            "minLength": null,
            "numeric": null,
            "regex": null,
            "required": null,
            "uppercase": null
          },
          "id": "7b127b72-588d-11e5-896a-f3f1c31d8410",
          "name": "number",
          "type": "integer",
          "validation_alpha": null,
          "validation_alphanumeric": null,
          "validation_email": null,
          "validation_lowercase": null,
          "validation_max": null,
          "validation_maxLength": null,
          "validation_min": null,
          "validation_minLength": null,
          "validation_numeric": null,
          "validation_regex": null,
          "validation_required": null,
          "validation_uppercase": null,
          "createdAt": "2015-09-11T14:00:38.000Z",
          "updatedAt": "2015-09-11T14:00:48.000Z",
          "data_set_id": "89f6d160-4fe4-11e5-92dd-05d823229c00"
        }
      ],
      "relationsTo": [
        {
          "id": 158,
          "fromId": "a23f3fa0-4fe4-11e5-92dd-05d823229c00",
          "fromType": "one",
          "toId": "89f6d160-4fe4-11e5-92dd-05d823229c00",
          "toType": "many",
          "createdAt": "2015-08-31T13:33:16.000Z",
          "updatedAt": "2015-08-31T13:33:16.000Z"
        }
      ],
      "relationsFrom": []
    },
    {
      "_id": "a23f3fa0-4fe4-11e5-92dd-05d823229c00",
      "relationName": "rel_Department",
      "id": "a23f3fa0-4fe4-11e5-92dd-05d823229c00",
      "name": "Department",
      "data_app_id": "71183da0-4fe4-11e5-92dd-05d823229c00",
      "createdAt": "2015-08-31T13:31:50.000Z",
      "updatedAt": "2015-09-11T14:01:30.000Z",
      "fields": [
        {
          "_id": "9a4256a0-588d-11e5-bf3c-51be00c9390b",
          "validations": {
            "alpha": null,
            "alphanumeric": null,
            "email": null,
            "lowercase": null,
            "max": null,
            "maxLength": null,
            "min": null,
            "minLength": null,
            "numeric": null,
            "regex": null,
            "required": null,
            "uppercase": null
          },
          "id": "9a4256a0-588d-11e5-bf3c-51be00c9390b",
          "name": "department",
          "type": "string",
          "validation_alpha": null,
          "validation_alphanumeric": null,
          "validation_email": null,
          "validation_lowercase": null,
          "validation_max": null,
          "validation_maxLength": null,
          "validation_min": null,
          "validation_minLength": null,
          "validation_numeric": null,
          "validation_regex": null,
          "validation_required": null,
          "validation_uppercase": null,
          "createdAt": "2015-09-11T14:01:30.000Z",
          "updatedAt": "2015-09-11T14:01:30.000Z",
          "data_set_id": "a23f3fa0-4fe4-11e5-92dd-05d823229c00"
        }
      ],
      "relationsTo": [],
      "relationsFrom": [
        {
          "id": 158,
          "fromId": "a23f3fa0-4fe4-11e5-92dd-05d823229c00",
          "fromType": "one",
          "toId": "89f6d160-4fe4-11e5-92dd-05d823229c00",
          "toType": "many",
          "createdAt": "2015-08-31T13:33:16.000Z",
          "updatedAt": "2015-08-31T13:33:16.000Z"
        }
      ]
    }
  ],
  "user": "11eeeeb0-f58e-11e4-b670-cd51c29c5410"
}

If you want to get information about the datasets that belong to an app, search on the id of the app and populate=apis

GET https://services.jexia.com/app/<app_id>?populate=apis

Field Type Description
Authorization String JWT Token Bearer authentication

POST

Request:

{

"name": "testapp",
"user":"11eeeeb0-f58e-11e4-b670-cd51c29c5410"
}

Response:


{
  "_id": "c57571f0-8f8c-11e5-8829-cd5de2187ceb",
  "varId": "_c57571f0_8f8c_11e5_8829_cd5de2187ceb",
  "id": "c57571f0-8f8c-11e5-8829-cd5de2187ceb",
  "name": "testapp",
  "user_id": "11eeeeb0-f58e-11e4-b670-cd51c29c5410",
  "running": true,
  "defaultDomain": "c57571f0-8f8c-11e5-8829-cd5de2187ceb.test.jexia.com",
  "customDomain": null,
  "active": true,
  "strictSchema": false,
  "populateAll": true,
  "createdAt": "2015-11-20T13:44:09.000Z",
  "updatedAt": "2015-11-20T13:44:09.000Z",
  "user": "11eeeeb0-f58e-11e4-b670-cd51c29c5410"
}

Endpoint

POST https://services.jexia.com/app

Field Type Description
Authorization String JWT Token Bearer authentication.

Query Parameters

Parameter Type Description
name String Name of the new Data App
user String The user id
active Boolean This field is not used right now
running Boolean The running status of the Data App
customDomain String The custom domain for the Data App
strictSchema Boolean If a strict schema should be used or not
populateAll Boolean If populate all should be used or not

Success200

Parameter Type Description
id String The id for the new Data App
name String The name of the Data App
user_id String The id of the user
running Boolean The running status of the Data App
defaultDomain String The default domain of the Data App
customDomain String The custom domain of the Data App
active Boolean This field is not used right now
strictSchema Boolean If strict schema should be used or not
populateAll Boolean If Populate All should be used or not
user String The id of the user

PATCH

Request


{

"name": "test-app",
"strictSchema": "false"
}

Response


{
  "_id": "c57571f0-8f8c-11e5-8829-cd5de2187ceb",
  "varId": "_c57571f0_8f8c_11e5_8829_cd5de2187ceb",
  "id": "c57571f0-8f8c-11e5-8829-cd5de2187ceb",
  "name": "test-app",
  "user_id": "11eeeeb0-f58e-11e4-b670-cd51c29c5410",
  "running": true,
  "defaultDomain": "c57571f0-8f8c-11e5-8829-cd5de2187ceb.test.jexia.com",
  "customDomain": null,
  "active": true,
  "strictSchema": false,
  "populateAll": true,
  "createdAt": "2015-11-20T13:44:09.000Z",
  "updatedAt": "2015-11-20T14:51:05.000Z",
  "user": "11eeeeb0-f58e-11e4-b670-cd51c29c5410"
}

Can change the app name, running status, schema type, populate all and custom domain

Endpoint

PATCH /app/:appID

Field Type Description
Authorization String JWT Token Bearer authentication

Query Parameters

Parameter Type Description
name String New name of the Data App
running Boolean Running status of the Data App
strictSchema Boolean Strict Schema status of the Data App
customDomain Boolean Custom domein of the Data App
populateAll Boolean Populate All status of the Data App

Success200

Parameter Type Description
id String The id for the new Data App
name String The name of the Data App
user_id String The id of the user
running Boolean The running status of the Data App
defaultDomain String The default domain of the Data App
customDomain String The custom domain of the Data App
active Boolean This field is not used right now
strictSchema Boolean If strict schema should be used or not
populateAll Boolean If Populate All should be used or not
user String The id of the user

DELETE

To delete a Data App you need to specify its ID.

DELETE https://services.jexia.com/app/app-id

Field Type Description
Authorization String JWT Token Bearer authentication

This will the delete the app with that ID.

Filter with Query Parameters

Request


`GET https://services.jexia.com/app?name=appname`

Response


{
    "_id": "71183da0-4fe4-11e5-92dd-05d823229c00",
    "varId": "_71183da0_4fe4_11e5_92dd_05d823229c00",
    "id": "71183da0-4fe4-11e5-92dd-05d823229c00",
    "name": "appname",
    "user_id": "11eeeeb0-f58e-11e4-b670-cd51c29c5410",
    "running": true,
    "defaultDomain": "71183da0-4fe4-11e5-92dd-05d823229c00.test.jexia.com",
    "customDomain": null,
    "active": true,
    "strictSchema": false,
    "populateAll": true,
    "createdAt": "2015-08-31T13:30:28.000Z",
    "updatedAt": "2015-08-31T13:39:58.000Z",
    "user": "11eeeeb0-f58e-11e4-b670-cd51c29c5410"
  }

Request


GET  https://services.jexia.com/app?user=user_id&name=demoapp

Response


{
    "_id": "0961a9a0-5096-11e5-8090-8770e89bf4e8",
    "varId": "_0961a9a0_5096_11e5_8090_8770e89bf4e8",
    "id": "0961a9a0-5096-11e5-8090-8770e89bf4e8",
    "name": "demoapp",
    "user_id": "fa962040-5095-11e5-8090-8770e89bf4e8",
    "running": true,
    "defaultDomain": "0961a9a0-5096-11e5-8090-8770e89bf4e8.test.jexia.com",
    "customDomain": null,
    "active": true,
    "strictSchema": false,
    "populateAll": true,
    "createdAt": "2015-09-01T10:41:45.000Z",
    "updatedAt": "2015-09-02T13:46:02.000Z",
    "user": "fa962040-5095-11e5-8090-8770e89bf4e8"
  },
  {
    "_id": "27677930-111b-11e5-8c2d-798c6b0699e0",
    "varId": "_27677930_111b_11e5_8c2d_798c6b0699e0",
    "id": "27677930-111b-11e5-8c2d-798c6b0699e0",
    "name": "DemoApp",
    "user_id": "425a0890-fb11-11e4-9ddf-09d6a0979f87",
    "running": true,
    "defaultDomain": "27677930-111b-11e5-8c2d-798c6b0699e0.test.jexia.com",
    "customDomain": null,
    "active": true,
    "strictSchema": false,
    "populateAll": true,
    "createdAt": "2015-06-12T17:53:24.000Z",
    "updatedAt": "2015-09-18T13:09:07.000Z",
    "user": "425a0890-fb11-11e4-9ddf-09d6a0979f87"
  }

If you pass in any query parameters the results will be filtered based on them.

Search an app on the app name

Field Type Description
Authorization String JWT Token Bearer authentication

Search all the apps with a specific name from a user

Field Type Description
Authorization String JWT Token Bearer authentication

API

GET

Request


`GET https://secure.jexia.com/api`

Response




  {
    "_id": "0f83f1d0-5096-11e5-bef9-290e41e2af2e",
    "relationName": "rel_persons",
    "id": "0f83f1d0-5096-11e5-bef9-290e41e2af2e",
    "name": "persons",
    "data_app_id": "0961a9a0-5096-11e5-8090-8770e89bf4e8",
    "createdAt": "2015-09-01T10:41:54.000Z",
    "updatedAt": "2015-09-02T08:46:17.000Z",
    "fields": [
      {
        "_id": "2db1f7f1-5097-11e5-92dd-05d823229c00",
        "validations": {
          "alpha": null,
          "alphanumeric": null,
          "email": null,
          "lowercase": null,
          "max": null,
          "maxLength": null,
          "min": null,
          "minLength": null,
          "numeric": null,
          "regex": null,
          "required": null,
          "uppercase": null
        },
        "id": "2db1f7f1-5097-11e5-92dd-05d823229c00",
        "name": "firstName",
        "type": "string",
        "validation_alpha": null,
        "validation_alphanumeric": null,
        "validation_email": null,
        "validation_lowercase": null,
        "validation_max": null,
        "validation_maxLength": null,
        "validation_min": null,
        "validation_minLength": null,
        "validation_numeric": null,
        "validation_regex": null,
        "validation_required": null,
        "validation_uppercase": null,
        "createdAt": "2015-09-01T10:49:54.000Z",
        "updatedAt": "2015-09-02T08:46:17.000Z",
        "data_set_id": "0f83f1d0-5096-11e5-bef9-290e41e2af2e"
      },
      {
        "_id": "3f56b901-5097-11e5-8090-8770e89bf4e8",
        "validations": {
          "alpha": null,
          "alphanumeric": null,
          "email": null,
          "lowercase": null,
          "max": null,
          "maxLength": null,
          "min": null,
          "minLength": null,
          "numeric": null,
          "regex": null,
          "required": null,
          "uppercase": null
        },
        "id": "3f56b901-5097-11e5-8090-8770e89bf4e8",
        "name": "lastName",
        "type": "string",
        "validation_alpha": null,
        "validation_alphanumeric": null,
        "validation_email": null,
        "validation_lowercase": null,
        "validation_max": null,
        "validation_maxLength": null,
        "validation_min": null,
        "validation_minLength": null,
        "validation_numeric": null,
        "validation_regex": null,
        "validation_required": null,
        "validation_uppercase": null,
        "createdAt": "2015-09-01T10:50:23.000Z",
        "updatedAt": "2015-09-02T08:46:17.000Z",
        "data_set_id": "0f83f1d0-5096-11e5-bef9-290e41e2af2e"
      },
      {
        "_id": "3f56b902-5097-11e5-8090-8770e89bf4e8",
        "validations": {
          "alpha": null,
          "alphanumeric": null,
          "email": null,
          "lowercase": null,
          "max": null,
          "maxLength": null,
          "min": null,
          "minLength": null,
          "numeric": null,
          "regex": null,
          "required": null,
          "uppercase": null
        },
        "id": "3f56b902-5097-11e5-8090-8770e89bf4e8",
        "name": "active",
        "type": "boolean",
        "validation_alpha": null,
        "validation_alphanumeric": null,
        "validation_email": null,
        "validation_lowercase": null,
        "validation_max": null,
        "validation_maxLength": null,
        "validation_min": null,
        "validation_minLength": null,
        "validation_numeric": null,
        "validation_regex": null,
        "validation_required": null,
        "validation_uppercase": null,
        "createdAt": "2015-09-01T10:50:23.000Z",
        "updatedAt": "2015-09-02T08:46:17.000Z",
        "data_set_id": "0f83f1d0-5096-11e5-bef9-290e41e2af2e"
      }
    ],
    "relationsFrom": [],
    "relationsTo": [
      {
        "id": 161,
        "fromId": "e8e04c50-5152-11e5-92dd-05d823229c00",
        "fromType": "one",
        "toId": "0f83f1d0-5096-11e5-bef9-290e41e2af2e",
        "toType": "many",
        "createdAt": "2015-09-04T13:12:33.000Z",
        "updatedAt": "2015-09-04T13:12:33.000Z"
      }
    ],
    "app": "0961a9a0-5096-11e5-8090-8770e89bf4e8"
  },
  {
    "_id": "0fa70690-585f-11e5-bf3c-51be00c9390b",
    "relationName": "rel_newset",
    "id": "0fa70690-585f-11e5-bf3c-51be00c9390b",
    "name": "newset",
    "data_app_id": "78488a20-56d9-11e5-92dd-05d823229c00",
    "createdAt": "2015-09-11T08:28:21.000Z",
    "updatedAt": "2015-09-11T08:28:21.000Z",
    "fields": [],
    "relationsFrom": [],
    "relationsTo": [],
    "app": "78488a20-56d9-11e5-92dd-05d823229c00"
  },
  {
    "_id": "1093ff10-5303-11e5-92dd-05d823229c00",
    "relationName": "rel_test_set",
    "id": "1093ff10-5303-11e5-92dd-05d823229c00",
    "name": "test_set",
    "data_app_id": "26566280-0492-11e5-8c2d-798c6b0699e0",
    "createdAt": "2015-09-04T12:47:13.000Z",
    "updatedAt": "2015-09-18T10:13:29.000Z",
    "fields": [
      {
        "_id": "df0e3230-5ded-11e5-8ee5-6b0c65fa03a6",
        "validations": {
          "alpha": null,
          "alphanumeric": null,
          "email": null,
          "lowercase": null,
          "max": null,
          "maxLength": null,
          "min": null,
          "minLength": null,
          "numeric": null,
          "regex": null,
          "required": null,
          "uppercase": null
        },
        "id": "df0e3230-5ded-11e5-8ee5-6b0c65fa03a6",
        "name": "Veld-1",
        "type": "integer",
        "validation_alpha": null,
        "validation_alphanumeric": null,
        "validation_email": null,
        "validation_lowercase": null,
        "validation_max": null,
        "validation_maxLength": null,
        "validation_min": null,
        "validation_minLength": null,
        "validation_numeric": null,
        "validation_regex": null,
        "validation_required": null,
        "validation_uppercase": null,
        "createdAt": "2015-09-18T10:13:13.000Z",
        "updatedAt": "2015-09-18T10:13:29.000Z",
        "data_set_id": "1093ff10-5303-11e5-92dd-05d823229c00"
      },
      {
        "_id": "df0e3231-5ded-11e5-8ee5-6b0c65fa03a6",
        "validations": {
          "alpha": null,
          "alphanumeric": null,
          "email": null,
          "lowercase": null,
          "max": null,
          "maxLength": null,
          "min": null,
          "minLength": null,
          "numeric": null,
          "regex": null,
          "required": null,
          "uppercase": null
        },
        "id": "df0e3231-5ded-11e5-8ee5-6b0c65fa03a6",
        "name": "Veld-3",
        "type": "float",
        "validation_alpha": null,
        "validation_alphanumeric": null,
        "validation_email": null,
        "validation_lowercase": null,
        "validation_max": null,
        "validation_maxLength": null,
        "validation_min": null,
        "validation_minLength": null,
        "validation_numeric": null,
        "validation_regex": null,
        "validation_required": null,
        "validation_uppercase": null,
        "createdAt": "2015-09-18T10:13:13.000Z",
        "updatedAt": "2015-09-18T10:13:29.000Z",
        "data_set_id": "1093ff10-5303-11e5-92dd-05d823229c00"
      },
      {
        "_id": "df0e3232-5ded-11e5-8ee5-6b0c65fa03a6",
        "validations": {
          "alpha": null,
          "alphanumeric": null,
          "email": null,
          "lowercase": null,
          "max": null,
          "maxLength": null,
          "min": null,
          "minLength": null,
          "numeric": null,
          "regex": null,
          "required": null,
          "uppercase": null
        },
        "id": "df0e3232-5ded-11e5-8ee5-6b0c65fa03a6",
        "name": "Another-field",
        "type": "datetime",
        "validation_alpha": null,
        "validation_alphanumeric": null,
        "validation_email": null,
        "validation_lowercase": null,
        "validation_max": null,
        "validation_maxLength": null,
        "validation_min": null,
        "validation_minLength": null,
        "validation_numeric": null,
        "validation_regex": null,
        "validation_required": null,
        "validation_uppercase": null,
        "createdAt": "2015-09-18T10:13:13.000Z",
        "updatedAt": "2015-09-18T10:13:29.000Z",
        "data_set_id": "1093ff10-5303-11e5-92dd-05d823229c00"
      }
    ],
    "relationsFrom": [
      {
        "id": 189,
        "fromId": "1093ff10-5303-11e5-92dd-05d823229c00",
        "fromType": "one",
        "toId": "62639050-31d7-11e5-b61d-4ddee4ec9a7d",
        "toType": "one",
        "createdAt": "2015-09-11T13:42:19.000Z",
        "updatedAt": "2015-09-11T13:42:19.000Z"
      }
    ],
    "relationsTo": [
      {
        "id": 182,
        "fromId": "a4f307a0-32dd-11e5-bdf1-71ea73bb69f5",
        "fromType": "one",
        "toId": "1093ff10-5303-11e5-92dd-05d823229c00",
        "toType": "one",
        "createdAt": "2015-09-11T13:29:05.000Z",
        "updatedAt": "2015-09-11T13:29:05.000Z"
      },
      {
        "id": 184,
        "fromId": "4259dfc0-32af-11e5-bdf1-71ea73bb69f5",
        "fromType": "one",
        "toId": "1093ff10-5303-11e5-92dd-05d823229c00",
        "toType": "one",
        "createdAt": "2015-09-11T13:29:05.000Z",
        "updatedAt": "2015-09-11T13:29:05.000Z"
      }
    ],
    "app": "26566280-0492-11e5-8c2d-798c6b0699e0"
  },
  {
    "_id": "12f4f980-5303-11e5-bef9-290e41e2af2e",
    "relationName": "rel_werwer",
    "id": "12f4f980-5303-11e5-bef9-290e41e2af2e",
    "name": "werwer",
    "data_app_id": "26566280-0492-11e5-8c2d-798c6b0699e0",
    "createdAt": "2015-09-04T12:47:17.000Z",
    "updatedAt": "2015-09-04T12:47:17.000Z",
    "fields": [],
    "relationsFrom": [
      {
        "id": 188,
        "fromId": "12f4f980-5303-11e5-bef9-290e41e2af2e",
        "fromType": "one",
        "toId": "1533ed00-5303-11e5-8090-8770e89bf4e8",
        "toType": "one",
        "createdAt": "2015-09-11T13:40:30.000Z",
        "updatedAt": "2015-09-11T13:40:30.000Z"
      }
    ],
    "relationsTo": [
      {
        "id": 186,
        "fromId": "511c1a50-32af-11e5-85dd-77bc15d0381e",
        "fromType": "one",
        "toId": "12f4f980-5303-11e5-bef9-290e41e2af2e",
        "toType": "one",
        "createdAt": "2015-09-11T13:30:05.000Z",
        "updatedAt": "2015-09-11T13:30:05.000Z"
      }
    ],
    "app": "26566280-0492-11e5-8c2d-798c6b0699e0"
  },
  {
    "_id": "14197c50-5303-11e5-92dd-05d823229c00",
    "relationName": "rel_zAnother_dataset",
    "id": "14197c50-5303-11e5-92dd-05d823229c00",
    "name": "zAnother_dataset",
    "data_app_id": "26566280-0492-11e5-8c2d-798c6b0699e0",
    "createdAt": "2015-09-04T12:47:19.000Z",
    "updatedAt": "2015-09-18T10:15:39.000Z",
    "fields": [],
    "relationsFrom": [
      {
        "id": 192,
        "fromId": "14197c50-5303-11e5-92dd-05d823229c00",
        "fromType": "one",
        "toId": "1533ed00-5303-11e5-8090-8770e89bf4e8",
        "toType": "one",
        "createdAt": "2015-09-11T13:44:59.000Z",
        "updatedAt": "2015-09-11T13:44:59.000Z"
      },
      {
        "id": 190,
        "fromId": "14197c50-5303-11e5-92dd-05d823229c00",
        "fromType": "one",
        "toId": "a4f307a0-32dd-11e5-bdf1-71ea73bb69f5",
        "toType": "one",
        "createdAt": "2015-09-11T13:42:19.000Z",
        "updatedAt": "2015-09-11T13:42:19.000Z"
      }
    ],
    "relationsTo": [
      {
        "id": 181,
        "fromId": "62639050-31d7-11e5-b61d-4ddee4ec9a7d",
        "fromType": "one",
        "toId": "14197c50-5303-11e5-92dd-05d823229c00",
        "toType": "one",
        "createdAt": "2015-09-11T13:29:05.000Z",
        "updatedAt": "2015-09-11T13:29:05.000Z"
      }
    ],
    "app": "26566280-0492-11e5-8c2d-798c6b0699e0"
  },
  {
    "_id": "1533ed00-5303-11e5-8090-8770e89bf4e8",
    "relationName": "rel_werwerwerwer",
    "id": "1533ed00-5303-11e5-8090-8770e89bf4e8",
    "name": "werwerwerwer",
    "data_app_id": "26566280-0492-11e5-8c2d-798c6b0699e0",
    "createdAt": "2015-09-04T12:47:21.000Z",
    "updatedAt": "2015-09-04T12:47:21.000Z",
    "fields": [],
    "relationsFrom": [],
    "relationsTo": [
      {
        "id": 188,
        "fromId": "12f4f980-5303-11e5-bef9-290e41e2af2e",
        "fromType": "one",
        "toId": "1533ed00-5303-11e5-8090-8770e89bf4e8",
        "toType": "one",
        "createdAt": "2015-09-11T13:40:30.000Z",
        "updatedAt": "2015-09-11T13:40:30.000Z"
      },
      {
        "id": 192,
        "fromId": "14197c50-5303-11e5-92dd-05d823229c00",
        "fromType": "one",
        "toId": "1533ed00-5303-11e5-8090-8770e89bf4e8",
        "toType": "one",
        "createdAt": "2015-09-11T13:44:59.000Z",
        "updatedAt": "2015-09-11T13:44:59.000Z"
      }
    ],
    "app": "26566280-0492-11e5-8c2d-798c6b0699e0"
  },
  {
    "_id": "16ad50a0-3485-11e5-941a-a1a25908fb18",
    "relationName": "rel_fuel",
    "id": "16ad50a0-3485-11e5-941a-a1a25908fb18",
    "name": "fuel",
    "data_app_id": "842e4c80-f801-11e4-9619-49c180a27009",
    "createdAt": "2015-07-27T17:29:52.000Z",
    "updatedAt": "2015-07-27T17:29:52.000Z",
    "fields": [],
    "relationsFrom": [],
    "relationsTo": [
      {
        "id": 140,
        "fromId": "82bc15c0-3484-11e5-8c90-9d8728ccfe85",
        "fromType": "many",
        "toId": "16ad50a0-3485-11e5-941a-a1a25908fb18",
        "toType": "many",
        "createdAt": "2015-07-27T17:30:39.000Z",
        "updatedAt": "2015-07-27T17:30:39.000Z"
      }
    ],
    "app": "842e4c80-f801-11e4-9619-49c180a27009"
  },
  {
    "_id": "28ea5210-570b-11e5-8090-8770e89bf4e8",
    "relationName": "rel_test1",
    "id": "28ea5210-570b-11e5-8090-8770e89bf4e8",
    "name": "test1",
    "data_app_id": "78488a20-56d9-11e5-92dd-05d823229c00",
    "createdAt": "2015-09-09T15:55:15.000Z",
    "updatedAt": "2015-09-09T15:55:15.000Z",
    "fields": [],
    "relationsFrom": [
      {
        "id": 174,
        "fromId": "28ea5210-570b-11e5-8090-8770e89bf4e8",
        "fromType": "one",
        "toId": "8b73ac00-56f8-11e5-92dd-05d823229c00",
        "toType": "many",
        "createdAt": "2015-09-09T15:55:43.000Z",
        "updatedAt": "2015-09-09T15:55:43.000Z"
      }
    ],
    "relationsTo": [],
    "app": "78488a20-56d9-11e5-92dd-05d823229c00"
  },
  {
    "_id": "30520b10-5896-11e5-bf3c-51be00c9390b",
    "relationName": "rel_zAnother_datasetz",
    "id": "30520b10-5896-11e5-bf3c-51be00c9390b",
    "name": "zAnother_datasetz",
    "data_app_id": "26566280-0492-11e5-8c2d-798c6b0699e0",
    "createdAt": "2015-09-11T15:02:58.000Z",
    "updatedAt": "2015-09-18T10:16:01.000Z",
    "fields": [],
    "relationsFrom": [],
    "relationsTo": [],
    "app": "26566280-0492-11e5-8c2d-798c6b0699e0"
  }



GET https://secure.jexia.com/api

Field Type Description
Authorization String JWT Token Bearer authentication.

Success200

Parameter Type Description
id String The id of the dataset
relationName String The name of the relation from the dataset to another dataset
name String The name of the dataset
data_app_id String The id of the Data App the dataset belongs to
createdAt String The datetime the dataset was created
updatedAt String The datetime the dataset was updated
fields Object The object holding the information about the fields
relationsFrom Object The object holding the information about the relation-from
relationsTo Object The object holding the information about the relation-to
app String The id of the Data App
validations Object The object holding the information about validations.
id String The id of the field
name String The name of the field
type String The field type
validation_alpha Boolean Whether the field should only contain letters
validation_alphanumeric Boolean Whether the field should only contain letters and numbers
validation_email Boolean Whether the field should be an email
validation_lowercase Boolean Whether the field should only contain lowercase characters
validation_max Number The maximum value that a number type field can get
validation_maxLength Number The maximum accepted length of the value in this field
validation_min Number The minimum value that a number type field (integer/float) can get
validation_minLength Number The minimum required length of the value in this field
validation_numeric Boolean Whether the string in this field should only contain numbers
validation_regex String Some regex to validate this field against
validation_required Boolean Whether this field is required or not
validation_uppercase Boolean Whether the field should only contain uppercase characters
createdAt String The datetime the field was created
updatedAt String The datetime the field was updated
data_set_id String The data set the field belongs to

Validations

Parameter Type Description
alpha Boolean Whether the field should only contain letters
alphanumeric Boolean hether the field should only contain letters and numbers
email Boolean Whether the field should be an email
equals Boolean Something the field should be equal to
len Number The required length of the field
lowercase Boolean Whether the field should only contain lowercase characters.
min Number The minimum value that a number type field (integer/float) can get.
minLength Number The minimum required length of the value in this field
max Number The maximum value that a number type field can get
maxLength Number The maximum accepted length of the value in this field
notEmpty Boolean Whether the field can be empty or not
numeric Boolean Whether the string in this field should only contain numbers
regex String Some regex to validate this field against
required Boolean Whether this field is required or not
uppercase Boolean Whether the field should only contain uppercase characters

RelationsFrom

Parameter Type Description
id Number The id
fromId String The id of the relationFrom
fromType String The type of the relationFrom (one or many)
toId String The id of the relationTo
toType String The type of the relationTo (one or many)
createdAt String The datetime of the relation being created
updatedAt String The datetime of the relation being updated

RelationsTo

Parameter Type Description
id Number The id
fromId String The id of the relationFrom
fromType String The type of the relationFrom (one or many)
toId String The id of the relationTo
toType String The type of the relationTo (one or many)
createdAt String The datetime of the relation being created
updatedAt String The datetime of the relation being updated

Search on id

Request


 `GET https://secure.jexia.com/api/api_id`

Response



{
  "_id": "0f83f1d0-5096-11e5-bef9-290e41e2af2e",
  "relationName": "rel_persons",
  "id": "0f83f1d0-5096-11e5-bef9-290e41e2af2e",
  "name": "persons",
  "data_app_id": "0961a9a0-5096-11e5-8090-8770e89bf4e8",
  "createdAt": "2015-09-01T10:41:54.000Z",
  "updatedAt": "2015-09-02T08:46:17.000Z",
  "relationsTo": [
    {
      "id": 161,
      "fromId": "e8e04c50-5152-11e5-92dd-05d823229c00",
      "fromType": "one",
      "toId": "0f83f1d0-5096-11e5-bef9-290e41e2af2e",
      "toType": "many",
      "createdAt": "2015-09-04T13:12:33.000Z",
      "updatedAt": "2015-09-04T13:12:33.000Z"
    }
  ],
  "relationsFrom": [],
  "fields": [
    {
      "_id": "2db1f7f1-5097-11e5-92dd-05d823229c00",
      "validations": {
        "alpha": null,
        "alphanumeric": null,
        "email": null,
        "lowercase": null,
        "max": null,
        "maxLength": null,
        "min": null,
        "minLength": null,
        "numeric": null,
        "regex": null,
        "required": null,
        "uppercase": null
      },
      "id": "2db1f7f1-5097-11e5-92dd-05d823229c00",
      "name": "firstName",
      "type": "string",
      "validation_alpha": null,
      "validation_alphanumeric": null,
      "validation_email": null,
      "validation_lowercase": null,
      "validation_max": null,
      "validation_maxLength": null,
      "validation_min": null,
      "validation_minLength": null,
      "validation_numeric": null,
      "validation_regex": null,
      "validation_required": null,
      "validation_uppercase": null,
      "createdAt": "2015-09-01T10:49:54.000Z",
      "updatedAt": "2015-09-02T08:46:17.000Z",
      "data_set_id": "0f83f1d0-5096-11e5-bef9-290e41e2af2e"
    },
    {
      "_id": "3f56b901-5097-11e5-8090-8770e89bf4e8",
      "validations": {
        "alpha": null,
        "alphanumeric": null,
        "email": null,
        "lowercase": null,
        "max": null,
        "maxLength": null,
        "min": null,
        "minLength": null,
        "numeric": null,
        "regex": null,
        "required": null,
        "uppercase": null
      },
      "id": "3f56b901-5097-11e5-8090-8770e89bf4e8",
      "name": "lastName",
      "type": "string",
      "validation_alpha": null,
      "validation_alphanumeric": null,
      "validation_email": null,
      "validation_lowercase": null,
      "validation_max": null,
      "validation_maxLength": null,
      "validation_min": null,
      "validation_minLength": null,
      "validation_numeric": null,
      "validation_regex": null,
      "validation_required": null,
      "validation_uppercase": null,
      "createdAt": "2015-09-01T10:50:23.000Z",
      "updatedAt": "2015-09-02T08:46:17.000Z",
      "data_set_id": "0f83f1d0-5096-11e5-bef9-290e41e2af2e"
    },
    {
      "_id": "3f56b902-5097-11e5-8090-8770e89bf4e8",
      "validations": {
        "alpha": null,
        "alphanumeric": null,
        "email": null,
        "lowercase": null,
        "max": null,
        "maxLength": null,
        "min": null,
        "minLength": null,
        "numeric": null,
        "regex": null,
        "required": null,
        "uppercase": null
      },
      "id": "3f56b902-5097-11e5-8090-8770e89bf4e8",
      "name": "active",
      "type": "boolean",
      "validation_alpha": null,
      "validation_alphanumeric": null,
      "validation_email": null,
      "validation_lowercase": null,
      "validation_max": null,
      "validation_maxLength": null,
      "validation_min": null,
      "validation_minLength": null,
      "validation_numeric": null,
      "validation_regex": null,
      "validation_required": null,
      "validation_uppercase": null,
      "createdAt": "2015-09-01T10:50:23.000Z",
      "updatedAt": "2015-09-02T08:46:17.000Z",
      "data_set_id": "0f83f1d0-5096-11e5-bef9-290e41e2af2e"
    }
  ],
  "app": "0961a9a0-5096-11e5-8090-8770e89bf4e8"
}

If you want to get a dataset with a specific id use:

GET https://secure.jexia.com/api/api_id

Field Type Description
Authorization String JWT Token Bearer authentication.

Success200

Parameter Type Description
id String The id of the dataset
relationName String The name of the relation from the dataset to another dataset
name String The name of the dataset
data_app_id String The id of the Data App the dataset belongs to
createdAt String The datetime the dataset was created
updatedAt String The datetime the dataset was updated
fields Object The object holding the information about the fields
relationsFrom Object The object holding the information about the relation-from
relationsTo Object The object holding the information about the relation-to
app String The id of the Data App

Fields

Parameter Type Description
validations Object The object holding the information about validations.
id String The id of the field
name String The name of the field
type String The field type
validation_alpha Boolean Whether the field should only contain letters
validation_alphanumeric Boolean Whether the field should only contain letters and numbers
validation_email Boolean Whether the field should be an email
validation_lowercase Boolean Whether the field should only contain lowercase characters
validation_max Number The maximum value that a number type field can get
validation_maxLength Number The minimum required length of the value in this field
validation_min Number The minimum value that a number type field (integer/float) can get
validation_minLength Number The minimum required length of the value in this field
validation_numeric Boolean Whether the string in this field should only contain numbers
validation_regex String Some regex to validate this field against
validation_required Boolean Whether this field is required or not
validation_uppercase Boolean Whether the field should only contain uppercase characters
createdAt String The datetime the field was created
updatedAt String The datetime the field was updated
data_set_id String The data set the field belongs to

Validations

Parameter Type Description
alpha Boolean Whether the field should only contain letters
alphanumeric Boolean hether the field should only contain letters and numbers
email Boolean Whether the field should be an email
equals Boolean Something the field should be equal to
len Number The required length of the field
lowercase Boolean Whether the field should only contain lowercase characters.
min Number The minimum value that a number type field (integer/float) can get.
minLength Number The minimum required length of the value in this field
max Number The maximum value that a number type field can get
maxLength Number The maximum accepted length of the value in this field
notEmpty Boolean Whether the field can be empty or not
numeric Boolean Whether the string in this field should only contain numbers
regex String Some regex to validate this field against
required Boolean Whether this field is required or not
uppercase Boolean Whether the field should only contain uppercase characters

RelationsFrom

Parameter Type Description
id Number The id
fromId String The id of the relationFrom
fromType String The type of the relationFrom (one or many)
toId String The id of the relationTo
toType String The type of the relationTo (one or many)
createdAt String The datetime of the relation being created
updatedAt String The datetime of the relation being updated

RelationsTo

Parameter Type Description
id Number The id
fromId String The id of the relationFrom
fromType String The type of the relationFrom (one or many)
toId String The id of the relationTo
toType String The type of the relationTo (one or many)
createdAt String The datetime of the relation being created
updatedAt String The datetime of the relation being updated

Populate Request

Parameter Value
populate app
populate app.user
populate app.apis

Populate with app

Request


 `GET https://secure.jexia.com/app/api_id?populate=app`

Response




{
  "_id": "0fa70690-585f-11e5-bf3c-51be00c9390b",
  "relationName": "rel_newset",
  "id": "0fa70690-585f-11e5-bf3c-51be00c9390b",
  "name": "newset",
  "data_app_id": "78488a20-56d9-11e5-92dd-05d823229c00",
  "createdAt": "2015-09-11T08:28:21.000Z",
  "updatedAt": "2015-09-11T08:28:21.000Z",
  "app": {
    "_id": "78488a20-56d9-11e5-92dd-05d823229c00",
    "varId": "_78488a20_56d9_11e5_92dd_05d823229c00",
    "id": "78488a20-56d9-11e5-92dd-05d823229c00",
    "name": "todo",
    "user_id": "91667600-eb5b-11e4-ad20-cdfadceaff2c",
    "running": true,
    "defaultDomain": "78488a20-56d9-11e5-92dd-05d823229c00.test.jexia.com",
    "customDomain": null,
    "active": true,
    "strictSchema": false,
    "populateAll": true,
    "createdAt": "2015-09-09T09:59:34.000Z",
    "updatedAt": "2015-09-09T09:59:34.000Z"
  },
  "relationsTo": [],
  "relationsFrom": [],
  "fields": []
}



If you want to get information about the Data App the dataset belongs to and the user to whom it belongs, populate with:

GET https://services.jexia.com/api/api_id?populate=app.user

Populate with app.apis

If you want to get information about the Data App and its Datasets populate with:

GET https://services.jexia.com/api/api_id?populate=app.apis

POST

Endpoint

Request (Minimum required)


{
  "name": "data-set name",
  "app": "<(data-)app ID>"
}

Response

{
  "name": "data-set name",
  "app": "<(data-)app ID>",
  "fields": [
    {
      "type": "string", // can be string, text, integer, float, date, datetime boolean, binary, array, json, email
      "name": "", // required!
      "validations": {
        "required": null,
        "alpha": null, // boolean, whether the field should only contain letters
        "alphanumeric": null, // boolean, whether the field should only contain letters and numbers
        "email": null, // boolean, whether the field should be an email (for string type)
        "equals": null, // boolean, something that the field should be equal to
        "len": null, // integer, the required length of the field
        "lowercase": null, // boolean
        "min": null, // integer, the minimum value that a number type field (integer/float) can get
        "minLength": null, // integer, the minimum required length of the value in this field
        "max": null, // integer, the maximum value that a number type field can get
        "maxLength": null, // integer, the maximum accepted length of the value in this field
        "notEmpty": null, // boolean
        "numeric": null, // boolean, whether the string in this field should only contain numbers
        "regex": null, // some regex to validate this field against
        "uppercase": null, // boolean
      }
    }
  ]
}

POST https://services.jexia.com/api

Field Type Description
Authorization String JWT Token Bearer authentication.

Success200

Field Type Description
name String Dataset name
app String Id of the Data App the dataset belongs to
fields Object Holds the information about the fields
type String Sets the type of the field
name String The name of the field
validations Object Holds the information about the validations
required Boolean Whether this field is required or not
alpha Boolean Whether the field should only contain letters
alphanumeric Boolean Whether the field should only contain letters and numbers
email Boolean Whether the field should be an email
equals Boolean Something the field should be equal to
len Number The required length of the field
lowercase Boolean Whether the field should only contain lowercase characters
min Number The minimum value that a number type field (integer/float) can get
minLength Number The minimum required length of the value in this field
max Number The maximum value that a number type field can get
maxLength Number The maximum accepted length of the value in this field
notEmpty Boolean Whether the field can be empty or not
numeric Boolean Whether the string in this field should only contain numbers
regex String Some regex to validate this field against
uppercase Boolean Whether the field should only contain uppercase characters

PATCH

Request


{
  "name": "another name"
}

Response


{
  "name": "another name",
  "app": "<(data-)app ID>",
  "fields": [
    {
      "type": "string", // can be string, text, integer, float, date, datetime boolean, binary, array, json, email
      "name": "", // required!
      "validations": {
        "required": null,
        "alpha": null, // boolean, whether the field should only contain letters
        "alphanumeric": null, // boolean, whether the field should only contain letters and numbers
        "email": null, // boolean, whether the field should be an email (for string type)
        "equals": null, // boolean, something that the field should be equal to
        "len": null, // integer, the required length of the field
        "lowercase": null, // boolean
        "min": null, // integer, the minimum value that a number type field (integer/float) can get
        "minLength": null, // integer, the minimum required length of the value in this field
        "max": null, // integer, the maximum value that a number type field can get
        "maxLength": null, // integer, the maximum accepted length of the value in this field
        "notEmpty": null, // boolean
        "numeric": null, // boolean, whether the string in this field should only contain numbers
        "regex": null, // some regex to validate this field against
        "uppercase": null, // boolean
      }
    }
  ]
}

PATCH https://services.jexia.com/api/api-id

For all the PATCH request you don’t need to send all the fields, but only the ones that you want to update.

DELETE

DELETE https://services.jexia.com/api/api-id

To delete a dataset you need to specify the id of the dataset.

Field Type Description
Authorization String JWT Token Bearer authentication.

Filter with Query Parameters

Request


`GET https://services.jexia.com/api?name=datasetname`

Response



[
  {
    "_id": "a23f3fa0-4fe4-11e5-92dd-05d823229c00",
    "relationName": "rel_Department",
    "id": "a23f3fa0-4fe4-11e5-92dd-05d823229c00",
    "name": "Department",
    "data_app_id": "71183da0-4fe4-11e5-92dd-05d823229c00",
    "createdAt": "2015-08-31T13:31:50.000Z",
    "updatedAt": "2015-09-11T14:01:30.000Z",
    "fields": [
      {
        "_id": "9a4256a0-588d-11e5-bf3c-51be00c9390b",
        "validations": {
          "alpha": null,
          "alphanumeric": null,
          "email": null,
          "lowercase": null,
          "max": null,
          "maxLength": null,
          "min": null,
          "minLength": null,
          "numeric": null,
          "regex": null,
          "required": null,
          "uppercase": null
        },
        "id": "9a4256a0-588d-11e5-bf3c-51be00c9390b",
        "name": "department",
        "type": "string",
        "validation_alpha": null,
        "validation_alphanumeric": null,
        "validation_email": null,
        "validation_lowercase": null,
        "validation_max": null,
        "validation_maxLength": null,
        "validation_min": null,
        "validation_minLength": null,
        "validation_numeric": null,
        "validation_regex": null,
        "validation_required": null,
        "validation_uppercase": null,
        "createdAt": "2015-09-11T14:01:30.000Z",
        "updatedAt": "2015-09-11T14:01:30.000Z",
        "data_set_id": "a23f3fa0-4fe4-11e5-92dd-05d823229c00"
      }
    ],
    "relationsFrom": [
      {
        "id": 158,
        "fromId": "a23f3fa0-4fe4-11e5-92dd-05d823229c00",
        "fromType": "one",
        "toId": "89f6d160-4fe4-11e5-92dd-05d823229c00",
        "toType": "many",
        "createdAt": "2015-08-31T13:33:16.000Z",
        "updatedAt": "2015-08-31T13:33:16.000Z"
      }
    ],
    "relationsTo": [],
    "app": "71183da0-4fe4-11e5-92dd-05d823229c00"
  }
]

If you pass in any query parameters the results will be filtered based on them:

Example: Search a user on its username:

Relations

RelationsFrom

Parameter Type Description
id Number The id
fromId String The id of the relationFrom
fromType String The type of the relationFrom (one or many)
toId String The id of the relationTo
toType String The type of the relationTo (one or many)
createdAt String The datetime of the relation being created
updatedAt String The datetime of the relation being updated

RelationsTo

Parameter Type Description
id Number The id
fromId String The id of the relationFrom
fromType String The type of the relationFrom (one or many)
toId String The id of the relationTo
toType String The type of the relationTo (one or many)
createdAt String The datetime of the relation being created
updatedAt String The datetime of the relation being updated

Real Time Communication

With Jexia you can make use of Real Time Communication. This means by whenever there are changes in your dataset you will be notified. Note that for this to work you need to make sure real time communication is enabled (it is on by default).

Turning RTC on/off

PATCH services.jexia.com/api/dataset_id

Request


`PATCH services.jexia.com/api/dataset_id`


{
    ...
    "rtcStatus": true/false // true is on, false is off... DOH!
}

It is possible to turn the RTC on or off on dataset level. If the RTC is off no events will be published for that dataset.

What is what

This section gives an overview of the terms used in our manual.

DataApp

A collection of DataSets, identified uniquely by an AppId. A ‘DataApp’ is the application you can create that stores all kind of data. Data is organized within DataSets.

DataSet

A collection of data belonging to a DataApp, uniquely identified by a name.

Key

A Key that belongs to a DataApp, specifiying the priviliges for DataSets in that DataApp. (API) Keys give access to DataApps based on user defined permissions on DataApp, DataSet and field levels. A DataApp can have several keys, each with different permissions. An API key belongs to only one Data App.

Secret

A Secret (password) that belongs to a Key, needed to generate an Authentication Token

Authentication Token

A Token needed to access a DataSet

Root key

Automatically created key when a new DataApp is created. Root keys have full write access to all the resource of a Data App. It is recommended to create one or more API Keys to interact with your DataApp and DataSets.

Examples

We think that there is only one way to find out how Jexia can benefit you. Just give it a try! Building something great with Jexia is real easy and can be done fast. Below we have collected some example applications that are created to show case what Jexia can do.

If you want your example application in this list, just send us a link!

Technical Support

Getting help with Jexia is easy, with various options for free community support for individual and small projects, up to premium support for large projects.

All your findings,issues and feature request are more than welcome!