Rulerr Developers API


API Details

Base URI: https://api.rulerr.com/developers/v1
Version: v1
Media Type: application/json
Accepted Protocols:

  • HTTPS

/organizations/list

get

URL
https://api.rulerr.com/developers/v1/organizations/list

get

Description
Retrieve a list of Organizations currently using your product. This endpoint also returns the Organization's details required for authentication with your product's API.

Request

Body

No body data required.
Response

HTTP Status Code 200
A list of Organizations using this product including the organization's authentication data.

Body
Type: application/json

{
    "status": 200,
    "data": [{
        "id": "b8ec2cf9-f4fa-4d11-b89c-2bf51a22cc75",
        "organizationName": "mycompany",
        "customer": true,
        "developer": false,
        "deletedTimestamp": null,
        "createdTimestamp": "2016-11-23T23:57:46.992Z",
        "updatedTimestamp": "2016-11-23T23:57:46.992Z",
        "productKey": "b04f9f4b-c944-4135-b492-6cdd3a4e8981",
        "productSecret": "BHDOK87+UHG-jh9kIu0J7HDdozDhxv7GjBB8ev7enys="
    }],
    "message": "OK"
}


/{organization_id}/events

post

URL
https://api.rulerr.com/developers/v1/{organization_id}/events

post

Description
Add an event. Event "type" must be one of the following: unknown login-success login-failure password-change password-reset profile-change authentication-change access-change admin-event file-create file-read file-write file-delete data-create data-read data-write * data-delete

Request

Body
Type: application/json

{
  "status": 200,
  "data": {
      "id": "0546927c-e674-a6cb-c02c-332d14a2cda7",
      "serviceId": "0546927c-e674-a6cb-c02c-332d14a2cda7",
      "accountId": "0546927c-e674-a6cb-c02c-332d14a2cda7",
      "contactId": "0546927c-e674-a6cb-c02c-332d14a2cda7",
      "objectIds": [
        "0546927c-e674-a6cb-c02c-332d14a2cda7"
      ],
      "ipAddress": "10.10.10.10",
      "code": "33j387jjg454",
      "type": "login-success",
      "name": "Login success",
      "description": null,
      "newData": {
        "eventType": "login_success",
        "memberId": "dbmid:efgh5678",
        "infoDict": null,
        "ipAddress": "192.0.2.0",
        "userId": 87654321,
        "name": "John",
        "country": "US",
        "eventTypeDescription": "Signed in",
        "eventCategory": "logins",
        "time": "2014-10-03T01:16:32+00:00",
        "email": "john@example.com"
      },
      "oldData": null,
      "eventTimestamp": "2015-09-14T05:49:56.487Z",
      "deletedTimestamp": null,
      "updatedTimestamp": "2015-09-14T05:49:56.487Z",
      "createdTimestamp": "2015-09-14T05:49:56.487Z"
  },
  "message": "OK"
}
Response

HTTP Status Code 200
Returns the access object which was just created.


/{organization_id}/events/list

get

URL
https://api.rulerr.com/developers/v1/{organization_id}/events/list

get

Description
List events

Request

Body

No body data required.
Response

HTTP Status Code 200
Returns all events


/{organization_id}/events/import

post

URL
https://api.rulerr.com/developers/v1/{organization_id}/events/import

post

Description
Import a list of events

Request

Body
Type: application/json

{
  "status": 200,
  "data": [
    {
      "id": "0546927c-e674-a6cb-c02c-332d14a2cda7",
      "accountId": "0546927c-e674-a6cb-c02c-332d14a2cda7",
      "contactId": "0546927c-e674-a6cb-c02c-332d14a2cda7",
      "objectIds": [
        "0546927c-e674-a6cb-c02c-332d14a2cda7"
      ],
      "ipAddress": "10.10.10.10",
      "code": "33j387jjg454",
      "type": "login-success",
      "name": "Login success",
      "description": null,
      "newData": {
        "eventType": "login_success",
        "memberId": "dbmid:efgh5678",
        "infoDict": null,
        "ipAddress": "192.0.2.0",
        "userId": 87654321,
        "name": "John",
        "country": "US",
        "eventTypeDescription": "Signed in",
        "eventCategory": "logins",
        "time": "2014-10-03T01:16:32+00:00",
        "email": "john@example.com"
      },
      "oldData": null,
      "eventTimestamp": "2015-09-14T05:49:56.487Z",
      "deletedTimestamp": null,
      "updatedTimestamp": "2015-09-14T05:49:56.487Z",
      "createdTimestamp": "2015-09-14T05:49:56.487Z"
    }
  ],
  "message": "OK"
}
Response

HTTP Status Code 200
Import a list of events


/{organization_id}/events/{event_id}

get delete put

URL
https://api.rulerr.com/developers/v1/{organization_id}/events/{event_id}

  • {event_id}
    • Type: string
    • Required: Yes

get

Description
Returns the event with the given id.

Request

Body

No body data required.
Response

HTTP Status Code 200
Returns the event with the given id.

delete

Description
Deletes an event

Request

Body

No body data required.
Response

HTTP Status Code 200
Deletes an event

put

Description
Updates data for the given event item. Event "type" must be one of the following: unknown login-success login-failure password-change password-reset profile-change authentication-change access-change admin-event file-create file-read file-write file-delete data-create data-read data-write * data-delete

