Bilbeo API

User

User - Register

/user

Parameter

Field Type Description
mail string

valid email address

Success 200

Field Type Description
status string

success

message string

Activation link sent

userId string

ID of the registered user

HTTP/1.1 200 OK

{
    "status": "success",
    "message": "User successfully registration ",
    "userId": "536b07935c89be214c000009"
}

User - Activate

/user/activate

Header

Field Type Description
Authorization activationToken

activation token sent by mail after /user or in response to the OEM request /oem/user

Success 200

Field Type Description
status string

success

message string

Activation link sent

HTTP/1.1 200 OK

{
    "status": "success",
    "message": "Activation link sent"
}

Error 4xx

Field Type Description
status string

error

message string

User already activated

userActivated string

false

HTTP/1.1 403 OK

{
    "status": "error",
    "error": "User already activated"
    "userActivated": "false"
}

User - Authenticate

/user/authenticate

Parameter

Field Type Description
mail string

valid mail address

password string

password

Success 200

Field Type Description
status string

success

token string

authentication token

HTTP/1.1 200 OK

{
    "status": "success",
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJtYWlsIjoiaGlsbGVsQGJpbGJlby5jb20iLCJpZCI6IjUzNmIwNzkzNWM4OWJlMjE0YzAwMDAwOSIsImV4cCI6MTQyNzY0NDUyOCwiaWF0IjoxNDI3Mzg1MzI4fQ.eu_SS6sQhyuFHsE2qGoeJlrQi1sOnWxOr0kymK40iOA"
}

Error 4xx

Field Type Description
status string

error

message string

Wrong mail address or password

HTTP/1.1 403 OK

{
    "status": "error",
    "error": "Wrong mail address or password"
}

User - Get User Details

/user/get

Header

Field Type Description
Authorization authToken

Authentication Token

Success 200

Field Type Description
status string

success

user object

user details

  _id id

user's ID

  firstName string

first name

  lastName string

last name

  mail string

email address

  language string

language

  photoURL url

URL of the user's profile picture

  workspacePermission object[]

list of workspace permissions

    _id id

ID or the workspace permission

    workspaceId id

ID or the workspace

    indicatorPermission id

ID or the workspace indicator permission group

    dimensionPermission id

ID or the workspace dimension permission group

    canUpdate boolean

true if the user has the ability to update this workspace

    isAdmin boolean

true if the user has the ability to manage this workspace

    name name

name of the workspace

  activated date

date of activation

  logoURL url

URL of the header logo

  webURL url

URL of the domain the user is registered in

  reportButtonURL url

URL of the bottom link in the report mail

  lastLogin optional date

date of the last login if any

  isOEM optional boolean

true if the user is an OEM manager

  APIKey optional string

API key if the user is an OEM

  ownerId optional id

ID of the user's OEM if any

  custom optional string/object

custom properties set on the user creation or update

HTTP/1.1 200 OK

{
    "status": "success",
    "user": {
        "_id" : "536b07935c89be214c000009",
        "firstName" : "Hillel",
        "lastName" : "Arki",
        "mail" : "hillel@bilbeo.com  "
        "language" : "en_GB",
        "photoURL" : "https://bilbeo-user-photo.s3-eu-west-1.amazonaws.com/536b07935c89be214c000009.gif",
        "workspacePermission" : [
          {
            "_id" : "5405a01d2e47d257710004d1",
            "isAdmin" : true,
            "workspaceId" : "5405a01d2e47d257710004cc",
            "indicatorPermission" : "5405a01d2e47d257710004d0",
            "dimensionPermission" : "5405a01d2e47d257710004cf",
            "canUpdate" : true,
            "name" : "Bilbeo"
          },
          {
            "_id" : "54059fae2e47d257710004ca",
            "isAdmin" : false,
            "workspaceId" : "54059fa72e47d257710003c4",
            "indicatorPermission" : "54059fae2e47d257710004c9",
            "dimensionPermission" : "54059fae2e47d257710004c8",
            "canUpdate" : false,
            "name" : "My other awesome company"
          },
        ],
        "activated" : "2014-05-08T04:27:17.257Z",
        "logoURL" : "https://hillel.bilbeo.net/assets/img/logos/bilbeo.png",
        "webURL" : "https://www.bilbeo.net",
        "reportButtonURL" : "https://www.bilbeo.net",
        "lastLogin" : "2015-03-29T08:26:18.466Z",
        "isOEM" : false,
        "APIKey": "TzBmz%<>gl[PP.GBJX-dB9v{?:^:JFz0A$`3u6.v`rv#:K57TbA9pBkbaptnhewc"
        "ownerId" : "536b07935c89be214c001009",
        "custom" : "this dude is great",
      }
}
HTTP/1.1 401 Unauthorized

{
    "error": "No Authorization header was found"
}
HTTP/1.1 500 Unauthorized

{
    "error": "invalid signature"
}

User - Update

/user/update

Header

Field Type Description
Authorization authToken

authentication token

Parameter

Field Type Description
firstName optional string

first name

lastName optional string

last name

mail optional string

valid email address

password optional string

password (must contain at least six characters)

language optional string

must be supported (see /languages)

profilePicture optional base64

Base 64 encoded PNG, JPEG or GIF image

custom optional string/object

custom attributes that can be retrieved upon /user/get

Success 200

Field Type Description
status string

success

message string

User profile updated

user object

user details

  _id id

user's ID

  firstName string

first name

  lastName string

last name

  mail string

email address

  language string

language

  workspacePermission object[]

list of workspace permissions

    _id id

ID or the workspace permission

    workspaceId id

ID or the workspace

    indicatorPermission id

ID or the workspace indicator permission group

    dimensionPermission id

ID or the workspace dimension permission group

    canUpdate boolean

true if the user has the ability to update this workspace

    isAdmin boolean

true if the user has the ability to manage this workspace

  activated date

date of activation

  logoURL optional url

URL of the header logo

  webURL optional url

URL of the domain the user is registered in

  reportButtonURL optional url

URL of the bottom link in the report mail

  photoURL optional url

URL of the user's profile picture

  lastLogin optional date

date of the last login if any

  isOEM optional boolean

true if the user is an OEM manager

  APIKey optional string

API key if the user is an OEM

  ownerId optional id

ID of the user's OEM if any

  custom optional string/object

custom properties set on the user creation or update

HTTP/1.1 200 OK

{
    "status": "success",
    "message": "User profile updated",
    "user": {
        "_id": "536b07935c89be214c000009",
        "firstName": "Hillel",
        "lastName": "Arki",
        "mail": "hillel@bilbeo.com  ",
        "isOEM": false,
        "logoURL": "http://vector.me/files/images/8/3/83888/porsche.png",
        "activated": "2014-05-08T04:27:17.257Z",
        "lastLogin": "2015-03-29T11:35:21.246Z",
        "APIKey": "TzBmz%<>gl[PP.GBJX-dB9v{?:^:JFz0A$`3u6.v`rv#:K57TbA9pBkbaptnhewc",
        "custom": "more_testing",
        "photoURL": "https://bilbeo-user-photo.s3-eu-west-1.amazonaws.com/536b07935c89be214c000009.gif",
        "workspacePermission": [{
            "workspaceId": "53bd30d39a43a0323900000a",
            "indicatorPermission": "53bd30fb9a43a032390001fc",
            "dimensionPermission": "53bd30fa9a43a032390001fb",
            "_id": "53bd30fb9a43a032390001fd",
            "lastLogin": "2015-03-04T12:25:33.169Z",
            "canUpdate": false,
            "isAdmin": true
        }, {
            "workspaceId": "53a9c7cc1fc5f11c7e0000e2",
            "indicatorPermission": "53a9c84e1fc5f11c7e0002d4",
            "dimensionPermission": "53a9c84d1fc5f11c7e0002d3",
            "_id": "53a9c84e1fc5f11c7e0002d5",
            "lastLogin": "2015-03-25T23:05:11.745Z",
            "canUpdate": true,
            "isAdmin": true
        }],
        "language": "en_GB"
    }
}

User - Resend activation

/user/resendactivation

Parameter

Field Type Description
mail string

valid email address

Success 200

Field Type Description
status string

success

message string

Activation link sent

HTTP/1.1 200 OK

{
    "status": "success",
    "message": "Activation link sent"
}
HTTP/1.1 403 OK

{
    "status": "error",
    "error": "User already activated"
    "userActivated": "false"
}

User - Forgot password

/user/password/forgot

Parameter

Field Type Description
mail string

valid email address

Success 200

Field Type Description
status string

success

message string

Mail sent

HTTP/1.1 200 OK

{
    "status": "success",
    "message": "Mail sent"
}

User - Reset password

/user/password/reset

Header

Field Type Description
Authorization resetPasswordToken

reset password token

Parameter

Field Type Description
password string

new password

Size range: 6..

Success 200

Field Type Description
status string

success

message string

Password successfully updated

HTTP/1.1 200 OK

{
    "status": "success",
    "message": "Password successfully updated"
}

User - Complete Invitation

/user/invitation/complete

Parameter

Field Type Description
invite invitationToken

invitation token

firstName string

first name (must contain at least two characters)

Size range: 2..

lastName string

last name (must contain at least two characters)

Size range: 2..

password string

password (must contain at least six characters)

language string

must be supported (see /languages)

profilePicture optional base64

Base 64 encoded PNG, JPEG or GIF image

custom optional string/object

custom attributes that can be retrieved upon /user/get

Success 200

Field Type Description
status string

success

message string

User profile updated

user object

user details

  _id id

user's ID

  firstName string

first name

  lastName string

last name

  mail string

email address

  language string

language

  workspacePermission object[]

list of workspace permissions

    _id id

ID or the workspace permission

    workspaceId id

ID or the workspace

    indicatorPermission id

