Skip to content

Latest commit

 

History

History
179 lines (123 loc) · 5.7 KB

File metadata and controls

179 lines (123 loc) · 5.7 KB

rankvectors.CrawlingApi

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

Method HTTP request Description
get_crawl_history GET /api/projects/{projectId}/crawl Get crawl history
start_crawl POST /api/projects/{projectId}/crawl Start website crawl

get_crawl_history

List[Crawl] get_crawl_history(project_id)

Get crawl history

Get the crawl history for a project

Example

  • Api Key Authentication (ApiKeyAuth):
import rankvectors
from rankvectors.models.crawl import Crawl
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.CrawlingApi(api_client)
    project_id = 'proj-123' # str | Unique identifier for the project

    try:
        # Get crawl history
        api_response = api_instance.get_crawl_history(project_id)
        print("The response of CrawlingApi->get_crawl_history:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling CrawlingApi->get_crawl_history: %s\n" % e)

Parameters

Name Type Description Notes
project_id str Unique identifier for the project

Return type

List[Crawl]

Authorization

ApiKeyAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Crawl history -
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]

start_crawl

Crawl start_crawl(project_id, start_crawl_request=start_crawl_request)

Start website crawl

Start crawling a website to analyze content for link opportunities

Example

  • Api Key Authentication (ApiKeyAuth):
import rankvectors
from rankvectors.models.crawl import Crawl
from rankvectors.models.start_crawl_request import StartCrawlRequest
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.CrawlingApi(api_client)
    project_id = 'proj-123' # str | Unique identifier for the project
    start_crawl_request = rankvectors.StartCrawlRequest() # StartCrawlRequest |  (optional)

    try:
        # Start website crawl
        api_response = api_instance.start_crawl(project_id, start_crawl_request=start_crawl_request)
        print("The response of CrawlingApi->start_crawl:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling CrawlingApi->start_crawl: %s\n" % e)

Parameters

Name Type Description Notes
project_id str Unique identifier for the project
start_crawl_request StartCrawlRequest [optional]

Return type

Crawl

Authorization

ApiKeyAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Crawl started successfully -
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]