Skip to main content

REST APIs for 24.2.20 and 24.2.10

Security Principals Reference

This topic provides properties, parameters, and examples of security principals.

Query parameters for security principals

The only required parameter for all API methods is org_id.

Parameter

Description

Type

Required

org_id

Organization ID

Integer

Yes

max_results

Maximum number of entries to return

Integer

No

name

Name of security principal to filter by

String

GET, PUT: No

POST: Yes

sid

SID of security principal to filter by

String

GET: No

POST, PUT, DELETE: Yes

Properties for security principals

Parameter

Description

Type

href

URI of security principal

String

sid

Active Directory SID

String

name

Name of security principal

String

used_by_ruleset

Flag to indicate if a ruleset is using this security principal.

Boolean

deleted

Flag to indicate if the security principal has been deleted.

Boolean

Curl Command to Get Security Principals

curl -X GET https://pce.my-company.com:8443/api/v2/security_principals -u $KEY:$TOKEN -H 'Accept: application/json'

Example JSON Response Body

{
 "sid": "string",
 "name": "string",
 "description": "string"
}
Get a specified Security Principal

This GET command returns information about one specific security principal indicated by its sid.

Curl Command to Get a Security Principal

curl -X GET https://pce.my-company.com:8443/api/v2/security_principals/{sid} -u $KEY:$TOKEN -H 'Accept: application/json'

Example JSON Response Body

{
  "sid": "string",
  "name": "string",
  "description": "string"
}
Create a Security Principal

This POST command, on success, returns the HREF of the created security principal.

Curl Command to Create a Security Principal

curl -X POST https://pce.my-company.com:8443/api/v2/security_principals -u $KEY:$TOKEN -H 'Content-Type: application/json'

Example JSON Request Body

{
  "sid": "string",
  "name": "string",
  "description": "string"
}

Curl Command to Bulk Create Security Principals

curl -X PUT https://pce.my-company.com:8443/api/v2/security_principals/bulk_create -u $KEY:$TOKEN -H 'Content-Type: application/json'

Example JSON Request Body

[
  {
    "sid": "string",
    "name": "string",
    "description": "string"
  },
  {
    "sid": "string_2",
    "name": "string_2",
    "description": "string_2"
  }
]

Curl Command to Update a Security Principal

curl -X PUT https://pce.my-company.com:8443/api/v2/security_principals/{sid} -u $KEY:$TOKEN -H 'Content-Type: application/json'

Example JSON Request Body

{
  "name": "string",
  "description": "string"
}
Delete a Security Principal

This command deletes a security principal.

Curl Command to Delete a Security Principal

curl -X DELETE https://pce.my-company.com:8443/api/v2/security_principals/{sid} -u $KEY:$TOKEN

This command returns 204 No Content for success.