ID or the workspace indicator permission group

    dimensionPermission id

ID or the workspace dimension permission group

    canUpdate boolean

true if the user has the ability to update this workspace

    isAdmin boolean

true if the user has the ability to manage this workspace

  activated date

date of activation

  logoURL optional url

URL of the header logo

  webURL optional url

URL of the domain the user is registered in

  reportButtonURL optional url

URL of the bottom link in the report mail

  photoURL optional url

URL of the user's profile picture

  lastLogin optional date

date of the last login if any

  isOEM optional boolean

true if the user is an OEM manager

  APIKey optional string

API key if the user is an OEM

  ownerId optional id

ID of the user's OEM if any

  custom optional string/object

custom properties set on the user creation or update

HTTP/1.1 200 OK

{
    "status": "success",
    "message": "User profile updated",
    "user": {
        "_id": "536b07935c89be214c000009",
        "firstName": "Hillel",
        "lastName": "Arki",
        "mail": "hillel@bilbeo.com  ",
        "isOEM": false,
        "logoURL": "http://vector.me/files/images/8/3/83888/porsche.png",
        "activated": "2014-05-08T04:27:17.257Z",
        "lastLogin": "2015-03-29T11:35:21.246Z",
        "APIKey": "TzBmz%<>gl[PP.GBJX-dB9v{?:^:JFz0A$`3u6.v`rv#:K57TbA9pBkbaptnhewc",
        "custom": "more_testing",
        "photoURL": "https://bilbeo-user-photo.s3-eu-west-1.amazonaws.com/536b07935c89be214c000009.gif",
        "workspacePermission": [{
            "workspaceId": "53bd30d39a43a0323900000a",
            "indicatorPermission": "53bd30fb9a43a032390001fc",
            "dimensionPermission": "53bd30fa9a43a032390001fb",
            "_id": "53bd30fb9a43a032390001fd",
            "lastLogin": "2015-03-04T12:25:33.169Z",
            "canUpdate": false,
            "isAdmin": true
        }, {
            "workspaceId": "53a9c7cc1fc5f11c7e0000e2",
            "indicatorPermission": "53a9c84e1fc5f11c7e0002d4",
            "dimensionPermission": "53a9c84d1fc5f11c7e0002d3",
            "_id": "53a9c84e1fc5f11c7e0002d5",
            "lastLogin": "2015-03-25T23:05:11.745Z",
            "canUpdate": true,
            "isAdmin": true
        }],
        "language": "en_GB"
    }
}

User - Delete

/user

Header

Field Type Description
Authorization authToken

Authentication Token

Success 200

Field Type Description
status string

success

message string

User successfully removed

HTTP/1.1 200 OK

{
    "status": "success",
    "message": "User successfully removed"
}

Workspace

Workspace - Create

This method creates an empty workspace to be updated with data later on. The owner of the new workspace is the OEM.

/oem/workspace/create

Parameter

Field Type Description
dataSourceName string

data source name

workspaceName string

workspace name

APIKey APIKey

API Key

custom optional string/json

workspace customisation

Success 200

Field Type Description
status string

success

workspace id

new workspace ID

HTTP/1.1 200 OK
{
    "status":"success",
    "id": "'536b07935c89be214c000009',
}

Workspace - Get by OEM id

This function returns an array of workspaces owned and managed by an OEM account.

/oem/workspaces/list

Parameter

Field Type Description
APIKey APIKey

API Key

Success 200

Field Type Description
status string

success

data Object[]

workspaces data

  id id

workspace ID

  name string

workspace name

  dataSourceType string

datasource name

  custom optional string

workspace customisation

HTTP/1.1 200 OK
{
    "status": "success",
    "data": [
    {
        "id": "53ea3420c6e32d0f6545670b",
        "name": "MY FIRST WORKSPACE",
        "custom": "100018",
        "dataSourceType": "My dataSource"
     },
     {
        "id": "540414f747dfa1186986900a",
        "name": "SECOND WORKSPACE",
        "dataSourceType": "My dataSource"
     },
     {
        "id": "5405fa3e45678972e0001f4",
        "name": "ANOTHER WORKSPACE NAME",
        "custom": "100764",
        "dataSourceType": "Other dataSource"
     }]
}

Workspace - Delete

This function will delete a whole workspace

/workspace/:workspaceId/delete

Header

Field Type Description
Authorization authenticationToken

Authentication Token

Success 200

Field Type Description
status string

Success

id id

workspace ID

HTTP/1.1 200 OK
{
    "status":"success",
    "id": "'536b07935c89be214c000009'
}

Workspace - Empty data

Empty workspace data. This method allows you to empty all your workspace data

/oem/workspace/update

Parameter

Field Type Description
APIKey APIKey

API Key

workspaceId id

workspace ID

updateMode string

delete in order to remove all your data

Allowed values: "delete"

Success 200

Field Type Description
status string

success

HTTP/1.1 200 OK
{
    "status":"success"
}

Workspace - Get users

In order to list the users belonging to a workspace, one has to be an admin on the workspace.
An Authentication Token must be provided, (see /user/authenticate)

/workspace/:workspaceId/users

Header

Field Type Description
Authorization authToken

Authentication Token

Success 200

Field Type Description
status string

success

users object[]

users data

  _id id

user id

  firstName string

user's first name

  lastName string

user's last name

  mail string

user's mail

  language string

user's language

  photoURL string

user's picture

  indicatorPermission id

user's indicator permission ID

  dimensionPermission id

user's dimension permission ID

  isAdmin boolean

if user's admin

HTTP/1.1 200 OK
{
    "status": "success",
    "users": [{
            "_id": "536b07935c89be214c000009",
            "firstName": "Hillel",
            "lastName": "Arki Prod",
            "mail": "hillel@bilbeo.com  ",
            "language": "fr_FR",
            "photoURL": "https://bilbeo-user-photo.s3-eu-west-1.amazonaws.com/536b07935c89be214c000009.gif",
            "indicatorPermission": "53819e4c456a847f060001fd",
            "dimensionPermission": "53819e4c456a847f060001fc",
            "isAdmin": true
            },
            {
            "_id": "5374bf2cf219df0e1000000d",
            "firstName": "Roni",
            "lastName": "Toledano",
            "mail": "roni@bilbeo.com  ",
            "language": "en_GB",
            "photoURL": "https://bilbeo-user-photo.s3-eu-west-1.amazonaws.com/5374bf2cf219df0e1000000d.jpeg",
            "indicatorPermission": "53819e4c456a847f060001fd",
            "dimensionPermission": "53819e4c456a847f060001fc",
            "isAdmin": true
            },
            {
            "_id": "54463c3cb43a6c635c000013",
            "firstName": "Yonathan",
            "lastName": "Benitah",
            "mail": "yonathan@bilbeo.com  ",
            "language": "en_GB",
            "photoURL": "https://bilbeo-user-photo.s3-eu-west-1.amazonaws.com/54463c3cb43a6c635c000013.jpeg",
            "indicatorPermission": "53819e4c456a847f060001fd",
            "dimensionPermission": "53819e4c456a847f060001fc",
            "isAdmin": true
            }]
}
HTTP/1.1 500 Unauthorized

{
    "error": "invalid signature"
}
HTTP/1.1 403 Unauthorized

{
    "error": "You are not allowed to see users permissions on this workspace"
}

Workspace - Get

This function will return the workspace's data for the given parameter ID.

workspace/:workspaceId

Header

Field Type Description
Authorization authToken

Authentication Token

Parameter

Field Type Description
complete optional boolean

Filter the permissions to retrieve the ones corresponding to the user making the request

Success 200

Field Type Description
status string

success

id id

workspace ID

data json
  name json

Workspace name

  updated json

last updated date of the workspace

  dimensions json

list of all the dimensions for this workspace

  breakdowns json

list of all the breakdowns for this workspace

  indicators json

list of all the indicators for this workspace

  dimensionsIDs json

IDs of each dimension

  breakdownsIDs json

IDs of each breakdown

  indicatorsIDs json

IDs of each indicator

HTTP/1.1 200 OK