Request

Body
Type: application/json

{
  "status": 200,
  "data": {
      "id": "0546927c-e674-a6cb-c02c-332d14a2cda7",
      "serviceId": "0546927c-e674-a6cb-c02c-332d14a2cda7",
      "accountId": "0546927c-e674-a6cb-c02c-332d14a2cda7",
      "contactId": "0546927c-e674-a6cb-c02c-332d14a2cda7",
      "objectIds": [
        "0546927c-e674-a6cb-c02c-332d14a2cda7"
      ],
      "ipAddress": "10.10.10.10",
      "code": "33j387jjg454",
      "type": "login-success",
      "name": "Login success",
      "description": null,
      "newData": {
        "eventType": "login_success",
        "memberId": "dbmid:efgh5678",
        "infoDict": null,
        "ipAddress": "192.0.2.0",
        "userId": 87654321,
        "name": "John",
        "country": "US",
        "eventTypeDescription": "Signed in",
        "eventCategory": "logins",
        "time": "2014-10-03T01:16:32+00:00",
        "email": "john@example.com"
      },
      "oldData": null,
      "eventTimestamp": "2015-09-14T05:49:56.487Z",
      "deletedTimestamp": null,
      "updatedTimestamp": "2015-09-14T05:49:56.487Z",
      "createdTimestamp": "2015-09-14T05:49:56.487Z"
  },
  "message": "OK"
}
Response

HTTP Status Code 200
Returns the updated data.


Permissions

Description
These endpoints allow you to manage permissions and accounts for your product within Rulerr. Your integration must have access to manage permissions to use these endpoints.


/{organization_id}/permissions/access

post

URL
https://api.rulerr.com/developers/v1/{organization_id}/permissions/access

post

Description
Allow an account to access your product.

Request

Body
Type: application/json

{
  "accountId": "972db8fc-aaf8-4102-ae12-e419348484e2",
  "allowed": true,
  "groupId": null,
  "roles": null,
  "accessibles": null
}
Response

HTTP Status Code 200
Returns the access object which was just created.

Body
Type: application/json

{
  "status": 200,
  "data": {
      "id": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "groupId": null,
      "personId": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "productId": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "allowed": true,
      "roles": [
        {
          "id": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
          "productId": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
          "code": "manager",
          "name": "Manager",
          "description": "Manager of the service",
          "deletedTimestamp": null,
          "createdTimestamp": "2016-08-31T06:46:18.145Z",
          "updatedTimestamp": "2016-08-31T06:46:18.145Z"
        }
      ],
      "deletedTimestamp": null,
      "createdTimestamp": "2016-08-31T06:46:18.145Z",
      "updatedTimestamp": "2016-08-31T06:46:18.145Z"
  },
  "message": "OK"
}


/{organization_id}/permissions/access/list

get

URL
https://api.rulerr.com/developers/v1/{organization_id}/permissions/access/list

get

Description
Lists accesses matching given data. Results can be filtered with a URL query string.

Available filters: allowed full group accountId limit - limit the amount of records returned offset - the first record to return in the set

Eg. GET https://api.rulerr.com/developers/v1/{organization_id}/permissions/access/list?accountId={account_id}

Request

Body

No body data required.
Response

HTTP Status Code 200
Returns all data matching the given filters.

Body
Type: application/json

{
  "status": 200,
  "data": [
    {
      "id": "a8f17384-9bf6-4d90-a906-b7c598699ca3",
      "groupId": null,
      "personId": null,
      "accountId": "bd6b75e6-5618-49b1-8fd5-fd6657a93a67",
      "productId": "3073518c-539e-4c50-bdd0-295af5cab557",
      "allowed": true,
      "roles": [],
      "deletedTimestamp": null,
      "createdTimestamp": "2016-11-24T09:10:20.555Z",
      "updatedTimestamp": "2016-11-24T09:10:20.555Z",
      "account": {
        "id": "bd6b75e6-5618-49b1-8fd5-fd6657a93a67",
        "productId": "3073518c-539e-4c50-bdd0-295af5cab557",
        "personId": null,
        "code": "b9ab55fb-b44b-4aa2-a9a9-cca7109bace4",
        "fullName": "John Smith",
        "emailAddress": "",
        "phone": "",
        "department": "",
        "jobTitle": "",
        "deletedTimestamp": null,
        "createdTimestamp": "2016-11-24T09:10:20.059Z",
        "updatedTimestamp": "2016-11-24T09:10:20.059Z"
      }
    }
  ],
  "message": "OK"
}


/{organization_id}/permissions/access/{access_id}

get delete put

URL
https://api.rulerr.com/developers/v1/{organization_id}/permissions/access/{access_id}

  • {access_id}
    • Type: string
    • Required: Yes

get

Description
Returns the access item with the given id.

Request

Body

No body data required.
Response

HTTP Status Code 200
Returns all data for the requested access item.

Body
Type: application/json

{
  "status": 200,
  "data": {
      "id": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "groupId": null,
      "personId": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "productId": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "allowed": true,
      "roles": [
        {
          "id": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
          "productId": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
          "code": "manager",
          "name": "Manager",
          "description": "Manager of the service",
          "deletedTimestamp": null,
          "createdTimestamp": "2016-08-31T06:46:18.145Z",
          "updatedTimestamp": "2016-08-31T06:46:18.145Z"
        }
      ],
      "deletedTimestamp": null,
      "createdTimestamp": "2016-08-31T06:46:18.145Z",
      "updatedTimestamp": "2016-08-31T06:46:18.145Z"
  },
  "message": "OK"
}

