Skip to content

Latest commit

 

History

History
432 lines (276 loc) · 18.3 KB

File metadata and controls

432 lines (276 loc) · 18.3 KB

InstanceSettings

Overview

Modify the settings of your instance.

Available Operations

get

Fetches the current instance

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Clerk\Backend;

$sdk = Backend\ClerkBackend::builder()
    ->setSecurity(
        '<YOUR_BEARER_TOKEN_HERE>'
    )
    ->build();



$response = $sdk->instanceSettings->get(

);

if ($response->instance !== null) {
    // handle response
}

Response

?Operations\GetInstanceResponse

Errors

Error Type Status Code Content Type
Errors\SDKException 4XX, 5XX */*

update

Updates the settings of an instance

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Clerk\Backend;

$sdk = Backend\ClerkBackend::builder()
    ->setSecurity(
        '<YOUR_BEARER_TOKEN_HERE>'
    )
    ->build();



$response = $sdk->instanceSettings->update(
    request: $request
);

if ($response->statusCode === 200) {
    // handle response
}

Parameters

Parameter Type Required Description
$request Operations\UpdateInstanceRequestBody ✔️ The request object to use for the request.

Response

?Operations\UpdateInstanceResponse

Errors

Error Type Status Code Content Type
Errors\ClerkErrors 422 application/json
Errors\SDKException 4XX, 5XX */*

updateRestrictions

Updates the restriction settings of an instance

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Clerk\Backend;

$sdk = Backend\ClerkBackend::builder()
    ->setSecurity(
        '<YOUR_BEARER_TOKEN_HERE>'
    )
    ->build();



$response = $sdk->instanceSettings->updateRestrictions(
    request: $request
);

if ($response->instanceRestrictions !== null) {
    // handle response
}

Parameters

Parameter Type Required Description
$request Operations\UpdateInstanceRestrictionsRequestBody ✔️ The request object to use for the request.

Response

?Operations\UpdateInstanceRestrictionsResponse

Errors

Error Type Status Code Content Type
Errors\ClerkErrors 402, 422 application/json
Errors\SDKException 4XX, 5XX */*

getOAuthApplicationSettings

Retrieves the settings for OAuth applications for the instance (dynamic client registration, JWT access tokens, etc.).

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Clerk\Backend;

$sdk = Backend\ClerkBackend::builder()
    ->setSecurity(
        '<YOUR_BEARER_TOKEN_HERE>'
    )
    ->build();



$response = $sdk->instanceSettings->getOAuthApplicationSettings(

);

if ($response->oAuthApplicationSettings !== null) {
    // handle response
}

Response

?Operations\GetInstanceOAuthApplicationSettingsResponse

Errors

Error Type Status Code Content Type
Errors\SDKException 4XX, 5XX */*

updateOAuthApplicationSettings

Updates the OAuth application settings for the instance.

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Clerk\Backend;

$sdk = Backend\ClerkBackend::builder()
    ->setSecurity(
        '<YOUR_BEARER_TOKEN_HERE>'
    )
    ->build();



$response = $sdk->instanceSettings->updateOAuthApplicationSettings(
    request: $request
);

if ($response->oAuthApplicationSettings !== null) {
    // handle response
}

Parameters

Parameter Type Required Description
$request Operations\UpdateInstanceOAuthApplicationSettingsRequestBody ✔️ The request object to use for the request.

Response

?Operations\UpdateInstanceOAuthApplicationSettingsResponse

Errors

Error Type Status Code Content Type
Errors\ClerkErrors 422 application/json
Errors\SDKException 4XX, 5XX */*

changeDomain

Change the domain of a production instance.

Changing the domain requires updating the DNS records accordingly, deploying new SSL certificates, updating your Social Connection's redirect URLs and setting the new keys in your code.

WARNING: Changing your domain will invalidate all current user sessions (i.e. users will be logged out). Also, while your application is being deployed, a small downtime is expected to occur.

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Clerk\Backend;

$sdk = Backend\ClerkBackend::builder()
    ->setSecurity(
        '<YOUR_BEARER_TOKEN_HERE>'
    )
    ->build();



$response = $sdk->instanceSettings->changeDomain(
    request: $request
);

if ($response->statusCode === 200) {
    // handle response
}

Parameters

Parameter Type Required Description
$request Operations\ChangeProductionInstanceDomainRequestBody ✔️ The request object to use for the request.

Response

?Operations\ChangeProductionInstanceDomainResponse

Errors

Error Type Status Code Content Type
Errors\ClerkErrors 400, 422 application/json
Errors\SDKException 4XX, 5XX */*

updateOrganizationSettings

Updates the organization settings of the instance

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Clerk\Backend;

$sdk = Backend\ClerkBackend::builder()
    ->setSecurity(
        '<YOUR_BEARER_TOKEN_HERE>'
    )
    ->build();



$response = $sdk->instanceSettings->updateOrganizationSettings(
    request: $request
);

if ($response->organizationSettings !== null) {
    // handle response
}

Parameters

Parameter Type Required Description
$request Operations\UpdateInstanceOrganizationSettingsRequestBody ✔️ The request object to use for the request.

Response

?Operations\UpdateInstanceOrganizationSettingsResponse

Errors

Error Type Status Code Content Type
Errors\ClerkErrors 400, 402, 404, 422 application/json
Errors\SDKException 4XX, 5XX */*

getInstanceProtect

Get instance protect settings

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Clerk\Backend;

$sdk = Backend\ClerkBackend::builder()
    ->setSecurity(
        '<YOUR_BEARER_TOKEN_HERE>'
    )
    ->build();



$response = $sdk->instanceSettings->getInstanceProtect(

);

if ($response->instanceProtect !== null) {
    // handle response
}

Response

?Operations\GetInstanceProtectResponse

Errors

Error Type Status Code Content Type
Errors\SDKException 4XX, 5XX */*

updateInstanceProtect

Update instance protect settings

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Clerk\Backend;

$sdk = Backend\ClerkBackend::builder()
    ->setSecurity(
        '<YOUR_BEARER_TOKEN_HERE>'
    )
    ->build();



$response = $sdk->instanceSettings->updateInstanceProtect(
    request: $request
);

if ($response->instanceProtect !== null) {
    // handle response
}

Parameters

Parameter Type Required Description
$request Operations\UpdateInstanceProtectRequestBody ✔️ The request object to use for the request.

Response

?Operations\UpdateInstanceProtectResponse

Errors

Error Type Status Code Content Type
Errors\ClerkErrors 422 application/json
Errors\SDKException 4XX, 5XX */*