get

Example Usage

import os
from unkey_py import Unkey

s = Unkey(
    bearer_auth=os.getenv("UNKEY_BEARER_AUTH", ""),
)

res = s.apis.get(api_id="api_1234")

if res.object is not None:
    # handle response
    pass

Parameters

ParameterTypeRequiredDescriptionExample
api_idstr:heavy_check_mark:N/Aapi_1234
retriesOptional[utils.RetryConfig]:heavy_minus_sign:Configuration to override the default retry behavior of the client.

Response

models.GetAPIResponse

Errors

Error TypeStatus CodeContent Type
models.ErrBadRequest400application/json
models.ErrUnauthorized401application/json
models.ErrForbidden403application/json
models.ErrNotFound404application/json
models.ErrConflict409application/json
models.ErrTooManyRequests429application/json
models.ErrInternalServerError500application/json
models.SDKError4XX, 5XX*/*

create

Example Usage

import os
from unkey_py import Unkey

s = Unkey(
    bearer_auth=os.getenv("UNKEY_BEARER_AUTH", ""),
)

res = s.apis.create(request={
    "name": "my-api",
})

if res.object is not None:
    # handle response
    pass

Parameters

ParameterTypeRequiredDescription
requestmodels.CreateAPIRequestBody:heavy_check_mark:The request object to use for the request.
retriesOptional[utils.RetryConfig]:heavy_minus_sign:Configuration to override the default retry behavior of the client.

Response

models.CreateAPIResponse

Errors

Error TypeStatus CodeContent Type
models.ErrBadRequest400application/json
models.ErrUnauthorized401application/json
models.ErrForbidden403application/json
models.ErrNotFound404application/json
models.ErrConflict409application/json
models.ErrTooManyRequests429application/json
models.ErrInternalServerError500application/json
models.SDKError4XX, 5XX*/*

list_keys

Example Usage

import os
from unkey_py import Unkey

s = Unkey(
    bearer_auth=os.getenv("UNKEY_BEARER_AUTH", ""),
)

res = s.apis.list_keys(request={
    "api_id": "api_1234",
    "limit": 100,
})

if res.object is not None:
    # handle response
    pass

Parameters

ParameterTypeRequiredDescription
requestmodels.ListKeysRequest:heavy_check_mark:The request object to use for the request.
retriesOptional[utils.RetryConfig]:heavy_minus_sign:Configuration to override the default retry behavior of the client.

Response

models.ListKeysResponse

Errors

Error TypeStatus CodeContent Type
models.ErrBadRequest400application/json
models.ErrUnauthorized401application/json
models.ErrForbidden403application/json
models.ErrNotFound404application/json
models.ErrConflict409application/json
models.ErrTooManyRequests429application/json
models.ErrInternalServerError500application/json
models.SDKError4XX, 5XX*/*

delete

Example Usage

import os
from unkey_py import Unkey

s = Unkey(
    bearer_auth=os.getenv("UNKEY_BEARER_AUTH", ""),
)

res = s.apis.delete(request={
    "api_id": "api_1234",
})

if res.object is not None:
    # handle response
    pass

Parameters

ParameterTypeRequiredDescription
requestmodels.DeleteAPIRequestBody:heavy_check_mark:The request object to use for the request.
retriesOptional[utils.RetryConfig]:heavy_minus_sign:Configuration to override the default retry behavior of the client.

Response

models.DeleteAPIResponse

Errors

Error TypeStatus CodeContent Type
models.ErrBadRequest400application/json
models.ErrUnauthorized401application/json
models.ErrForbidden403application/json
models.ErrNotFound404application/json
models.ErrConflict409application/json
models.ErrDeleteProtected429application/json
models.ErrInternalServerError500application/json
models.SDKError4XX, 5XX*/*

delete_keys

Example Usage

import os
from unkey_py import Unkey

s = Unkey(
    bearer_auth=os.getenv("UNKEY_BEARER_AUTH", ""),
)

res = s.apis.delete_keys(request={
    "api_id": "api_1234",
})

if res.object is not None:
    # handle response
    pass

Parameters

ParameterTypeRequiredDescription
requestmodels.DeleteKeysRequestBody:heavy_check_mark:The request object to use for the request.
retriesOptional[utils.RetryConfig]:heavy_minus_sign:Configuration to override the default retry behavior of the client.

Response

models.DeleteKeysResponse

Errors

Error TypeStatus CodeContent Type
models.ErrBadRequest400application/json
models.ErrUnauthorized401application/json
models.ErrForbidden403application/json
models.ErrNotFound404application/json
models.ErrConflict409application/json
models.ErrTooManyRequests429application/json
models.ErrInternalServerError500application/json
models.SDKError4XX, 5XX*/*