"status": "success",
"id": "53819e2d456a847f06000009",
"data": {
  "name": "CAVALLARI Group",
  "updated": "2015-02-01T10:37:08.365Z",
  "dimensions": {
    "Compagnie": [
      "MONACO MOTORS",
      '...',
    ],
    "Site": [
      "MONACO MOTORS",
      "GHC",
      '...'
    ]
  },
  "breakdowns": {
    "Domaine": [
      "Atelier",
      "VO"
    ],
    "Service": [
      "Administratif",
      "Carrosserie",
      "Cessions",
    ],
    "Fournisseur": [
      "ASTIGIANA GO",
      " HONDA",
      " MASERATI",
      "HONDA",
      "GGE ST MICHE",
      "MASERATI",
    ],
    "Type Service": [
      "Atelier",
      "magasin"
    ],
    "Type": [
      "VN",
      "VD",
      "RETROCESSION"
    ],
    "Modèle": [
      "S60",
    ],
    "type": [
      "VD",
      "VN"
    ]
  },
  "indicators": [
    {
      "formula": "IDENTITY(53736058b7b6a6d21e000013)",
      "indicatorDomain": "Global",
      "name": "900: Total Turnover",
      "publicID": "1",
      "description": "",
      "keyIndicator": true,
      "valueSpec": "Currency",
      "formatSpec": "EUR0",
      "direction": "Increasing is Better",
      "aggregation": "sum",
      "displayGranularity": "Day",
      "_id": "53736058b7b6a6d21e000014",
      "dependencies": ["53736058b7b6a6d21e00000c"],
      "snapshot": false,
      "nameI18N": {
        "en-US": "900: CA Total",
        "fr-FR": "900: CA Total",
        "en-GB": "900: Total Turnover"
      },
      "information": {
        "description": "This indicator measures the total turnover.",
        "formula": "Total HT des factures (-avoirs) des factures par service. Le CA Atelier couvre PR et MO.C'est la date de facture qui fait foi. \n\nDans le cas des VN et VO, c'est la dernière date de facture qui fait foi (celle qui est affichée dans la fiche VN ou VO). \nTous les montants sont pris en compte dans le montant HT hors Carte grises et Carburants (comme la règle de marge spécifique BI)",
        "hint": "Faites évoluer cet indicateur avec des opérations marketing après-vente, le remplissage du planning de RDV et/ou des ventes additionnelles.\nConseil : Utiliser le Push BI pour l’envoi de cet indicateur a fréquence mensuelle."
      }
    },
    {
      "formula": "IDENTITY(53736058b7b6a6d21e000093)",
      "indicatorDomain": "Global",
      "name": "901: Total Margin",
      "publicID": "2",
      "description": "",
      "keyIndicator": true,
      "valueSpec": "Currency",
      "formatSpec": "EUR0",
      "direction": "Increasing is Better",
      "aggregation": "sum",
      "displayGranularity": "Day",
      "_id": "53736058b7b6a6d21e000094",
      "dependencies": ["53736058b7b6a6d21e00000c"],
      "snapshot": false,
      "nameI18N": {
        "en-US": "901: Marge Totale",
        "fr-FR": "901: Marge Totale",
        "en-GB": "901: Total Margin"
      },
      "information": {
        "description": "This indicator measures the total margin.",
        "formula": "Total des marges  des factures (-avoirs) des factures par service. \nPour les MO c'est le coût moyen de l'heure vendue qui est utilisée pour calculer le coût. Les PR sont valorisées au PMP SAUF pour les pièces non gérées en stock, ou c'est le PA qui est utilisé. \n\nPour les VN et VO, c'est la dernière date de facture qui fait foi (celle qui est affichée dans la fichez VN ou VO). \nTous les montants sont pris en compte dans le montant HT hors Carte grises et Carburants (comme la règle de marge spécifique BI)",
        "hint": "Faites évoluer cet indicateur avec des opérations marketing après-vente, l’ajustement de prix des pièces concurrentielles, la maitrise des remises de pièces par  famille client\nConseil : Ajouter cet indicateur à votre rapport mensuel "
      }
    },
    {
      "formula": "DIVIDE(537484bfd3e7724d94259c2c,537484d2d3e7724d94259c2d)",
      "indicatorDomain": "Global",
      "name": "902: % Coverage of expenses by the total margin",
      "publicID": "3",
      "description": "Cet indicateur mesure le % de couverture des charges par la marge dégagée. Il est calculé mensuellement, et le mois en cours est inclus.",
      "keyIndicator": true,
      "valueSpec": "Percentage",
      "formatSpec": "+.1",
      "direction": "Increasing is Better",
      "aggregation": "sum",
      "displayGranularity": "Month",
      "_id": "53736058b7b6a6d21e000095",
      "dependencies": ["53736058b7b6a6d21e00000c"],
      "snapshot": false,
      "nameI18N": {
        "en-US": "902: Tx couv. charges par Marge Tot",
        "fr-FR": "902: Tx couv. charges par Marge Tot",
        "en-GB": "902: % Coverage of expenses by the total margin"
      },
      "information": {
        "description": "This indicator measures the % of the fixed costs by the overall margin. It is calculated monthly and the current mode is included",
        "formula": "Le budget mensuel, par site peut êtere alimenté dans DatacarDMS (apr le biais d'une GI).\nLe montant des charges mensuelles par site y est défini.\n\nLe % de couverture est le résultat de la marge totale dégagée par site (voir 901 pour laz définition / Charges\n\nSi les charges ne sont pas définies, l'indicateur n'est pas calculé",
        "hint": "Privilégiez la prise de rendez-vous, anticipez la charge de l’atelier.\nPartagez cette performance avec les chefs de service concernés."
      }
    }
  ],
  "dimensionsIDs": {
    "Compagnie}}{{MONACO MOTORS": "53819e2d456a847f0600000a",
    "Site}}{{MONACO MOTORS": "53819e2d456a847f0600000b",
    "Compagnie}}{{MONTE CARLO MOTORS": "53819e2d456a847f06000023",
    "Site}}{{GHC": "53819e2d456a847f060000e0"
  },
  "breakdownsIDs": {
    "Domaine}}{{Atelier": "53819e2d456a847f0600000c",
    "Service}}{{Administratif": "53819e2d456a847f0600000d",
    "Service}}{{Carrosserie": "53819e2d456a847f0600000e",
    "Fournisseur}}{{ HONDA": "53819e2d456a847f06000093",
    "Fournisseur}}{{ MASERATI": "53819e2d456a847f06000094",
    "Fournisseur}}{{ASTIGIANA GO": "53819e2d456a847f06000095",
    "Type}}{{VN": "53819e2d456a847f0600010e",
    "Modèle}}{{S60": "53819e2d456a847f06000165",
  },
  "indicatorsIDs": {
    "900: Total Turnover": "53736058b7b6a6d21e000014",
    "901: Total Margin": "53736058b7b6a6d21e000094",
    "902: % Coverage of expenses by the total margin": "53736058b7b6a6d21e000095",
    "..."
  }
}
HTTP/1.1 401 Unauthorized

{
    "error":"You are not allowed to access this workspace."
}

Workspace - Is owner

Get This function will check if user is owner on the workspace

/workspace/:workspaceId/isOwner

Header

Field Type Description
Authorization authToken

Authentication Token

Success 200

Field Type Description
status string

success

id id

workspace ID

data boolean

if user is owner

HTTP/1.1 200 OK
{
     "status": "success",
     "id" : "53819e2d456a847f06000009",
     "data": false
}
HTTP/1.1 401 Token Error

{
    "error":"Error while decoding the token"
}

Workspace - Update with compression

Update workspace data. This method is intended to update your workspace with larger amounts of data. The data field format is the same as with the uncompressed method except it is to be sent as a string instead of a JSON object. The string is obtained by first deflating then casting to base64 the contents you want to send as data. Snippets are provided bellow

/oem/workspace/update

Parameter

Field Type Description
APIKey APIKey

API Key

workspaceId id

workspace ID

updateMode string

replace in order to add or update data
see empty workspace to remove data

Allowed values: "replace"

updatePartial boolean

true empties the related to the sent series (i.e. if a KPI with ID 123 is sent, the previous data for this KPI is removed and replaced with the series that are currently sent)
In order to only replace data based on dimensions, see the updateDimensions parameter bellow
false empties the whole workspace and inserts the sent series

updateDimensions optional boolean

Defaults to false.
true updates data on a per dimension basis (i.e. if KPI 123 has dimensions "Country":"France" and "Country":"USA" and only series with "Country":"France" are sent, the previously sent series with "Country":"USA" will be left intact)
false will remove all the previously sent data about the KPI that's currently being fed (i.e. "Country":"USA" series will be removed)

compressed boolean

true

Allowed values: "true"

data string

Base 64 string of the copmressed data obtained by deflating your JSON then casting it to base 64. See the same field in the [url]uncompressed method for details about the format

custom optional string/object

custom attributes

var zlib = require('zlib');
var data = {};

zlib.deflate(data, function(err, deflatedData) {
 if (!err) var compressedData = deflatedData.toString("base64"); 
});
import java.util.zip.Deflater;
import com.sun.org.apache.xerces.internal.impl.dv.util.Base64;

public class BilbeoCompression {

 public static void main(String argv[]) {
      try {
         
          String data = "{}";
          byte[] input = data.getBytes("UTF-8");

          byte[] output = new byte[input.length];
          Deflater compresser = new Deflater();
          compresser.setInput(input);
          compresser.finish();
          compresser.end();
          
          StringBuilder sb = new StringBuilder();
          sb.append(Base64.encode(output));
          String compressedData = sb.toString();

      } catch(java.io.UnsupportedEncodingException ex) {}
 }
}

Success 200

Field Type Description
status string

success

HTTP/1.1 200 OK
{
    "status":"success"
}

Workspace - Update without compression

Update workspace data. This method is intended to update your workspace data. If you need to send large amounts of data, look at the compressed method

/oem/workspace/update

Parameter

Field Type Description
APIKey APIKey

API Key

workspaceId id

workspace ID

updateMode string

replace in order to add or update data
see empty workspace to remove data

Allowed values: "replace"

updatePartial boolean

true empties the related to the sent series (i.e. if a KPI with ID 123 is sent, the previous data for this KPI is removed and replaced with the series that are currently sent)
In order to only replace data based on dimensions, see the updateDimensions parameter bellow
false empties the whole workspace and inserts the sent series

updateDimensions optional boolean

Defaults to false.
true updates data on a per dimension basis (i.e. if KPI 123 has dimensions "Country":"France" and "Country":"USA" and only series with "Country":"France" are sent, the previously sent series with "Country":"USA" will be left intact)
false will remove all the previously sent data about the KPI that's currently being fed (i.e. "Country":"USA" series will be removed)

compressed boolean

false

Allowed values: "false"

data object

your data in a compressed format or as an object depending on the copmressed parameter
Aware, some time your KPI is a ratio so you need to provide two arrays of datas: one for denominateur DataDen and another one for numerotor DataNum
See bellow the data example object to know how it should be structured.
Be sure numbers of data in KPIs.data is matching the granularity (KPIs.TemporalSpec.Granularity).
In the example we have a month granularity, startTime - EndTime = one year so we have 12 items in data

  Name string

Updated name of your workspace (serves as an update)

  KPIs [object]

An array of data series

    ID id

The indicator ID as defined in the data source linked to the workspace

    HierarchySpec optional object

The dimension(s) of the current data series in the form of key:value (look at the example below)

    Breakdown optional object

