Skip to content

Latest commit

 

History

History
110 lines (75 loc) · 6.45 KB

README.md

File metadata and controls

110 lines (75 loc) · 6.45 KB

Workspaces

(workspaces)

Overview

Available Operations

  • get - Retrieve a workspace
  • update - Update a workspace

get

Retrieve a workspace for the authenticated user.

Example Usage

from dub import Dub


with Dub(
    token="DUB_API_KEY",
) as d_client:

    res = d_client.workspaces.get(request={
        "id_or_slug": "<value>",
    })

    assert res is not None

    # Handle response
    print(res)

Parameters

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

Response

components.WorkspaceSchema

Errors

Error Type Status Code Content Type
errors.BadRequest 400 application/json
errors.Unauthorized 401 application/json
errors.Forbidden 403 application/json
errors.NotFound 404 application/json
errors.Conflict 409 application/json
errors.InviteExpired 410 application/json
errors.UnprocessableEntity 422 application/json
errors.RateLimitExceeded 429 application/json
errors.InternalServerError 500 application/json
errors.SDKError 4XX, 5XX */*

update

Update a workspace by ID or slug.

Example Usage

from dub import Dub


with Dub(
    token="DUB_API_KEY",
) as d_client:

    res = d_client.workspaces.update(id_or_slug="<value>")

    assert res is not None

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
id_or_slug str ✔️ The ID or slug of the workspace to update.
request_body Optional[operations.UpdateWorkspaceRequestBody] N/A
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

components.WorkspaceSchema

Errors

Error Type Status Code Content Type
errors.BadRequest 400 application/json
errors.Unauthorized 401 application/json
errors.Forbidden 403 application/json
errors.NotFound 404 application/json
errors.Conflict 409 application/json
errors.InviteExpired 410 application/json
errors.UnprocessableEntity 422 application/json
errors.RateLimitExceeded 429 application/json
errors.InternalServerError 500 application/json
errors.SDKError 4XX, 5XX */*