Use Case for Retrieving Permissions Assigned to a Role

To get permissions assigned to a role, send a SuiteQL query with the role id. Add the limit and offset criteria to your request to get the results in multiple pages. For more information about pagination, read Collection Paging.

Note that Prefer: transient is a required header parameter.

          POST {{REST_SERVICES}}/query/v1/suiteql?limit=5&offset=10
{
    "q": "SELECT * FROM rolepermissions WHERE role = 1028"
} 

        

The following is an example of a response:

          {
    "links": [
        {
            "rel": "previous",
            "href": "https://<accountID>.suitetalk.api.netsuite.com/services/rest/query/v1/suiteql?limit=5&offset=5"
        },
        {
            "rel": "first",
            "href": "https://<accountID>.suitetalk.api.netsuite.com/services/rest/query/v1/suiteql?limit=5&offset=0"
        },
        {
            "rel": "next",
            "href": "https://<accountID>.suitetalk.api.netsuite.com/services/rest/query/v1/suiteql?limit=5&offset=15"
        },
        {
            "rel": "last",
            "href": "https://<accountID>.suitetalk.api.netsuite.com/services/rest/query/v1/suiteql?limit=5&offset=60"
        },
        {
            "rel": "self",
            "href": "https://<accountID>.suitetalk.api.netsuite.com/services/rest/query/v1/suiteql?limit=5&offset=10"
        }
    ],
    "count": 5,
    "hasMore": true,
    "items": [
        {
            "links": [],
            "name": "Custom Fields",
            "permkey": "ADMI_CUSTFIELD",
            "permlevel": "4",
            "restriction": "-1",
            "role": "1028"
        },
        {
            "links": [],
            "name": "Custom Item Fields",
            "permkey": "ADMI_CUSTITEMFIELD",
            "permlevel": "4",
            "restriction": "-1",
            "role": "1028"
        },
        {
            "links": [],
            "name": "Custom Lists",
            "permkey": "ADMI_CUSTLIST",
            "permlevel": "4",
            "restriction": "-1",
            "role": "1028"
        },
        {
            "links": [],
            "name": "Custom PDF Layouts",
            "permkey": "ADMI_CUSTLAYOUT",
            "permlevel": "4",
            "restriction": "-1",
            "role": "1028"
        },
        {
            "links": [],
            "name": "Custom Record Types",
            "permkey": "ADMI_CUSTRECORD",
            "permlevel": "4",
            "restriction": "-1",
            "role": "1028"
        }
    ],
    "offset": 10,
    "totalResults": 61
} 

        

Related Topics

Employee Use Cases
Use Case for Adding a Supervisor to an Employee
Use Case for Adding Employee Address
Use Case for Adding Subscriptions to an Employee
Use Case for Creating an Expense Report from an Employee Record
Use Case for Finding All Employee Records Under a Supervisor
Use Case for Finding IDs of Roles Assigned to an Employee
Use Case for Finding the Name of a Role

General Notices