delete

Description
Revokes the access item with given id.

Request

Body

No body data required.
Response

HTTP Status Code 200
Returns the data about the revoked access item.

Body
Type: application/json

{
  "status": 200,
  "data": {
      "id": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "groupId": null,
      "personId": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "productId": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "allowed": true,
      "roles": [
        {
          "id": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
          "productId": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
          "code": "manager",
          "name": "Manager",
          "description": "Manager of the service",
          "deletedTimestamp": null,
          "createdTimestamp": "2016-08-31T06:46:18.145Z",
          "updatedTimestamp": "2016-08-31T06:46:18.145Z"
        }
      ],
      "deletedTimestamp": null,
      "createdTimestamp": "2016-08-31T06:46:18.145Z",
      "updatedTimestamp": "2016-08-31T06:46:18.145Z"
  },
  "message": "OK"
}

put

Description
Updates data for the given access item.

Request

Body
Type: application/json

{
  "accountId": "261a3c78-bae3-4221-8068-5a235a53b821",
  "roles": ["e0fc47e5-4b53-467e-896d-1e2d1571bcf4"],
  "allowed": false,
  "groupId": null
}
Response

HTTP Status Code 200
Returns the updated data.

Body
Type: application/json

{
  "status": 200,
  "data": {
      "id": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "groupId": null,
      "personId": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "productId": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "allowed": true,
      "roles": [
        {
          "id": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
          "productId": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
          "code": "manager",
          "name": "Manager",
          "description": "Manager of the service",
          "deletedTimestamp": null,
          "createdTimestamp": "2016-08-31T06:46:18.145Z",
          "updatedTimestamp": "2016-08-31T06:46:18.145Z"
        }
      ],
      "deletedTimestamp": null,
      "createdTimestamp": "2016-08-31T06:46:18.145Z",
      "updatedTimestamp": "2016-08-31T06:46:18.145Z"
  },
  "message": "OK"
}


/{organization_id}/permissions/privileges

post

URL
https://api.rulerr.com/developers/v1/{organization_id}/permissions/privileges

post

Description
Add a privilege for your product. When adding a privilege, 'code' is used to associate this privilege with an identifier in your product. A privilege should be associated with an access item.

Request

Body
Type: application/json

{
  "accessId": "8cc6e0ad-6a8c-4da3-a2b5-6d04c110a569",
  "roleId": "5d36f0da-1b5d-7d3e-b5c7-9a6efb17ab2a",
  "code": "myProductPermissionIdentifier",
  "name": "My Product File",
  "description": "A file within my product",
  "details": {
    "read": true,
    "write": false
  }
}
Response

HTTP Status Code 200
Returns the privilege which was just created.

Body
Type: application/json

{
  "status": 200,
  "data": {
      "id": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "accessId": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "roleId": null,
      "code": "DOC123",
      "name": "Documents Share 123",
      "description": "Documents Share for general use",
      "details": {
        "read": true,
        "write": false
      },
      "deletedTimestamp": null,
      "createdTimestamp": "2016-08-31T06:46:18.145Z",
      "updatedTimestamp": "2016-08-31T06:46:18.145Z"
  },
  "message": "OK"
}


/{organization_id}/permissions/privileges/import

post

URL
https://api.rulerr.com/developers/v1/{organization_id}/permissions/privileges/import

post

Description
Import a set of privileges. This endpoint will update any privileges in your set which correlate to existing privileges, and add any privileges that exist in your set but not within Rulerr.

Request

Body
Type: application/json

[
  {
    "id": "ca4d4f46-9797-4380-8cb9-998683b416a9",
    "accessId": "eeaf8c73-2720-49eb-9391-0f94a225fc85",
    "roleId": null,
    "code": "0BwYGAT0z-ANOc3RhcnRlcl9maWxlX2Rhc2hlclYw",
    "name": "Getting started",
    "description": "PDF File",
    "details": {
        "read": true,
        "write": false
    }
  },
  {
    "id": "d086fbde-45b9-4095-bba9-3f7f47e67135",
    "accessId": "645905be-d820-4187-a3f3-238d38cc8ad4",
    "roleId": null,
    "code": "0B81LAI1bp0LMOWQ3V1U5MXVhUDQ",
    "name": "documents",
    "description": "Folder",
    "details": {
      "read": true,
      "write": true
    }
  }
]
Response

HTTP Status Code 200
Privileges have been imported

Body
Type: application/json

{
  "status": 200,
  "data": [
    {
      "id": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "permissionId": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "roleId": null,
      "code": "DOC123",
      "name": "Documents Share 123",
      "description": "Documents Share for general use",
      "details": {
        "read": true,
        "write": false
      },
      "deletedTimestamp": null,
      "createdTimestamp": "2016-08-31T06:46:18.145Z",
      "updatedTimestamp": "2016-08-31T06:46:18.145Z"
    }
  ],
  "message": "OK"
}

/{organization_id}/permissions/privileges/list

get

URL
https://api.rulerr.com/developers/v1/{organization_id}/permissions/privileges/list

get

Description
Lists privileges matching given data. This endpoint can filter data before it is returned.

