AuthApi class reference
All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
create_login | POST /api/auth/login | |
create_logout | POST /api/auth/logout | |
create_password_change | POST /api/auth/password/change | |
create_password_reset | POST /api/auth/password/reset | |
create_password_reset_confirm | POST /api/auth/password/reset/confirm | |
create_register | POST /api/auth/register | |
create_signing | POST /api/auth/signing | This method signs URL for access to the server |
retrieve_rules | GET /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
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:
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)
except exceptions.ApiException as e:
print("Exception when calling AuthApi.create_login(): %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
login_serializer_ex_request | LoginSerializerExRequest |
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 as status code, headers, or raw response data. Read more about invocation parameters and returned values here.
Authentication
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 | - |
create_logout
create_logout( **kwargs )
Calls Django logout method and delete the Token object assigned to the current User object. Accepts/Returns nothing.
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:
try:
(data, response) = api_client.auth_api.create_logout()
pprint(data)
except exceptions.ApiException as e:
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 as status code, headers, or raw response data. Read more about invocation parameters and returned values here.
Authentication
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 | - |
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
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:
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)
except exceptions.ApiException as e:
print("Exception when calling AuthApi.create_password_change(): %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
password_change_request | PasswordChangeRequest |
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 as status code, headers, or raw response data. Read more about invocation parameters and returned values here.
Authentication
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 | - |
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
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:
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)
except exceptions.ApiException as e:
print("Exception when calling AuthApi.create_password_reset(): %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
password_reset_serializer_ex_request | PasswordResetSerializerExRequest |
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 as status code, headers, or raw response data. Read more about invocation parameters and returned values here.
Authentication
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 | - |
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
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:
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)
except exceptions.ApiException as e:
print("Exception when calling AuthApi.create_password_reset_confirm(): %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
password_reset_confirm_request | PasswordResetConfirmRequest |
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 as status code, headers, or raw response data. Read more about invocation parameters and returned values here.
Authentication
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 | - |
create_register
create_register( register_serializer_ex_request, **kwargs )
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:
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)
except exceptions.ApiException as e:
print("Exception when calling AuthApi.create_register(): %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
register_serializer_ex_request | RegisterSerializerExRequest |
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 as status code, headers, or raw response data. Read more about invocation parameters and returned values here.
Authentication
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 | - |
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
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:
signing_request = SigningRequest(
url="url_example",
) # SigningRequest |
try:
(data, response) = api_client.auth_api.create_signing(
signing_request,)
pprint(data)
except exceptions.ApiException as e:
print("Exception when calling AuthApi.create_signing(): %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
signing_request | SigningRequest |
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 as status code, headers, or raw response data. Read more about invocation parameters and returned values here.
Authentication
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 | text URL | - |
retrieve_rules
retrieve_rules( **kwargs )
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",)
with ApiClient(configuration) as api_client:
try:
api_client.auth_api.retrieve_rules()
except exceptions.ApiException as e:
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, 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.
Authentication
No authentication required
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | No response body | - |