(samlConnections)
- create - Create a SAML Connection
- delete - Delete a SAML Connection
- get - Retrieve a SAML Connection by ID
- list - Get a list of SAML Connections for an instance
- update - Update a SAML Connection
Create a new SAML Connection.
declare(strict_types=1);
require 'vendor/autoload.php';
use Clerk\Backend;
use Clerk\Backend\Models\Operations;
$sdk = Backend\ClerkBackend::builder()
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->build();
$request = new Operations\CreateSAMLConnectionRequestBody(
name: '<value>',
domain: 'low-packaging.info',
provider: Operations\Provider::SamlCustom,
);
$response = $sdk->samlConnections->create(
request: $request
);
if ($response->schemasSAMLConnection !== null) {
// handle response
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\CreateSAMLConnectionRequestBody | ✔️ | The request object to use for the request. |
?Operations\CreateSAMLConnectionResponse
Error Type | Status Code | Content Type |
---|---|---|
Errors\ClerkErrors | 402, 403, 404, 422 | application/json |
Errors\SDKException | 4XX, 5XX | */* |
Deletes the SAML Connection whose ID matches the provided id
in the path.
declare(strict_types=1);
require 'vendor/autoload.php';
use Clerk\Backend;
$sdk = Backend\ClerkBackend::builder()
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->build();
$response = $sdk->samlConnections->delete(
samlConnectionId: '<id>'
);
if ($response->deletedObject !== null) {
// handle response
}
Parameter | Type | Required | Description |
---|---|---|---|
samlConnectionId |
string | ✔️ | The ID of the SAML Connection to delete |
?Operations\DeleteSAMLConnectionResponse
Error Type | Status Code | Content Type |
---|---|---|
Errors\ClerkErrors | 402, 403, 404 | application/json |
Errors\SDKException | 4XX, 5XX | */* |
Fetches the SAML Connection whose ID matches the provided saml_connection_id
in the path.
declare(strict_types=1);
require 'vendor/autoload.php';
use Clerk\Backend;
$sdk = Backend\ClerkBackend::builder()
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->build();
$response = $sdk->samlConnections->get(
samlConnectionId: '<id>'
);
if ($response->schemasSAMLConnection !== null) {
// handle response
}
Parameter | Type | Required | Description |
---|---|---|---|
samlConnectionId |
string | ✔️ | The ID of the SAML Connection |
?Operations\GetSAMLConnectionResponse
Error Type | Status Code | Content Type |
---|---|---|
Errors\ClerkErrors | 402, 403, 404 | application/json |
Errors\SDKException | 4XX, 5XX | */* |
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.
declare(strict_types=1);
require 'vendor/autoload.php';
use Clerk\Backend;
$sdk = Backend\ClerkBackend::builder()
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->build();
$response = $sdk->samlConnections->list(
limit: 10,
offset: 0,
organizationId: [
'<id>',
]
);
if ($response->samlConnections !== null) {
// handle response
}
Parameter | Type | Required | Description |
---|---|---|---|
limit |
?int | ➖ | Applies a limit to the number of results returned. Can be used for paginating the results together with offset . |
offset |
?int | ➖ | Skip the first offset results when paginating.Needs to be an integer greater or equal to zero. To be used in conjunction with limit . |
organizationId |
array<string> | ➖ | Returns SAML connections that have an associated organization ID to the given organizations. For each organization id, the + and - can beprepended to the id, which denote whether the respective organization should be included or excluded from the result set. Accepts up to 100 organization ids. |
?Operations\ListSAMLConnectionsResponse
Error Type | Status Code | Content Type |
---|---|---|
Errors\ClerkErrors | 402, 403, 422 | application/json |
Errors\SDKException | 4XX, 5XX | */* |
Updates the SAML Connection whose ID matches the provided id
in the path.
declare(strict_types=1);
require 'vendor/autoload.php';
use Clerk\Backend;
use Clerk\Backend\Models\Operations;
$sdk = Backend\ClerkBackend::builder()
->setSecurity(
'<YOUR_BEARER_TOKEN_HERE>'
)
->build();
$requestBody = new Operations\UpdateSAMLConnectionRequestBody();
$response = $sdk->samlConnections->update(
samlConnectionId: '<id>',
requestBody: $requestBody
);
if ($response->schemasSAMLConnection !== null) {
// handle response
}
Parameter | Type | Required | Description |
---|---|---|---|
samlConnectionId |
string | ✔️ | The ID of the SAML Connection to update |
requestBody |
Operations\UpdateSAMLConnectionRequestBody | ✔️ | N/A |
?Operations\UpdateSAMLConnectionResponse
Error Type | Status Code | Content Type |
---|---|---|
Errors\ClerkErrors | 402, 403, 404, 422 | application/json |
Errors\SDKException | 4XX, 5XX | */* |