asdfasdfsadf

Management API (Beta)

Overview

Management API allows external services and apps to manage users and groups, datasources, queries, dashboards and widgets programmatically. The API is RESTful, and can be accessed via http://<service_host_and_port>/api/1.0/* url. Each request is stateless, with a response that includes an optional JSON object.

Enabling the Management API

To turn the API Management API, you must be an admin user and enable it. Navigate to the Settings (gear icon) -> User settings -> "Account settings" tab -> "Management API" row and click "Enable" to enable it. You will see your unique "client id" and "client secret", which you will need to access the system. Record and keep it securely.

Authentication

Overview

For authentication use OAuth 2.0 bearer access token in the HTTP headers of every request. Obtain a bearer token using your client id and client secret using the login end point. After the session, we also recommed using the logout end point to log out of the session. The default timeout for the bearer token is 1 hour, after which an UNAUTHORIZED (401) status code will be returned, at which point you will need again obtain new bearer access token using "login" command.

Typical workflow:

  • Obtain access token via login end point, keep the resulting bearer token in memory
  • Use the appropriate API end points as needed, passing in bearer token.
  • Call logout after use.

Login

To get bearer access token, turn on Management API in the User settings to obtan your "client id" and "client secret". Be sure to keep this in the safe place.

POST /api/1.0/login

Parameter Comments
cliend_id client_id is a part of credentials obtained from User settings.
client_secret client_secret is a part of credentials obtained from User settings.
HTTP Status Response
200 OK
{
  "access_token": <Access Token used for API calls>,
  "token_type": <Type of Token> ("Bearer" always),
  "expires_in": <Number of seconds before the token expires> (by default - 3600 seconds)
}
400 BAD_REQUEST
{ 
  "message": <Error details>, 
  "documentation_url": <Documentation link>
}

