Skip to content

Latest commit

 

History

History
426 lines (293 loc) · 13.5 KB

File metadata and controls

426 lines (293 loc) · 13.5 KB

rankvectors.ProjectsApi

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

Method HTTP request Description
create_project POST /api/projects Create a new project
delete_project DELETE /api/projects/{projectId} Delete a project
get_project GET /api/projects/{projectId} Get project details
list_projects GET /api/projects List all projects
sync_project POST /api/projects/{projectId}/sync Sync project

create_project

Project create_project(create_project_request)

Create a new project

Create a new project for internal linking optimization

Example

  • Api Key Authentication (ApiKeyAuth):
import rankvectors
from rankvectors.models.create_project_request import CreateProjectRequest
from rankvectors.models.project import Project
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.ProjectsApi(api_client)
    create_project_request = {"name":"My Website","domain":"https://example.com"} # CreateProjectRequest | 

    try:
        # Create a new project
        api_response = api_instance.create_project(create_project_request)
        print("The response of ProjectsApi->create_project:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectsApi->create_project: %s\n" % e)

Parameters

Name Type Description Notes
create_project_request CreateProjectRequest

Return type

Project

Authorization

ApiKeyAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 Project created successfully -
400 Bad request - invalid parameters -
401 Unauthorized - missing or invalid API key -
500 Internal server error -

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

delete_project

DeleteProject200Response delete_project(project_id)

Delete a project

Delete a project and all associated data

Example

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

    try:
        # Delete a project
        api_response = api_instance.delete_project(project_id)
        print("The response of ProjectsApi->delete_project:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectsApi->delete_project: %s\n" % e)

Parameters

Name Type Description Notes
project_id str Unique identifier for the project

Return type

DeleteProject200Response

Authorization

ApiKeyAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Project deleted 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]

get_project

Project get_project(project_id)

Get project details

Get detailed information about a specific project

Example

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

    try:
        # Get project details
        api_response = api_instance.get_project(project_id)
        print("The response of ProjectsApi->get_project:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectsApi->get_project: %s\n" % e)

Parameters

Name Type Description Notes
project_id str Unique identifier for the project

Return type

Project

Authorization

ApiKeyAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Project details -
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]

list_projects

List[Project] list_projects()

List all projects

Get a list of all projects for the authenticated user

Example

  • Api Key Authentication (ApiKeyAuth):
import rankvectors
from rankvectors.models.project import Project
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.ProjectsApi(api_client)

    try:
        # List all projects
        api_response = api_instance.list_projects()
        print("The response of ProjectsApi->list_projects:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectsApi->list_projects: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

List[Project]

Authorization

ApiKeyAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 List of projects -
401 Unauthorized - missing or invalid API key -
500 Internal server error -

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

sync_project

SyncProject200Response sync_project(project_id, sync_project_request=sync_project_request)

Sync project

Trigger a full sync of project content (used by WordPress and other integrations)

Example

  • Api Key Authentication (ApiKeyAuth):
import rankvectors
from rankvectors.models.sync_project200_response import SyncProject200Response
from rankvectors.models.sync_project_request import SyncProjectRequest
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.ProjectsApi(api_client)
    project_id = 'proj-123' # str | Unique identifier for the project
    sync_project_request = rankvectors.SyncProjectRequest() # SyncProjectRequest |  (optional)

    try:
        # Sync project
        api_response = api_instance.sync_project(project_id, sync_project_request=sync_project_request)
        print("The response of ProjectsApi->sync_project:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectsApi->sync_project: %s\n" % e)

Parameters

Name Type Description Notes
project_id str Unique identifier for the project
sync_project_request SyncProjectRequest [optional]

Return type

SyncProject200Response

Authorization

ApiKeyAuth

HTTP request headers

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

HTTP response details

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