Skip to content

Pointr Advanced Role Authorization Guide

All Advanced Role Authorization endpoints related to Pointr Content API are explained one by one below.

User Management

Create a New User

This endpoint allows you to create a new user. Only super admin or admins can create a user. An email sent to the user to inform them to set a password. Also the newly created user role will be “User” by default.

Requirements:

➔ ClientIdentifier must be provided.

➔ Email must be unique and be in email format.

{
  "email": "email@pointr.tech"
}
  • Response:
{
  "createdTimestampUtcEpochSeconds": 1716901025,
  "endpoint": "/api/v8/clients/{clientInternalIdentifier}/users",
  "result": {
    "userId": 1
  }
}

Update a User

This endpoint allows you to update an existing user.

Requirements:

➔ ClientIdentifier must be provided.

➔ Email must be unique and be in email format.

{
  "email": "email@pointr.tech"
}
  • Response:
{
  "createdTimestampUtcEpochSeconds": 1716901025,
  "endpoint": "/api/v8/clients/{clientInternalIdentifier}/users/{userId}",
  "result": {
    "userId": 1
  }
}

Delete a User

This endpoint allows you to delete an existing user. A user can only delete users in their own hierarchy. If the user they want to delete has another permission outside the hierarchy, they cannot delete them. Also, a user cannot delete their own user.

Requirements:

➔ ClientIdentifier must be provided.

➔ UserId must be provided.

{
  "createdTimestampUtcEpochSeconds": 1499590119,
  "endpoint": "/api/v8/clients/{clientInternalIdentifier}/users/{userId}"
}

Get a User

This endpoint returns user information and user permissions. The permissions listed are filtered according to the hierarchy of the user performing the operation. Superadmin or client admin can view user’s all permissions.

{
  "createdTimestampUtcEpochSeconds": 1616428800,
  "endpoint": "/api/v8/clients/{clientInternalIdentifier}/users/{userId}",
  "result": {
    "userId": 1,
    "userName": "Pointr 1",
    "lastLoginDate": "2024-09-04T14:50:16.7453196+00:00",
    "createdDate": "2024-10-04T14:50:16.7453208+00:00",
    "roles": [
      "User"
    ],
    "permissions": [
      {
        "id": 1,
        "permissionId": 0,
        "clientId": "e93ba637-37f4-41fe-a19a-26e069cbc8c5",
        "clientName": "Pointr Inc",
        "siteId": -1,
        "siteName": "",
        "buildingId": -1,
        "buildingName": ""
      }
    ]
  }
}

Get User List

This endpoint returns users information and user permissions. The permissions listed are filtered according to the hierarchy of the user performing the operation. Superadmin or client admin can view user’s all permissions.

{
  "createdTimestampUtcEpochSeconds": 1616428800,
  "endpoint": "/api/v8/clients/{clientInternalIdentifier}/users",
  "results": [
    {
      "userId": 1,
      "userName": "Pointr 1",
      "lastLoginDate": "2024-09-04T14:50:16.7063803+00:00",
      "createdDate": "2024-10-04T14:50:16.7063847+00:00",
      "roles": [
        "User"
      ],
      "permissions": [
        {
          "id": 1,
          "permissionId": 0,
          "clientId": "f6e4ff9a-282b-40a8-ac00-e450d535b836",
          "clientName": "Pointr Inc",
          "siteId": -1,
          "siteName": "",
          "buildingId": -1,
          "buildingName": ""
        }
      ]
    },
    {
      "userId": 2,
      "userName": "Pointr 2",
      "lastLoginDate": "2024-09-04T14:50:16.7063896+00:00",
      "createdDate": "2024-10-04T14:50:16.7063896+00:00",
      "roles": [
        "User"
      ],
      "permissions": [
        {
          "id": 2,
          "permissionId": 1,
          "clientId": "f6e4ff9a-282b-40a8-ac00-e450d535b836",
          "clientName": "Pointr Inc",
          "siteId": 1,
          "siteName": "Bomonto Sisli Istanbul",
          "buildingId": -1,
          "buildingName": ""
        }
      ]
    },
    {
      "userId": 3,
      "userName": "Pointr 3",
      "lastLoginDate": "2024-09-04T14:50:16.70639+00:00",
      "createdDate": "2024-10-04T14:50:16.7063901+00:00",
      "roles": [
        "User"
      ],
      "permissions": [
        {
          "id": 2,
          "permissionId": 2,
          "clientId": "f6e4ff9a-282b-40a8-ac00-e450d535b836",
          "clientName": "Pointr Inc",
          "siteId": 1,
          "siteName": "Bomonto Sisli Istanbul",
          "buildingId": 1,
          "buildingName": "Bomonti"
        }
      ]
    }
  ]
}

User Permission Management

Create Client-Based User Permissions

This endpoint allows you to create a client-based user permission. Only users with admin authorization can give permission to different users. Users with client admin privileges can grant admin, editor or read only privileges to their own client’s hierarchy.

Requirements:

➔ Provide a clientIdentifier.

➔ Provide a valid userId.

➔ PermissionId must be in range 1-3.

