InvitationsApi class reference

All URIs are relative tohttp://localhost

MethodHTTP requestDescription
acceptPOST /api/invitations/{key}/acceptAccept an invitation
createPOST /api/invitationsCreate an invitation
declinePOST /api/invitations/{key}/declineDecline an invitation
destroyDELETE /api/invitations/{key}Delete an invitation
listGET /api/invitationsList invitations
partial_updatePATCH /api/invitations/{key}Update an invitation
resendPOST /api/invitations/{key}/resendResend an invitation
retrieveGET /api/invitations/{key}Get invitation details

accept

accept(key,**kwargs)

Accept an invitation

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:key="key_example"# str | A unique value identifying this invitation.try:(data,response)=api_client.invitations_api.accept(key,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling InvitationsApi.accept():%s\n"%e)

Parameters

NameTypeDescriptionNotes
keystrA 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200The invitation is accepted-
400The invitation is expired or already accepted-

create

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

Create an invitation

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling InvitationsApi.create():%s\n"%e)

Parameters

NameTypeDescriptionNotes
invitation_write_requestInvitationWriteRequest
x_organizationstrOrganization unique slug[optional]
orgstrOrganization unique slug[optional]
org_idintOrganization 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
201-

decline

decline(key,**kwargs)

Decline an invitation

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:key="key_example"# str | A unique value identifying this invitation.try:api_client.invitations_api.decline(key,)exceptexceptions.ApiExceptionase:print("Exception when calling InvitationsApi.decline():%s\n"%e)

Parameters

NameTypeDescriptionNotes
keystrA 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, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
204The invitation has been declined-

destroy

destroy(key,**kwargs)

Delete an invitation

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:key="key_example"# str | A unique value identifying this invitation.try:api_client.invitations_api.destroy(key,)exceptexceptions.ApiExceptionase:print("Exception when calling InvitationsApi.destroy():%s\n"%e)

Parameters

NameTypeDescriptionNotes
keystrA 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, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
204The 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)

List invitations

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling InvitationsApi.list():%s\n"%e)

Parameters

NameTypeDescriptionNotes
x_organizationstrOrganization unique slug[optional]
filterstrJSON 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]
orgstrOrganization unique slug[optional]
org_idintOrganization identifier[optional]
ownerstrA simple equality filter for the owner field[optional]
pageintA page number within the paginated result set.[optional]
page_sizeintNumber of results to return per page.[optional]
searchstrA search term. Available search_fields: (‘owner’,)[optional]
sortstrWhich 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

partial_update

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

Update an invitation

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_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)exceptexceptions.ApiExceptionase:print("Exception when calling InvitationsApi.partial_update():%s\n"%e)

Parameters

NameTypeDescriptionNotes
keystrA unique value identifying this invitation.
patched_invitation_write_requestPatchedInvitationWriteRequest[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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-

resend

resend(key,**kwargs)

Resend an invitation

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:key="key_example"# str | A unique value identifying this invitation.try:api_client.invitations_api.resend(key,)exceptexceptions.ApiExceptionase:print("Exception when calling InvitationsApi.resend():%s\n"%e)

Parameters

NameTypeDescriptionNotes
keystrA 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, soNone is always returned as the first value.The second value is the raw response, which can be useful to get response parameters, such asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
204Invitation has been sent-
400The invitation is already accepted-

retrieve

retrieve(key,**kwargs)

Get invitation details

Example

frompprintimportpprintfromcvat_sdk.api_clientimportConfiguration,ApiClient,exceptionsfromcvat_sdk.api_client.modelsimport*# Set up an API client# Read Configuration class docs for more info about parameters and authentication methodsconfiguration=Configuration(host="http://localhost",username='YOUR_USERNAME',password='YOUR_PASSWORD',)withApiClient(configuration)asapi_client:key="key_example"# str | A unique value identifying this invitation.try:(data,response)=api_client.invitations_api.retrieve(key,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling InvitationsApi.retrieve():%s\n"%e)

Parameters

NameTypeDescriptionNotes
keystrA 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 asstatus code, headers, or raw response data. Read more about invocation parametersand returned valueshere.

Authentication

basicAuth, csrfAuth, csrfHeaderAuth, sessionAuth, signatureAuth, tokenAuth

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200-