The breakdown(s) of the current data series in the form of key:value (look at the example below)

    TemporalSpec object

Time information about the series that is being sent

      StartTime date

Date at which the series starts formatted as follows:
'M d, Y' with M being the first 3 letters of the month capitalized, d the day of the month and Y the full year with 4 digits (e.g. Aug 26, 1989)

      EndTime date

Date at which the series ends formatted as follows:
'M d, Y' with M being the first 3 letters of the month capitalized, d the day of the month and Y the full year with 4 digits (e.g. Sep 09, 2015)

      Granularity string

What each point of the series measures (i.e. is each number sent reprensenting the value of a day or of a month)

Allowed values: "Day", "Month"

    Data optional [float]

Use this parameter to send series for KPIs that are set as division:false in the data source
An array containing the series' values. One for each day or month depending on Granularity. Mind that the total number of values match StartTime and EndTime sent.
Please mind that Percentage series are to be sent as decimal values (e.g. 1% is to be sent as 0.01).
Time values are to be sent as seconds (e.g. 1 minute and 30 seconds are to be sent as 90)

    DataNum optional [float]

Use this parameter to send series for KPIs that are set as division:true in the data source
This is the numerator series of the division
See Data above for details about the format

    DataDen optional [float]

Use this parameter to send series for KPIs that are set as division:true in the data source
This is the denominator series of the division
See Data above for details about the format

    ValueSpec optional string

An optional override of the type of data that has been set in the data source

Allowed values: "Currency", "Percentage", "Number", "Time"

    FormatSpec optional string

An optional override of the unit of data that has been set in the data source

Allowed values: "EUR0", "USD0", "+.0", "+.2", "+.1", "hhmmss", "sec"

custom optional string/object

custom attributes


{
 "Name" : "My data test example",
 "KPIs" : [{
     "HierarchySpec" : {
         "Company" : "DYNAMIC AUTO",
         "Site" : "Site 1"
     },
     "ID" : 1,
     "Breakdown" : {
         "Brand" : "Tesla",
         "Model" : "Model S"
     },
     "TemporalSpec" : {
         "StartTime" : "Feb 1, 2012",
         "EndTime" : "Feb 1, 2013",
         "Step" : "1",
         "Granularity" : "Month"
     },
     "ValueSpec" : "Currency",
     "Data" : [ null, null, null, null, null, null, null, null, 26.67, null, 67.50, null],
     "FormatSpec" : "USD"
 },  {
     "HierarchySpec" : {
         "Company" : "DYNAMIC AUTO",
         "Site" : "Site 2"
     },
     "ID" : 2018,
     "Breakdown" : {
         "Fournisseur" : "Autres Marques"
     },
     "TemporalSpec" : {
         "StartTime" : "Feb 1, 2012",
         "EndTime" : "Feb 1, 2013",
         "Step" : "1",
         "Granularity" : "Month"
     },
     "ValueSpec" : "Number",
     "FormatSpec" : "+.1",
     "DataNum" : [null, null, null, null, null, 9568.48, 9354.15, 9542.05, null, null, null, null],
     "DataDen" : [83.32,  null, null, null, null, null, null, 36.18, 36.18, 36.18, null, null]
 }]
}

Success 200

Field Type Description
status string

success

HTTP/1.1 200 OK
{
    "status":"success"
}

Permission

Permission - Add a user to a group

This function will set permission on indicators and dimensions for a given user.
Permissions groups can be set with Create a permission group.

/workspace/:workspaceId/user/upsert

Header

Field Type Description
Authorization authToken

Authentication Token

Parameter

Field Type Description
OEMId id

user ID

indicatorPermission id

indicator permission ID

dimensionPermission id

dimension permission ID

mail String

user's mail to add in the group

isAdmin boolean

if user is admin

canUpdate boolean

if user can update

Success 200

Field Type Description
status string

success

message string

{user’s mail} successfully added to the workspace {workspace ID}

HTTP/1.1 200 OK
{
    "status": "success",
    "message": "john@doe.com   successfully added to the workspace 536b07935c89be214c000009"
}
HTTP/1.1 401 Unauthorized

{
    "error": "No Authorization header was found"
}
HTTP/1.1 500 Unauthorized

{
    "error": "invalid signature"
}
HTTP/1.1 404 Unauthorized

{
    "error": "Invalid Indicator Permission Group ID"
}
HTTP/1.1 404 Unauthorized

{
    "error": "Invalid dimension Permission Group ID"
}

Permission - Create a permission group

This function will create a new permission group.
Create a permission group for users to limit them on indicators and dimensions on a given workspace.
An Authentication Token must be provided, (see /user/authenticate) .

/workspace/:workspaceId/permissions

Header

Field Type Description
Authorization authenticationToken

Authentication Token

Parameter

Field Type Description
name string

permission's group name

data id[]

indicator/dimension Ids

dimension optional boolean

true if data are dimensions

id optional id

if it's an update, then specify the Id

Success 200

Field Type Description
status string

success

id id

created or updated permission Id

data object
  message string

Permission group successfully created or updated.

  status string

success

  workspace object

Workspace specificities

    _id id

workspace ID

    name string

workspace name

    owner id

workspace owner (user ID)

    invited id[]
    showLastValue boolean
    newPermissionGroup boolean

true if the group permission has been created

    permissionGroups object[]

Group permissions data

      name string

Group permission's name

      dimension boolean

If this group permission contains dimensions

      default boolean

If this group permission is the default group permission

      _id id

Group permission's ID

      lastUpdateDate date

When does the group permission was updated last time

      data []

?

    breakdowns object[]

breakdowns on the workspace

      key string

breakdowns group's name

      value string

breakdowns name

      _id id

breakdowns id

    dataSources object[]

the workspace's dataSource

      lastUpdateDate object[]

When does the dataSource was updated last time

      _id object[]

the dataSource's ID

      type object[]

the dataSource's type

 HTTP/1.1 200 OK
{
 "status": "success",
 "id": "53819e2d456a847f06000009",
 "data": {
   "status": "success",
   "workspace": {
     "_id": "53819e2d456a847f06000009",
     "name": "My Workspace Name",
     "owner": "536b07935c89be214c908709",
     "__v": 7,
     "invited": [],
     "showLastValue": false,
     "permissionGroups": [
       {
         "name": "Default",
         "dimension": true,
         "default": true,
         "_id": "53819e4c456a847f067881fc",
         "lastUpdateDate": "2014-07-27T13:41:52.828Z",
         "data": []
       },
       {
         "name": "Default",
         "dimension": false,
         "default": true,
         "_id": "53819e4c456a847f060001fd",
         "lastUpdateDate": "2014-07-27T13:42:34.074Z",
         "data": []
       }
     ],
     "breakdowns": [ {
         "key": "Service",
         "value": "Commercial VN",
         "_id": "53819e2d456a847f06000020"
       },
       {
         "key": "Domaine",
         "value": "VO",
         "_id": "53819e2d456a847f06000021"
       }
     ],
     "indicators": [],
     "dataSources": [
       {
         "lastUpdateDate": "2014-07-27T13:22:15.988Z",
         "_id": "53819e2d456a847f06000008",
         "type": "DTF"
       }
     ],
     "lastUpdateDate": "2015-02-01T10:37:08.365Z"
   },
   "newPermissionGroup": false,
   "message": "Permission group successfully updated."
 }
}

Permission - Delete a user from a group

In order to revoke permission for a user, one has to be an admin on the workspace.
Permissions can’t be revoked for the owner of the workspace.
An Authentication Token must be provided, (see /user/authenticate) .

/workspace/:workspaceid/user/revoke

Header

Field Type Description
Authorization authToken

Authentication Token

Parameter

Field Type Description
mail string

user mail

Success 200

Field Type Description
status string

success

message string

{user’s mail} successfully revoked from workspace {workspace ID}

HTTP/1.1 200 OK

{
    "status": "success",
    "message" "john@doe.com   successfully revoked from workspace 536b07935c89be214c0000"
}
HTTP/1.1 401 Unauthorized

{
    "error": "No Authorization header was found"
}
HTTP/1.1 500 Unauthorized

{
    "error": "invalid signature"
}

Permission - Delete permission group

This function will delete a permission group in the workspace

/workspace/:workspaceId/permissions

Header

Field Type Description
Authorization authenticationToken

Authentication Token

Success 200

Field Type Description
status string

success

id id

deleted permission Id

data object
  message string

Permission group successfully removed.

  status string

success

  workspace object

Workspace specificities

    _id id

workspace ID

    name string

workspace name

    owner id

workspace owner (user ID)

    invited id[]
    showLastValue boolean
    newPermissionGroup boolean

true if the group permission has been created

    permissionGroups object[]

Group permissions data

      name string

Group permission's name

      dimension boolean

If this group permission contains dimensions

      default boolean

If this group permission is the default group permission

      _id id

Group permission's ID

      lastUpdateDate date

When does the group permission was updated last time

      data []

?

    breakdowns object[]

breakdowns on the workspace

      key string

breakdowns group's name

      value string

breakdowns name

      _id id

breakdowns id

    dataSources object[]

the workspace's dataSource

      lastUpdateDate object[]

When does the dataSource was updated last time

      _id object[]

the dataSource's ID

      type object[]

