Api / Service accounts
Method | Description |
---|---|
🔹 close() | Close service account |
🔹 create() | Create service account |
🔹 list() | List service acounts |
🔹 read() | Fetch service account |
🔹 regenerate() | Regenerate |
🔹 update() | Update service account |
📚 Service accounts API Reference
Getting started
// Place your API Key 👇 here
$sdk = new \Kronup\Sdk();
// API Call
$sdk->api()->serviceAccounts();
close()
Close this service account. This action is always reversible. You can re-open it anytime with “regenerate”.
#️⃣ Execute example in terminal
Request
DELETE
/service-accounts/{accountId}
Type signature
(new \Kronup\Sdk())->api()->serviceAccounts()->close(
string $account_id
): \Kronup\Model\ServiceAccount
Parameters
Name | Type | Description |
---|---|---|
$account_id | string | Service account ID |
Return type
create()
Create a new service account for this Organization
#️⃣ Execute example in terminal
Request
POST
/service-accounts
Type signature
(new \Kronup\Sdk())->api()->serviceAccounts()->create(
\Kronup\Model\PayloadServiceAccountCreate $payload_service_account_create
): \Kronup\Model\ServiceAccount
Parameters
Name | Type | Description |
---|---|---|
$payload_service_account_create | \Kronup\Model\PayloadServiceAccountCreate |
Return type
list()
Get a list of all service account models, including those that were closed
#️⃣ Execute example in terminal
Request
GET
/service-accounts
Type signature
(new \Kronup\Sdk())->api()->serviceAccounts()->list(
[ int $page_number = 1, ]
[ int $page_size = 500 ]
): \Kronup\Model\ServiceAccountsList
Parameters
Name | Type | Description |
---|---|---|
$page_number | int | [default to 1] |
$page_size | int | [default to 500] |
Return type
\Kronup\Model\ServiceAccountsList
read()
Retrieve service account model
#️⃣ Execute example in terminal
Request
GET
/service-accounts/{accountId}
Type signature
(new \Kronup\Sdk())->api()->serviceAccounts()->read(
string $account_id
): \Kronup\Model\ServiceAccount
Parameters
Name | Type | Description |
---|---|---|
$account_id | string | Service Account ID |
Return type
regenerate()
Regenerate service account JSON Web Token and re-open service account if previously closed
#️⃣ Execute example in terminal
Request
PUT
/service-accounts/{accountId}
Type signature
(new \Kronup\Sdk())->api()->serviceAccounts()->regenerate(
string $account_id
): \Kronup\Model\ServiceAccount
Parameters
Name | Type | Description |
---|---|---|
$account_id | string | Service account ID |
Return type
update()
Update service account details
#️⃣ Execute example in terminal
Request
POST
/service-accounts/{accountId}
Type signature
(new \Kronup\Sdk())->api()->serviceAccounts()->update(
string $account_id,
\Kronup\Model\PayloadServiceAccountUpdate $payload_service_account_update
): \Kronup\Model\ServiceAccount
Parameters
Name | Type | Description |
---|---|---|
$account_id | string | Service account ID |
$payload_service_account_update | \Kronup\Model\PayloadServiceAccountUpdate |