1. Client Admin
2. Client Editor
3. Client Readonly
{
  "createdTimestampUtcEpochSeconds": 1499590119,
  "endpoint": "/api/v8/users/{userId}/permissions/{permissionId}/clients/{clientInternalIdentifier}"
}

Create Site-Based User Permissions

This endpoint allows you to create a site-based user permission. Only users with admin authorization can give permission to different users. Users with site admin privileges can grant admin, editor or read only privileges to their own site’s hierarchy.

Requirements:

➔ Provide a siteId.

➔ Provide a valid userId.

➔ PermissionId must be in range 1-3.

1. Site Admin
2. Site Editor
3. Site Readonly
{
  "createdTimestampUtcEpochSeconds": 1499590119,
  "endpoint": "/users/{userId}/permissions/{permissionId}/sites/{siteInternalIdentifier}"
}

Create Building-Based User Permissions

This endpoint allows you to create a building-based user permission. Only users with admin authorization can give permission to different users. Users with building admin privileges can grant admin, editor or readonly privileges to their own building’s hierarchy.

Requirements:

➔ Provide a buildingId.

➔ Provide a valid userId.

➔ PermissionId must be in range 1-3.

1. Building Admin
2. Building Editor
3. Building Readonly
{
  "createdTimestampUtcEpochSeconds": 1499590119,
  "endpoint": "/api/v8/users/{userId}/permissions/{permissionId}/buildings/{buildingInternalIdentifier}"
}

Update a User Permissions

This endpoint allows you to update a user’s permissions. You cannot regulate your own permissions. Only users with administrator privileges can update the permissions of users in their hierarchy. This endpoint deletes the records that the user is authorized and saves the authorizations in the payload to the system.

Requirements:

➔ Provide a valid userId.

➔ PermissionId must be in range 1-3.

1. Building Admin
2. Building Editor
3. Building Readonly

➔ ClientId is required.

➔ SiteId is optional. If you want to update permission on a site basis, you have to specify the siteId.

➔ BuildingId is optional. If you want to update permission on a building basis, you have to specify the buildingId.

Note

Information:

  • If you give only ClientId, you define Client based permission.
  • If you provide ClientId and SiteId, you give Site based permission.
  • If you give all the criteria (clientId, siteId, buildingId), then you have defined Building based permission.
[
  {
    "permissionId": 0,
    "clientId": "0469c0a2-d5a4-4ab7-b9bf-8afa05476a41"
  },
  {
    "permissionId": 1,
    "clientId": "0469c0a2-d5a4-4ab7-b9bf-8afa05476a41",
    "siteId": 1
  },
  {
    "permissionId": 2,
    "clientId": "0469c0a2-d5a4-4ab7-b9bf-8afa05476a41",
    "siteId": 1,
    "buildingId": 1
  }
]
  • Response:
{
  "createdTimestampUtcEpochSeconds": 1499590119,
  "endpoint": "/api/v8/users/{userId}/permissions"
}

Delete a User Permission

This endpoint allows you to delete a user’s permission. A user cannot delete their own permissions. Only users with admin authorization can delete different users. When deleting a user permission, the process hard deletes the record.

Requirements:

➔ Provide a valid userId.

{
  "createdTimestampUtcEpochSeconds": 1499590119,
  "endpoint": "/users/{userId}/permissions/{id}"
}

Get User Permissions

This endpoint allows you to return the permission list of only the users you are authorized for.

Requirements:

➔ Provide a valid userId.

  • Method: GET
  • Endpoint: /users/{userId}/permissions
  • Description: Fetch all permissions of a user
  • Request Payload: Empty Payload
  • Response:
{
  "createdTimestampUtcEpochSeconds": 1616428800,
  "endpoint": "api/v8/users/{userId}/permissions",
  "results": [
    {
      "id": 1,
      "userId": 1,
      "permissionId": 0,
      "clientId": "fc37578e-b4d5-4e48-9266-30ab167e3277",
      "clientName": "Pointr Inc",
      "siteId": -1,
      "siteName": "",
      "buildingId": -1,
      "buildingName": "",
      "createdDate": "2024-09-14T14:50:16.8389008Z"
    },
    {
      "id": 2,
      "userId": 2,
      "permissionId": 1,
      "clientId": "fc37578e-b4d5-4e48-9266-30ab167e3277",
      "clientName": "Pointr Inc",
      "siteId": 1,
      "siteName": "Bomonto Sisli Istanbul",
      "buildingId": -1,
      "buildingName": "",
      "createdDate": "2024-09-19T14:50:16.8389018Z"
    },
    {
      "id": 3,
      "userId": 3,
      "permissionId": 2,
      "clientId": "fc37578e-b4d5-4e48-9266-30ab167e3277",
      "clientName": "Pointr Inc",
      "siteId": 1,
      "siteName": "Bomonto Sisli Istanbul",
      "buildingId": 1,
      "buildingName": "Bomonti",
      "createdDate": "2024-09-24T14:50:16.8389021Z"
    }
  ]
}

Endpoint Management According to Authorizations

All endpoints in Content.API are prepared in an excel file and we have specified which endpoints a user can use according to all the authorizations they can receive. You can review the excel document for more information.

Please check here to see Role Management Activity List.


Last update: September 6, 2024
Back to top