Available filters: code accessId limit - limit the amount of records returned offset - the first record to return in the set

Eg. GET https://api.rulerr.com/developers/v1/{organization_id}/permissions/privileges/list?code={code}

Request

Body

No body data required.
Response

HTTP Status Code 200
Returns all data matching the given data.

Body
Type: application/json

{
  "status": 200,
  "data": [
    {
      "id": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "accessId": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "roleId": null,
      "code": "DOC123",
      "name": "Documents Share 123",
      "description": "Documents Share for general use",
      "details": {
        "read": true,
        "write": false
      },
      "deletedTimestamp": null,
      "createdTimestamp": "2016-08-31T06:46:18.145Z",
      "updatedTimestamp": "2016-08-31T06:46:18.145Z"
    }
  ],
  "message": "OK"
}


/{organization_id}/permissions/privileges/{privilege_id}

get delete put

URL
https://api.rulerr.com/developers/v1/{organization_id}/permissions/privileges/{privilege_id}

  • {privilege_id}
    • Type: string
    • Required: Yes

get

Description
Returns data about the privilege item with given id.

Request

Body

No body data required.
Response

HTTP Status Code 200
Returns the data about the requested privilege item.

Body
Type: application/json

{
  "status": 200,
  "data": {
      "id": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "accessId": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "roleId": null,
      "code": "DOC123",
      "name": "Documents Share 123",
      "description": "Documents Share for general use",
      "details": {
        "read": true,
        "write": false
      },
      "deletedTimestamp": null,
      "createdTimestamp": "2016-08-31T06:46:18.145Z",
      "updatedTimestamp": "2016-08-31T06:46:18.145Z"
  },
  "message": "OK"
}

delete

Description
Removes the privilege item with given id.

Request

Body

No body data required.
Response

HTTP Status Code 200
Returns the data about the removed privilege item.

Body
Type: application/json

{
  "status": 200,
  "data": {
      "id": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "accessId": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "roleId": null,
      "code": "DOC123",
      "name": "Documents Share 123",
      "description": "Documents Share for general use",
      "details": {
        "read": true,
        "write": false
      },
      "deletedTimestamp": null,
      "createdTimestamp": "2016-08-31T06:46:18.145Z",
      "updatedTimestamp": "2016-08-31T06:46:18.145Z"
  },
  "message": "OK"
}

put

Description
Updates data for the given privilege item. Note that "roleId" for the privilege cannot be updated.

Request

Body
Type: application/json

{
  "code": "myProductPermissionIdentifier",
  "name": "My Product File",
  "description": "A file within my product",
  "details": {
    "read": true,
    "write": false
  }
}
Response

HTTP Status Code 200
Returns the updated data

Body
Type: application/json

{
  "status": 200,
  "data": {
      "id": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "accessId": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "roleId": null,
      "code": "DOC123",
      "name": "Documents Share 123",
      "description": "Documents Share for general use",
      "details": {
        "read": true,
        "write": false
      },
      "deletedTimestamp": null,
      "createdTimestamp": "2016-08-31T06:46:18.145Z",
      "updatedTimestamp": "2016-08-31T06:46:18.145Z"
  },
  "message": "OK"
}


/{organization_id}/permissions/accounts

post

URL
https://api.rulerr.com/developers/v1/{organization_id}/permissions/accounts

post

Description
Add an account for your product. An account is directly associated with an account in your product. Users of Rulerr can map between their People and their Accounts.

Note that 'code' should correspond to a relevant identifier within your product.

Request

Body
Type: application/json

{
  "code": "myProductUserIdentifier",
  "fullName": "John Doe",
  "emailAddress": "johndoe@company.com",
  "phone": "+1 555 456 789",
  "department": "Human Resources",
  "jobTitle": "Human Resources Manager"
}
Response

HTTP Status Code 200
Returns the account which was just created.

Body
Type: application/json

{
  "status": 200,
  "data": {
    "id": "623a0bc3-7908-41cc-b8a6-e41c87aade7d",
    "productId": "27b3012d-2d84-4168-83ea-adb9061a15b7",
    "code": "myProductUserIdentifier",
    "fullName": "John Doe",
    "emailAddress": "johndoe@company.com",
    "phone": "+1 555 456 789",
    "department": "Human Resources",
    "jobTitle": "Human Resources Manager",
    "updatedTimestamp": "2016-11-09T03:50:28.017Z",
    "createdTimestamp": "2016-11-09T03:50:28.017Z",
    "personId": null,
    "deletedTimestamp": null
  },
  "message": "OK"
}


/{organization_id}/permissions/accounts/list

get

URL
https://api.rulerr.com/developers/v1/{organization_id}/permissions/accounts/list

get

Description
Lists accounts matching given data. This endpoint can filter data before it is returned to you. Results can be filtered with a URL query string.

Available Filters: personId code email phone name limit - limit the amount of records returned * offset - the first record to return in the set

Eg. GET https://api.rulerr.com/developers/v1/{organization_id}/permissions/accounts/list?personId={person_id}

Request

Body

No body data required.
Response

HTTP Status Code 200
Returns all data matching the given data.

Body
Type: application/json

