AuthApi class reference

All URIs are relative tohttp://localhost

MethodHTTP requestDescription
create_loginPOST /api/auth/login
create_logoutPOST /api/auth/logout
create_password_changePOST /api/auth/password/change
create_password_resetPOST /api/auth/password/reset
create_password_reset_confirmPOST /api/auth/password/reset/confirm
create_registerPOST /api/auth/register
create_signingPOST /api/auth/signingThis method signs URL for access to the server
retrieve_rulesGET /api/auth/rules

create_login

create_login(login_serializer_ex_request,**kwargs)

Check the credentials and return the REST Token if the credentials are valid and authenticated. If email verification is enabled and the user has the unverified email, an email with a confirmation link will be sent. Calls Django Auth login method to register User ID in Django session framework. Accept the following POST parameters: username, email, password Return the REST Framework Token Object’s key.

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:login_serializer_ex_request=LoginSerializerExRequest(username="username_example",email="email_example",password="password_example",)# LoginSerializerExRequest |try:(data,response)=api_client.auth_api.create_login(login_serializer_ex_request,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling AuthApi.create_login():%s\n"%e)

Parameters

NameTypeDescriptionNotes
login_serializer_ex_requestLoginSerializerExRequest

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

Returned values

Returned type:Tuple[Token, 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-

create_logout

create_logout(**kwargs)

Calls Django logout method and delete the Token object assigned to the current User object. Accepts/Returns nothing.

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:try:(data,response)=api_client.auth_api.create_logout()pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling AuthApi.create_logout():%s\n"%e)

Parameters

This endpoint does not need any parameter.

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

Returned values

Returned type:Tuple[RestAuthDetail, 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-

create_password_change

create_password_change(password_change_request,**kwargs)

Calls Django Auth SetPasswordForm save method. Accepts the following POST parameters: new_password1, new_password2 Returns the success/fail message.

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:password_change_request=PasswordChangeRequest(old_password="old_password_example",new_password1="new_password1_example",new_password2="new_password2_example",)# PasswordChangeRequest |try:(data,response)=api_client.auth_api.create_password_change(password_change_request,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling AuthApi.create_password_change():%s\n"%e)

Parameters

NameTypeDescriptionNotes
password_change_requestPasswordChangeRequest

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

Returned values

Returned type:Tuple[RestAuthDetail, 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-

create_password_reset

create_password_reset(password_reset_serializer_ex_request,**kwargs)

Calls Django Auth PasswordResetForm save method. Accepts the following POST parameters: email Returns the success/fail message.

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:password_reset_serializer_ex_request=PasswordResetSerializerExRequest(email="email_example",)# PasswordResetSerializerExRequest |try:(data,response)=api_client.auth_api.create_password_reset(password_reset_serializer_ex_request,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling AuthApi.create_password_reset():%s\n"%e)

Parameters

NameTypeDescriptionNotes
password_reset_serializer_ex_requestPasswordResetSerializerExRequest

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

Returned values

Returned type:Tuple[RestAuthDetail, 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-

create_password_reset_confirm

create_password_reset_confirm(password_reset_confirm_request,**kwargs)

Password reset e-mail link is confirmed, therefore this resets the user’s password. Accepts the following POST parameters: token, uid, new_password1, new_password2 Returns the success/fail message.

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:password_reset_confirm_request=PasswordResetConfirmRequest(new_password1="new_password1_example",new_password2="new_password2_example",uid="uid_example",token="token_example",)# PasswordResetConfirmRequest |try:(data,response)=api_client.auth_api.create_password_reset_confirm(password_reset_confirm_request,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling AuthApi.create_password_reset_confirm():%s\n"%e)

Parameters

NameTypeDescriptionNotes
password_reset_confirm_requestPasswordResetConfirmRequest

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

Returned values

Returned type:Tuple[RestAuthDetail, 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-

create_register

create_register(register_serializer_ex_request,**kwargs)

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:register_serializer_ex_request=RegisterSerializerExRequest(username="username_example",email="email_example",password1="password1_example",password2="password2_example",first_name="first_name_example",last_name="last_name_example",)# RegisterSerializerExRequest |try:(data,response)=api_client.auth_api.create_register(register_serializer_ex_request,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling AuthApi.create_register():%s\n"%e)

Parameters

NameTypeDescriptionNotes
register_serializer_ex_requestRegisterSerializerExRequest

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

Returned values

Returned type:Tuple[RegisterSerializerEx, 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-

create_signing

create_signing(signing_request,**kwargs)

This method signs URL for access to the server

Signed URL contains a token which authenticates a user on the server.Signed URL is valid during 30 seconds since signing.

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:signing_request=SigningRequest(url="url_example",)# SigningRequest |try:(data,response)=api_client.auth_api.create_signing(signing_request,)pprint(data)exceptexceptions.ApiExceptionase:print("Exception when calling AuthApi.create_signing():%s\n"%e)

Parameters

NameTypeDescriptionNotes
signing_requestSigningRequest

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

Returned values

Returned type:Tuple[str, 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
200text URL-

retrieve_rules

retrieve_rules(**kwargs)

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",)withApiClient(configuration)asapi_client:try:api_client.auth_api.retrieve_rules()exceptexceptions.ApiExceptionase:print("Exception when calling AuthApi.retrieve_rules():%s\n"%e)

Parameters

This endpoint does not need any parameter.

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

No authentication required

HTTP request headers

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

HTTP response details

Status codeDescriptionResponse headers
200No response body-