Skip to content

Latest commit

 

History

History
447 lines (344 loc) · 24.4 KB

README.md

File metadata and controls

447 lines (344 loc) · 24.4 KB

Instance

(instance())

Available Operations

updateAuthConfig

Updates the settings of an instance

Example Usage

package hello.world;

import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.components.*;
import com.clerk.backend_api.models.components.Security;
import com.clerk.backend_api.models.operations.*;
import com.clerk.backend_api.utils.EventStream;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.Optional;
import org.openapitools.jackson.nullable.JsonNullable;
import static java.util.Map.entry;

public class Application {

    public static void main(String[] args) throws Exception {
        try {
            Clerk sdk = Clerk.builder()
                .bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
                .build();

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

            UpdateInstanceAuthConfigResponse res = sdk.instance().updateAuthConfig()
                .request(req)
                .call();

            if (res.instanceSettings().isPresent()) {
                // handle response
            }
        } catch (com.clerk.backend_api.models.errors.ClerkErrors e) {
            // handle exception
            throw e;
        } catch (com.clerk.backend_api.models.errors.SDKError e) {
            // handle exception
            throw e;
        } catch (Exception e) {
            // handle exception
            throw e;
        }
    }
}

Parameters

Parameter Type Required Description
request com.clerk.backend_api.models.operations.UpdateInstanceAuthConfigRequestBody ✔️ The request object to use for the request.

Response

Optional<? extends com.clerk.backend_api.models.operations.UpdateInstanceAuthConfigResponse>

Errors

Error Object Status Code Content Type
models/errors/ClerkErrors 402,422 application/json
models/errors/SDKError 4xx-5xx /

updateProductionDomain

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.

⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.

Example Usage

package hello.world;

import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.components.*;
import com.clerk.backend_api.models.components.Security;
import com.clerk.backend_api.models.operations.*;
import com.clerk.backend_api.utils.EventStream;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.Optional;
import org.openapitools.jackson.nullable.JsonNullable;
import static java.util.Map.entry;

public class Application {

    public static void main(String[] args) throws Exception {
        try {
            Clerk sdk = Clerk.builder()
                .bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
                .build();

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

            UpdateProductionInstanceDomainResponse res = sdk.instance().updateProductionDomain()
                .request(req)
                .call();

            // handle response
        } catch (com.clerk.backend_api.models.errors.ClerkErrors e) {
            // handle exception
            throw e;
        } catch (com.clerk.backend_api.models.errors.SDKError e) {
            // handle exception
            throw e;
        } catch (Exception e) {
            // handle exception
            throw e;
        }
    }
}

Parameters

Parameter Type Required Description
request com.clerk.backend_api.models.operations.UpdateProductionInstanceDomainRequestBody ✔️ The request object to use for the request.

Response

Optional<? extends com.clerk.backend_api.models.operations.UpdateProductionInstanceDomainResponse>

Errors

Error Object Status Code Content Type
models/errors/ClerkErrors 400,422 application/json
models/errors/SDKError 4xx-5xx /

update

Updates the settings of an instance

Example Usage

package hello.world;

import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.components.*;
import com.clerk.backend_api.models.components.Security;
import com.clerk.backend_api.models.operations.*;
import com.clerk.backend_api.utils.EventStream;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.Optional;
import org.openapitools.jackson.nullable.JsonNullable;
import static java.util.Map.entry;

public class Application {

    public static void main(String[] args) throws Exception {
        try {
            Clerk sdk = Clerk.builder()
                .bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
                .build();

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

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

            // handle response
        } catch (com.clerk.backend_api.models.errors.ClerkErrors e) {
            // handle exception
            throw e;
        } catch (com.clerk.backend_api.models.errors.SDKError e) {
            // handle exception
            throw e;
        } catch (Exception e) {
            // handle exception
            throw e;
        }
    }
}

Parameters

Parameter Type Required Description
request com.clerk.backend_api.models.operations.UpdateInstanceRequestBody ✔️ The request object to use for the request.

