All URIs are relative to https://api.rankvectors.com
| Method | HTTP request | Description |
|---|---|---|
| batch_sync_pages | POST /api/projects/{projectId}/pages/batch | Batch sync pages |
| list_pages | GET /api/projects/{projectId}/pages | List pages |
BatchSyncPages200Response batch_sync_pages(project_id, batch_sync_pages_request)
Batch sync pages
Sync multiple pages to a project (used by WordPress and other integrations)
- Api Key Authentication (ApiKeyAuth):
import rankvectors
from rankvectors.models.batch_sync_pages200_response import BatchSyncPages200Response
from rankvectors.models.batch_sync_pages_request import BatchSyncPagesRequest
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.PagesApi(api_client)
project_id = 'proj-123' # str | Unique identifier for the project
batch_sync_pages_request = rankvectors.BatchSyncPagesRequest() # BatchSyncPagesRequest |
try:
# Batch sync pages
api_response = api_instance.batch_sync_pages(project_id, batch_sync_pages_request)
print("The response of PagesApi->batch_sync_pages:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PagesApi->batch_sync_pages: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| project_id | str | Unique identifier for the project | |
| batch_sync_pages_request | BatchSyncPagesRequest |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Pages synced successfully | - |
| 400 | Bad request - invalid parameters | - |
| 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]
ListPages200Response list_pages(project_id, limit=limit, offset=offset)
List pages
Get a list of pages for a project
- Api Key Authentication (ApiKeyAuth):
import rankvectors
from rankvectors.models.list_pages200_response import ListPages200Response
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.PagesApi(api_client)
project_id = 'proj-123' # str | Unique identifier for the project
limit = 50 # int | Results per page (optional) (default to 50)
offset = 0 # int | Pagination offset (optional) (default to 0)
try:
# List pages
api_response = api_instance.list_pages(project_id, limit=limit, offset=offset)
print("The response of PagesApi->list_pages:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PagesApi->list_pages: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| project_id | str | Unique identifier for the project | |
| limit | int | Results per page | [optional] [default to 50] |
| offset | int | Pagination offset | [optional] [default to 0] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | List of pages | - |
| 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]