the dataSource's type

 HTTP/1.1 200 OK
{
 "status": "success",
 "id": "53819e2d456a847f06000009",
 "data": {
   "status": "success",
   "workspace": {
     "_id": "53819e2d456a847f06000009",
     "name": "My Workspace Name",
     "owner": "536b07935c89be214c908709",
     "__v": 7,
     "invited": [],
     "showLastValue": false,
     "permissionGroups": [
       {
         "name": "Default",
         "dimension": true,
         "default": true,
         "_id": "53819e4c456a847f067881fc",
         "lastUpdateDate": "2014-07-27T13:41:52.828Z",
         "data": []
       },
       {
         "name": "Default",
         "dimension": false,
         "default": true,
         "_id": "53819e4c456a847f060001fd",
         "lastUpdateDate": "2014-07-27T13:42:34.074Z",
         "data": []
       }
     ],
     "breakdowns": [ {
         "key": "Service",
         "value": "Commercial VN",
         "_id": "53819e2d456a847f06000020"
       },
       {
         "key": "Domaine",
         "value": "VO",
         "_id": "53819e2d456a847f06000021"
       }
     ],
     "indicators": [],
     "dataSources": [
       {
         "lastUpdateDate": "2014-07-27T13:22:15.988Z",
         "_id": "53819e2d456a847f06000008",
         "type": "DTF"
       }
     ],
     "lastUpdateDate": "2015-02-01T10:37:08.365Z"
   },
   "newPermissionGroup": false,
   "message": "Permission group successfully removed."
 }
}

Permission - Get by workspace

Get workspace permission groups from the DB

/workspace/:workspaceId/permissions

Header

Field Type Description
Authorization authenticationToken

Authentication Token

Success 200

Field Type Description
status string

success

data object[]

workspace permission groups

  _id id

permission id

  data id[]

array of indicators/dimensions avaiable for this group permission.
If empty so all the indicators are avaiable.

  default boolean

true if is the default group permission

  dimension boolean

true if group permission it's a dimension permission.
If false so it's a group permission for indicators

  lastUpdateDate string

Last updated date for this permision group

  name string

permission group's name

users object[]

users on this workspace

  _id object[]

user's ID

  firstName string

user's first name

  lastName string

user's last name

  mail string

user's mail

  photoURL optional string

url of user's profile picture

  isOwner optional boolean

true if user is the workspace owner

  workspacePermission object[]

user's permission for workspaces

    _id id

workspacePermission ID

    canUpdate boolean

if user can update

    dimensionPermission id

user's permission on dimensions

    indicatorPermission id

user's permission on indicators

    isAdmin boolean

if user's admin

    lastLogin string

user's last login

    workspaceId id

workspace ID

 HTTP/1.1 200 OK

  {
     "status": "success",
      "data": [
      {
          "name": "Default",
          "dimension": true,
          "default": true,
          "_id": "53819e4c456a847f060001fc",
          "lastUpdateDate": "2014-07-27T13:41:52.828Z",
          "data": [],
          "userCount": 9
      },
      {
          "name": "Default",
          "dimension": false,
          "default": true,
          "_id": "53819e4c456a847f060678",
          "lastUpdateDate": "2014-07-27T13:42:34.074Z",
          "data": [],
          "userCount": 9
      },
      {
          "name": "test 2",
          "dimension": false,
          "_id": "5534b3c8fb59f23036861a51",
          "lastUpdateDate": "2015-04-22T09:33:40.136Z",
          "data": [
              "53736059b7b6a6d21e000268",
              "53736058b7b6a6d21e000094",
              "53736058b7b6a6d21e000095",
              "53736059b7b6a6d21e000226"
          ]
      },
      {
          "name": "ew",
          "dimension": true,
          "_id": "55376b0758391bde53290dac",
          "lastUpdateDate": "2015-04-22T09:33:59.957Z",
          "data": ["53819e2d456a847f06000049"]
      }
  ],
      "users": [
      {
          "_id": "536b07935c89be214c000009",
          "firstName": "Hillel",
          "lastName": "Arki Prod",
          "mail": "hillel@bilbeo.com  ",
          "workspacePermission": [
              {
                  "workspaceId": "53819e2d456a847f06000009",
                  "indicatorPermission": "53819e4c456a847f060001fd",
                  "dimensionPermission": "53819e4c456a847f060001fc",
                  "_id": "53f345028648651d47000011",
                  "canUpdate": true,
                  "isAdmin": true,
                  "lastLogin": "2015-03-30T11:48:16.353Z"
              }
          ],
          "photoURL": "https://bilbeo-user-photo.s3-eu-west-1.amazonaws.com/536b07935c89be214c000009.gif",
          "isOwner": true
      },
      {
          "_id": "5374bf2cf219df0e1000000d",
          "firstName": "Roni",
          "lastName": "Toledano",
          "mail": "roni@bilbeo.com  ",
          "workspacePermission": [
              {
                  "workspaceId": "53819e2d456a847f06000009",
                  "indicatorPermission": "53819e4c456a847f060001fd",
                  "dimensionPermission": "53819e4c456a847f060001fc",
                  "_id": "54ef3174947dc3201b8b3c6e",
                  "canUpdate": true,
                  "isAdmin": true,
                  "lastLogin": "2015-04-27T07:00:04.178Z"
              }
          ],
  ]}
}

Error 4xx

Field Type Description
status string

error

id id

workspace ID

error object
HTTP/1.1 404
  {
    "status": "error",
    "error": {"error": "Workspace not found"}
  }

Permission - Update a permission group

Call this function in order to update a permission on a group.
The signature of the function is the same as create a group permission, you only need to provide in the body request the group permission ID

/workspace/:workspaceId/permissions

Permission - Update user permission

Call this function in order to update a permission for a given user.
The signature of the function is the same as add a user to a group.

/workspace/:workspaceId/user/upsert

Header

Field Type Description
Authorization authToken

Authentication Token

Parameter

Field Type Description
OEMId id

user ID

indicatorPermission id

indicator permission ID

dimensionPermission id

dimension permission ID

mail String

user's mail to add in the group

isAdmin boolean

if user is admin

canUpdate boolean

if user can update

Success 200

Field Type Description
status string

success

message string

{user’s mail} successfully added to the workspace {workspace ID}

HTTP/1.1 200 OK
{
    "status": "success",
    "message": "john@doe.com   successfully added to the workspace 536b07935c89be214c000009"
}
HTTP/1.1 401 Unauthorized

{
    "error": "No Authorization header was found"
}
HTTP/1.1 500 Unauthorized

{
    "error": "invalid signature"
}
HTTP/1.1 404 Unauthorized

{
    "error": "Invalid Indicator Permission Group ID"
}
HTTP/1.1 404 Unauthorized

{
    "error": "Invalid dimension Permission Group ID"
}

OEM

OEM - Users list

This function will return a list of user managed by the OEM.

/oem/users/list

Parameter

Field Type Description
APIKey APIKey

API Key

Success 200

Field Type Description
status string

success

users object[]

Users data

  _id id

user id

  firstName string

user's first name

  lastName string

user's last name

  mail string

user's mail

  language string

user's language

  workspacePermission object[]

user's dimension permission data

    workspaceId id

workspace ID

    indicatorPermission id

indicator permission ID

    dimensionPermission id

dimension permission ID

    _id id

user workspace permission ID

    isAdmin boolean

if user is admin

    canUpdate boolean

if user can update

  referrerId optional string

user ID

  activated optional date

registration date

  isOEM optional boolean

if user is OEM

  ownerId optional boolean

workspace owner user ID

HTTP/1.1 200 OK
{
    "status": "success",
    "users":  {
        "_id": "53919e1dacdaad9c5f000009",
        "firstName": "Bruno",
        "lastName": "Riffard",
        "mail": "briffard@datafirst.fr  ",
        "ownerId": "53905ec5bc8cfa983900000c",
        "workspacePermission": [{
            "workspaceId": "53819e2d456a847f06000009",
            "indicatorPermission": "53819e4c456a847f060001fd",
            "dimensionPermission": "53819e4c456a847f060001fc",
            "_id": "53819e4c456a847f060001fe",
            "canUpdate": true,
            "isAdmin": true
            },
            {
            "workspaceId": "53d768df0240d0ee06000009",
            "indicatorPermission": "5468d7dc78304dfa2b00000b",
            "dimensionPermission": "53d768e40240d0ee0600010a",
            "_id": "54690d923daeb9f92b00000a",
            "canUpdate": false,
            "isAdmin": false
            }],
        "language": "fr_FR",
        "activated": "2014-06-06T11:43:01.177Z",
        "lastLogin": "2014-12-02T11:03:08.298Z"
        },
        {
        "_id": "53a2ebe5b41f8de44700002d",
        "ownerId": "53905ec5bc8cfa983900000c",
        "firstName": "Béatrice",
        "lastName": "Sampaio",
        "mail": "bsampaio@datafirst.fr  ",
        "referrerId": "53905ec5bc8cfa983900000c",
        "workspacePermission": [],
        "language": "fr_FR",
        "activated": "2014-06-19T13:55:49.826Z"
        },
}

Error 4xx

Field Type Description
status string

error

message string

an error message

userActivated string

false

HTTP/1.1 404 OK
{
    "status": "error",
    "error": "Invalid OEM ID or API Key"
}
HTTP/1.1 403 OK
{
    "status": "error",
    "error": "Please provide an API key, an OEM ID and a user mail"
}

OEM - Generate API Key

This function doesn’t use a regular authentication token.
Only the token sent after a reset password request is valid, see /api/user/password/forgot.
Only the last reset password request link generated can be used.

/oem/key/generate

Header

Field Type Description
Authorization authToken

authentication token

Success 200

Field Type Description
status string

success

APIKey key

API Key

HTTP/1.1 200 OK
{
    "status": "success",
    "key": "^c6l^}2a|ch$ba`[tUm&TZN`:*hZWQ:cZVtr!!LyDzoWe.6PUA>eM_ODOxE~{~DR"
}
HTTP/1.1 403 OK

{
    "status": "error",
    "error": "Invalid Request"
}

OEM - Generate a token

This function will return a valid token

/oem/user/token/get

Parameter

Field Type Description
userId id

The userID

APIKey APIKey

APIKey

Success 200

Field Type Description
status string

success

token string

the token

