InvitationsApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
accept POST /api/invitations/{key}/accept Method registers user and accepts invitation to organization
create POST /api/invitations Method creates an invitation
decline POST /api/invitations/{key}/decline Method declines the invitation to organization
destroy DELETE /api/invitations/{key} Method deletes an invitation
list GET /api/invitations Method returns a paginated list of invitations
partial_update PATCH /api/invitations/{key} Methods does a partial update of chosen fields in an invitation
resend POST /api/invitations/{key}/resend Method resends the invitation to organization
retrieve GET /api/invitations/{key} Method returns details of an invitation

accept

accept( key, **kwargs )

Method registers user and accepts invitation to organization

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    key = "key_example" # str | A unique value identifying this invitation.

    try:
        (data, response) = api_client.invitations_api.accept(
            key,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling InvitationsApi.accept(): %s\n" % e)

Parameters

Name Type Description Notes
key str A unique value identifying this invitation.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[AcceptInvitationRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 The invitation is accepted -
400 The invitation is expired or already accepted -

create

create( invitation_write_request, x_organization=None, org=None, org_id=None, **kwargs )

Method creates an invitation

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    invitation_write_request = InvitationWriteRequest(
        role=RoleEnum("worker"),
        email="email_example",
    ) # InvitationWriteRequest | 
    x_organization = "X-Organization_example" # str | Organization unique slug (optional)
    org = "org_example" # str | Organization unique slug (optional)
    org_id = 1 # int | Organization identifier (optional)

    try:
        (data, response) = api_client.invitations_api.create(
            invitation_write_request,
            x_organization=x_organization,
            org=org,
            org_id=org_id,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling InvitationsApi.create(): %s\n" % e)

Parameters

Name Type Description Notes
invitation_write_request InvitationWriteRequest
x_organization str Organization unique slug [optional]
org str Organization unique slug [optional]
org_id int Organization identifier [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[InvitationRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
201 -

decline

decline( key, **kwargs )

Method declines the invitation to organization

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    key = "key_example" # str | A unique value identifying this invitation.

    try:
        api_client.invitations_api.decline(
            key,)
    except exceptions.ApiException as e:
        print("Exception when calling InvitationsApi.decline(): %s\n" % e)

Parameters

Name Type Description Notes
key str A unique value identifying this invitation.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 The invitation has been declined -

destroy

destroy( key, **kwargs )

Method deletes an invitation

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    key = "key_example" # str | A unique value identifying this invitation.

    try:
        api_client.invitations_api.destroy(
            key,)
    except exceptions.ApiException as e:
        print("Exception when calling InvitationsApi.destroy(): %s\n" % e)

Parameters

Name Type Description Notes
key str A unique value identifying this invitation.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 The invitation has been deleted -

list

list( x_organization=None, filter=None, org=None, org_id=None, owner=None, page=None, page_size=None, search=None, sort=None, **kwargs )

Method returns a paginated list of invitations

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    x_organization = "X-Organization_example" # str | Organization unique slug (optional)
    filter = "filter_example" # str |  JSON Logic filter. This filter can be used to perform complex filtering by grouping rules.  For example, using such a filter you can get all resources created by you:      - {\"and\":[{\"==\":[{\"var\":\"owner\"},\"<user>\"]}]}  Details about the syntax used can be found at the link: https://jsonlogic.com/   Available filter_fields: ['owner', 'user_id', 'accepted']. (optional)
    org = "org_example" # str | Organization unique slug (optional)
    org_id = 1 # int | Organization identifier (optional)
    owner = "owner_example" # str | A simple equality filter for the owner field (optional)
    page = 1 # int | A page number within the paginated result set. (optional)
    page_size = 1 # int | Number of results to return per page. (optional)
    search = "search_example" # str | A search term. Available search_fields: ('owner',) (optional)
    sort = "sort_example" # str | Which field to use when ordering the results. Available ordering_fields: ['owner', 'created_date'] (optional)

    try:
        (data, response) = api_client.invitations_api.list(
            x_organization=x_organization,
            filter=filter,
            org=org,
            org_id=org_id,
            owner=owner,
            page=page,
            page_size=page_size,
            search=search,
            sort=sort,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling InvitationsApi.list(): %s\n" % e)

Parameters

Name Type Description Notes
x_organization str Organization unique slug [optional]
filter str JSON Logic filter. This filter can be used to perform complex filtering by grouping rules. For example, using such a filter you can get all resources created by you: - {"and":[{"==":[{"var":"owner"},""]}]} Details about the syntax used can be found at the link: https://jsonlogic.com/ Available filter_fields: [‘owner’, ‘user_id’, ‘accepted’]. [optional]
org str Organization unique slug [optional]
org_id int Organization identifier [optional]
owner str A simple equality filter for the owner field [optional]
page int A page number within the paginated result set. [optional]
page_size int Number of results to return per page. [optional]
search str A search term. Available search_fields: (‘owner’,) [optional]
sort str Which field to use when ordering the results. Available ordering_fields: [‘owner’, ‘created_date’] [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[PaginatedInvitationReadList, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

partial_update

partial_update( key, patched_invitation_write_request=None, **kwargs )

Methods does a partial update of chosen fields in an invitation

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    key = "key_example" # str | A unique value identifying this invitation.
    patched_invitation_write_request = PatchedInvitationWriteRequest(
        role=RoleEnum("worker"),
        email="email_example",
    ) # PatchedInvitationWriteRequest |  (optional)

    try:
        (data, response) = api_client.invitations_api.partial_update(
            key,
            patched_invitation_write_request=patched_invitation_write_request,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling InvitationsApi.partial_update(): %s\n" % e)

Parameters

Name Type Description Notes
key str A unique value identifying this invitation.
patched_invitation_write_request PatchedInvitationWriteRequest [optional]

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[InvitationRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -

resend

resend( key, **kwargs )

Method resends the invitation to organization

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    key = "key_example" # str | A unique value identifying this invitation.

    try:
        api_client.invitations_api.resend(
            key,)
    except exceptions.ApiException as e:
        print("Exception when calling InvitationsApi.resend(): %s\n" % e)

Parameters

Name Type Description Notes
key str A unique value identifying this invitation.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[None, urllib3.HTTPResponse].

Returns a tuple with 2 values: (None, raw_response).

This endpoint does not have any return value, so None is always returned as the first value. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 Invitation has been sent -
400 The invitation is already accepted -

retrieve

retrieve( key, **kwargs )

Method returns details of an invitation

Example

from pprint import pprint

from cvat_sdk.api_client import Configuration, ApiClient, exceptions
from cvat_sdk.api_client.models import *

# Set up an API client
# Read Configuration class docs for more info about parameters and authentication methods
configuration = Configuration(
    host = "http://localhost",
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD',
)

with ApiClient(configuration) as api_client:
    key = "key_example" # str | A unique value identifying this invitation.

    try:
        (data, response) = api_client.invitations_api.retrieve(
            key,)
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling InvitationsApi.retrieve(): %s\n" % e)

Parameters

Name Type Description Notes
key str A unique value identifying this invitation.

There are also optional kwargs that control the function invocation behavior. Read more here.

Returned values

Returned type: Tuple[InvitationRead, urllib3.HTTPResponse].

Returns a tuple with 2 values: (parsed_response, raw_response).

The first value is a model parsed from the response data. The second value is the raw response, which can be useful to get response parameters, such as status code, headers, or raw response data. Read more about invocation parameters and returned values here.

Authorization

basicAuth, csrfAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.cvat+json

HTTP response details

Status code Description Response headers
200 -