Skip to content

Latest commit

 

History

History
134 lines (83 loc) · 6.19 KB

File metadata and controls

134 lines (83 loc) · 6.19 KB

BlocklistIdentifiersSDK

(blocklist_identifiers)

Overview

Available Operations

  • list - List all identifiers on the block-list
  • create - Add identifier to the block-list
  • delete - Delete identifier from block-list

list

Get a list of all identifiers which are not allowed to access an instance

Example Usage

from clerk_backend_api import Clerk


with Clerk(
    bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as clerk:

    res = clerk.blocklist_identifiers.list()

    assert res is not None

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.BlocklistIdentifiers

Errors

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

create

Create an identifier that is blocked from accessing an instance

Example Usage

from clerk_backend_api import Clerk


with Clerk(
    bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as clerk:

    res = clerk.blocklist_identifiers.create(request={
        "identifier": "[email protected]",
    })

    assert res is not None

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
request models.CreateBlocklistIdentifierRequestBody ✔️ The request object to use for the request.
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.BlocklistIdentifier

Errors

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

delete

Delete an identifier from the instance block-list

Example Usage

from clerk_backend_api import Clerk


with Clerk(
    bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as clerk:

    res = clerk.blocklist_identifiers.delete(identifier_id="identifier123")

    assert res is not None

    # Handle response
    print(res)

Parameters

Parameter Type Required Description Example
identifier_id str ✔️ The ID of the identifier to delete from the block-list identifier123
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

models.DeletedObject

Errors

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