Skip to content

Latest commit

 

History

History
96 lines (66 loc) · 3.26 KB

File metadata and controls

96 lines (66 loc) · 3.26 KB

rankvectors.AnalyticsApi

All URIs are relative to https://api.rankvectors.com

Method HTTP request Description
get_project_analytics GET /api/projects/{projectId}/analytics Get project analytics

get_project_analytics

ProjectAnalytics get_project_analytics(project_id, start_date=start_date, end_date=end_date)

Get project analytics

Get detailed analytics for a project

Example

  • Api Key Authentication (ApiKeyAuth):
import rankvectors
from rankvectors.models.project_analytics import ProjectAnalytics
from rankvectors.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.rankvectors.com
# See configuration.py for a list of all supported configuration parameters.
configuration = rankvectors.Configuration(
    host = "https://api.rankvectors.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Enter a context with an instance of the API client
with rankvectors.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = rankvectors.AnalyticsApi(api_client)
    project_id = 'proj-123' # str | Unique identifier for the project
    start_date = '2013-10-20T19:20:30+01:00' # datetime | Start date for analytics (optional)
    end_date = '2013-10-20T19:20:30+01:00' # datetime | End date for analytics (optional)

    try:
        # Get project analytics
        api_response = api_instance.get_project_analytics(project_id, start_date=start_date, end_date=end_date)
        print("The response of AnalyticsApi->get_project_analytics:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AnalyticsApi->get_project_analytics: %s\n" % e)

Parameters

Name Type Description Notes
project_id str Unique identifier for the project
start_date datetime Start date for analytics [optional]
end_date datetime End date for analytics [optional]

Return type

ProjectAnalytics

Authorization

ApiKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Project analytics -
401 Unauthorized - missing or invalid API key -
403 Forbidden - access denied to resource -
404 Not found - resource doesn't exist -
500 Internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]