Domain Principal

An Object

Note

Drop in one of our language drivers to accelerate your development.
Here are links to some of our popular Cookbooks to help you get started!

Parent

This Domain Principal is contained within a Domain.

Properties

The following properties are available:

Property Type Default Read-Only Description
_doc string No The primary ID
_system object No Metadata maintained by the system
authorities array No
name string No
type string No

Methods

The following methods are available:

Add Member

Adds a principal to a group
POST /domains/{domainId}/principals/{principalId}/members/add

Parameters

Name Required Type Description
domainId true string The ID of the domain
principalId true string The ID of the principal
id true string

Response

{
  "type": "object",
  "description": "Status of Operation",
  "properties": {
    "ok": {
      "type": "boolean",
      "description": "Indicates whether the operation succeeded or not"
    }
  }
}

Check Membership

POST /domains/{domainId}/principals/membership/check

Parameters

Name Required Type Description
domainId true string The ID of the domain

Check Memberships

POST /domains/{domainId}/principals/memberships/check

Parameters

Name Required Type Description
domainId true string The ID of the domain

Check Permission

Checks whether an actor has a permission over a principal
POST /domains/{domainId}/principals/{permissionedId}/permissions/{permissionId}/check

Parameters

Name Required Type Description
domainId true string The ID of the domain
permissionedId true string The ID of the permissioned object or datastore
permissionId true string The ID of the permission
id true string

Response

{
  "type": "object",
  "description": "Check",
  "extends": "status",
  "properties": {
    "check": {
      "type": "boolean"
    },
    "ok": null
  }
}

Check Single Authority

Checks whether an actor has an authority over a principal
POST /domains/{domainId}/principals/{permissionedId}/authorities/{authorityId}/check

Parameters

Name Required Type Description
domainId true string The ID of the domain
permissionedId true string The ID of the permissioned object or datastore
authorityId true string The ID or authority key for the authority
id true string

Response

{
  "type": "object",
  "description": "Check",
  "extends": "status",
  "properties": {
    "check": {
      "type": "boolean"
    },
    "ok": null
  }
}

Check multiple Authorities

Checks whether one or more authorities against the specified principal are granted for a given set of users
POST /domains/{domainId}/principals/authorities/check

Parameters

Name Required Type Description
domainId true string The ID of the domain

Response

{
  "type": "object",
  "description": "Check Multiple Authorities Out",
  "properties": {
    "checks": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "permissionedId": {
            "type": "string"
          },
          "principalId": {
            "type": "string"
          },
          "authorityId": {
            "type": "string"
          },
          "result": {
            "type": "boolean"
          }
        }
      }
    }
  }
}

Check multiple Permissions

Checks whether multiple actors have permissions over a principal
POST /domains/{domainId}/principals/permissions/check

Parameters

Name Required Type Description
domainId true string The ID of the domain
HTTP Payload true string HTTP Payload

Response

{
  "type": "object",
  "description": "List of results for Principals that were Checked",
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "permissionedId": {
            "type": "string"
          },
          "principalId": {
            "type": "string"
          },
          "permissionId": {
            "type": "string"
          },
          "result": {
            "type": "boolean"
          }
        }
      }
    }
  }
}

Create Domain Principal

Creates a new Domain Principal
POST /domains/{domainId}/principals

Parameters

Name Required Type Description
domainId true string , The incoming JSON payload should contain properties for the newly created principal. If a 'password' property is provided, an identity will be created in the domain's default directory. ,
The incoming JSON payload should contain properties for the newly created principal. If a 'password' property is provided, an identity will be created in the domain's default directory.

Response

{
  "type": "object",
  "description": "Status of Operation",
  "properties": {
    "ok": {
      "type": "boolean",
      "description": "Indicates whether the operation succeeded or not"
    }
  }
}

Delete Attachment

Deletes an attachment
DELETE /domains/{domainId}/principals/{principalId}/attachments/{attachmentId}

Parameters

Name Required Type Description
domainId true string The ID of the domain
principalId true string The ID of the principal
attachmentId true string

Response

