Skip to content

Accounts Endpoints

The Accounts API provides endpoints for managing user accounts, retrieving account details, and performing bulk operations.

Base URL

All endpoints are relative to /api/v1/accounts.


List Accounts

Retrieve a paginated list of accounts with optional filtering.

http
GET /api/v1/accounts

Query Parameters

ParameterTypeDescription
searchstringSearch by account name or email
departmentstringFilter by department
data_source_idstringFilter by data source
limitnumberNumber of items to return (default: 50)
afterstringCursor for pagination

Response

json
{
  "accounts": [
    {
      "id": "acc-123",
      "name": "john.doe",
      "email": "john.doe@company.com",
      "display_name": "John Doe",
      "department": "Engineering",
      "status": "active",
      "risk_score": 35,
      "created_at": "2024-01-15T10:30:00Z"
    }
  ],
  "pageInfo": {
    "hasNextPage": true,
    "endCursor": "cursor-token"
  }
}

Get Account

Retrieve details for a specific account.

http
GET /api/v1/accounts/{id}

Path Parameters

ParameterTypeDescription
idstringAccount ID

Response

Returns the complete account object with all fields.


Create Account

Create a new account record.

http
POST /api/v1/accounts

::: note Administrator Only This endpoint requires Administrator role. :::

Request Body

json
{
  "name": "jane.smith",
  "email": "jane.smith@company.com",
  "display_name": "Jane Smith",
  "department": "Finance",
  "data_source_id": "ds-123"
}

Response

Returns the created account object with generated id.


Update Account

Update an existing account.

http
PUT /api/v1/accounts/{id}

::: note Administrator Only This endpoint requires Administrator role. :::

Path Parameters

ParameterTypeDescription
idstringAccount ID

Request Body

Include only the fields to update.

Response

Returns the updated account object.


Delete Account

Delete an account record.

http
DELETE /api/v1/accounts/{id}

::: note Administrator Only This endpoint requires Administrator role. :::

Path Parameters

ParameterTypeDescription
idstringAccount ID

Response

Returns 204 No Content on success.


Bulk Get Accounts

Retrieve multiple accounts by their IDs in a single request.

http
POST /api/v1/accounts/bulk

Request Body

json
{
  "account_ids": ["acc-123", "acc-456", "acc-789"]
}

Response

json
{
  "accounts": [...],
  "not_found": ["acc-789"]
}

Get Account Attributes

Retrieve custom attributes for an account.

http
GET /api/v1/accounts/{id}/attributes

Path Parameters

ParameterTypeDescription
idstringAccount ID

Response

json
{
  "attributes": {
    "custom_field_1": "value",
    "custom_field_2": "value"
  },
  "count": 2
}

Get Account Group Memberships

Retrieve groups an account belongs to.

http
GET /api/v1/accounts/{id}/groupmemberships

Path Parameters

ParameterTypeDescription
idstringAccount ID

Response

json
{
  "groups": [
    {
      "id": "grp-123",
      "name": "Engineering Team",
      "membership_type": "direct"
    }
  ],
  "count": 1
}

Get Account Owners

Retrieve owners associated with an account.

http
GET /api/v1/accounts/{id}/owners

Path Parameters

ParameterTypeDescription
idstringAccount ID

Response

json
{
  "owners": [
    {
      "id": "own-123",
      "name": "John Manager",
      "email": "john.manager@company.com"
    }
  ],
  "count": 1
}

Search by Attributes

Search accounts by custom attribute values.

http
GET /api/v1/accounts/search/attributes

Query Parameters

ParameterTypeDescription
field_namestringAttribute field name
field_valuestringValue to search for
limitnumberNumber of results

Response

Paginated list of matching accounts.


Get Attribute Search Stats

Get statistics about searchable attributes.

http
GET /api/v1/accounts/search/attributes/stats

Response

json
{
  "searchable_fields": 15,
  "total_indexed_values": 5000
}

Get Account Platforms

Get distinct platforms with account counts.

http
GET /api/v1/accounts/platforms

Response

json
{
  "platforms": [
    { "name": "Okta", "count": 1500 },
    { "name": "Azure", "count": 800 }
  ]
}

Calculate Account Risk

Trigger risk score calculation for an account.

http
POST /api/v1/accounts/{id}/calculate-risk

Path Parameters

ParameterTypeDescription
idstringAccount ID

Response

json
{
  "status": "calculating",
  "message": "Risk calculation started"
}

Manager Resolution Endpoints

Get Manager Resolution Config

http
GET /api/v1/accounts/manager-resolution/config

Save Manager Resolution Config

http
PUT /api/v1/accounts/manager-resolution/config

::: note Administrator Only This endpoint requires Administrator role. :::

Request Body

json
{
  "source_application": "app-123",
  "manager_field_path": "entity.ManagerID",
  "manager_id_field_path": "entity.EmployeeNumber",
  "scheduled_enabled": true
}

Run Manager Resolution

http
POST /api/v1/accounts/manager-resolution/run

::: note Administrator Only This endpoint requires Administrator role. :::

Get Manager Resolution Stats

http
GET /api/v1/accounts/manager-resolution/stats

Response

json
{
  "total_owners": 1000,
  "owners_with_manager": 850,
  "owners_without_manager": 150
}

Error Responses

Status CodeDescription
400Bad Request - Invalid parameters
401Unauthorized - Authentication required
403Forbidden - Insufficient permissions
404Not Found - Account does not exist
500Internal Server Error

Hydden Documentation and Training Hub