{
  "status": 200,
  "data": [
    {
      "id": "972db8fc-aaf8-4102-ae12-e419348484e2",
      "productId": "27b3012d-2d84-4168-83ea-adb9061a15b7",
      "personId": null,
      "code": "myProductUserIdentifier",
      "fullName": "John Doe",
      "emailAddress": "johndoe@company.com",
      "phone": "+1 555 456 789",
      "department": "Human Resources",
      "jobTitle": "Human Resources Manager",
      "deletedTimestamp": null,
      "createdTimestamp": "2016-11-09T02:27:23.384Z",
      "updatedTimestamp": "2016-11-09T02:27:23.384Z"
    }
  ],
  "message": "OK"
}


/{organization_id}/permissions/accounts/{account_id}

get delete put

URL
https://api.rulerr.com/developers/v1/{organization_id}/permissions/accounts/{account_id}

  • {account_id}
    • Type: string
    • Required: Yes

get

Description
Returns data about the account with given id.

Request

Body

No body data required.
Response

HTTP Status Code 200
Returns the data about the requested account.

Body
Type: application/json

{
  "status": 200,
  "data": {
    "id": "623a0bc3-7908-41cc-b8a6-e41c87aade7d",
    "productId": "27b3012d-2d84-4168-83ea-adb9061a15b7",
    "personId": null,
    "code": "myProductUserIdentifier1",
    "fullName": "John Doe",
    "emailAddress": "johndoe@company.com",
    "phone": "+1 555 456 789",
    "department": "Human Resources",
    "jobTitle": "Human Resources Manager",
    "deletedTimestamp": null,
    "createdTimestamp": "2016-11-09T03:50:28.017Z",
    "updatedTimestamp": "2016-11-09T03:50:28.017Z"
  },
  "message": "OK"
}

delete

Description
Disables the account with given id.

Request

Body

No body data required.
Response

HTTP Status Code 200
Returns the data about the disabled account.

Body
Type: application/json

{
  "status": 200,
  "data": {
    "id": "623a0bc3-7908-41cc-b8a6-e41c87aade7d",
    "productId": "27b3012d-2d84-4168-83ea-adb9061a15b7",
    "personId": null,
    "code": "myProductUserIdentifier1",
    "fullName": "John Doe",
    "emailAddress": "johndoe@company.com",
    "phone": "+1 555 456 789",
    "department": "Human Resources",
    "jobTitle": "Human Resources Manager",
    "deletedTimestamp": null,
    "createdTimestamp": "2016-11-09T03:50:28.017Z",
    "updatedTimestamp": "2016-11-09T03:51:20.984Z"
  },
  "message": "OK"
}

put

Description
Updates data for the given account.

Request

Body
Type: application/json

{
  "code": "modifiedUserIdentifier",
  "fullName": "John William Doe",
  "emailAddress": "johndoe@company.com",
  "phone": "+1 555 123 456",
  "department": "HR",
  "jobTitle": "HR Manager"
}
Response

HTTP Status Code 200
Returns the updated data.

Body
Type: application/json

{
  "status": 200,
  "data": {
    "id": "623a0bc3-7908-41cc-b8a6-e41c87aade7d",
    "productId": "27b3012d-2d84-4168-83ea-adb9061a15b7",
    "personId": null,
    "code": "myProductUserIdentifier",
    "fullName": "John Doe",
    "emailAddress": "johndoe@company.com",
    "phone": "+1 555 456 789",
    "department": "Human Resources",
    "jobTitle": "Human Resources Manager",
    "deletedTimestamp": null,
    "createdTimestamp": "2016-11-09T03:50:28.017Z",
    "updatedTimestamp": "2016-11-09T03:51:20.984Z"
  },
  "message": "OK"
}


/{organization_id}/permissions/roles

post

URL
https://api.rulerr.com/developers/v1/{organization_id}/permissions/roles

post

Description
Create new role for your product.

Request

Body
Type: application/json

{
  "code": "myRoleCode123",
  "name": "Name of Role",
  "description": "Description of Role"
}
Response

HTTP Status Code 200
Role created

Body
Type: application/json

{
  "status": 200,
  "data": {
      "id": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "productId": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "code": "manager",
      "name": "Manager",
      "description": "Manager of the service",
      "deletedTimestamp": null,
      "createdTimestamp": "2016-08-31T06:46:18.145Z",
      "updatedTimestamp": "2016-08-31T06:46:18.145Z"
  },
  "message": "OK"
}


/{organization_id}/permissions/roles/list

get

URL
https://api.rulerr.com/developers/v1/{organization_id}/permissions/roles/list

get

Description
Get a list of roles for this product. Results can be filtered with a URL query string.

Available filters: * code

Eg. GET https://api.rulerr.com/developers/v1/{organization_id}/permissions/roles/list?code={code}

Request

Body

No body data required.
Response

HTTP Status Code 200
A list of roles matching the given filters.

Body
Type: application/json

{
  "status": 200,
  "data": [
    {
      "id": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "productId": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "code": "manager",
      "name": "Manager",
      "description": "Manager of the service",
      "deletedTimestamp": null,
      "createdTimestamp": "2016-08-31T06:46:18.145Z",
      "updatedTimestamp": "2016-08-31T06:46:18.145Z"
    }
  ],
  "message": "OK"
}


/{organization_id}/permissions/roles/{role_id}

get put delete

URL
https://api.rulerr.com/developers/v1/{organization_id}/permissions/roles/{role_id}

  • {role_id}
    • Type: string
    • Required: Yes