{
  "type": "object",
  "description": "Status of Operation",
  "properties": {
    "ok": {
      "type": "boolean",
      "description": "Indicates whether the operation succeeded or not"
    }
  }
}

Delete Domain Principal

Deletes an existing Domain Principal
DELETE /domains/{domainId}/principals/{principalId}

Parameters

Name Required Type Description
domainId true string The ID of the domain
principalId true string The ID of the principal

Response

{
  "type": "object",
  "description": "Status of Operation",
  "properties": {
    "ok": {
      "type": "boolean",
      "description": "Indicates whether the operation succeeded or not"
    }
  }
}

Download Attachment

Downloads an attachment
GET /domains/{domainId}/principals/{principalId}/attachments/{attachmentId}

Parameters

Name Required Type Description
domainId true string The ID of the domain
principalId true string The ID of the principal
attachmentId true string
a false string If true, the 'Content-Disposition' header will be set

Download Preview

Downloads a preview stream of a principal attachment
GET /domains/{domainId}/principals/{principalId}/preview/{name}

Parameters

Name Required Type Description
domainId true string The ID of the domain
principalId true string The ID of the principal
name true string
mimetype false string The mimetype to be streamed back (defaults to 'image/png')
size false number For image mimetypes, the max width of the generated image (defaults to 64)
attachment false string The ID of the attachment that serves as the source for the preview (default to 'default')
force false boolean Forces the re-generation of the preview stream, even if previously saved
save false boolean Specifies whether to save the generated preview stream as an attachment (defaults to true)
fallback false boolean A fallback URL that should be redirected to in the event that a preview stream cannot be generated

Export Domain Principal

Starts an export job for this resource
POST /domains/{domainId}/principals/{principalId}/export

Parameters

Name Required Type Description
domainId true string The ID of the domain
principalId true string The ID of the principal
groupId false string The Group ID to be assigned to the exported archive
artifactId false string The Artifact ID to be assigned to the exported archive
versionId false string The Version ID to be assigned to the exported archive
vaultId false string The ID of the vault where the exported archive should be saved
schedule false string Whether to run the job immediately or in the background (either 'synchronous' or 'asynchronous')

Response

{
  "type": "object",
  "description": "Export Configuration",
  "properties": {
    "startDate": {
      "type": "object",
      "description": "Only include objects whose modification date is after this time (epoch millis). This is used for partial or rolling exports."
    },
    "endDate": {
      "type": "object",
      "description": "Only include objects whose modification date is before this time (epoch millis). This is used for partial or rolling exports."
    },
    "startChangeset": {
      "type": "string",
      "description": "Only include data that is relevant to changesets at or beyond the specified changeset."
    },
    "endChangeset": {
      "type": "string",
      "description": "Only include data that is relevant to changesets at or before the specified changeset."
    },
    "includeACLs": {
      "type": "boolean",
      "default": true,
      "description": "Whether to include ACLs during export."
    },
    "includeTeams": {
      "type": "boolean",
      "default": true,
      "description": "Whether to include Teams during export."
    },
    "includeActivities": {
      "type": "boolean",
      "default": true,
      "description": "Whether to include Activities during export."
    },
    "includeBinaries": {
      "type": "boolean",
      "default": true,
      "description": "Whether to include Binaries for data stores during export."
    },
    "includeAttachments": {
      "type": "boolean",
      "default": true,
      "description": "Whether to include Attachments for Attachables during export."
    },
    "artifactDependencies": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "artifactIncludes": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "forceIncludes": {
      "type": "boolean"
    }
  }
}

Grant Authority

Grants an authority over a principal to an actor
POST /domains/{domainId}/principals/{permissionedId}/authorities/{authorityId}/grant

Parameters

Name Required Type Description
domainId true string The ID of the domain
permissionedId true string The ID of the permissioned object or datastore
authorityId true string The ID or authority key for the authority
id true string

Response

{
  "type": "object",
  "description": "Status of Operation",
  "properties": {
    "ok": {
      "type": "boolean",
      "description": "Indicates whether the operation succeeded or not"
    }
  }
}