HTTP/1.1 200 OK
{
    "status": "success",
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJtYWlsIjoiaGlsbGVsQGJpbGJlby5jb20iLCJpZCI6IjUzNmIwNzkzNWM4OWJlMjE0YzAwMDAwOSIsImV4cCI6MTQyNzY0NDUyOCwiaWF0IjoxNDI3Mzg1MzI4fQ.eu_SS6sQhyuFHsE2qGoeJlrQi1sOnWxOr0kymK40iOA"
}
HTTP/1.1 403 OK

{
    "status": "error",
    "error": "Invalid OEM ID or API Key"
}

OEM - Insert a user

This function will add a new user for the OEM.

/oem/user

Parameter

Field Type Description
APIKey APIKey

API Key

password string

password

firstName string

user's first Name

lastName string

user's lastName

mail string

user's mail

language string

user's language

referrer id

user's referrer (user ID)

workspaceId optional id

user will be add on that specific workspace

isAdmin optional boolean

if created user is admin on workspace

custom optional string/object

custom attributes that can be retrieved upon /user/get

Success 200

Field Type Description
status string

success

userId id

created user ID

mail string

user's mail

message string

message User successfully created & activated

 HTTP/1.1 200 OK
{
 "status": "success",
 "userId": "53819e2d456a847f06000009",
 "userMail": "toto@gmail.com  ",
 "message": "message User successfully created & activated"
}
HTTP/1.1 403 Unauthorized

{
    "status": "error",
    "error": "This workspace doesn't exist or you do not own it"
}

OEM - Update Settings

/oem/settings

Header

Field Type Description
Authorization authToken

authentication token

Parameter

Field Type Description
logoURL optional string

URL of the logo shown thoughout the application to the OEM users

reportButtonURL optional string

URL of the CTA button sent with the reports

allowLogout optional boolean

allow users to log out (users will see the login form)

allowInvites optional boolean

allow users to invite other users

allowWorkspaceCreation optional boolean

allow users to create workspaces

sendingMailAddress optional string

mail address used to send mails from the application

sendingMailAuthor optional string

author used to send mails from the application

Success 200

Field Type Description
status string

success

message string

User profile updated

user object

user details

  _id id

user's ID

  firstName string

first name

  lastName string

last name

  mail string

email address

  language string

language

  activated date

date of activation

  logoURL optional url

URL of the header logo

  webURL optional url

URL of the domain the user is registered in

  reportButtonURL optional url

URL of the bottom link in the report mail

  allowLogout optional url

allow users to log out (users will see the login form)

  allowInvites optional url

allow users to invite other users

  allowWorkspaceCreation optional url

allow users to create workspaces

  sendingMailAddress optional url

mail address used to send mails from the application

  sendingMailAuthor optional url

author used to send mails from the application

  photoURL optional url

URL of the user's profile picture

  lastLogin optional date

date of the last login if any

  isOEM optional boolean

true if the user is an OEM manager

  APIKey optional string

API key if the user is an OEM

  ownerId optional id

ID of the user's OEM if any

  custom optional string/object

custom properties set on the user creation or update

 HTTP/1.1 200 OK

{
   "status": "success"
   "message": "User profile updated",
   "user": {
       "logoURL": "https://datamining.datacar.com/assets/img/logos/hillel.png",
       "activated": "2014-06-05T12:13:56.595Z",
       "lastLogin": "2015-04-29T07:11:28.092Z",
       "firstName": "Hillel",
       "lastName": "Arki",
       "APIKey": "al;dfgsjkdf;klgjhs;ogihdfglkdjfgljsakjfhlkjsghflgjkshdflghsldf",
       "_id": "53905ec5bc8cfa983900345345",
       "reportButtonURL": "https://hillel.bilbeo.net",
       "allowInvites": true,
       "webURL": "https://hillel.bilbeo.net",
       "custom": " ",
       "isOEM": true,
       "language": "en_GB",
       "photoURL": "https://bilbeo-user-photo.s3-eu-west-1.amazonaws.com/53905ec5bc8cfa983900345345.jpeg",
       "mail": "hillel@bilbeo.com  "
   }
}

Datasource

Datasource - Create

This function will create a new data source and returns its ID.

/datasource

Header

Field Type Description
Authorization authToken

Authentication Token

Parameter

Field Type Description
name string

Datasource's name

owner id

User ID of data source's owner

langs optional string

Default language for dataSource.
If this field is empty, it would be en-US

defaultLang optional string

If this field is empty, it would set the same value as above (langs)

Success 200

Field Type Description
status string

success

id id

created data source's ID

HTTP/1.1 200 OK

{
    "status": "success",
    "id" "536b07935c89be214c0000"
}
HTTP/1.1 400 No DataSource name

{
    "error": "Please provide a Data Source name"
}

Datasource - Delete

This function will delete a data source.
Before performing this action, please delete all workspaces link to the data Source."

/datasource/delete

Header

Field Type Description
Authorization authToken

Authentication Token

Parameter

Field Type Description
name string

Datasource's name

owner id

User ID of data source's owner

Success 200

Field Type Description
status string

success

id id

deleted workspace ID

data string

success message

HTTP/1.1 200 OK

{
    "status": "success",
    "id:" "536b07935c89be214c0000"
    "data": "Data Source successfully deleted."
}
HTTP/1.1 500 Unauthorized

{
    "error": "You are not allowed to perform this action."
}
HTTP/1.1 500 Error

{
    "error": "Impossible to delete the Data Source. Some workspaces are still linked to it. Please delete these workspaces before attempting to delete this Data Source.
}

Datasource - Get all

This function will return a list of all the data sources for the OEM

/datasource/

Header

Field Type Description
Authorization authToken

Authentication Token

Success 200

Field Type Description
status string

success

data json

the datasource's data

HTTP/1.1 200 OK
{
     "status": "success",
     "datasources": [
         {
             "_id": "5480040414a05f641b005679",
              "name": My awesome data source 1",
              "lastUpdateDate": "2015-04-21T06:42:39.989Z",
              "isPublic": false
          },
          {
              "_id": "53706e4ab02776383c00123f",
              "name": "My awesome data source 2",
              "lastUpdateDate": "2015-03-13T17:16:31.615Z",
              "isPublic": false
          }
     ]
 }

Datasource - Get statistics

This function will return the datasource's data with some statistics.
Statistics are numbers per workspace of permissions, dimensions, breakdowns, users...

/datasource/:datasourceName/withstatistics

Header

Field Type Description
Authorization authToken

Authentication Token

Success 200

Field Type Description
status string

success

data json

the datasource's data