Response

Optional<? extends com.clerk.backend_api.models.operations.UpdateInstanceResponse>

Errors

Error Object 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.components.*;
import com.clerk.backend_api.models.components.Security;
import com.clerk.backend_api.models.operations.*;
import com.clerk.backend_api.utils.EventStream;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.Optional;
import org.openapitools.jackson.nullable.JsonNullable;
import static java.util.Map.entry;

public class Application {

    public static void main(String[] args) throws Exception {
        try {
            Clerk sdk = Clerk.builder()
                .bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
                .build();

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

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

            if (res.instanceRestrictions().isPresent()) {
                // handle response
            }
        } catch (com.clerk.backend_api.models.errors.ClerkErrors e) {
            // handle exception
            throw e;
        } catch (com.clerk.backend_api.models.errors.SDKError e) {
            // handle exception
            throw e;
        } catch (Exception e) {
            // handle exception
            throw e;
        }
    }
}

Parameters

Parameter Type Required Description
request com.clerk.backend_api.models.operations.UpdateInstanceRestrictionsRequestBody ✔️ The request object to use for the request.

Response

Optional<? extends com.clerk.backend_api.models.operations.UpdateInstanceRestrictionsResponse>

Errors

Error Object Status Code Content Type
models/errors/ClerkErrors 402,422 application/json
models/errors/SDKError 4xx-5xx /

changeProductionDomain

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

package hello.world;

import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.components.*;
import com.clerk.backend_api.models.components.Security;
import com.clerk.backend_api.models.operations.*;
import com.clerk.backend_api.utils.EventStream;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.Optional;
import org.openapitools.jackson.nullable.JsonNullable;
import static java.util.Map.entry;

public class Application {

    public static void main(String[] args) throws Exception {
        try {
            Clerk sdk = Clerk.builder()
                .bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
                .build();

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

            ChangeProductionInstanceDomainResponse res = sdk.instance().changeProductionDomain()
                .request(req)
                .call();

            // handle response
        } catch (com.clerk.backend_api.models.errors.ClerkErrors e) {
            // handle exception
            throw e;
        } catch (com.clerk.backend_api.models.errors.SDKError e) {
            // handle exception
            throw e;
        } catch (Exception e) {
            // handle exception
            throw e;
        }
    }
}

Parameters

Parameter Type Required Description
request com.clerk.backend_api.models.operations.ChangeProductionInstanceDomainRequestBody ✔️ The request object to use for the request.

Response

Optional<? extends com.clerk.backend_api.models.operations.ChangeProductionInstanceDomainResponse>

Errors

Error Object Status Code Content Type
models/errors/ClerkErrors 400,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.components.*;
import com.clerk.backend_api.models.components.Security;
import com.clerk.backend_api.models.operations.*;
import com.clerk.backend_api.utils.EventStream;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.Optional;
import org.openapitools.jackson.nullable.JsonNullable;
import static java.util.Map.entry;

public class Application {

    public static void main(String[] args) throws Exception {
        try {
            Clerk sdk = Clerk.builder()
                .bearerAuth("<YOUR_BEARER_TOKEN_HERE>")
                .build();

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

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

            if (res.organizationSettings().isPresent()) {
                // handle response
            }
        } catch (com.clerk.backend_api.models.errors.ClerkErrors e) {
            // handle exception
            throw e;
        } catch (com.clerk.backend_api.models.errors.SDKError e) {
            // handle exception
            throw e;
        } catch (Exception e) {
            // handle exception
            throw e;
        }
    }
}

Parameters

Parameter Type Required Description
request com.clerk.backend_api.models.operations.UpdateInstanceOrganizationSettingsRequestBody ✔️ The request object to use for the request.

Response

Optional<? extends com.clerk.backend_api.models.operations.UpdateInstanceOrganizationSettingsResponse>

Errors

Error Object Status Code Content Type
models/errors/ClerkErrors 402,404,422 application/json
models/errors/SDKError 4xx-5xx /