AXIAM PHP SDK

GroupsApi extends ManagementSupport
in package

FinalYes

Named collections of users. Roles assigned to a group are inherited by every member.

The groups namespace handle (CONTRACT.md §27.2), reached as $client->management()->groups(). Every method here goes through the one shared ManagementTransport, so §3 CSRF, the §4 cookie jar, the §5 tenant header, §6 TLS, §16 retry and §19 telemetry apply without this class doing anything to opt in (§27.8).

Table of Contents

Methods

__construct()  : mixed
addMember()  : void
`POST /api/v1/groups/{group_id}/members`
addServiceAccount()  : void
`POST /api/v1/groups/{group_id}/service-accounts`
create()  : Group
`POST /api/v1/groups`
delete()  : void
`DELETE /api/v1/groups/{group_id}`
forTenant()  : static
A COPY of this handle scoped to `$tenantId` (§27.4 rule 3). See {@see self::inOrg()} for why it copies.
get()  : Group
`GET /api/v1/groups/{group_id}`
inOrg()  : static
A COPY of this handle scoped to `$orgId` (§27.4 rule 3).
listItems()  : Page<string|int, Group>
`GET /api/v1/groups`
listMembers()  : Page<string|int, UserResponse>
`GET /api/v1/groups/{group_id}/members`
listRoles()  : array<int, RoleAssignment>
`GET /api/v1/groups/{group_id}/roles`
listServiceAccounts()  : Page<string|int, ServiceAccountResponse>
`GET /api/v1/groups/{group_id}/service-accounts`
removeMember()  : void
`DELETE /api/v1/groups/{group_id}/members/{user_id}`
removeServiceAccount()  : void
`DELETE /api/v1/groups/{group_id}/service-accounts/{service_account_id}`
update()  : Group
`PUT /api/v1/groups/{group_id}`

Methods

__construct()

public __construct(ManagementTransport $transport[, NamespaceScope $scope = new NamespaceScope() ][, string|null $clientOrgId = null ][, string|null $clientTenantId = null ]) : mixed
Parameters
$transport : ManagementTransport

The one wire path (§27.8).

$scope : NamespaceScope = new NamespaceScope()

Per-handle {org_id}/{tenant_id} overrides.

$clientOrgId : string|null = null

The client's own organization id, or null.

$clientTenantId : string|null = null

The client's own tenant id, or null.

addMember()

`POST /api/v1/groups/{group_id}/members`

public addMember(string $groupId, AddMemberRequest $body) : void

POST /api/v1/groups/{group_id}/members.

Returns nothing; the server answers with an empty body.

Parameters
$groupId : string

the {group_id} path parameter

$body : AddMemberRequest

the request body

addServiceAccount()

`POST /api/v1/groups/{group_id}/service-accounts`

public addServiceAccount(string $groupId, AddServiceAccountMemberRequest $body) : void

POST /api/v1/groups/{group_id}/service-accounts.

Returns nothing; the server answers with an empty body.

Parameters
$groupId : string

the {group_id} path parameter

$body : AddServiceAccountMemberRequest

the request body

delete()

`DELETE /api/v1/groups/{group_id}`

public delete(string $groupId) : void

DELETE /api/v1/groups/{group_id}.

Returns nothing; the server answers with an empty body.

NOT idempotent (§27.4 rule 6): deleting something already deleted raises NotFoundError rather than succeeding quietly.

Parameters
$groupId : string

the {group_id} path parameter

forTenant()

A COPY of this handle scoped to `$tenantId` (§27.4 rule 3). See {@see self::inOrg()} for why it copies.

public forTenant(string $tenantId) : static
Parameters
$tenantId : string
Return values
static

get()

`GET /api/v1/groups/{group_id}`

public get(string $groupId) : Group

GET /api/v1/groups/{group_id}.

Parameters
$groupId : string

the {group_id} path parameter

Return values
Group

inOrg()

A COPY of this handle scoped to `$orgId` (§27.4 rule 3).

public inOrg(string $orgId) : static

Returns a new handle rather than mutating this one. An administrator holding a handle to their own organization should not find it repointed at someone else's because an unrelated code path re-scoped a shared object — and on a management surface that failure mode writes to the wrong tenant rather than merely reading from it.

Parameters
$orgId : string
Return values
static

listItems()

`GET /api/v1/groups`

public listItems([PageRequest|null $page = null ]) : Page<string|int, Group>

GET /api/v1/groups.

Returns ONE page. Page::$total is the server's count across all pages and is not count($page) — see §27.4 rule 4.

Parameters
$page : PageRequest|null = null

which page to fetch; defaults to the first

Return values
Page<string|int, Group>

listMembers()

`GET /api/v1/groups/{group_id}/members`

public listMembers(string $groupId[, PageRequest|null $page = null ]) : Page<string|int, UserResponse>

GET /api/v1/groups/{group_id}/members.

Returns ONE page. Page::$total is the server's count across all pages and is not count($page) — see §27.4 rule 4.

Parameters
$groupId : string

the {group_id} path parameter

$page : PageRequest|null = null

which page to fetch; defaults to the first

Return values
Page<string|int, UserResponse>

listRoles()

`GET /api/v1/groups/{group_id}/roles`

public listRoles(string $groupId) : array<int, RoleAssignment>

GET /api/v1/groups/{group_id}/roles.

Returns the server's complete list. This endpoint is NOT paginated, so the result is a plain list and never a Page (§27.4 rule 4).

Parameters
$groupId : string

the {group_id} path parameter

Return values
array<int, RoleAssignment>

listServiceAccounts()

`GET /api/v1/groups/{group_id}/service-accounts`

public listServiceAccounts(string $groupId[, PageRequest|null $page = null ]) : Page<string|int, ServiceAccountResponse>

GET /api/v1/groups/{group_id}/service-accounts.

Returns ONE page. Page::$total is the server's count across all pages and is not count($page) — see §27.4 rule 4.

Parameters
$groupId : string

the {group_id} path parameter

$page : PageRequest|null = null

which page to fetch; defaults to the first

Return values
Page<string|int, ServiceAccountResponse>

removeMember()

`DELETE /api/v1/groups/{group_id}/members/{user_id}`

public removeMember(string $groupId, string $userId) : void

DELETE /api/v1/groups/{group_id}/members/{user_id}.

Returns nothing; the server answers with an empty body.

NOT idempotent (§27.4 rule 6): deleting something already deleted raises NotFoundError rather than succeeding quietly.

Parameters
$groupId : string

the {group_id} path parameter

$userId : string

the {user_id} path parameter

removeServiceAccount()

`DELETE /api/v1/groups/{group_id}/service-accounts/{service_account_id}`

public removeServiceAccount(string $groupId, string $serviceAccountId) : void

DELETE /api/v1/groups/{group_id}/service-accounts/{service_account_id}.

Returns nothing; the server answers with an empty body.

NOT idempotent (§27.4 rule 6): deleting something already deleted raises NotFoundError rather than succeeding quietly.

Parameters
$groupId : string

the {group_id} path parameter

$serviceAccountId : string

the {service_account_id} path parameter

update()

`PUT /api/v1/groups/{group_id}`

public update(string $groupId, UpdateGroup $body) : Group

PUT /api/v1/groups/{group_id}.

Parameters
$groupId : string

the {group_id} path parameter

$body : UpdateGroup

the request body

Return values
Group
On this page

Search results