Error details:
  • Invalid parameters - missed client_id
  • Invalid parameters - missed client_secret
  • Management API disabled for this account
  • 404 NOT_FOUND
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Error details:
  • Invalid credentials
  • Bearer access token

    The returned by "login" bearer access token should be used in subsequent calls to the Management API in header named "Authorization":

    Authorization: Bearer 69EuuRHieoidfbth48ygR9843wrgw94930g39845

    curl -i -d "client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET" http://localhost:9090/api/1.0/login
    

    Logout

    Call this end point to destroy the bearer token. You can re-issue a bearer token using the login end point.

    DELETE /api/1.0/logout

    No parameters
    HTTP Status Response
    200 OK No response body
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -X DELETE http://localhost:9090/api/1.0/logout
    

    Users

    List Users

    GET /api/1.0/users

    No parameters
    HTTP Status Response
    200 OK Output example:
    {
       "list":[
          {
             "id":10077,
             "username":"someEmail1@someHost.com",
             "name":"Test8",
             "customerId":1033,
             "autocycle":false,
             "tempUser":false,
             "ssoUser":false,
             "newUser":false,
             "timeZone":"America/Los_Angeles",
             "userGroups":[
                {
                   "id":889,
                   "groupName":"Default"
                },
                {
                   "id":890,
                   "groupName":"group1"
                },
                {
                   "id":891,
                   "groupName":"group2"
                }
             ],
             "roles":[
                "admin"
             ],
             "free":false,
             "twoFactorAuth":false
          },
          {
             "id":10081,
             "username":"someEmail2@someHost.com",
             "customerId":1033,
             "autocycle":false,
             "tempUser":false,
             "ssoUser":false,
             "newUser":false,
             "timeZone":"America/Los_Angeles",
             "userGroups":[
                {
                   "id":890,
                   "groupName":"group1"
                }
             ],
             "roles":[
                "admin"
             ],
             "free":false,
             "twoFactorAuth":false
          }
       ]
    }
      
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER"  http://localhost:9090/api/1.0/users/
    

    Get User

    GET /api/1.0/users/<user_id>

    Parameter Comments
    user_id User id to get info about specified User
    HTTP Status Response
    200 OK Output example:
    {
       "id":10091,
       "username":"someEmail1@someHost.com",
       "customerId":1033,
       "autocycle":false,
       "tempUser":false,
       "ssoUser":false,
       "newUser":false,
       "timeZone":"America/Los_Angeles",
       "userGroups":[
          {
             "id":889,
             "groupName":"Default"
          }
       ],
       "roles":[
          "viewer"
       ],
       "free":false,
       "twoFactorAuth":false
    }
      
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • 403 FORBIDDEN
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Error details:
  • Current user is not allowed to see specified user info
  • curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER"  http://localhost:9090/api/1.0/users/10001
    

    Create User

    POST /api/1.0/users/

    POST JSON payload:

    Parameter Comments
    username User name of new user, actually the existing email of new user
    password Password for new user
    phone Phone number for new user (required if using 2FA)
    userInviteJson JSON of "invite" properties which include: user role (possible values: user, viewer, admin), user groups to which user will belong, which include group id, access level (possible values: 1, 2, where 1 - Edit rights, 2 - Read-only rights). Example:
    {
      "userGroups":
        [
          {
            "id":889,
            "access_level":1
          }
        ],
      "userRole":"viewer"
    }
              
    HTTP Status Response
    200 OK Return created user json info (same as "Get user" command). Output example:
    {
       "id":10091,
       "username":"someEmail1@someHost.com",
       "customerId":1033,
       "autocycle":false,
       "tempUser":false,
       "ssoUser":false,
       "newUser":false,
       "timeZone":"America/Los_Angeles",
       "userGroups":[
          {
             "id":889,
             "groupName":"Default"
          }
       ],
       "roles":[
          "viewer"
       ],
       "free":false,
       "twoFactorAuth":false
    }
      
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • Error details:
  • Invalid userInviteJson specified
  • Specified group is not exists
  • Invalid group specified
  • Invalid user role specified
  • Common error creating user via management api - details in the log at server
  • User limit reached
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • 409 CONFLICT
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Error details:
  • User with such name already exists
  • 415 UNSUPPORTED_MEDIA_TYPE Cannot consume content type - The server refused this request because the request entity is in a format not supported by the requested resource for the requested method.
    curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -H "Content-Type: application/json" -X POST -d "{\"username\":\"someEmail1@someHost.com\", \"password\":\"somePassword\", \"phone\":\"somePhone\", \"userInviteJson\": {\"userGroups\":[{\"id\":889,\"access_level\":1}],\"userRole\":\"viewer\"} }"  http://localhost:9090/api/1.0/users
    

    Delete User

    DELETE /api/1.0/users/<user_id>

    Parameter Comments
    user_id User id of User to delete
    HTTP Status Response
    200 OK No response body
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • Error details:
  • Invalid json properties
  • Missed 'username' field in json
  • Missed 'password' field in json
  • Missed 'userInviteJson' field in json
  • Missed 'phone' field in json
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • 403 FORBIDDEN
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Error details:
  • Current user is not allowed to delete specified user or user is not found
  • curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -X DELETE http://localhost:9090/api/1.0/users/10084
    

    Edit User

    PUT /api/1.0/users/<user_id>

    Parameter Comments
    user_id User id of the user to delete

    PUT JSON payload.
    Any of fields are optional here (e.g. you can edit only required fields of user).

    Parameter Comments
    name Name of user (this is not username)
    groups List of groups to which User is belongs, including access level (1 - Edit rights, 2 - read-only) Example of object: [{"name":"Default","id":889,"type":"Groups","access_level":1}]
    roles Role of the account, could be: admin, user, viewer
    contentFilters Optional (could be set to empty string), the content filters set to User. Example: [{"fieldName":"$c9_<field>$","type":"java.lang.String","values":["33"],"operator":"Equals"}]
    timezone String timezone of the user location, e.g.: America/Los_Angeles
    twoFactorAuth (BOOL value) Boolean value, if set to "true" then 2FA (two factor) authorisation is enabled for the account
    phone Phone number of the account. Mostly useful together with "twoFactorAuth" variable
    HTTP Status Response
    200 OK Return created user json info (same as "Get user" command). Output example:
    {
       "id":10091,
       "username":"someEmail1@someHost.com",
       "customerId":1033,
       "autocycle":false,
       "tempUser":false,
       "ssoUser":false,
       "newUser":false,
       "timeZone":"America/Los_Angeles",
       "userGroups":[
          {
             "id":889,
             "groupName":"Default"
          }
       ],
       "roles":[
          "viewer"
       ],
       "free":false,
       "twoFactorAuth":false
    }
      
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • Error details:
  • Common error saving user - details in the server log
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • 403 FORBIDDEN
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Error details:
  • Current user is not allowed to edit specified user
  • 415 UNSUPPORTED_MEDIA_TYPE Cannot consume content type - The server refused this request because the request entity is in a format not supported by the requested resource for the requested method.
    curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -H "Content-Type: application/json" -X PUT -d "{\"name\":\"someName123\"}"  http://localhost:9090/api/1.0/users/10096
    

    Groups

    List Groups -- Current User

    GET /api/1.0/groups

    No parameters
    HTTP Status Response
    200 OK Output example:
    {
       "list":[
          {
             "id":889,
             "groupName":"Default"
          },
          {
             "id":890,
             "groupName":"group1"
          },
          {
             "id":891,
             "groupName":"group2"
          }
       ]
    }
      
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER"  http://localhost:9090/api/1.0/groups/
    

    List Groups - By User

    GET /api/1.0/users/<user_id>/groups

    Parameter Comments
    user_id User id of User to get Groups
    HTTP Status Response
    200 OK Output example:
    {
       "list":[
          {
             "id":889,
             "groupName":"Default"
          },
          {
             "id":890,
             "groupName":"group1"
          },
          {
             "id":891,
             "groupName":"group2"
          }
       ]
    }
      
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • 403 FORBIDDEN
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Error details:
  • Current user is not allowed to see specified user info
  • curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER"  http://localhost:9090/api/1.0/users/10001/groups/
    

    Get Group Details (current user)

    GET /api/1.0/groups/<group_id>

    Parameter Comments
    group_id Group id of Group to get
    HTTP Status Response
    200 OK Output example:
    {
      "id":890,
      "groupName":"group1"
    }
      
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • 403 FORBIDDEN
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Error details:
  • Current user is not allowed to see specified group
  • curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER"  http://localhost:9090/api/1.0/groups/10001
    

    Get Groups - By User

    GET /api/1.0/users/<user_id>/groups/<group_id>

    Parameter Comments
    userid User id of User to get specified Group in it
    group_id Group id of Group to get info about inside specified User
    HTTP Status Response
    200 OK Output example:
    {
      "id":890,
      "groupName":"group1"
    }
      
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • 403 FORBIDDEN
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Error details:
  • Current user is not allowed to see specified group
  • curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER"  http://localhost:9090/api/1.0/users/10001/groups/90002
    

    Create Group within current user

    POST /api/1.0/groups/

    Parameter Comments
    groupName Group name of new group
    HTTP Status Response
    200 OK Return created group json info (same as "Get group" command). Output example:
    {
      "id":890,
      "groupName":"group1"
    }
      
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • Error details:
  • Missed groupName field
  • Common error creating user group - more details at server log
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -d "groupname=newGroupName1"  http://localhost:9090/api/1.0/groups
    

    Create Group inside specified user

    POST /api/1.0/users/<user_id>/groups/

    Parameter Comments
    userid User id of User to create Group in it
    groupName Group name of new group
    HTTP Status Response
    200 OK Return created group json info (same as "Get group" command). Output example:
    {
      "id":890,
      "groupName":"group1"
    }
      
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • Error details:
  • Missed groupName field
  • Common error creating user group - more details at server log
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • 403 FORBIDDEN
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Error details:
  • Current user is not allowed to edit specified user info
  • curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -d "groupname=newGroupName1"  http://localhost:9090/api/1.0/users/10001/groups
    

    Delete Group of current User

    DELETE /api/1.0/groups/<group_id>

    Parameter Comments
    group_id Group id of Group to delete
    HTTP Status Response
    200 OK No response body
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • Error details:
  • Failed to remove group - more details at server log
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • 403 FORBIDDEN
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Error details:
  • Current user is not allowed to delete specified group
  • curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -X DELETE http://localhost:9090/api/1.0/groups/895
    

    Delete Group of specified User

    DELETE /api/1.0/users/<user_id>/groups/<group_id>

    Parameter Comments
    userid User id of User to delete Group in it
    group_id Group id of Group to delete
    HTTP Status Response
    200 OK No response body
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • Error details:
  • Failed to remove group - more details at server log
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • 403 FORBIDDEN
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Error details:
  • Current user is not allowed to delete specified group
  • curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -X DELETE http://localhost:9090/api/1.0/users/10001/groups/895
    

    Edit Group of current User

    PUT /api/1.0/groups/<group_id>

    Parameter Comments
    group_id Group id of Group to edit
    groupName New group name of Group
    HTTP Status Response
    200 OK Return updated group json info (same as "Get group" command). Output example:
    {
      "id":890,
      "groupName":"group1"
    }
      
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • Error details:
  • Missed groupName field
  • Failed to edit group - details saved at server log
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • 403 FORBIDDEN
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Error details:
  • Current user is not allowed to edit specified group
  • curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -X PUT -d "groupName=updatedGroupName1"  http://localhost:9090/api/1.0/groups/897
    

    Edit Group of selected User

    PUT /api/1.0/users/<user_id>/groups/<group_id>

    Parameter Comments
    user_id User id where edit the Group
    group_id Group id of Group to edit
    groupName New group name of Group
    HTTP Status Response
    200 OK Return updated group json info (same as "Get group" command). Output example:
    {
      "id":890,
      "groupName":"group1"
    }
      
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • Error details:
  • Missed groupName field
  • Failed to edit group - details saved at server log
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • 403 FORBIDDEN
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Error details:
  • Current user is not allowed to edit specified group
  • curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -X PUT -d "groupName=updatedGroupName1"  http://localhost:9090/api/1.0/users/10001/groups/897
    

    Dashboards

    List Dashboards

    GET /api/1.0/dashboards

    No parameters
    HTTP Status Response
    200 OK Output example:
    {
       "list":[
          {
             "createdDate":1484118380000,
             "id":110634,
             "name":"Dashboard1",
             "userId":10077,
             "url":"eD8yPisWdcQhdOeip2IJii6Tip1dLNOlFJiiDHhW3iiqSHqtQie",
             "selected":true,
             "displayOrder":0,
             "screenAdjust":true,
             "screenWidth":1447,
             "screenHeight":908,
             "lastModDt":1492849740000,
             "lastAccessDt":1492849740000,
             "locked":false,
             "accessLevel":1,
             "showWidgetList":true
          },
          {
             "createdDate":1481572146000,
             "id":110617,
             "name":"Dashboard2",
             "userId":10077,
             "url":"m2a68Ahq9l9cNWKNQoqXipiirjzwiiUGPUis0QurjbHE5bIie",
             "selected":true,
             "displayOrder":0,
             "screenAdjust":false,
             "screenWidth":1680,
             "screenHeight":1050,
             "lastModDt":1492550129000,
             "lastAccessDt":1492550093000,
             "locked":false,
             "accessLevel":1,
             "showWidgetList":true,
          }
       ]
    }
      
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER"  http://localhost:9090/api/1.0/dashboards/
    

    Get Dashboard

    GET /api/1.0/dashboards/<objectId>

    Parameter Comments
    objectId Dashboard id to view Dashboard
    HTTP Status Response
    200 OK Output example:
    {
     "createdDate":1481572146000,
     "id":110617,
     "name":"Dashboard2",
     "userId":10077,
     "url":"m2a68Ahq9l9cNWKNQoqXipiirjzwiiUGPUis0QurjbHE5bIie",
     "selected":true,
     "displayOrder":0,
     "screenAdjust":false,
     "screenWidth":1680,
     "screenHeight":1050,
     "lastModDt":1492550129000,
     "lastAccessDt":1492550093000,
     "locked":false,
     "accessLevel":1,
     "showWidgetList":true,
    } 
      
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • 403 FORBIDDEN
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Error details:
  • Current user is not allowed to access specified dashboard
  • curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER"  http://localhost:9090/api/1.0/dashboards/10001
    

    Share Dashboard via Url

    GET /api/1.0/dashboards/<objectId>?shareViaUrl=true

    Parameter Comments
    objectId Id of Dashboard to share
    object_id "shareViaUrl" is query param, only possible value is "true", meaning this will be sharing Dashboard via Url
    HTTP Status Response
    200 OK Output example:
    {
     "dashShareUrlKey": "x5UJADiifFZoYS6iix2ADwEJsii30Qljj7eUcNKfcSMduMie"
    } 
      

    Use the dashShareUrlKey to construct the full url by adding /d/ and the "dashShareUrlKey" to the host name and port. If service host and port is "localhost:9090" then the constructed url from above example is: http://localhost:9090/d/x5UJADiifFZoYS6iix2ADwEJsii30Qljj7eUcNKfcSMduMie
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • Error details:
  • Some error occurred during sharing dashboard - more details at server log
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • 403 FORBIDDEN
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Error details:
  • Current user is not allowed to access specified dashboard
  • curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER"  http://localhost:9090/api/1.0/dashboards/10001?shareViaUrl=true
    

    Share Dashboard to Users/Groups

    PUT /api/1.0/dashboards/<objectId>/share

    Parameter Comments
    objectId Dashboard id of Dashboard to share

    PUT JSON payload:

    Parameter Comments
    shareProperties Share properties json array. Available fields:
  • Type: Users, Groups.
  • access_level: 1 - Edit rights, 2 - Read-only
  • name: the name of the User to share to
  • id: group id of the Group to share to.
    Example:
    [ 
      { 
        "type" : "Users", 
        "access_level" : 1, 
        "name" : "someUser1@host.com" 
      },
      { 
        "type" : "Groups", 
        "access_level" : 1, 
        "id" : 10001 
      } 
    ]
    
  • HTTP Status Response
    200 OK No response body
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • Error details:
  • Missed shareProperties field
  • shareProperties missed the type field
  • shareProperties missed the access_level field
  • shareProperties has invalid the type value
  • shareProperties has invalid the access_level value
  • shareProperties missed the id field
  • shareProperties missed the name field
  • shareProperties has invalid the name field
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • 403 FORBIDDEN
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Error details:
  • Current user is not allowed to share specified dashboard
  • 415 UNSUPPORTED_MEDIA_TYPE Cannot consume content type - The server refused this request because the request entity is in a format not supported by the requested resource for the requested method.
    curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -H "Content-Type: application/json" -X PUT -d "{\"shareProperties\" : [ { \"type\" : \"Users\", \"access_level\" : 1, \"name\" : \"someUser@host.com\" } ] }"  http://localhost:9090/api/1.0/dashboards/110643/share
    

    Create Dashboard

    POST /api/1.0/dashboards/

    POST JSON payload:

    Parameter Comments
    dashName Dashboard name
    screenWidth Dashboard screen width in pixels
    screenHeight Dashboard screen height in pixels
    HTTP Status Response
    200 OK Return created Dashboard json info (same as "Get Dashboard" command). Output example:
    {
     "createdDate":1481572146000,
     "id":110617,
     "name":"Dashboard2",
     "userId":10077,
     "url":"m2a68Ahq9l9cNWKNQoqXipiirjzwiiUGPUis0QurjbHE5bIie",
     "selected":true,
     "displayOrder":0,
     "screenAdjust":false,
     "screenWidth":1680,
     "screenHeight":1050,
     "lastModDt":1492550129000,
     "lastAccessDt":1492550093000,
     "locked":false,
     "accessLevel":1,
     "showWidgetList":true,
    } 
      
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • Error details:
  • Missed dashName field
  • Invalid screenWidth field
  • Invalid screenHeight field
  • Invalid group specified
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • 415 UNSUPPORTED_MEDIA_TYPE Cannot consume content type - The server refused this request because the request entity is in a format not supported by the requested resource for the requested method.
    curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -H "Content-Type: application/json" -X POST -d "{\"dashName\":\"dashboardName1\",\"screenWidth\":1000,\"screenHeight\":800}"  http://localhost:9090/api/1.0/dashboards
    

    Delete Dashboard

    DELETE /api/1.0/dashboards/<objectId>

    Parameter Comments
    objectId Id of Dashboard to delete
    HTTP Status Response
    200 OK No response body
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • Error details:
  • Error removing dashboard - more details at server log
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • 403 FORBIDDEN
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Error details:
  • Current user is not allowed to delete specified dashboard
  • curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -X DELETE http://localhost:9090/api/1.0/dashboards/10084
    

    Edit Dashboard

    PUT /api/1.0/dashboards/<objectId>

    Parameter Comments
    objectId Dashboard id of Dashboard to edit

    PUT JSON payload:

    Parameter Comments
    dashName New Name of Dashboard
    categories List of categories
    HTTP Status Response
    200 OK Return edited Dashboard json info (same as "Get Dashboard" command). Output example:
    {
     "createdDate":1481572146000,
     "id":110617,
     "name":"Dashboard2",
     "userId":10077,
     "url":"m2a68Ahq9l9cNWKNQoqXipiirjzwiiUGPUis0QurjbHE5bIie",
     "selected":true,
     "displayOrder":0,
     "screenAdjust":false,
     "screenWidth":1680,
     "screenHeight":1050,
     "lastModDt":1492550129000,
     "lastAccessDt":1492550093000,
     "locked":false,
     "accessLevel":1,
     "showWidgetList":true,
    } 
      
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • Error details:
  • Missed dashName field
  • Missed categories field
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • 403 FORBIDDEN
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Error details:
  • Current user is not allowed to edit specified dashboard
  • 415 UNSUPPORTED_MEDIA_TYPE Cannot consume content type - The server refused this request because the request entity is in a format not supported by the requested resource for the requested method.
    curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -H "Content-Type: application/json" -X PUT -d "{\"dashName\":\"updatedDashboardName1\", \"categories\" : [ \"category1\"]}"  http://localhost:9090/api/1.0/dashboards/10001
    

    Clone Dashboard

    POST /api/1.0/dashboards/<objectIdToClone>

    Parameter Comments
    objectIdToClone Dashboard id of Dashboard to clone

    POST JSON payload:

    Parameter Comments
    dashName New (cloned) Name of Dashboard
    screenWidth Cloned dashboard screen width in pixels
    screenHeight Cloned dashboard screen height in pixels
    HTTP Status Response
    200 OK Return cloned Dashboard json info (same as "Get Dashboard" command). Output example:
    {
     "createdDate":1481572146000,
     "id":110617,
     "name":"Dashboard2",
     "userId":10077,
     "url":"m2a68Ahq9l9cNWKNQoqXipiirjzwiiUGPUis0QurjbHE5bIie",
     "selected":true,
     "displayOrder":0,
     "screenAdjust":false,
     "screenWidth":1680,
     "screenHeight":1050,
     "lastModDt":1492550129000,
     "lastAccessDt":1492550093000,
     "locked":false,
     "accessLevel":1,
     "showWidgetList":true,
    } 
      
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • Error details:
  • Error cloning dashboard - no any additional info available
  • Missed dashName field
  • Missed screenWidth field
  • Missed screenHeight field
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • 403 FORBIDDEN
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Error details:
  • Current user is not allowed to clone specified dashboard
  • 415 UNSUPPORTED_MEDIA_TYPE Cannot consume content type - The server refused this request because the request entity is in a format not supported by the requested resource for the requested method.
    curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -H "Content-Type: application/json" -X POST -d "{\"dashName\":\"clonedDashboardName1\",\"screenWidth\":1000,\"screenHeight\":800}" http://localhost:9090/api/1.0/dashboards/110643
    

    List Widgets in Dashboard

    GET /api/1.0/dashboards/<objectId>/widgets?byCategory=<byCategory>

    Parameter Comments
    objectId Dashboard id in which to get widgets list
    byCategory Query parameter, optional. If set, then widgets filtered by specified category
    HTTP Status Response
    200 OK Output example:
    {
       "list":[
          {
             "id":25901,
             "name":"test5",
             "userId":10077,
             "customerId":1033,
             "datasetId":15150,
             "type":2,
             "description":null,
             "urlString":"02SscJ",
             "access":0,
             "refreshChartMillis":-1,
             "createdDate":1492282355000,
             "jsonConfig":null,
             "queryId":-1,
             "queryStr":null,
             "adhocQuery":null,
             "category":"All",
             "drilldown":false,
             "dataset":{
                "createdDate":1492282355000,
                "lastModDate":1492282355000,
                "id":15150,
                "metadataConfig":"{\"fieldNames\":[\"id_0\",\"id\",\"geometry\",\"properties\"],\"dataTypes\":{\"id_0\":\"java.lang.String\",\"id\":\"java.lang.String\",\"geometry\":\"java.util.Map\",\"properties\":\"java.util.Map\"}}",
                "mongoId":null,
                "mongoConnectUri":"localhost:27017/Some_a3PNFK",
                "customerId":1033,
                "datasetName":"test5",
                "identifier":null,
                "userId":0,
                "customer":null,
                "metaData":{
                   "fieldNames":[
                      "id_0",
                      "id",
                      "geometry",
                      "properties"
                   ],
                   "dataTypes":{
                      "id_0":"java.lang.String",
                      "id":"java.lang.String",
                      "geometry":"java.util.Map",
                      "properties":"java.util.Map"
                   }
                }
             },
             "position":{
                "chartId":25901,
                "width":-1,
                "height":-1,
                "originalScreenWidth":-1,
                "originalScreenHeight":-1,
                "col":1,
                "row":13,
                "id":25901,
                "xpos":0,
                "ypos":0,
                "size_x":12,
                "size_y":12
             },
             "associations":null,
             "queryModified":false,
             "updateFilters":false,
             "dataFields":[
    
             ],
             "transientChartFilters":null,
             "typeModified":false,
             "lastSyncDate":1492282355000,
             "viewOnly":false,
             "truncated":false,
             "processedName":"test5",
             "widgetConfig":null,
             "chartProperties":{
                "chart.type":"datagrid"
             },
             "statusIndColumns":[
    
             ],
             "gridBean":null,
             "dataRow":null,
             "text":"",
             "colNames":null,
             "dataRows":null,
             "live":false,
             "filters":null,
             "widgetType":"DATA_GRID",
             "macros":null,
             "strictFilters":null,
             "dbFields":[
    
             ],
             "widgetTypeStr":"datagrid",
             "filterFieldDataTypes":{
                "geometry":"java.util.Map",
                "id":"java.lang.String",
                "id_0":"java.lang.String",
                "properties":"java.util.Map"
             },
             "allFilters":[
    
             ],
             "processedFilters":[
    
             ]
          }
       ]
    }
      
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • 403 FORBIDDEN
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Error details:
  • Current user is not allowed to get widgets of specified dashboard
  • curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER"  http://localhost:9090/api/1.0/dashboards/10001/widgets
    

    Widgets

    List Widgets

    GET /api/1.0/widgets?byCategory=<byCategory>

    Parameter Comments
    byCategory Query parameter, optional. If set, then widgets filtered by specified category
    HTTP Status Response
    200 OK Output example:
    {
       "list":[
          {
             "id":25901,
             "name":"test5",
             "userId":10077,
             "customerId":1033,
             "datasetId":15150,
             "type":2,
             "description":null,
             "urlString":"02SscJ",
             "access":0,
             "refreshChartMillis":-1,
             "createdDate":1492282355000,
             "jsonConfig":null,
             "queryId":-1,
             "queryStr":null,
             "adhocQuery":null,
             "category":"All",
             "drilldown":false,
             "dataset":{
                "createdDate":1492282355000,
                "lastModDate":1492282355000,
                "id":15150,
                "metadataConfig":"{\"fieldNames\":[\"id_0\",\"id\",\"geometry\",\"properties\"],\"dataTypes\":{\"id_0\":\"java.lang.String\",\"id\":\"java.lang.String\",\"geometry\":\"java.util.Map\",\"properties\":\"java.util.Map\"}}",
                "mongoId":null,
                "mongoConnectUri":"localhost:27017/Some_a3PNFK",
                "customerId":1033,
                "datasetName":"test5",
                "identifier":null,
                "userId":0,
                "customer":null,
                "metaData":{
                   "fieldNames":[
                      "id_0",
                      "id",
                      "geometry",
                      "properties"
                   ],
                   "dataTypes":{
                      "id_0":"java.lang.String",
                      "id":"java.lang.String",
                      "geometry":"java.util.Map",
                      "properties":"java.util.Map"
                   }
                }
             },
             "position":{
                "chartId":25901,
                "width":-1,
                "height":-1,
                "originalScreenWidth":-1,
                "originalScreenHeight":-1,
                "col":1,
                "row":13,
                "id":25901,
                "xpos":0,
                "ypos":0,
                "size_x":12,
                "size_y":12
             },
             "associations":null,
             "queryModified":false,
             "updateFilters":false,
             "dataFields":[
    
             ],
             "transientChartFilters":null,
             "typeModified":false,
             "lastSyncDate":1492282355000,
             "viewOnly":false,
             "truncated":false,
             "processedName":"test5",
             "widgetConfig":null,
             "chartProperties":{
                "chart.type":"datagrid"
             },
             "statusIndColumns":[
    
             ],
             "gridBean":null,
             "dataRow":null,
             "text":"",
             "colNames":null,
             "dataRows":null,
             "live":false,
             "filters":null,
             "widgetType":"DATA_GRID",
             "macros":null,
             "strictFilters":null,
             "dbFields":[
    
             ],
             "widgetTypeStr":"datagrid",
             "filterFieldDataTypes":{
                "geometry":"java.util.Map",
                "id":"java.lang.String",
                "id_0":"java.lang.String",
                "properties":"java.util.Map"
             },
             "allFilters":[
    
             ],
             "processedFilters":[
    
             ]
          }
       ]
    }
      
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER"  http://localhost:9090/api/1.0/widgets/
    

    Get Widget

    GET /api/1.0/widgets/<objectId>

    Parameter Comments
    objectId Widget id to view
    HTTP Status Response
    200 OK Output example:
    {
     "id":25901,
     "name":"test5",
     "userId":10077,
     "customerId":1033,
     "datasetId":15150,
     "type":2,
     "description":null,
     "urlString":"02SscJ",
     "access":0,
     "refreshChartMillis":-1,
     "createdDate":1492282355000,
     "jsonConfig":null,
     "queryId":-1,
     "queryStr":null,
     "adhocQuery":null,
     "category":"All",
     "drilldown":false,
     "dataset":{
        "createdDate":1492282355000,
        "lastModDate":1492282355000,
        "id":15150,
        "metadataConfig":"{\"fieldNames\":[\"id_0\",\"id\",\"geometry\",\"properties\"],\"dataTypes\":{\"id_0\":\"java.lang.String\",\"id\":\"java.lang.String\",\"geometry\":\"java.util.Map\",\"properties\":\"java.util.Map\"}}",
        "mongoId":null,
        "mongoConnectUri":"localhost:27017/Some_a3PNFK",
        "customerId":1033,
        "datasetName":"test5",
        "identifier":null,
        "userId":0,
        "customer":null,
        "metaData":{
           "fieldNames":[
              "id_0",
              "id",
              "geometry",
              "properties"
           ],
           "dataTypes":{
              "id_0":"java.lang.String",
              "id":"java.lang.String",
              "geometry":"java.util.Map",
              "properties":"java.util.Map"
           }
        }
     },
     "position":{
        "chartId":25901,
        "width":-1,
        "height":-1,
        "originalScreenWidth":-1,
        "originalScreenHeight":-1,
        "col":1,
        "row":13,
        "id":25901,
        "xpos":0,
        "ypos":0,
        "size_x":12,
        "size_y":12
     },
     "associations":null,
     "queryModified":false,
     "updateFilters":false,
     "dataFields":[
    
     ],
     "transientChartFilters":null,
     "typeModified":false,
     "lastSyncDate":1492282355000,
     "viewOnly":false,
     "truncated":false,
     "processedName":"test5",
     "widgetConfig":null,
     "chartProperties":{
        "chart.type":"datagrid"
     },
     "statusIndColumns":[
    
     ],
     "gridBean":null,
     "dataRow":null,
     "text":"",
     "colNames":null,
     "dataRows":null,
     "live":false,
     "filters":null,
     "widgetType":"DATA_GRID",
     "macros":null,
     "strictFilters":null,
     "dbFields":[
    
     ],
     "widgetTypeStr":"datagrid",
     "filterFieldDataTypes":{
        "geometry":"java.util.Map",
        "id":"java.lang.String",
        "id_0":"java.lang.String",
        "properties":"java.util.Map"
     },
     "allFilters":[
    
     ],
     "processedFilters":[
    
     ]
    } 
      
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • 403 FORBIDDEN
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Error details:
  • Current user is not allowed to see specified widget
  • curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER"  http://localhost:9090/api/1.0/widgets/10001
    

    Share Widget via Url

    GET /api/1.0/widgets/<objectId>?shareViaUrl=true

    Parameter Comments
    objectId Id of Widget to share
    object_id "shareViaUrl" is query param, only possible value is "true", meaning this will be sharing Widget via Url
    HTTP Status Response
    200 OK Output example:
    {
     "widgetShareUrlKey": "x5UJADiifFZoYS6iix2ADwEJsii30Qljj7eUcNKfcSMduMie"
    } 
      

    Use the widgetShareUrlKey to construct the full url by adding /w/ and the "widgetShareUrlKey" to the host name and port. If service host and port is "localhost:9090" then the constructed url from above example is: http://localhost:9090/w/x5UJADiifFZoYS6iix2ADwEJsii30Qljj7eUcNKfcSMduMie
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • Error details:
  • Some error occurred during sharing widget - more details at server log
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • 403 FORBIDDEN
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Error details:
  • Current user is not allowed to access specified widget
  • curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER"  http://localhost:9090/api/1.0/widgets/5002?shareViaUrl=true
    

    Share Widget to Users/Groups

    PUT /api/1.0/widgets/<objectId>/share

    Parameter Comments
    objectId Widget id of Widget to share

    PUT JSON payload:

    Parameter Comments
    shareProperties Share properties json array. Available fields:
  • Type: Users, Groups.
  • access_level: 1 - Edit rights, 2 - Read-only
  • name: the name of the User to share to
  • id: group id of the Group to share to.
    Example:
    [ 
      { 
        "type" : "Users", 
        "access_level" : 1, 
        "name" : "someUser1@host.com" 
      },
      { 
        "type" : "Groups", 
        "access_level" : 1, 
        "id" : 10001 
      } 
    ]
    
  • HTTP Status Response
    200 OK No response body
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • Error details:
  • Missed shareProperties field
  • shareProperties missed the type field
  • shareProperties missed the access_level field
  • shareProperties has invalid the type value
  • shareProperties has invalid the access_level value
  • shareProperties missed the id field
  • shareProperties missed the name field
  • shareProperties has invalid the name field
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • 403 FORBIDDEN
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Error details:
  • Current user is not allowed to share specified widget
  • 415 UNSUPPORTED_MEDIA_TYPE Cannot consume content type - The server refused this request because the request entity is in a format not supported by the requested resource for the requested method.
    curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -H "Content-Type: application/json" -X PUT -d "{\"shareProperties\" : [ { \"type\" : \"Users\", \"access_level\" : 1, \"name\" : \"someUser@host.com\" } ] }"  http://localhost:9090/api/1.0/widgets/110643/share
    

    Create Widget

    POST /api/1.0/widgets/

    POST JSON payload:

    Parameter Comments
    datasetId Id of Dataset to use to create Widget
    widgetName Widget name
    HTTP Status Response
    200 OK Return created Widget json info (same as "Get widget" command). Output example:
    {
     "id":25901,
     "name":"test5",
     "userId":10077,
     "customerId":1033,
     "datasetId":15150,
     "type":2,
     "description":null,
     "urlString":"02SscJ",
     "access":0,
     "refreshChartMillis":-1,
     "createdDate":1492282355000,
     "jsonConfig":null,
     "queryId":-1,
     "queryStr":null,
     "adhocQuery":null,
     "category":"All",
     "drilldown":false,
     "dataset":{
        "createdDate":1492282355000,
        "lastModDate":1492282355000,
        "id":15150,
        "metadataConfig":"{\"fieldNames\":[\"id_0\",\"id\",\"geometry\",\"properties\"],\"dataTypes\":{\"id_0\":\"java.lang.String\",\"id\":\"java.lang.String\",\"geometry\":\"java.util.Map\",\"properties\":\"java.util.Map\"}}",
        "mongoId":null,
        "mongoConnectUri":"localhost:27017/Some_a3PNFK",
        "customerId":1033,
        "datasetName":"test5",
        "identifier":null,
        "userId":0,
        "customer":null,
        "metaData":{
           "fieldNames":[
              "id_0",
              "id",
              "geometry",
              "properties"
           ],
           "dataTypes":{
              "id_0":"java.lang.String",
              "id":"java.lang.String",
              "geometry":"java.util.Map",
              "properties":"java.util.Map"
           }
        }
     },
     "position":{
        "chartId":25901,
        "width":-1,
        "height":-1,
        "originalScreenWidth":-1,
        "originalScreenHeight":-1,
        "col":1,
        "row":13,
        "id":25901,
        "xpos":0,
        "ypos":0,
        "size_x":12,
        "size_y":12
     },
     "associations":null,
     "queryModified":false,
     "updateFilters":false,
     "dataFields":[
    
     ],
     "transientChartFilters":null,
     "typeModified":false,
     "lastSyncDate":1492282355000,
     "viewOnly":false,
     "truncated":false,
     "processedName":"test5",
     "widgetConfig":null,
     "chartProperties":{
        "chart.type":"datagrid"
     },
     "statusIndColumns":[
    
     ],
     "gridBean":null,
     "dataRow":null,
     "text":"",
     "colNames":null,
     "dataRows":null,
     "live":false,
     "filters":null,
     "widgetType":"DATA_GRID",
     "macros":null,
     "strictFilters":null,
     "dbFields":[
    
     ],
     "widgetTypeStr":"datagrid",
     "filterFieldDataTypes":{
        "geometry":"java.util.Map",
        "id":"java.lang.String",
        "id_0":"java.lang.String",
        "properties":"java.util.Map"
     },
     "allFilters":[
    
     ],
     "processedFilters":[
    
     ]
    }
      
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • Error details:
  • Missed datasetId field
  • Missed widgetName field
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • 403 FORBIDDEN
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Error details:
  • Current user is not allowed to add widget using specified dataset
  • Have no permissions to add new widget
  • Widget limit reached
  • 415 UNSUPPORTED_MEDIA_TYPE Cannot consume content type - The server refused this request because the request entity is in a format not supported by the requested resource for the requested method.
    curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -H "Content-Type: application/json" -X POST -d "{\"datasetId\":15134,\"widgetName\":\"newWidgetName1\"}" http://localhost:9090/api/1.0/widgets
    

    Delete Widget

    DELETE /api/1.0/widgets/<objectId>

    Parameter Comments
    objectId Widget id to delete
    HTTP Status Response
    200 OK No response body
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • 403 FORBIDDEN
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Error details:
  • Current user is not allowed to delete specified widget
  • curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -X DELETE http://localhost:9090/api/1.0/widgets/25902
    

    Edit Widget

    PUT /api/1.0/widgets/<objectId>

    Parameter Comments
    objectId Widget id of Widget to edit

    PUT JSON payload:

    Parameter Comments
    widgetName Widget name
    HTTP Status Response
    200 OK Return edited Widget json info (same as "Get Widget" command). Output example:
    {
     "id":25901,
     "name":"test5",
     "userId":10077,
     "customerId":1033,
     "datasetId":15150,
     "type":2,
     "description":null,
     "urlString":"02SscJ",
     "access":0,
     "refreshChartMillis":-1,
     "createdDate":1492282355000,
     "jsonConfig":null,
     "queryId":-1,
     "queryStr":null,
     "adhocQuery":null,
     "category":"All",
     "drilldown":false,
     "dataset":{
        "createdDate":1492282355000,
        "lastModDate":1492282355000,
        "id":15150,
        "metadataConfig":"{\"fieldNames\":[\"id_0\",\"id\",\"geometry\",\"properties\"],\"dataTypes\":{\"id_0\":\"java.lang.String\",\"id\":\"java.lang.String\",\"geometry\":\"java.util.Map\",\"properties\":\"java.util.Map\"}}",
        "mongoId":null,
        "mongoConnectUri":"localhost:27017/Some_a3PNFK",
        "customerId":1033,
        "datasetName":"test5",
        "identifier":null,
        "userId":0,
        "customer":null,
        "metaData":{
           "fieldNames":[
              "id_0",
              "id",
              "geometry",
              "properties"
           ],
           "dataTypes":{
              "id_0":"java.lang.String",
              "id":"java.lang.String",
              "geometry":"java.util.Map",
              "properties":"java.util.Map"
           }
        }
     },
     "position":{
        "chartId":25901,
        "width":-1,
        "height":-1,
        "originalScreenWidth":-1,
        "originalScreenHeight":-1,
        "col":1,
        "row":13,
        "id":25901,
        "xpos":0,
        "ypos":0,
        "size_x":12,
        "size_y":12
     },
     "associations":null,
     "queryModified":false,
     "updateFilters":false,
     "dataFields":[
    
     ],
     "transientChartFilters":null,
     "typeModified":false,
     "lastSyncDate":1492282355000,
     "viewOnly":false,
     "truncated":false,
     "processedName":"test5",
     "widgetConfig":null,
     "chartProperties":{
        "chart.type":"datagrid"
     },
     "statusIndColumns":[
    
     ],
     "gridBean":null,
     "dataRow":null,
     "text":"",
     "colNames":null,
     "dataRows":null,
     "live":false,
     "filters":null,
     "widgetType":"DATA_GRID",
     "macros":null,
     "strictFilters":null,
     "dbFields":[
    
     ],
     "widgetTypeStr":"datagrid",
     "filterFieldDataTypes":{
        "geometry":"java.util.Map",
        "id":"java.lang.String",
        "id_0":"java.lang.String",
        "properties":"java.util.Map"
     },
     "allFilters":[
    
     ],
     "processedFilters":[
    
     ]
    }
      
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • Error details:
  • Missed widgetName field
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • 403 FORBIDDEN
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Error details:
  • Current user is not allowed to edit specified widget
  • 415 UNSUPPORTED_MEDIA_TYPE Cannot consume content type - The server refused this request because the request entity is in a format not supported by the requested resource for the requested method.
    curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -H "Content-Type: application/json" -X PUT -d "{\"widgetName\":\"updatedWidgetName1\"}"  http://localhost:9090/api/1.0/widgets/123
    

    Clone Widget

    POST /api/1.0/widgets/<objectIdToClone>

    Parameter Comments
    objectIdToClone Widget id of Widget to clone

    POST JSON payload:

    Parameter Comments
    widgetName New (cloned) Name of Widget
    cloneWithData boolean variable, meaning if need to clone with data
    HTTP Status Response
    200 OK Return cloned Widget json info (same as "Get Widget" command). Output example:
    {
     "id":25901,
     "name":"test5",
     "userId":10077,
     "customerId":1033,
     "datasetId":15150,
     "type":2,
     "description":null,
     "urlString":"02SscJ",
     "access":0,
     "refreshChartMillis":-1,
     "createdDate":1492282355000,
     "jsonConfig":null,
     "queryId":-1,
     "queryStr":null,
     "adhocQuery":null,
     "category":"All",
     "drilldown":false,
     "dataset":{
        "createdDate":1492282355000,
        "lastModDate":1492282355000,
        "id":15150,
        "metadataConfig":"{\"fieldNames\":[\"id_0\",\"id\",\"geometry\",\"properties\"],\"dataTypes\":{\"id_0\":\"java.lang.String\",\"id\":\"java.lang.String\",\"geometry\":\"java.util.Map\",\"properties\":\"java.util.Map\"}}",
        "mongoId":null,
        "mongoConnectUri":"localhost:27017/Some_a3PNFK",
        "customerId":1033,
        "datasetName":"test5",
        "identifier":null,
        "userId":0,
        "customer":null,
        "metaData":{
           "fieldNames":[
              "id_0",
              "id",
              "geometry",
              "properties"
           ],
           "dataTypes":{
              "id_0":"java.lang.String",
              "id":"java.lang.String",
              "geometry":"java.util.Map",
              "properties":"java.util.Map"
           }
        }
     },
     "position":{
        "chartId":25901,
        "width":-1,
        "height":-1,
        "originalScreenWidth":-1,
        "originalScreenHeight":-1,
        "col":1,
        "row":13,
        "id":25901,
        "xpos":0,
        "ypos":0,
        "size_x":12,
        "size_y":12
     },
     "associations":null,
     "queryModified":false,
     "updateFilters":false,
     "dataFields":[
    
     ],
     "transientChartFilters":null,
     "typeModified":false,
     "lastSyncDate":1492282355000,
     "viewOnly":false,
     "truncated":false,
     "processedName":"test5",
     "widgetConfig":null,
     "chartProperties":{
        "chart.type":"datagrid"
     },
     "statusIndColumns":[
    
     ],
     "gridBean":null,
     "dataRow":null,
     "text":"",
     "colNames":null,
     "dataRows":null,
     "live":false,
     "filters":null,
     "widgetType":"DATA_GRID",
     "macros":null,
     "strictFilters":null,
     "dbFields":[
    
     ],
     "widgetTypeStr":"datagrid",
     "filterFieldDataTypes":{
        "geometry":"java.util.Map",
        "id":"java.lang.String",
        "id_0":"java.lang.String",
        "properties":"java.util.Map"
     },
     "allFilters":[
    
     ],
     "processedFilters":[
    
     ]
    }
      
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • Error details:
  • Missed widgetName field
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • 403 FORBIDDEN
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Error details:
  • Current user is not allowed to clone specified widget
  • 415 UNSUPPORTED_MEDIA_TYPE Cannot consume content type - The server refused this request because the request entity is in a format not supported by the requested resource for the requested method.
    curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -H "Content-Type: application/json" -X POST -d "{\"widgetName\":\"clonedWidgetName1\",\"cloneWithData\":true}"  http://localhost:9090/api/1.0/widgets/12345
    

    Datasources

    List Datasources

    GET /api/1.0/datasources

    No parameters
    HTTP Status Response
    200 OK Output example:
    {
       "list":[
          {
             "createdDate":1492025827000,
             "lastModDate":1492060895000,
             "strId":"hXlIbZ",
             "op":2,
             "connectorAssignee":null,
             "connectorSyncStatus":1,
             "lastSyncDate":null,
             "connector":null,
             "id":3144,
             "name":"\"someName\"",
             "datasource":"mongo",
             "userId":10077,
             "customerId":1033,
             "connectorId":1,
             "accessLevel":1
          }
       ]
    }
      
    NOTE: from entity output excluded the "jsonConfig" field.
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER"  http://localhost:9090/api/1.0/datasources
    

    Get Datasource

    GET /api/1.0/datasources/<datasourceId>

    Parameter Comments
    datasourceId Datasource ID to view
    HTTP Status Response
    200 OK Output example:
    {
       "createdDate":1492025827000,
       "lastModDate":1492060895000,
       "strId":"hXlIbZ",
       "op":2,
       "connectorAssignee":null,
       "connectorSyncStatus":1,
       "lastSyncDate":null,
       "connector":null,
       "id":3144,
       "name":"\"someName\"",
       "datasource":"mongo",
       "userId":10077,
       "customerId":1033,
       "connectorId":1,
       "accessLevel":1
    }
      
    NOTE: from entity output excluded the "jsonConfig" field.
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • 403 FORBIDDEN
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Error details:
  • Current user is not allowed to see specified datasource
  • curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER"  http://localhost:9090/api/1.0/datasources/123
    

    Create Datasource

    POST /api/1.0/datasources/

    POST JSON payload.

    SubfieldTypeDescription
    nameStringDatasource name
    datasourceStringDatasource type: bigquery, cloud9charts, cloudant, couchbase, datastax, elasticsearch, ga, hana, hive, influxdb, logsene, marklogic, mongo, mysql, omniture, oracle, orientdb, phoenix, postgresql, presto, salesforce, redshift, restapi, snowflake, spark, sqlserver, teradata
    privateConnectorNumberID of private connector (only if "privateDatasource" field is set to true)
    privateDatasourceBooleantrue if this datasource is using private connector; false otherwise
    tunnelAddressStringSSH tunnel connect string in the form of cloud9@<tunnel-host>:@<tunnel-port>
    Standard datasource properties
    dataverseString(couchbase) Dataverse which should only be set for Couchbase Analytics
    dbNameString(cloudant, couchbase, datastax, hana, hive, influxdb, marklogic, mongo, mysql, oracle, orientdb, phoenix, postgresql, presto, redshift, snowflake, spark, sqlserver, teradata) Database, Bucket, or Keyspace name
    dbPropertiesString(datastax, elasticsearch, hana, hive, marklogic, mongo, mysql, oracle, postgresql, presto, redshift, snowflake, spark, sqlserver) Database specific properties in datasource specific format such as headers, query string, etc
    hostString(couchbase, datastax, hana, hive, influxdb, marklogic, mongo, mysql, oracle, orientdb, phoenix, postgresql, presto, redshift, snowflake, spark, sqlserver, teradata) Database host(s)
    passwordString(cloudant, couchbase, datastax, elasticsearch, hana, hive, influxdb, logsene, marklogic, mongo, mysql, oracle, orientdb, phoenix, postgresql, presto, redshift, restapi, snowflake, spark, sqlserver, teradata) User password
    portNumber(datastax, hana, hive, marklogic, mongo, mysql, oracle, phoenix, postgresql, presto, redshift, snowflake, spark, sqlserver, teradata) Database port
    urlString(cloudant, elasticsearch, logsene, restapi) Database URL
    userIdString(cloudant, couchbase, datastax, elasticsearch, hana, hive, influxdb, logsene, marklogic, mongo, mysql, oracle, orientdb, phoenix, postgresql, presto, redshift, restapi, snowflake, spark, sqlserver, teradata) User ID
    schemaString(hana, hive, mysql, oracle, phoenix, postgresql, presto, redshift, snowflake, spark, sqlserver, teradata) Schema name
    warehouseString(snowflake) Snowflake warehouse
    OAuth datasource properties
    authRefreshTokenString(bigquery, ga, salesforce) OAuth refresh token
    authTokenString(bigquery, ga, salesforce) OAuth token
    projectIdString(bigquery) Project ID
    gaProfileIDString(ga) Google analytic profile ID
    sfInstanceURLString(salesforce) Salesforce instance URL
    Other datasource properties
    omSecretString(omniture) Omniture secret
    omUsernameString(omniture) Omniture username
    authHeadersString(restapi) REST auth headers
    authEndPointString(restapi) REST auth endpoint
    authPostPayloadString(restapi) REST auth POST payload
    authUrlParamsString(restapi) REST URL
    Example:
    {
       "name":"Mongo Database Test",
       "host":"some.host.com",
       "port":10642,
       "dbName":"someDbName",
       "userId":"someUserId",
       "password":"somePwd12345",
       "dbProperties":"",
       "privateDatasource":false,
       "privateConnector":479,
       "tunnel":false,
       "tunnelAddress":"",
       "datasource":"mongo"
    }
    
    HTTP Status Response
    200 OK Return created Datasource json info (same as "Get Datasource" command). Output example:
    {
       "createdDate":1492025827000,
       "lastModDate":1492060895000,
       "strId":"hXlIbZ",
       "op":2,
       "connectorAssignee":null,
       "connectorSyncStatus":1,
       "lastSyncDate":null,
       "connector":null,
       "id":3144,
       "name":"\"someName\"",
       "datasource":"mongo",
       "userId":10077,
       "customerId":1033,
       "connectorId":1,
       "accessLevel":1
    }
      
    NOTE: from entity output excluded the "jsonConfig" field.
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • Error details:
  • Error processing properties to create new datasource - more details at server log
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • 415 UNSUPPORTED_MEDIA_TYPE Cannot consume content type - The server refused this request because the request entity is in a format not supported by the requested resource for the requested method.
    curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -H "Content-Type: application/json" -X POST -d "{\"name\":\"Mongo Database Test\", \"host\":\"some.host.com\", \"port\":10642, \"dbName\":\"someDbName\", \"userId\":\"someUserId\", \"password\":\"somePwd12345\", \"dbProperties\":\"\", \"privateDatasource\": false, \"privateConnector\":479, \"tunnel\":false, \"tunnelAddress\":\"\", \"datasource\":\"mongo\"}" http://localhost:9090/api/1.0/datasources
    

    Edit Datasource

    PUT /api/1.0/datasources/<objectId>

    Parameter Comments
    objectId ID of Datasource to edit

    PUT JSON payload.

    SubfieldTypeDescription
    nameStringDatasource name
    datasourceStringDatasource type: bigquery, cloud9charts, cloudant, couchbase, datastax, elasticsearch, ga, hana, hive, influxdb, logsene, marklogic, mongo, mysql, omniture, oracle, orientdb, phoenix, postgresql, presto, salesforce, redshift, restapi, snowflake, spark, sqlserver, teradata
    privateConnectorNumberID of private connector (only if "privateDatasource" field is set to true)
    privateDatasourceBooleantrue if this datasource is using private connector; false otherwise
    tunnelAddressStringSSH tunnel connect string in the form of cloud9@<tunnel-host>:@<tunnel-port>
    Standard datasource properties
    dataverseString(couchbase) Dataverse which should only be set for Couchbase Analytics
    dbNameString(cloudant, couchbase, datastax, hana, hive, influxdb, marklogic, mongo, mysql, oracle, orientdb, phoenix, postgresql, presto, redshift, snowflake, spark, sqlserver, teradata) Database, Bucket, or Keyspace name
    dbPropertiesString(datastax, elasticsearch, hana, hive, marklogic, mongo, mysql, oracle, postgresql, presto, redshift, snowflake, spark, sqlserver) Database specific properties in datasource specific format such as headers, query string, etc
    hostString(couchbase, datastax, hana, hive, influxdb, marklogic, mongo, mysql, oracle, orientdb, phoenix, postgresql, presto, redshift, snowflake, spark, sqlserver, teradata) Database host(s)
    passwordString(cloudant, couchbase, datastax, elasticsearch, hana, hive, influxdb, logsene, marklogic, mongo, mysql, oracle, orientdb, phoenix, postgresql, presto, redshift, restapi, snowflake, spark, sqlserver, teradata) User password
    portNumber(datastax, hana, hive, marklogic, mongo, mysql, oracle, phoenix, postgresql, presto, redshift, snowflake, spark, sqlserver, teradata) Database port
    urlString(cloudant, elasticsearch, logsene, restapi) Database URL
    userIdString(cloudant, couchbase, datastax, elasticsearch, hana, hive, influxdb, logsene, marklogic, mongo, mysql, oracle, orientdb, phoenix, postgresql, presto, redshift, restapi, snowflake, spark, sqlserver, teradata) User ID
    schemaString(hana, hive, mysql, oracle, phoenix, postgresql, presto, redshift, snowflake, spark, sqlserver, teradata) Schema name
    warehouseString(snowflake) Snowflake warehouse
    OAuth datasource properties
    authRefreshTokenString(bigquery, ga, salesforce) OAuth refresh token
    authTokenString(bigquery, ga, salesforce) OAuth token
    projectIdString(bigquery) Project ID
    gaProfileIDString(ga) Google analytic profile ID
    sfInstanceURLString(salesforce) Salesforce instance URL
    Other datasource properties
    omSecretString(omniture) Omniture secret
    omUsernameString(omniture) Omniture username
    authHeadersString(restapi) REST auth headers
    authEndPointString(restapi) REST auth endpoint
    authPostPayloadString(restapi) REST auth POST payload
    authUrlParamsString(restapi) REST URL
    Example:
    {
       "name":"Mongo Database Test",
       "host":"some.host.com",
       "port":10642,
       "dbName":"someDbName",
       "userId":"someUserId",
       "password":"somePwd12345",
       "dbProperties":"",
       "privateDatasource":false,
       "privateConnector":479,
       "tunnel":false,
       "tunnelAddress":"",
       "datasource":"mongo"
    }
    
    HTTP Status Response
    200 OK Return edited Datasource json info (same as "Get Datasource" command). Output example:
    {
       "createdDate":1492025827000,
       "lastModDate":1492060895000,
       "strId":"hXlIbZ",
       "op":2,
       "connectorAssignee":null,
       "connectorSyncStatus":1,
       "lastSyncDate":null,
       "connector":null,
       "id":3144,
       "name":"\"someName\"",
       "datasource":"mongo",
       "userId":10077,
       "customerId":1033,
       "connectorId":1,
       "accessLevel":1
    }
      
    NOTE: from entity output excluded the "jsonConfig" field.
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • Error details:
  • Failed to update datasource - more details at server log
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • 403 FORBIDDEN
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Error details:
  • Current user is not allowed to edit specified datasource
  • 415 UNSUPPORTED_MEDIA_TYPE Cannot consume content type - The server refused this request because the request entity is in a format not supported by the requested resource for the requested method.
    curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -H "Content-Type: application/json" -X PUT -d "{\"name\":\"Mongo Database Test\", \"host\":\"some.host.com\", \"port\":10642, \"dbName\":\"someDbName\", \"userId\":\"someUserId\", \"password\":\"somePwd12345\", \"dbProperties\":\"\", \"privateDatasource\": false, \"privateConnector\":479, \"tunnel\":false, \"tunnelAddress\":\"\", \"datasource\":\"mongo\"}"  http://localhost:9090/api/1.0/datasources/123
    

    Delete Datasource

    DELETE /api/1.0/datasources/<objectId>

    Parameter Comments
    objectId Id of Datasource to delete
    HTTP Status Response
    200 OK No response body
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • 403 FORBIDDEN
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Error details:
  • Current user is not allowed to delete specified datasource
  • curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -X DELETE http://localhost:9090/api/1.0/datasources/123
    

    Share Datasource to Users/Groups

    PUT /api/1.0/datasources/<objectId>/share

    Parameter Comments
    objectId Id of Datasource to share

    PUT JSON payload:

    Parameter Comments
    shareProperties JSON array of objects
    SubfieldTypeDescription
    typeStringShare type: Users or Groups
    access_levelNumber1 = Edit rights
    2 = Read-only
    nameStringName of the user to share to
    idNumberGroup id of the group to share to
    Example:
    [ 
      { 
        "type" : "Users", 
        "access_level" : 1, 
        "name" : "someUser1@host.com" 
      },
      { 
        "type" : "Groups", 
        "access_level" : 1, 
        "id" : 10001 
      } 
    ]
    
    HTTP Status Response
    200 OK No response body
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • Error details:
  • Missed shareProperties field
  • shareProperties missed the type field
  • shareProperties missed the access_level field
  • shareProperties has invalid the type value
  • shareProperties has invalid the access_level value
  • shareProperties missed the id field
  • shareProperties missed the name field
  • shareProperties has invalid the name field
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • 403 FORBIDDEN
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Error details:
  • Current user is not allowed to edit specified datasource
  • 415 UNSUPPORTED_MEDIA_TYPE Cannot consume content type - The server refused this request because the request entity is in a format not supported by the requested resource for the requested method.
    curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -H "Content-Type: application/json" -X PUT -d "{\"shareProperties\":[ { \"type\" : \"Users\", \"access_level\" : 1, \"name\" : \"someUser@host.com\" } ] }"  http://localhost:9090/api/1.0/datasources/110643/share
    

    Clone Datasource

    POST /api/1.0/datasources/<objectIdToClone>

    Parameter Comments
    objectIdToClone Datasource id of Datasource to clone

    POST JSON payload:

    Parameter Comments
    datasourceName New (cloned) Name of Datasource
    HTTP Status Response
    200 OK Return cloned Datasource json info (same as "Get Datasource" command). Output example:
    {
       "createdDate":1492025827000,
       "lastModDate":1492060895000,
       "strId":"hXlIbZ",
       "op":2,
       "connectorAssignee":null,
       "connectorSyncStatus":1,
       "lastSyncDate":null,
       "connector":null,
       "id":3144,
       "name":"\"someName\"",
       "datasource":"mongo",
       "userId":10077,
       "customerId":1033,
       "connectorId":1,
       "accessLevel":1
    }
      
    NOTE: from entity output excluded the "jsonConfig" field.
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • Error details:
  • Error cloning datasource - more details at server log
  • Missed datasourceName field
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • 403 FORBIDDEN
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Error details:
  • Current user is not allowed to clone specified datasource
  • 415 UNSUPPORTED_MEDIA_TYPE Cannot consume content type - The server refused this request because the request entity is in a format not supported by the requested resource for the requested method.
    curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -H "Content-Type: application/json" -d "{\"datasourceName\":\"newName\"}"  http://localhost:9090/api/1.0/datasources/12345
    

    Queries

    List Queries

    GET /api/1.0/queries

    No parameters
    HTTP Status Response
    200 OK Output example:
    {
       "list":[
          {
             "createdDate":1492400077000,
             "lastModDate":1492400077000,
             "jsonConfig":"{\n  \"entityName\" : \"test123\",\n  \"queryStr\" : \"db[someTable].find().limit(10000)\",\n  \"datasourceId\" : 1427,\n  \"discovery\" : {\n    \"tableName\" : \"someTable\",\n    \"limit\" : 10000\n  },\n  \"direct\" : false,\n  \"triggered\" : false,\n  \"overrideVals\" : {\n    \"replaceAll\" : true\n  }\n}",
             "strId":"pvH8wk",
             "op":1,
             "connectorSyncStatus":1,
             "id":2017,
             "entityName":"test123",
             "datasourceId":1427,
             "userId":10077,
             "customerId":1033,
             "queryStr":"db[someTable].find().limit(10000)",
             "identifier":"kVrQip",
             "status":0,
             "triggerDatasetId":0,
             "discovery":{
                "tableName":"someTable",
                "limit":10000
             },
             "accessLevel":1,
             "triggered":false
          }
       ]
    }
      
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER"  http://localhost:9090/api/1.0/queries
    

    Get Query

    GET /api/1.0/queries/<queryId>?loadJoinDataSources=true

    Parameter Comments
    queryId Query ID to view
    loadJoinDataSources Optional query parameter. If set to true, then also joined Queries will be loaded associated with selected query/td>
    HTTP Status Response
    200 OK Output example:
    {
       "createdDate":1492400077000,
       "lastModDate":1492400077000,
       "jsonConfig":"{\n  \"entityName\" : \"test123\",\n  \"queryStr\" : \"db[someTable].find().limit(10000)\",\n  \"datasourceId\" : 1427,\n  \"discovery\" : {\n    \"tableName\" : \"someTable\",\n    \"limit\" : 10000\n  },\n  \"direct\" : false,\n  \"triggered\" : false,\n  \"overrideVals\" : {\n    \"replaceAll\" : true\n  }\n}",
       "strId":"pvH8wk",
       "op":1,
       "connectorSyncStatus":1,
       "id":2017,
       "entityName":"test123",
       "datasourceId":1427,
       "userId":10077,
       "customerId":1033,
       "queryStr":"db[someTable].find().limit(10000)",
       "identifier":"kVrQip",
       "status":0,
       "triggerDatasetId":0,
       "discovery":{
          "tableName":"someTable",
          "limit":10000
       },
       "accessLevel":1,
       "triggered":false
    }
      
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • 403 FORBIDDEN
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Error details:
  • Current user is not allowed to see specified query
  • curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER"  http://localhost:9090/api/1.0/queries/123
    

    Create Query

    POST /api/1.0/queries/

    POST JSON payload:

    Parameter Comments
    properties JSON properties
    SubfieldTypeDescription
    categoriesStringComma seperated list of 1 or more categories
    c9QLFilterStringC9QL query
    datasourceIdNumberDatasource ID
    directBooleanIs direct query
    entityNameStringQuery name
    frequencyNumberSchedule frequency
    frequencyTypeStringSchedule frequency type: minute, hours,
    joinQueriesArrayArray of <JoinQuery> type objects
    <JoinQuery>.c9QLFilterStringC9QL query
    <JoinQuery>.datasourceIdNumberDatasource ID
    <JoinQuery>.joinKeysMapMap of join key fields where for each entry of the map, key represents the left handside fieldname and value represents right handside fieldname.
    <JoinQuery>.joinTypeStringJoin type: BLEND, INNER JOIN, OUTER JOIN, LEFT OUTER JOIN, RIGHT OUTER JOIN, LOOP JOIN
    <JoinQuery>.queryStrStringDatasource specific proprietary query
    overrideValsStringOverride strategy which can be:
    1. <Empty>: append mode
    2. "All": replace all
    3. <Comma seperated list of 1 or more fields>: replace based on combination of fields
    queryStrStringDatasource specific proprietary query
    startTimeStringSchedule start time time which can be in one of the following formats:
        MM-dd-yyyy HH:mm:ssXXX
        MM-dd-yyyy HH:mm:ss
        MM/dd/yyyy HH:mm:ssXXX
        MM/dd/yyyy HH:mm:ss
        MM/dd/yyyy HH:mmXXX
        MM/dd/yyyy HH:mm
        MM/dd/yy HH:mm:ssXXX
        MM/dd/yy HH:mm:ss
        MM/dd/yy HH:mmXXX
        MM/dd/yy HH:mm
        MM/dd/yyyyXXX
        MM/dd/yyyy
        MM/dd/yyXXX
        MM/dd/yy
        HH:mm:ssXXX
        HH:mm:ss
        HH:mmXXX
        HH:mm
        mmXXX
        mm
    triggeredBooleanIs triggered query
    c9ExportDatasetNumber(cloud9charts) Source dataset ID
    Example:
    {
       "entityName":"test123",
       "queryStr":"db['someTable'].find().limit(10000)",
       "c9QLFilter":"",
       "datasourceId":1427,
       "datasource":"mongo",
       "dsName":"LocalMongo",
       "direct":false,
       "triggered":false,
       "overrideVals":"All"
    }
    
    HTTP Status Response
    200 OK Output example:
    {
       "createdDate":1492400077000,
       "lastModDate":1492400077000,
       "jsonConfig":"{\n  \"entityName\" : \"test123\",\n  \"queryStr\" : \"db[someTable].find().limit(10000)\",\n  \"datasourceId\" : 1427,\n  \"discovery\" : {\n    \"tableName\" : \"someTable\",\n    \"limit\" : 10000\n  },\n  \"direct\" : false,\n  \"triggered\" : false,\n  \"overrideVals\" : {\n    \"replaceAll\" : true\n  }\n}",
       "strId":"pvH8wk",
       "op":1,
       "connectorSyncStatus":1,
       "id":2017,
       "entityName":"test123",
       "datasourceId":1427,
       "userId":10077,
       "customerId":1033,
       "queryStr":"db[someTable].find().limit(10000)",
       "identifier":"kVrQip",
       "status":0,
       "triggerDatasetId":0,
       "discovery":{
          "tableName":"someTable",
          "limit":10000
       },
       "accessLevel":1,
       "triggered":false
    }
      
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • Error details:
  • Missed properties field
  • Error processing properties to create new query - more details at server log
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • 415 UNSUPPORTED_MEDIA_TYPE Cannot consume content type - The server refused this request because the request entity is in a format not supported by the requested resource for the requested method.
    curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -H "Content-Type: application/json" -X POST -d "{\"properties\":{\"entityName\":\"test123\", \"queryStr\":\"db['someTable'].find().limit(10000)\", \"c9QLFilter\":\"\", \"datasourceId\":1427, \"datasource\":\"mongo\", \"dsName\":\"LocalMongo\", \"direct\":false, \"triggered\":false, \"overrideVals\":\"All\"} }" http://localhost:9090/api/1.0/queries
    

    Edit Query

    PUT /api/1.0/queries/<queryId>

    Parameter Comments
    queryId ID of query to be edited

    POST JSON payload:

    ParameterComments
    properties JSON properties
    SubfieldTypeDescription
    categoriesStringComma seperated list of 1 or more categories
    c9QLFilterStringC9QL query
    datasourceIdNumberDatasource ID
    directBooleanIs direct query
    entityNameStringQuery name
    frequencyNumberSchedule frequency
    frequencyTypeStringSchedule frequency type: minute, hours,
    joinQueriesArrayArray of <JoinQuery> type objects
    <JoinQuery>.c9QLFilterStringC9QL query
    <JoinQuery>.datasourceIdNumberDatasource ID
    <JoinQuery>.joinKeysMapMap of join key fields where for each entry of the map, key represents the left handside fieldname and value represents right handside fieldname.
    <JoinQuery>.joinTypeStringJoin type: BLEND, INNER JOIN, OUTER JOIN, LEFT OUTER JOIN, RIGHT OUTER JOIN, LOOP JOIN
    <JoinQuery>.queryStrStringDatasource specific proprietary query
    overrideValsStringOverride strategy which can be:
    1. <Empty>: append mode
    2. "All": replace all
    3. <Comma seperated list of 1 or more fields>: replace based on combination of fields
    queryStrStringDatasource specific proprietary query
    startTimeStringSchedule start time time which can be in one of the following formats:
        MM-dd-yyyy HH:mm:ssXXX
        MM-dd-yyyy HH:mm:ss
        MM/dd/yyyy HH:mm:ssXXX
        MM/dd/yyyy HH:mm:ss
        MM/dd/yyyy HH:mmXXX
        MM/dd/yyyy HH:mm
        MM/dd/yy HH:mm:ssXXX
        MM/dd/yy HH:mm:ss
        MM/dd/yy HH:mmXXX
        MM/dd/yy HH:mm
        MM/dd/yyyyXXX
        MM/dd/yyyy
        MM/dd/yyXXX
        MM/dd/yy
        HH:mm:ssXXX
        HH:mm:ss
        HH:mmXXX
        HH:mm
        mmXXX
        mm
    triggeredBooleanIs triggered query
    c9ExportDatasetNumber(cloud9charts) Source dataset ID
    Example:
    {
       "entityName":"test123",
       "queryStr":"db['someTable'].find().limit(10000)",
       "c9QLFilter":"",
       "datasourceId":1427,
       "datasource":"mongo",
       "dsName":"LocalMongo",
       "direct":false,
       "triggered":false,
       "overrideVals":"All"
    }
    
    HTTP StatusResponse
    200 OK Output example:
    {
       "createdDate":1492400077000,
       "lastModDate":1492400077000,
       "jsonConfig":"{\n  \"entityName\" : \"test123\",\n  \"queryStr\" : \"db[someTable].find().limit(10000)\",\n  \"datasourceId\" : 1427,\n  \"discovery\" : {\n    \"tableName\" : \"someTable\",\n    \"limit\" : 10000\n  },\n  \"direct\" : false,\n  \"triggered\" : false,\n  \"overrideVals\" : {\n    \"replaceAll\" : true\n  }\n}",
       "strId":"pvH8wk",
       "op":1,
       "connectorSyncStatus":1,
       "id":2017,
       "entityName":"test123",
       "datasourceId":1427,
       "userId":10077,
       "customerId":1033,
       "queryStr":"db[someTable].find().limit(10000)",
       "identifier":"kVrQip",
       "status":0,
       "triggerDatasetId":0,
       "discovery":{
          "tableName":"someTable",
          "limit":10000
       },
       "accessLevel":1,
       "triggered":false
    }
      
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • Error details:
  • Missed properties field
  • Error processing properties to create new query - more details at server log
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • 415 UNSUPPORTED_MEDIA_TYPE Cannot consume content type - The server refused this request because the request entity is in a format not supported by the requested resource for the requested method.
    curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -H "Content-Type: application/json" -X PUT -d "{\"properties\":{\"entityName\":\"test123\", \"queryStr\":\"db['someTable'].find().limit(10000)\", \"c9QLFilter\":\"\", \"datasourceId\":1427, \"datasource\":\"mongo\", \"dsName\":\"LocalMongo\", \"discovery\":{\"tableName\":\"someTable\", \"metrics\":[], \"dimensions\":[], \"sort\":[], \"limit\":10000, \"filters\":[], \"datasourceId\":1427, \"datasource\":\"mongo\", \"dsName\":\"LocalMongo\"}, \"direct\":false, \"triggered\":false, \"overrideVals\":\"All\"} }"  http://localhost:9090/api/1.0/queries/20050
    

    Delete Query

    DELETE /api/1.0/queries/<queryId>

    Parameter Comments
    queryId ID of query to be deleted
    HTTP Status Response
    200 OK No response body
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • Error details:
  • Error deleting query - more details at server log
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • 403 FORBIDDEN
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Error details:
  • Current user is not allowed to delete specified query
  • 415 UNSUPPORTED_MEDIA_TYPE Cannot consume content type - The server refused this request because the request entity is in a format not supported by the requested resource for the requested method.
    curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -X DELETE http://localhost:9090/api/1.0/queries/20038
    

    Share Query to Users/Groups

    PUT /api/1.0/queries/<queryId>

    Parameter Comments
    queryId Id of Query to edit

    JSON PUT payload:

    Parameter Comments
    shareProperties JSON array of objects
    SubfieldTypeDescription
    typeStringShare type: Users or Groups
    access_levelNumber1 = Edit rights
    2 = Read-only
    nameStringName of the user to share to
    idNumberGroup id of the group to share to
    Example:
    [ 
      { 
        "type" : "Users", 
        "access_level" : 1, 
        "name" : "someUser1@host.com" 
      },
      { 
        "type" : "Groups", 
        "access_level" : 1, 
        "id" : 10001 
      } 
    ]
    
    HTTP Status Response
    200 OK No response body
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • Error details:
  • Missed shareProperties field
  • shareProperties missed the type field
  • shareProperties missed the access_level field
  • shareProperties has invalid the type value
  • shareProperties has invalid the access_level value
  • shareProperties missed the id field
  • shareProperties missed the name field
  • shareProperties has invalid the name field
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • 403 FORBIDDEN
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Error details:
  • Current user is not allowed to edit specified query
  • 415 UNSUPPORTED_MEDIA_TYPE Cannot consume content type - The server refused this request because the request entity is in a format not supported by the requested resource for the requested method.
    curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -H "Content-Type: application/json" -X PUT -d "{\"shareProperties\": [ { \"type\" : \"Users\", \"access_level\" : 1, \"name\" : \"someUser@host.com\" } ] }"  http://localhost:9090/api/1.0/queries/105530
    

    Clone Query

    POST /api/1.0/queries/<objectIdToClone>

    Parameter Comments
    objectIdToClone Query id of Query to clone

    POST JSON payload:

    Parameter Comments
    clonedQueryName New (cloned) Name of Query
    HTTP Status Response
    200 OK Return cloned Query json info (same as "Get Query" command). Output example:
    {
       "createdDate":1492400077000,
       "lastModDate":1492400077000,
       "jsonConfig":"{\n  \"entityName\" : \"test123\",\n  \"queryStr\" : \"db[someTable].find().limit(10000)\",\n  \"datasourceId\" : 1427,\n  \"discovery\" : {\n    \"tableName\" : \"someTable\",\n    \"limit\" : 10000\n  },\n  \"direct\" : false,\n  \"triggered\" : false,\n  \"overrideVals\" : {\n    \"replaceAll\" : true\n  }\n}",
       "strId":"pvH8wk",
       "op":1,
       "connectorSyncStatus":1,
       "id":2017,
       "entityName":"test123",
       "datasourceId":1427,
       "userId":10077,
       "customerId":1033,
       "queryStr":"db[someTable].find().limit(10000)",
       "identifier":"kVrQip",
       "status":0,
       "triggerDatasetId":0,
       "discovery":{
          "tableName":"someTable",
          "limit":10000
       },
       "accessLevel":1,
       "triggered":false
    }
      
    400 BAD_REQUEST
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Missing Authorization header
  • Invalid count of Authorization headers
  • Bearer token missing
  • Error details:
  • Error cloning query - more details at server log
  • Missed clonedQueryName field
  • 401 UNAUTHORIZED
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Common error details:
  • Bearer token is not found or expired
  • Authorization issue or user does not exist
  • 403 FORBIDDEN
    { "message": <Error details>, "documentation_url": <Documentation link> }

    Error details:
  • Current user is not allowed to clone specified query
  • 415 UNSUPPORTED_MEDIA_TYPE Cannot consume content type - The server refused this request because the request entity is in a format not supported by the requested resource for the requested method.
    curl -i -H "Authorization: Bearer HERE_IS_YOUR_BEARER" -H "Content-Type: application/json" -X POST -d "{\"clonedQueryName\":\"newName123\"}"  http://localhost:9090/api/1.0/queries/12345