get

Description
Returns a role with a given role ID.

Request

Body

No body data required.
Response

HTTP Status Code 200
The role matching the role ID.

Body
Type: application/json

{
  "status": 200,
  "data": {
      "id": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "productId": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "code": "manager",
      "name": "Manager",
      "description": "Manager of the service",
      "deletedTimestamp": null,
      "createdTimestamp": "2016-08-31T06:46:18.145Z",
      "updatedTimestamp": "2016-08-31T06:46:18.145Z"
  },
  "message": "OK"
}

put

Description
Updates role data.

Request

Body
Type: application/json

{
  "code": "myRoleCode123",
  "name": "Name of Role",
  "description": "Description of Role"
}
Response

HTTP Status Code 200
Returns the updated role.

Body
Type: application/json

{
  "status": 200,
  "data": {
      "id": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "productId": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "code": "manager",
      "name": "Manager",
      "description": "Manager of the service",
      "deletedTimestamp": null,
      "createdTimestamp": "2016-08-31T06:46:18.145Z",
      "updatedTimestamp": "2016-08-31T06:46:18.145Z"
  },
  "message": "OK"
}

delete

Description
Remove role from product.

Request

Body

No body data required.
Response

HTTP Status Code 200
Returns the data on the removed role.

Body
Type: application/json

{
  "status": 200,
  "data": {
      "id": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "productId": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "code": "manager",
      "name": "Manager",
      "description": "Manager of the service",
      "deletedTimestamp": null,
      "createdTimestamp": "2016-08-31T06:46:18.145Z",
      "updatedTimestamp": "2016-08-31T06:46:18.145Z"
  },
  "message": "OK"
}


People

post

Description
These endpoints allow you to manage people within Rulerr. Your integration must have access to manage people in order to use these endpoints.

URL
https://api.rulerr.com/developers/v1/{organization_id}/people

post

Description
Creates a new person within the Organization.

Request

Body
Type: application/json

{
    "organizationId": "94b2d08f-7cb5-43bb-8387-084e8285de1c",
    "fullName": "John Doe",
    "emailAddress": "john@company.com",
    "phone": "+1 555 456 789",
    "department": "IT",
    "jobTitle": "Developer"
}
Response

HTTP Status Code 200
Returns the person which was just created.

Body
Type: application/json

{
  "status": 200,
  "data": {
      "id": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "fullName": "Test User",
      "emailAddress": "test@test.com",
      "phone": "112121212",
      "deletedTimestamp": null,
      "disabled": false,
      "startTimestamp": "2016-12-01T03:28:08.714Z",
      "endTimestamp": "2017-12-01T03:28:08.714Z",
      "createdTimestamp": "2016-08-31T06:46:18.145Z",
      "updatedTimestamp": "2016-08-31T06:46:18.145Z"
  },
  "message": "OK"
}


/{organization_id}/people/list

get

URL
https://api.rulerr.com/developers/v1/{organization_id}/people/list

get

Description
Lists people matching given data. Results can be filtered with a URL query string.

Available Filters: email name phone limit - limit the amount of records returned * offset - the first record to return in the set

Eg. GET https://api.rulerr.com/developers/v1/{organization_id}/people/list?email={email}

Request

Body

No body data required.
Response

HTTP Status Code 200
Returns all data matching the given filters.

Body
Type: application/json

{
  "status": 200,
  "data": [
    {
      "id": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "fullName": "Test User",
      "emailAddress": "test@test.com",
      "phone": "112121212",
      "deletedTimestamp": null,
      "createdTimestamp": "2016-08-31T06:46:18.145Z",
      "updatedTimestamp": "2016-08-31T06:46:18.145Z"
    }
  ],
  "message": "OK"
}

/{organization_id}/people/{person_id}

get put

URL
https://api.rulerr.com/developers/v1/{organization_id}/people/{person_id}

  • {person_id}
    • Type: string
    • Required: Yes

get

Description
Returns data about the person with the given ID.

Request

Body

No body data required.
Response

HTTP Status Code 200
Returns data about the person with the given ID.

Body
Type: application/json

{
  "status": 200,
  "data": {
      "id": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "fullName": "Test User",
      "emailAddress": "test@test.com",
      "phone": "112121212",
      "deletedTimestamp": null,
      "disabled": false,
      "startTimestamp": "2016-12-01T03:28:08.714Z",
      "endTimestamp": "2017-12-01T03:28:08.714Z",
      "createdTimestamp": "2016-08-31T06:46:18.145Z",
      "updatedTimestamp": "2016-08-31T06:46:18.145Z"
  },
  "message": "OK"
}

put

Description
Updates data about person with a given ID.

Request

Body
Type: application/json

{
    "organizationId": "94b2d08f-7cb5-43bb-8387-084e8285de1c",
    "fullName": "John Doe",
    "emailAddress": "john@company.com",
    "phone": "+1 555 456 789",
    "department": "IT",
    "jobTitle": "Developer"
}
Response

HTTP Status Code 200
Returns the updated data about the person with the given ID.

Body
Type: application/json

