Skip to content

Latest commit

 

History

History
249 lines (167 loc) · 8.49 KB

File metadata and controls

249 lines (167 loc) · 8.49 KB

Permissions

(permissions)

Overview

Available Operations

create_permission

Create a permission

Example Usage

import airbyte_api
from airbyte_api import models

s = airbyte_api.AirbyteAPI(
    security=models.Security(
        basic_auth=models.SchemeBasicAuth(
            password="",
            username="",
        ),
    ),
)


res = s.permissions.create_permission(request=models.PermissionCreateRequest(
    permission_type=models.PublicPermissionType.WORKSPACE_ADMIN,
    user_id='7d08fd6c-531e-4a00-937e-3d355f253e63',
    workspace_id='9924bcd0-99be-453d-ba47-c2c9766f7da5',
))

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

Parameters

Parameter Type Required Description
request models.PermissionCreateRequest ✔️ The request object to use for the request.

Response

api.CreatePermissionResponse

Errors

Error Object Status Code Content Type
errors.SDKError 4xx-5xx /

delete_permission

Delete a Permission

Example Usage

import airbyte_api
from airbyte_api import api, models

s = airbyte_api.AirbyteAPI(
    security=models.Security(
        basic_auth=models.SchemeBasicAuth(
            password="",
            username="",
        ),
    ),
)


res = s.permissions.delete_permission(request=api.DeletePermissionRequest(
    permission_id='<value>',
))

if res is not None:
    # handle response
    pass

Parameters

Parameter Type Required Description
request api.DeletePermissionRequest ✔️ The request object to use for the request.

Response

api.DeletePermissionResponse

Errors

Error Object Status Code Content Type
errors.SDKError 4xx-5xx /

get_permission

Get Permission details

Example Usage

import airbyte_api
from airbyte_api import api, models

s = airbyte_api.AirbyteAPI(
    security=models.Security(
        basic_auth=models.SchemeBasicAuth(
            password="",
            username="",
        ),
    ),
)


res = s.permissions.get_permission(request=api.GetPermissionRequest(
    permission_id='<value>',
))

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

Parameters

Parameter Type Required Description
request api.GetPermissionRequest ✔️ The request object to use for the request.

Response

api.GetPermissionResponse

Errors

Error Object Status Code Content Type
errors.SDKError 4xx-5xx /

list_permissions

List Permissions by user id

Example Usage

import airbyte_api
from airbyte_api import api, models

s = airbyte_api.AirbyteAPI(
    security=models.Security(
        basic_auth=models.SchemeBasicAuth(
            password="",
            username="",
        ),
    ),
)


res = s.permissions.list_permissions(request=api.ListPermissionsRequest())

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

Parameters

Parameter Type Required Description
request api.ListPermissionsRequest ✔️ The request object to use for the request.

Response

api.ListPermissionsResponse

Errors

Error Object Status Code Content Type
errors.SDKError 4xx-5xx /

update_permission

Update a permission

Example Usage

import airbyte_api
from airbyte_api import api, models

s = airbyte_api.AirbyteAPI(
    security=models.Security(
        basic_auth=models.SchemeBasicAuth(
            password="",
            username="",
        ),
    ),
)


res = s.permissions.update_permission(request=api.UpdatePermissionRequest(
    permission_update_request=models.PermissionUpdateRequest(
        permission_type=models.PermissionType.ORGANIZATION_MEMBER,
    ),
    permission_id='<value>',
))

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

Parameters

Parameter Type Required Description
request api.UpdatePermissionRequest ✔️ The request object to use for the request.

Response

api.UpdatePermissionResponse

Errors

Error Object Status Code Content Type
errors.SDKError 4xx-5xx /