For the complete documentation index, see llms.txt. This page is also available as Markdown.

User

Operations for managing users including listing users and editing user configurations.

List all users

get

This endpoint retrieves a list of all users and their respective properties. Note: the 'role_name' field refers to the 'pretty_name' attribute from the Roles APIs and the direct role assigned to the user, not roles inherited through groups.

Responses
200

Successfully retrieved users

application/json
dataobject[]Required
get/platform/iam/v1/user
GET /platform/iam/v1/user HTTP/1.1
Host: api-cortex.paloaltonetworks.com
Accept: */*
{
  "data": [
    {
      "user_email": "user1@test.com",
      "user_first_name": "<first name>",
      "user_last_name": "<last name>",
      "phone_number": "408-753-4000",
      "role_name": "Investigator",
      "status": "Active",
      "last_logged_in": 1640024700241,
      "is_hidden": true,
      "user_type": "CSP",
      "groups": [
        {
          "group_id": 123,
          "group_name": "usergroup1"
        }
      ]
    },
    {
      "user_email": "user2@test.com",
      "user_first_name": "<first name>",
      "user_last_name": "<last name>",
      "phone_number": "408-753-4000",
      "status": "Active",
      "role_name": "Investigator",
      "last_logged_in": 1640024700241,
      "is_hidden": true,
      "user_type": "CSP",
      "groups": [
        {
          "group_id": 123,
          "group_name": "usergroup2"
        }
      ]
    }
  ],
  "metadata": {
    "total_count": 2
  }
}

Get user

get

This endpoint retrieves a user and its respective properties. Note: the 'role_name' field refers to the 'pretty_name' attribute from the Roles APIs, not the unique role identifier.

Path parameters
user_emailstringRequired

Full email of the user

Responses
200

Successfully retrieved user

application/json
dataobjectRequired
get/platform/iam/v1/user/{user_email}
GET /platform/iam/v1/user/{user_email} HTTP/1.1
Host: api-cortex.paloaltonetworks.com
Accept: */*
{
  "data": {
    "user_email": "user@test.com",
    "user_first_name": "<first name>",
    "user_last_name": "<last name>",
    "phone_number": "408-753-4000",
    "status": "Active",
    "role_name": "Account Admin",
    "last_logged_in": 1640024700241,
    "is_hidden": true,
    "user_type": "CSP",
    "groups": [
      {
        "group_id": "unique_group_id",
        "group_name": "usergroup"
      }
    ]
  }
}

Edit an existing user

patch

This endpoint allows updating various user details. Please note that you must pass an empty string for the 'role_id' field if you are attempting to remove a role from a user. For the 'user_groups' field, please pass an empty list to remove user group associations for the provided user.

Path parameters
user_emailstringRequired

Full email of the user

Body

Request object for editing an existing user

Responses
200

User edited successfully

application/json
patch/platform/iam/v1/user/{user_email}
PATCH /platform/iam/v1/user/{user_email} HTTP/1.1
Host: api-cortex.paloaltonetworks.com
Content-Type: application/json
Accept: */*
Content-Length: 143

{
  "request_data": {
    "phone_number": "408-753-4000",
    "status": "Active",
    "role_id": "role_name_123",
    "is_hidden": true,
    "user_groups": [
      "user_groups_123"
    ]
  }
}
{
  "data": {
    "message": "User updated successfully"
  }
}

Last updated

Was this helpful?