Import Domain Principal

Starts an import job for this resource
POST /domains/{domainId}/principals/{principalId}/import

Parameters

Name Required Type Description
domainId true string The ID of the domain
principalId true string The ID of the principal
groupId false string The Group ID to be assigned to the exported archive
artifactId false string The Artifact ID to be assigned to the exported archive
versionId false string The Version ID to be assigned to the exported archive
vaultId false string The ID of the vault where the exported archive should be saved
schedule false string Whether to run the job immediately or in the background (either 'synchronous' or 'asynchronous')

Response

{
  "type": "object",
  "description": "Import Configuration",
  "properties": {
    "includeACLs": {
      "type": "boolean",
      "default": true,
      "description": "Whether to include ACLs during import."
    },
    "includeTeams": {
      "type": "boolean",
      "default": true,
      "description": "Whether to include Teams during import."
    },
    "includeActivities": {
      "type": "boolean",
      "default": true,
      "description": "Whether to include Activities during import."
    },
    "includeBinaries": {
      "type": "boolean",
      "default": true,
      "description": "Whether to include Binaries for data stores during import."
    },
    "includeAttachments": {
      "type": "boolean",
      "default": true,
      "description": "Whether to include Attachments for Attachables during import."
    },
    "strategy": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "default": "CLONE",
      "description": "Either CLONE or COPY_EVERYTHING. Use CLONE to keep the same IDs on import. Use COPY_EVERYTHING to generate all new IDs for all entries on every import."
    },
    "substitutions": {
      "type": "string"
    }
  }
}

Invite User

Invites a user to a domain
POST /domains/{domainId}/principals/invite

Parameters

Name Required Type Description
domainId true string The ID of the domain
id true string

Response

{
  "type": "object",
  "description": "Status of Operation (with ID)",
  "extends": "status",
  "properties": {
    "_doc": {
      "type": "string"
    },
    "ok": null
  }
}

List Attachments

Lists the attachments for a principal
GET /domains/{domainId}/principals/{principalId}/attachments

Parameters

Name Required Type Description
domainId true string The ID of the domain
principalId true string The ID of the principal

Response

{
  "type": "object",
  "description": "Result Map",
  "properties": {
    "total_rows": {
      "type": "number"
    },
    "offset": {
      "type": "number"
    },
    "size": {
      "type": "number"
    },
    "rows": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/resultmap_attachment"
      }
    }
  }
}

List Members

Lists the principals belonging to a group
GET /domains/{domainId}/principals/{principalId}/members

Parameters

Name Required Type Description
domainId true string The ID of the domain
principalId true string The ID of the principal
sort false object Defines how to sort fields in the result set
skip false number Skips the result set cursor ahead the specified number of records
limit false number Specifies the number of records to be handed back in the result set
This method supports pagination.

Response

{
  "type": "object",
  "description": "Result Map",
  "properties": {
    "total_rows": {
      "type": "number"
    },
    "offset": {
      "type": "number"
    },
    "size": {
      "type": "number"
    },
    "rows": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/resultmap_domainprincipal"
      }
    }
  }
}

List Memberships

Lists the groups that a principal belongs to
GET /domains/{domainId}/principals/{principalId}/memberships

Parameters

Name Required Type Description
domainId true string The ID of the domain
principalId true string The ID of the principal
sort false object Defines how to sort fields in the result set
skip false number Skips the result set cursor ahead the specified number of records
limit false number Specifies the number of records to be handed back in the result set
This method supports pagination.

Response

{
  "type": "object",
  "description": "Result Map",
  "properties": {
    "total_rows": {
      "type": "number"
    },
    "offset": {
      "type": "number"
    },
    "size": {
      "type": "number"
    },
    "rows": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/resultmap_domainprincipal"
      }
    }
  }
}

List Teams

Lists the teams that a principal belongs to against a given teamable
GET /domains/{domainId}/principals/{principalId}/teams

Parameters

