Warning
This SDK is DEPRECATED
list- Get a list of SAML Connections for an instance⚠️ Deprecatedcreate- Create a SAML Connection⚠️ Deprecatedget- Retrieve a SAML Connection by ID⚠️ Deprecatedupdate- Update a SAML Connection⚠️ Deprecateddelete- Delete a SAML Connection⚠️ Deprecated
Returns the list of SAML Connections for an instance.
Results can be paginated using the optional limit and offset query parameters.
The SAML Connections are ordered by descending creation date and the most recent will be returned first.
Deprecated: Use the Enterprise Connections API instead. This endpoint will be removed in future versions.
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
package hello.world;
import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.errors.ClerkErrors;
import com.clerk.backend_api.models.operations.ListSAMLConnectionsRequest;
import com.clerk.backend_api.models.operations.ListSAMLConnectionsResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws ClerkErrors, Exception {
Clerk sdk = Clerk.builder()
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
ListSAMLConnectionsRequest req = ListSAMLConnectionsRequest.builder()
.build();
ListSAMLConnectionsResponse res = sdk.samlConnections().list()
.request(req)
.call();
if (res.samlConnections().isPresent()) {
System.out.println(res.samlConnections().get());
}
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
ListSAMLConnectionsRequest | ✔️ | The request object to use for the request. |
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ClerkErrors | 402, 403, 422 | application/json |
| models/errors/SDKError | 4XX, 5XX | */* |
Create a new SAML Connection. Deprecated: Use the Enterprise Connections API instead. This endpoint will be removed in future versions.
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
package hello.world;
import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.components.*;
import com.clerk.backend_api.models.errors.ClerkErrors;
import com.clerk.backend_api.models.operations.CreateSAMLConnectionResponse;
import java.lang.Exception;
import java.lang.Object;
public class Application {
public static void main(String[] args) throws ClerkErrors, Exception {
Clerk sdk = Clerk.builder()
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
CreateSAMLConnectionResponse res = sdk.samlConnections().create()
.call();
if (res.samlConnection().isPresent()) {
SAMLConnection unionValue = res.samlConnection().get();
Object raw = unionValue.value();
if (raw instanceof One) {
One oneValue = (One) raw;
// Handle one variant
} else if (raw instanceof Two) {
Two twoValue = (Two) raw;
// Handle two variant
} else {
// Unknown or unsupported variant
}
}
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
request |
CreateSAMLConnectionRequestBody | ✔️ | The request object to use for the request. |
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ClerkErrors | 402, 403, 404, 422 | application/json |
| models/errors/SDKError | 4XX, 5XX | */* |
Fetches the SAML Connection whose ID matches the provided saml_connection_id in the path.
Deprecated: Use the Enterprise Connections API instead. This endpoint will be removed in future versions.
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
package hello.world;
import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.components.*;
import com.clerk.backend_api.models.errors.ClerkErrors;
import com.clerk.backend_api.models.operations.GetSAMLConnectionResponse;
import java.lang.Exception;
import java.lang.Object;
public class Application {
public static void main(String[] args) throws ClerkErrors, Exception {
Clerk sdk = Clerk.builder()
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
GetSAMLConnectionResponse res = sdk.samlConnections().get()
.samlConnectionId("<id>")
.call();
if (res.samlConnection().isPresent()) {
SAMLConnection unionValue = res.samlConnection().get();
Object raw = unionValue.value();
if (raw instanceof One) {
One oneValue = (One) raw;
// Handle one variant
} else if (raw instanceof Two) {
Two twoValue = (Two) raw;
// Handle two variant
} else {
// Unknown or unsupported variant
}
}
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
samlConnectionId |
String | ✔️ | The ID of the SAML Connection |
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ClerkErrors | 402, 403, 404 | application/json |
| models/errors/SDKError | 4XX, 5XX | */* |
Updates the SAML Connection whose ID matches the provided id in the path.
Deprecated: Use the Enterprise Connections API instead. This endpoint will be removed in future versions.
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
package hello.world;
import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.components.*;
import com.clerk.backend_api.models.errors.ClerkErrors;
import com.clerk.backend_api.models.operations.UpdateSAMLConnectionRequestBody;
import com.clerk.backend_api.models.operations.UpdateSAMLConnectionResponse;
import java.lang.Exception;
import java.lang.Object;
public class Application {
public static void main(String[] args) throws ClerkErrors, Exception {
Clerk sdk = Clerk.builder()
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
UpdateSAMLConnectionResponse res = sdk.samlConnections().update()
.samlConnectionId("<id>")
.requestBody(UpdateSAMLConnectionRequestBody.builder()
.build())
.call();
if (res.samlConnection().isPresent()) {
SAMLConnection unionValue = res.samlConnection().get();
Object raw = unionValue.value();
if (raw instanceof One) {
One oneValue = (One) raw;
// Handle one variant
} else if (raw instanceof Two) {
Two twoValue = (Two) raw;
// Handle two variant
} else {
// Unknown or unsupported variant
}
}
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
samlConnectionId |
String | ✔️ | The ID of the SAML Connection to update |
requestBody |
UpdateSAMLConnectionRequestBody | ✔️ | N/A |
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ClerkErrors | 402, 403, 404, 422 | application/json |
| models/errors/SDKError | 4XX, 5XX | */* |
Deletes the SAML Connection whose ID matches the provided id in the path.
Deprecated: Use the Enterprise Connections API instead. This endpoint will be removed in future versions.
⚠️ DEPRECATED: This will be removed in a future release, please migrate away from it as soon as possible.
package hello.world;
import com.clerk.backend_api.Clerk;
import com.clerk.backend_api.models.errors.ClerkErrors;
import com.clerk.backend_api.models.operations.DeleteSAMLConnectionResponse;
import java.lang.Exception;
public class Application {
public static void main(String[] args) throws ClerkErrors, Exception {
Clerk sdk = Clerk.builder()
.bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
.build();
DeleteSAMLConnectionResponse res = sdk.samlConnections().delete()
.samlConnectionId("<id>")
.call();
if (res.deletedObject().isPresent()) {
System.out.println(res.deletedObject().get());
}
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
samlConnectionId |
String | ✔️ | The ID of the SAML Connection to delete |
| Error Type | Status Code | Content Type |
|---|---|---|
| models/errors/ClerkErrors | 402, 403, 404 | application/json |
| models/errors/SDKError | 4XX, 5XX | */* |