/assignMemberCategorySchema: Assign Member Category Schema

URL:
https://[root]/portals/[portalID]/assignMemberCategorySchema
Methods:
POST

Example usage

The following is a sample ArcGIS Online POST request for the assignMemberCategorySchema operation:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
POST /sharing/rest/portals/0123456789ABCDEF/assignMemberCategorySchema HTTP/1.1
Host: org.arcgis.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []

memberCategorySchema={
  "memberCategorySchema": [
    {
      "title": "Office Location",
      "categories": [
        {
          "title": "USA",
          "categories": [
            {
              "title": "Maine"
            },
            {
              "title": "California",
              "categories": [
                {
                  "title": "Redlands"
                },
                {
                  "title": "San Diego"
                }
              ]
            }
          ]
        },
        {
          "title": "Europe",
          "categories": [
            {
              "title": "Zurich"
            },
            {
              "title": "Edinburgh"
            }
          ]
        }
      ]
    },
    {
      "title": "Department",
      "categories": [
        {
          "title": "Sales"
        },
        {
          "title": "Consulting"
        }
      ]
    }
  ]
}&f=pjson

The following is a sample ArcGIS Enterprise POST request for the assignMemberCategorySchema operation:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
POST /webadaptor/sharing/rest/portals/0123456789ABCDEF/assignMemberCategorySchema HTTP/1.1
Host: machine.domain.com
Content-Type: application/x-www-form-urlencoded
Content-Length: []

memberCategorySchema={
  "memberCategorySchema": [
    {
      "title": "Office Location",
      "categories": [
        {
          "title": "USA",
          "categories": [
            {
              "title": "Maine"
            },
            {
              "title": "California",
              "categories": [
                {
                  "title": "Redlands"
                },
                {
                  "title": "San Diego"
                }
              ]
            }
          ]
        },
        {
          "title": "Europe",
          "categories": [
            {
              "title": "Zurich"
            },
            {
              "title": "Edinburgh"
            }
          ]
        }
      ]
    },
    {
      "title": "Department",
      "categories": [
        {
          "title": "Sales"
        },
        {
          "title": "Consulting"
        }
      ]
    }
  ]
}&f=pjson

Description

The assignMemberCategorySchema operation allows organization administrators and members with appropriate privileges to categorize organization members. Once the administrator or member with appropriate privileges sets up member categories in their organization, they can assign the categories to the members. They can then filter the members based on the categories.

An organization can have up to three levels of categories in the hierarchy, with a maximum of 200 categories and subcategories. Each organization member can have a maximum of 20 member categories assigned to them. It is recommended that you create a comprehensive and complete category hierarchy and naming scheme is before assigning categories to members.

The operation is available to both Esri default administrators and custom roles with the portal:admin:updateUsers privilege.

Request parameters

ParameterDetails

memberCategorySchema

A memberCategorySchema object that consists of an array of JSON objects representing top level categories. Each object can include the title, description, and categories properties. The categories property consists of an array of objects with each object having the same properties and represents the descendant categories or subcategories.

Example

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
memberCategorySchema={
  "memberCategorySchema": [
    {
      "title": "Department",
      "categories": [
        {
          "title": "Sales”
        },
        {
          "title": "Consulting"
        }
      ]
    },
    {
      "title": "Office Location"
    }
  ]
}

f

The response format. The default format is html.

Values: html | json | pjson

Response properties

PropertyDetails

success

Indicates whether the operation was successful.

JSON Response syntax

Use dark colors for code blocksCopy
1
2
3
{
  "success": true
}

JSON Response example

The following is a sample success response for the assignMemberCategorySchema operation:

Use dark colors for code blocksCopy
1
2
3
{
  "success": true
}

The following is a sample error message for the assignMemberCategorySchema operation:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
{
  "error": {
    "code": 400,
    "messageCode": "ORG_1132",
    "message": "Unable to assign member category schema.",
    "details": ["Member category schema exceeds max tree size or empty."]
  }
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.