{
  "status": 200,
  "data": {
      "id": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "fullName": "Test User",
      "emailAddress": "test@test.com",
      "phone": "112121212",
      "deletedTimestamp": null,
      "disabled": false,
      "startTimestamp": "2016-12-01T03:28:08.714Z",
      "endTimestamp": "2017-12-01T03:28:08.714Z",
      "createdTimestamp": "2016-08-31T06:46:18.145Z",
      "updatedTimestamp": "2016-08-31T06:46:18.145Z"
  },
  "message": "OK"
}


/{organization_id}/people/{person_id}/date

post

URL
https://api.rulerr.com/developers/v1/{organization_id}/people/{person_id}/date

post

Description
Disable a person, and set their start/end dates.

Request

Body
Type: application/json

{
  "status": 200,
  "data": {
      "id": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "fullName": "Test User",
      "emailAddress": "test@test.com",
      "phone": "112121212",
      "department": "IT",
      "jobTitle": "Software developer",
      "role": "none",
      "groups": [
        {
          "id": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
          "name": "Group name",
          "description": "Group description",
          "deletedTimestamp": null,
          "createdTimestamp": "2016-08-31T06:46:18.145Z",
          "updatedTimestamp": "2016-08-31T06:46:18.145Z"
        }
      ],
      "deletedTimestamp": null,
      "createdTimestamp": "2016-08-31T06:46:18.145Z",
      "updatedTimestamp": "2016-08-31T06:46:18.145Z"
  },
  "message": "OK"
}
Response

HTTP Status Code 200
Returns the updated data about the person with the given ID.

Body
Type: application/json

{
  "status": 200,
  "data": {
      "id": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "fullName": "Test User",
      "emailAddress": "test@test.com",
      "phone": "112121212",
      "deletedTimestamp": null,
      "disabled": false,
      "startTimestamp": "2016-12-01T03:28:08.714Z",
      "endTimestamp": "2017-12-01T03:28:08.714Z",
      "createdTimestamp": "2016-08-31T06:46:18.145Z",
      "updatedTimestamp": "2016-08-31T06:46:18.145Z"
  },
  "message": "OK"
}


Risks

get

Description
These endpoints allow you to view organization risks. Your integration must have access to manage analytics in order to use these endpoints.

URL
https://api.rulerr.com/developers/v1/{organization_id}/risks

get

Description
Returns information about the risks on organization level. Lists risks matching given data. Results can be filtered with a URL query string.

Available Filters: * from * to * zone

Eg. GET https://api.rulerr.com/developers/v1/{organization_id}/risks/people?from=2017-04-20&to=2017-05-09&zone=-600

Request

Body

No body data required.
Response

HTTP Status Code 200
Returns all data matching the given filters.

Body
Type: application/json

{
  "status": 200,
  "data": {
      "id": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "loginName": "test-customer",
      "companyName": "Test Customer",
      "deletedTimestamp": null,
      "createdTimestamp": "2016-08-31T06:46:18.145Z",
      "updatedTimestamp": "2016-08-31T06:46:18.145Z",
      "risks": [
        {
          "serviceCount": 21,
          "roleCount": 317,
          "accessibleCount": 46,
          "eventCount": 432,
          "eventTypeCount": {
              "unknown": 32,
              "loginSuccess": 96,
              "loginFailure": 290,
              "passwordChange": 1,
              "passwordReset": 1,
              "profileChange": 1,
              "authenticationChange": 1,
              "accessChange": 1,
              "adminEvent": 1,
              "fileCreate": 1,
              "fileRead": 1,
              "fileWrite": 1,
              "fileDelete": 1,
              "dataCreate": 1,
              "dataRead": 1,
              "dataWrite": 1,
              "dataDelete": 1
          },
          "timestamp": "2016-08-31"
        }
      ]
  },
  "message": "OK"
}

/{organization_id}/risks/people

get

URL
https://api.rulerr.com/developers/v1/{organization_id}/risks/people

get

Description
Returns information about the risks for each person within the organization. Lists people matching given data. Results can be filtered with a URL query string.

Available Filters: from to zone email name phone limit - limit the amount of records returned offset - the first record to return in the set

Eg. GET https://api.rulerr.com/developers/v1/{organization_id}/risks/people?from=2017-04-20&to=2017-05-09&zone=-600

Request

Body

No body data required.
Response

HTTP Status Code 200
Returns all data matching the given filters.

Body
Type: application/json

{
  "status": 200,
  "data": [
    {
      "id": "05dd5639-18f9-4eaf-a5b6-267b1972d98e",
      "fullName": "Test User",
      "emailAddress": "test@test.com",
      "phone": "112121212",
      "department": "IT",
      "jobTitle": "Software developer",
      "role": "none",
      "deletedTimestamp": null,
      "createdTimestamp": "2016-08-31T06:46:18.145Z",
      "updatedTimestamp": "2016-08-31T06:46:18.145Z",
      "risks": [
        {
          "serviceCount": 21,
          "roleCount": 317,
          "accessibleCount": 46,
          "eventCount": 432,
          "eventTypeCount": {
              "unknown": 32,
              "loginSuccess": 96,
              "loginFailure": 290,
              "passwordChange": 1,
              "passwordReset": 1,
              "profileChange": 1,
              "authenticationChange": 1,
              "accessChange": 1,
              "adminEvent": 1,
              "fileCreate": 1,
              "fileRead": 1,
              "fileWrite": 1,
              "fileDelete": 1,
              "dataCreate": 1,
              "dataRead": 1,
              "dataWrite": 1,
              "dataDelete": 1
          },
          "timestamp": "2016-08-31"
        }
      ]
    }
  ],
  "message": "OK"
}