Name Required Type Description
domainId true string The ID of the domain
principalId true string The ID of the principal
teamableType true string
teamableId true string
sort false object Defines how to sort fields in the result set
skip false number Skips the result set cursor ahead the specified number of records
limit false number Specifies the number of records to be handed back in the result set
This method supports pagination.

Response

{
  "type": "object",
  "description": "Result Map",
  "properties": {
    "total_rows": {
      "type": "number"
    },
    "offset": {
      "type": "number"
    },
    "size": {
      "type": "number"
    },
    "rows": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/resultmap_domainprincipal"
      }
    }
  }
}

Lists Domain Principal

Retrieves a list of Domain Principal instances
GET /domains/{domainId}/principals

Parameters

Name Required Type Description
domainId true string The ID of the domain
groups false string
sort false object Defines how to sort fields in the result set
skip false number Skips the result set cursor ahead the specified number of records
limit false number Specifies the number of records to be handed back in the result set
This method supports pagination.

Response

{
  "type": "object",
  "description": "Result Map",
  "properties": {
    "total_rows": {
      "type": "number"
    },
    "offset": {
      "type": "number"
    },
    "size": {
      "type": "number"
    },
    "rows": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/resultmap_domainprincipal"
      }
    }
  }
}

Query

Queries for matches
POST /domains/{domainId}/principals/query

Parameters

Name Required Type Description
domainId true string The ID of the domain
groups false string
sort false object Defines how to sort fields in the result set
skip false number Skips the result set cursor ahead the specified number of records
limit false number Specifies the number of records to be handed back in the result set
This method supports pagination.

Response

{
  "type": "object",
  "description": "Result Map",
  "properties": {
    "total_rows": {
      "type": "number"
    },
    "offset": {
      "type": "number"
    },
    "size": {
      "type": "number"
    },
    "rows": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/resultmap_domainprincipal"
      }
    }
  }
}

Read ACL

Read the Access Control List for the specified principal
GET /domains/{domainId}/principals/{permissionedId}/acl/list

Parameters

Name Required Type Description
domainId true string The ID of the domain
permissionedId true string The ID of the permissioned object or datastore

Response

{
  "type": "object",
  "description": "Result Map of ACL entries",
  "properties": {
    "total_rows": {
      "type": "number"
    },
    "offset": {
      "type": "number"
    },
    "size": {
      "type": "number"
    },
    "rows": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "_doc": {
            "type": "string",
            "title": "Principal ID"
          },
          "name": {
            "type": "string",
            "title": "Principal Name"
          },
          "type": {
            "type": "string",
            "title": "Principal Type"
          },
          "domainId": {
            "type": "string"
          },
          "domainQualifiedId": {
            "type": "string"
          },
          "domainQualifiedName": {
            "type": "string"
          },
          "principalId": {
            "type": "string",
            "title": "Principal ID"
          },
          "userEmail": {
            "type": "string"
          },
          "userFirstName": {
            "type": "string"
          },
          "userLastName": {
            "type": "string"
          },
          "authorities": {
            "type": "array",
            "title": "Authorities",
            "items": {
              "type": "string",
              "title": "Authority Key"
            }
          }
        }
      }
    }
  }
}

Read ACL for Principal

Reads the ACL for a principal and specific actor
GET /domains/{domainId}/principals/{permissionedId}/acl

Parameters

Name Required Type Description
domainId true string The ID of the domain
permissionedId true string The ID of the permissioned object or datastore
id true string

Response

{
  "type": "object",
  "description": "Result Map of Authority Keys",
  "properties": {
    "total_rows": {
      "type": "number"
    },
    "offset": {
      "type": "number"
    },
    "size": {
      "type": "number"
    },
    "rows": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "Authority Key"
      }
    }
  }
}

Read Authorities Report

Generates an authority report for a set of principals
POST /domains/{domainId}/principals/{permissionedId}/authorities

Parameters

Name Required Type Description
domainId true string The ID of the domain
permissionedId true string The ID of the permissioned object or datastore
HTTP Payload true string HTTP Payload

Response

{
  "$ref": "#/components/schemas/authorityreport"
}

Read Domain Principal

