Skip to main content Link Menu Expand (external link) Document Search Copy Copied

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

php -f close.php

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

\Kronup\Model\ServiceAccount

🔺 Back to top


create()

Create a new service account for this Organization

#️⃣ Execute example in terminal

php -f create.php

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

\Kronup\Model\ServiceAccount

🔺 Back to top


list()

Get a list of all service account models, including those that were closed

#️⃣ Execute example in terminal

php -f list.php

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

🔺 Back to top


read()

Retrieve service account model

#️⃣ Execute example in terminal

php -f read.php

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

\Kronup\Model\ServiceAccount

🔺 Back to top


regenerate()

Regenerate service account JSON Web Token and re-open service account if previously closed

#️⃣ Execute example in terminal

php -f regenerate.php

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

\Kronup\Model\ServiceAccount

🔺 Back to top


update()

Update service account details

#️⃣ Execute example in terminal

php -f update.php

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  

Return type

\Kronup\Model\ServiceAccount

🔺 Back to top