Messages

post

Description
These endpoints allow you to view organization messages.

URL
https://api.rulerr.com/developers/v1/{organization_id}/messages

post

Description
Creates a new message within the Organization.

Request

Body
Type: application/json

{
    "reference": "0546927c-e674-a6cb-c02c-332d14a2cda7",
    "code": "create-request",
    "heading": "Test message",
    "body": "I am a test message",
    "metadata": {},
    "recipients": ["product-expert"]
}
Response

HTTP Status Code 200
Returns the message which was just created.

Body
Type: application/json

{
  "status": 200,
  "data": {
      "id": "0546927c-e674-a6cb-c02c-332d14a2cda7",
      "reference": "0546927c-e674-a6cb-c02c-332d14a2cda7",
      "code": "create-request",
      "heading": "Test message",
      "body": "I am a test message",
      "metadata": {},
      "deletedTimestamp": null,
      "updatedTimestamp": "2015-09-14T05:49:56.487Z",
      "createdTimestamp": "2015-09-14T05:49:56.487Z"
  },
  "message": "OK"
}

/{organization_id}/messages/list

get

URL
https://api.rulerr.com/developers/v1/{organization_id}/messages/list

get

Description
Returns information about the messages within the organization. Lists messages matching given data. Results can be filtered with a URL query string.

Available Filters: reference code limit - limit the amount of records returned offset - the first record to return in the set

Eg. GET https://api.rulerr.com/developers/v1/{organization_id}/messages/list?code=authentication-failure

Request

Body

No body data required.
Response

HTTP Status Code 200
Returns all data matching the given filters.

Body
Type: application/json

{
  "status": 200,
  "data": [
    {
      "id": "0546927c-e674-a6cb-c02c-332d14a2cda7",
      "reference": "0546927c-e674-a6cb-c02c-332d14a2cda7",
      "code": "create-request",
      "heading": "Test message",
      "body": "I am a test message",
      "metadata": {},
      "deletedTimestamp": null,
      "updatedTimestamp": "2015-09-14T05:49:56.487Z",
      "createdTimestamp": "2015-09-14T05:49:56.487Z"
    }
  ],
  "message": "OK"
}

/{organization_id}/messages/{message_id}

get delete put

URL
https://api.rulerr.com/developers/v1/{organization_id}/messages/{message_id}

  • {message_id}
    • Type: string
    • Required: Yes

get

Description
Returns data about the message with the given ID.

Request

Body

No body data required.
Response

HTTP Status Code 200
Returns data about the message with the given ID.

Body
Type: application/json

{
  "status": 200,
  "data": {
      "id": "0546927c-e674-a6cb-c02c-332d14a2cda7",
      "reference": "0546927c-e674-a6cb-c02c-332d14a2cda7",
      "code": "create-request",
      "heading": "Test message",
      "body": "I am a test message",
      "metadata": {},
      "deletedTimestamp": null,
      "updatedTimestamp": "2015-09-14T05:49:56.487Z",
      "createdTimestamp": "2015-09-14T05:49:56.487Z"
  },
  "message": "OK"
}

delete

Description
Removes the message with the given ID.

Request

Body

No body data required.
Response

HTTP Status Code 200
Returns the data about the message which was removed.

Body
Type: application/json

{
  "status": 200,
  "data": {
      "id": "0546927c-e674-a6cb-c02c-332d14a2cda7",
      "reference": "0546927c-e674-a6cb-c02c-332d14a2cda7",
      "code": "create-request",
      "heading": "Test message",
      "body": "I am a test message",
      "metadata": {},
      "deletedTimestamp": null,
      "updatedTimestamp": "2015-09-14T05:49:56.487Z",
      "createdTimestamp": "2015-09-14T05:49:56.487Z"
  },
  "message": "OK"
}

put

Description
Updates data about message with a given ID.

Request

Body
Type: application/json

{
    "reference": "0546927c-e674-a6cb-c02c-332d14a2cda7",
    "code": "create-request",
    "heading": "Test message",
    "body": "I am a test message",
    "metadata": {},
    "recipients": ["product-expert"]
}
Response

HTTP Status Code 200
Returns the updated data about the message with the given ID.

Body
Type: application/json

{
  "status": 200,
  "data": {
      "id": "0546927c-e674-a6cb-c02c-332d14a2cda7",
      "reference": "0546927c-e674-a6cb-c02c-332d14a2cda7",
      "code": "create-request",
      "heading": "Test message",
      "body": "I am a test message",
      "metadata": {},
      "deletedTimestamp": null,
      "updatedTimestamp": "2015-09-14T05:49:56.487Z",
      "createdTimestamp": "2015-09-14T05:49:56.487Z"
  },
  "message": "OK"
}

Traits

authenticated

Applies to all endpoints that require a token and is intended for communication between your product and this API.

The token is associated with the Product.

The token can be obtained from the developers portal, and must be supplied in the Authorization header (see below).

Headers

Authorization
Type: string
Used to authenticate against the API with the token supplied at login or token refresh.

For example: Authorization: Bearer 0546927ce674a6cbc02c332d14a2cda7'

Content-type
Type: string
This header tells the API the MIME type in which body data is encoded. The API currently supports "application/json".

For example: "Content-type: application/json"