- listUsers - List Users
- getUser - Get User
- updateUser - Update User
- deleteUser - Delete User
- listRoles - List Roles
- getRole - Get Role
- listGroups - List Groups
- getGroup - Get Group
- listPolicies - List Policies
- getPolicy - Get Policy
List Users
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
use StackOne\client\Models\Operations;
use StackOne\client\Utils;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$request = new Operations\IamListUsersRequest(
xAccountId: '<id>',
fields: 'id,remote_id,first_name,last_name,name,primary_email_address,username,roles,groups,status,avatar,is_bot_user,last_active_at,last_login_at,created_at,updated_at,multi_factor_enabled,unified_custom_fields',
filter: new Operations\IamListUsersQueryParamFilter(
updatedAfter: Utils\Utils::parseDateTime('2020-01-01T00:00:00.000Z'),
),
expand: 'roles,groups',
prefer: 'heartbeat',
);
$responses = $sdk->iam->listUsers(
request: $request
);
foreach ($responses as $response) {
if ($response->statusCode === 200) {
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\IamListUsersRequest | ✔️ | The request object to use for the request. |
?Operations\IamListUsersResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Get User
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
use StackOne\client\Models\Operations;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$request = new Operations\IamGetUserRequest(
xAccountId: '<id>',
id: '<id>',
fields: 'id,remote_id,first_name,last_name,name,primary_email_address,username,roles,groups,status,avatar,is_bot_user,last_active_at,last_login_at,created_at,updated_at,multi_factor_enabled,unified_custom_fields',
expand: 'roles,groups',
prefer: 'heartbeat',
);
$response = $sdk->iam->getUser(
request: $request
);
if ($response->iamUserResult !== null) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\IamGetUserRequest | ✔️ | The request object to use for the request. |
?Operations\IamGetUserResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Update User
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$iamUpdateUserRequestDto = new Components\IamUpdateUserRequestDto(
primaryEmailAddress: 'han@stackone.com',
firstName: 'Han',
lastName: 'Solo',
name: 'Han Solo',
username: 'hansolo1977',
isBotUser: true,
status: new Components\IamUpdateUserRequestDtoStatus(
value: Components\IamUpdateUserRequestDtoValue::Enabled,
),
passthrough: [
'other_known_names' => 'John Doe',
],
);
$response = $sdk->iam->updateUser(
xAccountId: '<id>',
id: '<id>',
iamUpdateUserRequestDto: $iamUpdateUserRequestDto,
prefer: 'heartbeat'
);
if ($response->updateResult !== null) {
// handle response
}| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
xAccountId |
string | ✔️ | The account identifier | |
id |
string | ✔️ | N/A | |
iamUpdateUserRequestDto |
Components\IamUpdateUserRequestDto | ✔️ | N/A | |
prefer |
?string | ➖ | Set to "heartbeat" to enable keep-alive newline heartbeats during long-running requests. Response includes Preference-Applied: heartbeat header when honored. (RFC 7240) | heartbeat |
?Operations\IamUpdateUserResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Delete User
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$response = $sdk->iam->deleteUser(
xAccountId: '<id>',
id: '<id>',
prefer: 'heartbeat'
);
if ($response->deleteResult !== null) {
// handle response
}| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
xAccountId |
string | ✔️ | The account identifier | |
id |
string | ✔️ | N/A | |
prefer |
?string | ➖ | Set to "heartbeat" to enable keep-alive newline heartbeats during long-running requests. Response includes Preference-Applied: heartbeat header when honored. (RFC 7240) | heartbeat |
?Operations\IamDeleteUserResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
List Roles
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
use StackOne\client\Models\Operations;
use StackOne\client\Utils;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$request = new Operations\IamListRolesRequest(
xAccountId: '<id>',
fields: 'id,remote_id,name,type,policies,description,created_at,updated_at,unified_custom_fields',
filter: new Operations\IamListRolesQueryParamFilter(
updatedAfter: Utils\Utils::parseDateTime('2020-01-01T00:00:00.000Z'),
),
expand: 'policies',
prefer: 'heartbeat',
);
$responses = $sdk->iam->listRoles(
request: $request
);
foreach ($responses as $response) {
if ($response->statusCode === 200) {
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\IamListRolesRequest | ✔️ | The request object to use for the request. |
?Operations\IamListRolesResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Get Role
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
use StackOne\client\Models\Operations;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$request = new Operations\IamGetRoleRequest(
xAccountId: '<id>',
id: '<id>',
fields: 'id,remote_id,name,type,policies,description,created_at,updated_at,unified_custom_fields',
expand: 'policies',
prefer: 'heartbeat',
);
$response = $sdk->iam->getRole(
request: $request
);
if ($response->iamRoleResult !== null) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\IamGetRoleRequest | ✔️ | The request object to use for the request. |
?Operations\IamGetRoleResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
List Groups
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
use StackOne\client\Models\Operations;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$request = new Operations\IamListGroupsRequest(
xAccountId: '<id>',
fields: 'id,remote_id,parent_id,remote_parent_id,name,description,roles,type,created_at,updated_at,unified_custom_fields',
filter: null,
expand: 'roles',
prefer: 'heartbeat',
);
$responses = $sdk->iam->listGroups(
request: $request
);
foreach ($responses as $response) {
if ($response->statusCode === 200) {
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\IamListGroupsRequest | ✔️ | The request object to use for the request. |
?Operations\IamListGroupsResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Get Group
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
use StackOne\client\Models\Operations;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$request = new Operations\IamGetGroupRequest(
xAccountId: '<id>',
id: '<id>',
fields: 'id,remote_id,parent_id,remote_parent_id,name,description,roles,type,created_at,updated_at,unified_custom_fields',
expand: 'roles',
prefer: 'heartbeat',
);
$response = $sdk->iam->getGroup(
request: $request
);
if ($response->iamGroupResult !== null) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\IamGetGroupRequest | ✔️ | The request object to use for the request. |
?Operations\IamGetGroupResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
List Policies
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
use StackOne\client\Models\Operations;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$request = new Operations\IamListPoliciesRequest(
xAccountId: '<id>',
fields: 'id,remote_id,name,permissions,description,created_at,updated_at,unified_custom_fields',
filter: null,
expand: 'permissions',
prefer: 'heartbeat',
);
$responses = $sdk->iam->listPolicies(
request: $request
);
foreach ($responses as $response) {
if ($response->statusCode === 200) {
// handle response
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\IamListPoliciesRequest | ✔️ | The request object to use for the request. |
?Operations\IamListPoliciesResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Get Policy
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
use StackOne\client\Models\Operations;
$sdk = client\StackOne::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$request = new Operations\IamGetPolicyRequest(
xAccountId: '<id>',
id: '<id>',
fields: 'id,remote_id,name,permissions,description,created_at,updated_at,unified_custom_fields',
expand: 'permissions',
prefer: 'heartbeat',
);
$response = $sdk->iam->getPolicy(
request: $request
);
if ($response->iamPolicyResult !== null) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
$request |
Operations\IamGetPolicyRequest | ✔️ | The request object to use for the request. |
?Operations\IamGetPolicyResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\PreconditionFailedResponse | 412 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |