AnalyticsApi class reference

All URIs are relative to http://localhost

Method HTTP request Description
create_report POST /api/analytics/reports Create an analytics report
get_reports GET /api/analytics/reports Get an analytics report

create_report

create_report( rq_id=None, analytics_report_create_request=None, **kwargs )

Create an analytics report

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:
    rq_id = "rq_id_example" # str | The report creation request id. Can be specified to check the report creation status.  (optional)
    analytics_report_create_request = AnalyticsReportCreateRequest(
        job_id=1,
        task_id=1,
        project_id=1,
    ) # AnalyticsReportCreateRequest |  (optional)

    try:
        api_client.analytics_api.create_report(
            rq_id=rq_id,
            analytics_report_create_request=analytics_report_create_request,
        )
    except exceptions.ApiException as e:
        print("Exception when calling AnalyticsApi.create_report(): %s\n" % e)

Parameters

Name Type Description Notes
rq_id str The report creation request id. Can be specified to check the report creation status. [optional]
analytics_report_create_request AnalyticsReportCreateRequest [optional]

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

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 A analytics report request has been computed -
202 A analytics report request has been enqueued, the request id is returned. The request status can be checked at this endpoint by passing the rq_id as the query parameter. If the request id is specified, this response means the analytics report request is queued or is being processed. -
400 Invalid or failed request, check the response data for details -

get_reports

get_reports( end_date=None, job_id=None, project_id=None, start_date=None, task_id=None, **kwargs )

Get an analytics report

Receive analytics report

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:
    end_date = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | Specify the end date for filtering report data. (optional)
    job_id = 1 # int | Specify job ID (optional)
    project_id = 1 # int | Specify project ID (optional)
    start_date = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | Specify a start date for filtering report data. (optional)
    task_id = 1 # int | Specify task ID (optional)

    try:
        (data, response) = api_client.analytics_api.get_reports(
            end_date=end_date,
            job_id=job_id,
            project_id=project_id,
            start_date=start_date,
            task_id=task_id,
        )
        pprint(data)
    except exceptions.ApiException as e:
        print("Exception when calling AnalyticsApi.get_reports(): %s\n" % e)

Parameters

Name Type Description Notes
end_date datetime Specify the end date for filtering report data. [optional]
job_id int Specify job ID [optional]
project_id int Specify project ID [optional]
start_date datetime Specify a start date for filtering report data. [optional]
task_id int Specify task ID [optional]

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

Returned values

Returned type: Tuple[AnalyticsReport, 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 -
404 Not found -