Reads an instance of a Domain Principal
GET /domains/{domainId}/principals/{principalId}

Parameters

Name Required Type Description
domainId true string The ID of the domain
principalId true string The ID of the principal
groups false string

Response

{
  "type": "object",
  "extends": "document",
  "description": "Domain Principal",
  "container": "domain",
  "properties": {
    "name": {
      "type": "string"
    },
    "type": {
      "type": "string"
    },
    "authorities": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "Authority Key"
      }
    },
    "_doc": null,
    "_system": null
  }
}

Remove Member

Removes a principal from a group
POST /domains/{domainId}/principals/{principalId}/members/remove

Parameters

Name Required Type Description
domainId true string The ID of the domain
principalId true string The ID of the principal
id true string

Response

{
  "type": "object",
  "description": "Status of Operation",
  "properties": {
    "ok": {
      "type": "boolean",
      "description": "Indicates whether the operation succeeded or not"
    }
  }
}

Revoke Authority

Revokes an authority over a principal from an actor
POST /domains/{domainId}/principals/{permissionedId}/authorities/{authorityId}/revoke

Parameters

Name Required Type Description
domainId true string The ID of the domain
permissionedId true string The ID of the permissioned object or datastore
authorityId true string The ID or authority key for the authority
id true string

Response

{
  "type": "object",
  "description": "Status of Operation",
  "properties": {
    "ok": {
      "type": "boolean",
      "description": "Indicates whether the operation succeeded or not"
    }
  }
}

Summarize Access Policy

Retrieves an access policy summary for a user
GET /domains/{domainId}/principals/{principalId}/access/policies/summary

Parameters

Name Required Type Description
domainId true string The ID of the domain
principalId true string The ID of the principal
scope false string
info false string

Response

{
  "type": "object",
  "description": "Result Map",
  "properties": {
    "total_rows": {
      "type": "number"
    },
    "offset": {
      "type": "number"
    },
    "size": {
      "type": "number"
    },
    "rows": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/resultmap_accessPolicy"
      }
    }
  }
}

Update Domain Principal

Updates an existing Domain Principal
PUT /domains/{domainId}/principals/{principalId}

Parameters

Name Required Type Description
domainId true string The ID of the domain
principalId true string , The incoming JSON payload should contain the full set of properties to be updated onto the principal. A special 'password' property can be supplied to change a domain user's password. ,
The incoming JSON payload should contain the full set of properties to be updated onto the principal. A special 'password' property can be supplied to change a domain user's password.

Response

{
  "type": "object",
  "description": "Status of Operation",
  "properties": {
    "ok": {
      "type": "boolean",
      "description": "Indicates whether the operation succeeded or not"
    }
  }
}

Upload Attachment

Uploads an attachment
POST /domains/{domainId}/principals/{principalId}/attachments/{attachmentId}

Parameters

Name Required Type Description
domainId true string The ID of the domain
principalId true string The ID of the principal
attachmentId true string
Supports both URLEncoded and MultiPart requests

Response

{
  "type": "object",
  "description": "Status of Operation (with ID)",
  "extends": "status",
  "properties": {
    "_doc": {
      "type": "string"
    },
    "ok": null
  }
}

Upload Attachments

Uploads one or more attachments
POST /domains/{domainId}/principals/{principalId}/attachments

Parameters

Name Required Type Description
domainId true string The ID of the domain
principalId true string The ID of the principal
Only supports MultiPart requests

Response

{
  "type": "object",
  "description": "Result Map",
  "properties": {
    "total_rows": {
      "type": "number"
    },
    "offset": {
      "type": "number"
    },
    "size": {
      "type": "number"
    },
    "rows": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/resultmap_attachment"
      }
    }
  }
}

Schema


{
  "type": "object",
  "extends": "document",
  "description": "Domain Principal",
  "container": "domain",
  "properties": {
    "name": {
      "type": "string"
    },
    "type": {
      "type": "string"
    },
    "authorities": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "Authority Key"
      }
    },
    "_doc": null,
    "_system": null
  },
  "id": "principal"
}