Skip to content

create_auth_token

fastagency.studio.app.create_auth_token async #

create_auth_token(
    user_uuid: str,
    deployment_uuid: str,
    name: str,
    expiry: str,
) -> DeploymentAuthToken
Source code in fastagency/studio/app.py
@app.post("/user/{user_uuid}/deployment/{deployment_uuid}")
async def create_auth_token(
    user_uuid: Annotated[str, Path(title="User UUID")],
    deployment_uuid: Annotated[str, Path(title="Deployment UUID")],
    name: Annotated[str, Body(title="Name of the auth token")],
    expiry: Annotated[str, Body(title="Expiry of the auth token")],
) -> DeploymentAuthToken:
    return await create_deployment_auth_token(
        user_uuid=user_uuid, deployment_uuid=deployment_uuid, name=name, expiry=expiry
    )