HTTP/1.1 200 OK
{
 "status": "success",
 "datasource": {
     "_id": "53706e4ab02776383c00000f",
     "name": "My data source Name",
     "owner": "53905ec5bc8cfa983900000c",
     "defaultLang": "fr-FR",
     "__v": 90,
     "indicators": [
         {
             "formula": "IDENTITY(537a258ca38fb9da6b000013)",
             "indicatorDomain": "Global",
             "name": "900: CA Total",
             "publicID": "1",
             "description": "Cet indicateur mesure le Chiffre d'Affaire total.",
             "keyIndicator": true,
             "valueSpec": "Number",
             "formatSpec": "+.0",
             "direction": "Increasing is Better",
             "aggregation": "sum",
             "displayGranularity": "Month",
             "_id": "537a258ca38fb9da6b000014",
             "snapshot": false,
             "information": {
                 "description": "Cet indicateur mesure le Chiffre d'Affaire total.",
                 "formula": "",
                 "hint": "",
                 "hintI18N": {
                     "en-US": "",
                     "fr-FR": "Faites évoluer cet indicateur avec des opérations marketing, le remplissage du planning de RDV et/ou des ventes additionnelles. La qualité de service,\nFocus possible par domaine, service, site, compagnie",
                     "en-GB": "Faites évoluer cet indicateur avec des opérations marketing après-vente, le remplissage du planning de RDV et/ou des ventes additionnelles.\nConseil : Utiliser le Push BI pour l’envoi de cet indicateur a fréquence mensuelle."
                     },
                 "formulaI18N": {
                     "en-US": "",
                     "fr-FR": "",
                     "en-GB": "Total HT des factures (-avoirs) des factures par service. Le CA Atelier couvre PR et MO.C'est la date de facture qui fait foi. \n\nDans le cas des VN et VO, c'est la dernière date de facture qui fait foi (celle qui est affichée dans la fiche VN ou VO). \nTous les montants sont pris en compte dans le montant HT hors Carte grises et Carburants (comme la règle de marge spécifique BI)"
                     },
                 "descriptionI18N": {
                     "en-US": "",
                     "fr-FR": "Cet indicateur mesure le Chiffre d'Affaire total HT. Par Domaine et Service",
                     "en-GB": "This indicator measures the total turnover."
                     }
                 },
             "nameI18N": {
                 "en-US": "900: Total Turnover",
                 "fr-FR": "900: CA Total",
                 "en-GB": "900: Total Turnover"
                 },
             "dependencies": ["537a258ca38fb9da6b00000c"]
         },`
     ....other indicators
     ]
      "metrics": [
     {
         "_id": "537a258ca38fb9da6b000013",
         "sum": true,
         "snapshot": false,
         "granularity": "Day",
         "step": "1",
         "publicID": "1_0"
     },
     {
         "_id": "537a258ca38fb9da6b000066",
         "sum": true,
         "snapshot": false,
         "granularity": "Day",
         "step": "1",
         "publicID": "2_0"
     },...
    ],
 "lastUpdateDate": "2015-03-13T17:16:31.615Z",
 "isPublic": false,
 "langs": [
     "fr-FR",
     "en-GB"
 ],
 "statistics": [
      {
          "_id": "53ea3420c6e32d0f3000000b",
          "name": "GROUPE AUBERY",
          "updated": "2015-04-01T06:29:00.321Z",
          "permissionsCount": 9,
          "dimensionsCount": 29,
          "breakdownsCount": 423,
          "dataSourcesCount": 1,
          "userCount": 4
      },
      {
          "_id": "540414f747dfa1186900000a",
          "name": "DATAFIRST DEMO EN",
          "updated": "2015-02-01T10:37:09.348Z",
          "permissionsCount": 4,
          "dimensionsCount": 18,
          "breakdownsCount": 241,
          "dataSourcesCount": 1,
          "userCount": 2
      },...
}
HTTP/1.1 401 Unauthorized

{
    "error":"No Authorization header was found"
}

Datasource - Get

This function will return the datasource's data for the given parameter name.

/datasource/:datasourceName

Header

Field Type Description
Authorization authToken

Authentication Token

Success 200

Field Type Description
status string

success

data json

the datasource's data

HTTP/1.1 200 OK
{
 "status": "success",
 "datasource": {
     "_id": "53706e4ab02776383c00000f",
     "name": "My data source Name",
     "owner": "53905ec5bc8cfa983900000c",
     "defaultLang": "fr-FR",
     "__v": 90,
     "indicators": [
         {
             "formula": "IDENTITY(537a258ca38fb9da6b000013)",
             "indicatorDomain": "Global",
             "name": "900: CA Total",
             "publicID": "1",
             "description": "Cet indicateur mesure le Chiffre d'Affaire total.",
             "keyIndicator": true,
             "valueSpec": "Number",
             "formatSpec": "+.0",
             "direction": "Increasing is Better",
             "aggregation": "sum",
             "displayGranularity": "Month",
             "_id": "537a258ca38fb9da6b000014",
             "snapshot": false,
             "information": {
                 "description": "Cet indicateur mesure le Chiffre d'Affaire total.",
                 "formula": "",
                 "hint": "",
                 "hintI18N": {
                     "en-US": "",
                     "fr-FR": "Faites évoluer cet indicateur avec des opérations marketing, le remplissage du planning de RDV et/ou des ventes additionnelles. La qualité de service,\nFocus possible par domaine, service, site, compagnie",
                     "en-GB": "Faites évoluer cet indicateur avec des opérations marketing après-vente, le remplissage du planning de RDV et/ou des ventes additionnelles.\nConseil : Utiliser le Push BI pour l’envoi de cet indicateur a fréquence mensuelle."
                     },
                 "formulaI18N": {
                     "en-US": "",
                     "fr-FR": "",
                     "en-GB": "Total HT des factures (-avoirs) des factures par service. Le CA Atelier couvre PR et MO.C'est la date de facture qui fait foi. \n\nDans le cas des VN et VO, c'est la dernière date de facture qui fait foi (celle qui est affichée dans la fiche VN ou VO). \nTous les montants sont pris en compte dans le montant HT hors Carte grises et Carburants (comme la règle de marge spécifique BI)"
                     },
                 "descriptionI18N": {
                     "en-US": "",
                     "fr-FR": "Cet indicateur mesure le Chiffre d'Affaire total HT. Par Domaine et Service",
                     "en-GB": "This indicator measures the total turnover."
                     }
                 },
             "nameI18N": {
                 "en-US": "900: Total Turnover",
                 "fr-FR": "900: CA Total",
                 "en-GB": "900: Total Turnover"
                 },
             "dependencies": ["537a258ca38fb9da6b00000c"]
         },`
     ....other indicators
     ]
      "metrics": [
     {
         "_id": "537a258ca38fb9da6b000013",
         "sum": true,
         "snapshot": false,
         "granularity": "Day",
         "step": "1",
         "publicID": "1_0"
     },
     {
         "_id": "537a258ca38fb9da6b000066",
         "sum": true,
         "snapshot": false,
         "granularity": "Day",
         "step": "1",
         "publicID": "2_0"
     },...
    ],
 "lastUpdateDate": "2015-03-13T17:16:31.615Z",
 "isPublic": false,
 "langs": [
     "fr-FR",
     "en-GB"
 ]
}
HTTP/1.1 401 Unauthorized

{
    "error":"No Authorization header was found"
}

Datasource - Update

This function will update the data in data source

/datasource/:datasourceId

Header

Field Type Description
Authorization authToken

Authentication Token

Parameter

Field Type Description
name string

Datasource's name

owner id

User ID of data source's owner

Success 200

Field Type Description
data string/json

data to push into data source

HTTP/1.1 200 OK

{
    "status": "success",
    "id:" "536b07935c89be214c0000"
    "data": "Data Source successfully deleted."
}
HTTP/1.1 500 Unauthorized

{
    "error": "You are not allowed to perform this action."
}
HTTP/1.1 500 Error

{
    "error": "Impossible to delete the Data Source. Some workspaces are still linked to it. Please delete these workspaces before attempting to delete this Data Source.
}

Misc

Misc - Get languages

This function will return the avaiable languages for the app.

/languages

Parameter

Field Type Description
short optional string

send it if you want the api to return en instead of en_GB

Success 200

Field Type Description
status string

success

languages string[]

avaiable languages

HTTP/1.1 200 OK
{
     "status": "success",
     "languages": [
         "en",
         "fr"
     ]
 }

Personalization

Personalization - Get by workspace

This function returns personalization for a given workspace.
Personalization could be on indicators, dimensions, breakdowns, or others functionalities.

/personalization/:workspaceId

Header

Field Type Description
Authorization authenticationToken

Authentication Token

Parameter

Field Type Description
kpiId optional id

for specific indicator

dimensions optional string[]

list of dimensions ID separated by

breakdowns optional string[]

list of breakdowns ID separated by

keyPersonalization optional string

personalization wanted

Success 200

Field Type Description
status string

success

id id

workspace ID

data object[]

personalization data

  _id id

personalization id

  dimensions id[]

contains an array of IDs for dimensions

  breakdowns id[]

contains an array of IDs for breakdowns

  personalization object[]

personalization details

    key string

personalization name

    value object[]

personalization matching the key

HTTP/1.1 200 OK
{
    "status": "success",
    "id": "53819e2d456a847f06012309",
    "data": [
    {
        "_id": "54b6be3f8bc59d4873e36e12",
        "dimensions": [],
        "breakdowns": [],
        "personalization": [
         {
             "key": "widgetList",
             "value": [
                 {
                     "text": "New Breakdown Widget",
                     "row": 1,
                     "col": 1,
                     "sizex": 1,
                     "sizey": 2,
                     "family": "",
                     "widget": "breakdown",
                     "data": {
                         "indicatorId": "537a258ca38fb9da6b0000b8",
                         "breakdown": "Marque"
                     },
                     "_id": "54cdfb386a5dcaac0e03ddb7"
                 }
             ]
         },
    }
    ]
}

Error 4xx

Field Type Description
status string

error

id id

workspace ID

error object
HTTP/1.1 403
  {
    "status": "error",
    "id": "53819e2d456a847f06123009",
    "error": {"error": "personalization for kpi not found"}
  }

Personalization - Post for workspace

This function will return user's personalization for the given workspace ID

/personalization/:workspaceId

Header

Field Type Description
Authorization authenticationToken

Authentication Token

Parameter

Field Type Description
data object

data for personalization

  HistoryUsed optional object

user's history for this workspace

    aggregation optional object

aggregation for personalization on workspace for user

      granularitySelected optional string

granularity selected by user on the workspace

      compare optional string

compare period selected by user on the workspace

      hierarchySpec optional string[]

dimensions selected by user on the workspace

Success 200

Field Type Description
status string

success

response object

personalization

  _id id

personalization id

  workspaceId id

workspace id

  userId id

user id

  data Object[]

personalization data

    breakdowns string[]

breakdowns selected

    dimensions string[]

dimensions selected

    personalization Object[]

User personalization data

      key Object[]

User personalization data

      value Object

User personalization data

        aggregation Object

User personalization data

          compare string

compare period selected by user on the workspace

          granularitySelected string

granularity selected by user on the workspace

          hierarchySpec Object

dimensions selected by user on the workspace

HTTP/1.1 200 OK
{
    "status": "success",
    "response": {
    "_id": "54b6be3f8bc59d4da3e36e12",
    "workspaceId": "53819e2d456a847f06000009",
    "userId": "54463c3cb43a6c635c000013",
    "data": [
        {
            "personalization": [
                {
                    "key": "HistoryUsed",
                    "value": {
                        "aggregation": {
                            "granularitySelected": "Month",
                            "compare": "P-1",
                            "hierarchySpec": {}
                        }
                    }
                },
                {
                    "key": "widgetList",
                    "value": []
                },
                {
                    "key": "dashboardsList",
                    "value": [
                        {
                            "id": 0,
                            "name": "Main",
                            "userEditable": true,
                            "userRemovable": true,
                            "_id": "54b6be408bc59d4da3e36e14"
                        }
                    ]
                }
            ],
            "breakdowns": [],
            "dimensions": []
        }
    ]
  }
}

Error 4xx

Field Type Description
status string

error

message string

error message

HTTP/1.1 403 OK
  {
    "status": "error",
    "message": "No data sent"
  }

Task

Task - Create

This function will create a task on givens workspace and indicator. The task will be assign to one ore more users

/workspace/:workspaceId/indicator/:indicatorId/task

Header

Field Type Description
Authorization authenticationToken

Authentication Token

Parameter

Field Type Description
assignerId id

assigner's user ID

assigneeIds id[]

array of assignees' user IDs

title string

title

Size range: 1..50

breakdownIds optional id[]

array of breakdown IDs

dimensionIds optional id[]

array of dimension IDs

description optional string

description

startDate optional date

start date

dueDate optional date

due date (must be after the start date)

Success 200

Field Type Description
status string

Success

task object

task detail

  assignerId id

assigner's user ID

  workspaceId id

workspace ID

  indicatorId id

indicator ID

  startDate date

start date

  dueDate date

due date ID

  createdBy id

task creator ID

  lastUpdate date

last update of the task

  lastUpdatedBy id

user ID

  title string

task's title

  description string

task's description

  state string

task state

Allowed values: "inactive", "active", "succeeded", "failed"

  created date

creation date of the task

  dimensionIds id[]

array of dimension IDs

  breakdownIds id[]

array of breakdown IDs

  assigneeIds id[]

array of assignees' user IDs

  id id

task ID

 HTTP/1.1 200 OK
{
     "status":"success",
     "task": {
         "assignerId":"54463c3cb43a6c635c000013",
         "workspaceId":"53819e2d456a847f06000009",
         "indicatorId":"53736058b7b6a6d21e0001ac",
         "startDate":"2015-02-28T22:00:00.000Z",
         "dueDate":"2015-04-10T21:00:00.000Z",
         "createdBy":"54463c3cb43a6c635c000013",
         "lastUpdate":"2015-03-29T10:19:38.808Z",
         "lastUpdatedBy":"54463c3cb43a6c635c000013",
         "title":"My task's title",
         "description":"My awesome description",
         "state":"active",
         "created":"2015-03-29T10:19:38.808Z",
         "dimensionIds":["53819e2d456a847f06000038","53819e2d456a847f06000039"],
         "breakdownIds":["53819e2d456a847f0600013c"],
         "assigneeIds":["54463c3cb43a6c635c000013"],
         "id":"5517d1ba1a0146ae5288281d"
     }
}

Task - Delete

This function will delete the given task on workspace and indicator.

/workspace/:workspaceId/indicator/:indicatorId/task/:taskId

Header

Field Type Description
Authorization authenticationToken

Authentication Token

Success 200

Field Type Description
status string

Success

message string

task ID has been removed

 HTTP/1.1 200 OK
{
     "status":"success",
     "message": "The task 5517d13c1a0146ae5288281c has been successfully removed"
}

Task - Get by indicator

Retrieve all the tasks for given workspace and indicator.

/workspace/:workspaceId/indicator/:indicatorId/tasks

Header

Field Type Description
Authorization authenticationToken

Authentication Token

Success 200

Field Type Description
status string

Success

task object[]

array of tasks for the given indicator

  assignerId id

assigner's user ID

  workspaceId id

workspace ID

  indicatorId id

indicator ID

  startDate date

start date

  dueDate date

due date ID

  createdBy id

task creator ID

  lastUpdate date

last update of the task

  lastUpdatedBy id

user ID

  title string

task's title

  description string

task's description

  state string

task state

Allowed values: "inactive", "active", "succeeded", "failed"

  created date

creation date of the task

  dimensionIds id[]

array of dimension IDs

  breakdownIds id[]

array of breakdown IDs

  assigneeIds id[]

array of assignees' user IDs

  id id

task ID

 HTTP/1.1 200 OK
{
     "status":"success",
     "task": [{
         "assignerId":"54463c3cb43a6c635c000013",
         "workspaceId":"53819e2d456a847f06000009",
         "indicatorId":"53736058b7b6a6d21e0001ac",
         "startDate":"2015-02-28T22:00:00.000Z",
         "dueDate":"2015-04-10T21:00:00.000Z",
         "createdBy":"54463c3cb43a6c635c000013",
         "lastUpdate":"2015-03-29T10:19:38.808Z",
         "lastUpdatedBy":"54463c3cb43a6c635c000013",
         "title":"My task's title",
         "description":"My awesome description",
         "state":"active",
         "created":"2015-03-29T10:19:38.808Z",
         "dimensionIds":["53819e2d456a847f06000038","53819e2d456a847f06000039"],
         "breakdownIds":["53819e2d456a847f0600013c"],
         "assigneeIds":["54463c3cb43a6c635c000013"],
         "id":"5517d1ba1a0146ae5288281d"
     }]
}

Task - Get by workspace

Retrieve all the tasks for a given workspace.

/workspace/:workspaceId/tasks

Header

Field Type Description
Authorization authenticationToken

Authentication Token

Success 200

Field Type Description
status string

Success

task object[]

array of tasks for the given workspace

  assignerId id

assigner's user ID

  workspaceId id

workspace ID

  indicatorId id

indicator ID

  startDate date

start date

  dueDate date

due date ID

  createdBy id

task creator ID

  lastUpdate date

last update of the task

  lastUpdatedBy id

user ID

  title string

task's title

  description string

task's description

  state string

task state

Allowed values: "inactive", "active", "succeeded", "failed"

  created date

creation date of the task

  dimensionIds id[]

array of dimension IDs

  breakdownIds id[]

array of breakdown IDs

  assigneeIds id[]

array of assignees' user IDs

  id id

task ID

 HTTP/1.1 200 OK
{
     "status":"success",
     "task": [{
         "assignerId":"54463c3cb43a6c635c000013",
         "workspaceId":"53819e2d456a847f06000009",
         "indicatorId":"53736058b7b6a6d21e0001ac",
         "startDate":"2015-02-28T22:00:00.000Z",
         "dueDate":"2015-04-10T21:00:00.000Z",
         "createdBy":"54463c3cb43a6c635c000013",
         "lastUpdate":"2015-03-29T10:19:38.808Z",
         "lastUpdatedBy":"54463c3cb43a6c635c000013",
         "title":"My task's title",
         "description":"My awesome description",
         "state":"active",
         "created":"2015-03-29T10:19:38.808Z",
         "dimensionIds":["53819e2d456a847f06000038","53819e2d456a847f06000039"],
         "breakdownIds":["53819e2d456a847f0600013c"],
         "assigneeIds":["54463c3cb43a6c635c000013"],
         "id":"5517d1ba1a0146ae5288281d"
     }]
}

Task - Get

This function returns a specific task.

/task/:taskId

Header

Field Type Description
Authorization authenticationToken

Authentication Token

Success 200

Field Type Description
status string

Success

task object

task detail

  assignerId id

assigner's user ID

  workspaceId id

workspace ID

  indicatorId id

indicator ID

  startDate date

start date

  dueDate date

due date ID

  createdBy id

task creator ID

  lastUpdate date

last update of the task

  lastUpdatedBy id

user ID

  title string

task's title

  description string

task's description

  state string

task state

Allowed values: "inactive", "active", "succeeded", "failed"

  created date

creation date of the task

  dimensionIds id[]

array of dimension IDs

  breakdownIds id[]

array of breakdown IDs

  assigneeIds id[]

array of assignees' user IDs

  id id

task ID

 HTTP/1.1 200 OK
{
     "status":"success",
     "task": {
         "assignerId":"54463c3cb43a6c635c000013",
         "workspaceId":"53819e2d456a847f06000009",
         "indicatorId":"53736058b7b6a6d21e0001ac",
         "startDate":"2015-02-28T22:00:00.000Z",
         "dueDate":"2015-04-10T21:00:00.000Z",
         "createdBy":"54463c3cb43a6c635c000013",
         "lastUpdate":"2015-03-29T10:19:38.808Z",
         "lastUpdatedBy":"54463c3cb43a6c635c000013",
         "title":"My task's title",
         "description":"My awesome description",
         "state":"active",
         "created":"2015-03-29T10:19:38.808Z",
         "dimensionIds":["53819e2d456a847f06000038","53819e2d456a847f06000039"],
         "breakdownIds":["53819e2d456a847f0600013c"],
         "assigneeIds":["54463c3cb43a6c635c000013"],
         "id":"5517d1ba1a0146ae5288281d"
         }
}

Task - Update

Update a task.
The return's task will be the updated one.

/workspace/:workspaceId/indicator/:indicatorId/task/:taskId

Header

Field Type Description
Authorization authenticationToken

Authentication Token

Parameter

Field Type Description
assignerId id

assigner's user ID

assigneeIds id[]

array of assignees' user IDs

title string

title

Size range: 1..50

breakdownIds optional id[]

array of breakdown IDs

dimensionIds optional id[]

array of dimension IDs

description optional string

description

startDate optional date

start date

dueDate optional date

due date (must be after the start date)

Success 200

Field Type Description
status string

Success

task object

task detail

  assignerId id

assigner's user ID

  workspaceId id

workspace ID

  indicatorId id

indicator ID

  startDate date

start date

  dueDate date

due date ID

  createdBy id

task creator ID

  lastUpdate date

last update of the task

  lastUpdatedBy id

user ID

  title string

task's title

  description string

task's description

  state string

task state

Allowed values: "inactive", "active", "succeeded", "failed"

  created date

creation date of the task

  dimensionIds id[]

array of dimension IDs

  breakdownIds id[]

array of breakdown IDs

  assigneeIds id[]

array of assignees' user IDs

  id id

task ID

 HTTP/1.1 200 OK
{
     "status":"success",
     "task": {
         "assignerId":"54463c3cb43a6c635c000013",
         "workspaceId":"53819e2d456a847f06000009",
         "indicatorId":"53736058b7b6a6d21e0001ac",
         "startDate":"2015-02-28T22:00:00.000Z",
         "dueDate":"2015-04-10T21:00:00.000Z",
         "createdBy":"54463c3cb43a6c635c000013",
         "lastUpdate":"2015-03-29T10:19:38.808Z",
         "lastUpdatedBy":"54463c3cb43a6c635c000013",
         "title":"My task's title",
         "description":"My awesome description",
         "state":"active",
         "created":"2015-03-29T10:19:38.808Z",
         "dimensionIds":["53819e2d456a847f06000038","53819e2d456a847f06000039"],
         "breakdownIds":["53819e2d456a847f0600013c"],
         "assigneeIds":["54463c3cb43a6c635c000013"],
         "id":"5517d1ba1a0146ae5288281d"
     }
}