Skip to content

Latest commit

 

History

History
170 lines (116 loc) · 8.32 KB

File metadata and controls

170 lines (116 loc) · 8.32 KB

InstanceSettings

(instanceSettings())

Overview

Available Operations

update

Updates the settings of an instance

Example Usage

package hello.world;

import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.errors.ClerkErrors;
import com.clerk.backend_api.models.operations.UpdateInstanceRequestBody;
import com.clerk.backend_api.models.operations.UpdateInstanceResponse;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws ClerkErrors, Exception {

        Clerk sdk = Clerk.builder()
                .bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
            .build();

        UpdateInstanceRequestBody req = UpdateInstanceRequestBody.builder()
                .build();

        UpdateInstanceResponse res = sdk.instanceSettings().update()
                .request(req)
                .call();

        // handle response
    }
}

Parameters

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

Response

UpdateInstanceResponse

Errors

Error Type Status Code Content Type
models/errors/ClerkErrors 422 application/json
models/errors/SDKError 4XX, 5XX */*

updateRestrictions

Updates the restriction settings of an instance

Example Usage

package hello.world;

import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.errors.ClerkErrors;
import com.clerk.backend_api.models.operations.UpdateInstanceRestrictionsRequestBody;
import com.clerk.backend_api.models.operations.UpdateInstanceRestrictionsResponse;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws ClerkErrors, Exception {

        Clerk sdk = Clerk.builder()
                .bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
            .build();

        UpdateInstanceRestrictionsRequestBody req = UpdateInstanceRestrictionsRequestBody.builder()
                .build();

        UpdateInstanceRestrictionsResponse res = sdk.instanceSettings().updateRestrictions()
                .request(req)
                .call();

        if (res.instanceRestrictions().isPresent()) {
            // handle response
        }
    }
}

Parameters

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

Response

UpdateInstanceRestrictionsResponse

Errors

Error Type Status Code Content Type
models/errors/ClerkErrors 402, 422 application/json
models/errors/SDKError 4XX, 5XX */*

updateOrganizationSettings

Updates the organization settings of the instance

Example Usage

package hello.world;

import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.errors.ClerkErrors;
import com.clerk.backend_api.models.operations.UpdateInstanceOrganizationSettingsRequestBody;
import com.clerk.backend_api.models.operations.UpdateInstanceOrganizationSettingsResponse;
import java.lang.Exception;

public class Application {

    public static void main(String[] args) throws ClerkErrors, Exception {

        Clerk sdk = Clerk.builder()
                .bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
            .build();

        UpdateInstanceOrganizationSettingsRequestBody req = UpdateInstanceOrganizationSettingsRequestBody.builder()
                .build();

        UpdateInstanceOrganizationSettingsResponse res = sdk.instanceSettings().updateOrganizationSettings()
                .request(req)
                .call();

        if (res.organizationSettings().isPresent()) {
            // handle response
        }
    }
}

Parameters

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

Response

UpdateInstanceOrganizationSettingsResponse

Errors

Error Type Status Code Content Type
models/errors/ClerkErrors 402, 404, 422 application/json
models/errors/SDKError 4XX, 5XX */*