AXIAM PHP SDK

ScopesApi extends ManagementSupport
in package

FinalYes

Sub-resource granularity, always addressed under their resource.

The scopes namespace handle (CONTRACT.md §27.2), reached as $client->management()->scopes(). 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
create()  : Scope
`POST /api/v1/resources/{resource_id}/scopes`
delete()  : void
`DELETE /api/v1/resources/{resource_id}/scopes/{scope_id}`
forTenant()  : static
A COPY of this handle scoped to `$tenantId` (§27.4 rule 3). See {@see self::inOrg()} for why it copies.
get()  : Scope
`GET /api/v1/resources/{resource_id}/scopes/{scope_id}`
inOrg()  : static
A COPY of this handle scoped to `$orgId` (§27.4 rule 3).
listItems()  : array<int, Scope>
`GET /api/v1/resources/{resource_id}/scopes`
update()  : Scope
`PUT /api/v1/resources/{resource_id}/scopes/{scope_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.

create()

`POST /api/v1/resources/{resource_id}/scopes`

public create(string $resourceId, CreateScopeRequest $body) : Scope

POST /api/v1/resources/{resource_id}/scopes.

Parameters
$resourceId : string

the {resource_id} path parameter

$body : CreateScopeRequest

the request body

Return values
Scope

delete()

`DELETE /api/v1/resources/{resource_id}/scopes/{scope_id}`

public delete(string $resourceId, string $scopeId) : void

DELETE /api/v1/resources/{resource_id}/scopes/{scope_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
$resourceId : string

the {resource_id} path parameter

$scopeId : string

the {scope_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/resources/{resource_id}/scopes/{scope_id}`

public get(string $resourceId, string $scopeId) : Scope

GET /api/v1/resources/{resource_id}/scopes/{scope_id}.

Parameters
$resourceId : string

the {resource_id} path parameter

$scopeId : string

the {scope_id} path parameter

Return values
Scope

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/resources/{resource_id}/scopes`

public listItems(string $resourceId) : array<int, Scope>

GET /api/v1/resources/{resource_id}/scopes.

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
$resourceId : string

the {resource_id} path parameter

Return values
array<int, Scope>

update()

`PUT /api/v1/resources/{resource_id}/scopes/{scope_id}`

public update(string $resourceId, string $scopeId, UpdateScopeRequest $body) : Scope

PUT /api/v1/resources/{resource_id}/scopes/{scope_id}.

Parameters
$resourceId : string

the {resource_id} path parameter

$scopeId : string

the {scope_id} path parameter

$body : UpdateScopeRequest

the request body

Return values
Scope
On this page

Search results