Skip To Content
ArcGIS Developer
Dashboard

/assignMemberCategorySchema: Assign Member Category Schema

  • URL:https://[root]/portals/[portalID]/assignMemberCategorySchema(POST only)

Example usage

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


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:


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.

Note:

The forward slash (/) and comma (,) characters are reserved and cannot be used as values for the title property.

Example, formatted for readability


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


{
  "success": true
}

JSON Response example

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


{
  "success": true
}

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


{
  "error": {
    "code": 400,
    "messageCode": "ORG_1132",
    "message": "Unable to assign member category schema.",
    "details": ["Member category schema exceeds max tree size or empty."]
  }
}