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(create_project_request)
Create a new project
Create a new project for internal linking optimization
require 'time'
require 'rankvectors'
# setup authorization
RankVectors.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = RankVectors::ProjectsApi.new
create_project_request = RankVectors::CreateProjectRequest.new({name: 'My Website', domain: 'https://example.com'}) # CreateProjectRequest |
begin
# Create a new project
result = api_instance.create_project(create_project_request)
p result
rescue RankVectors::ApiError => e
puts "Error when calling ProjectsApi->create_project: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> create_project_with_http_info(create_project_request)
begin
# Create a new project
data, status_code, headers = api_instance.create_project_with_http_info(create_project_request)
p status_code # => 2xx
p headers # => { ... }
p data # => <Project>
rescue RankVectors::ApiError => e
puts "Error when calling ProjectsApi->create_project_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| create_project_request | CreateProjectRequest |
- Content-Type: application/json
- Accept: application/json
delete_project(project_id)
Delete a project
Delete a project and all associated data
require 'time'
require 'rankvectors'
# setup authorization
RankVectors.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = RankVectors::ProjectsApi.new
project_id = 'proj-123' # String | Unique identifier for the project
begin
# Delete a project
result = api_instance.delete_project(project_id)
p result
rescue RankVectors::ApiError => e
puts "Error when calling ProjectsApi->delete_project: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> delete_project_with_http_info(project_id)
begin
# Delete a project
data, status_code, headers = api_instance.delete_project_with_http_info(project_id)
p status_code # => 2xx
p headers # => { ... }
p data # => <DeleteProject200Response>
rescue RankVectors::ApiError => e
puts "Error when calling ProjectsApi->delete_project_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| project_id | String | Unique identifier for the project |
- Content-Type: Not defined
- Accept: application/json
get_project(project_id)
Get project details
Get detailed information about a specific project
require 'time'
require 'rankvectors'
# setup authorization
RankVectors.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = RankVectors::ProjectsApi.new
project_id = 'proj-123' # String | Unique identifier for the project
begin
# Get project details
result = api_instance.get_project(project_id)
p result
rescue RankVectors::ApiError => e
puts "Error when calling ProjectsApi->get_project: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> get_project_with_http_info(project_id)
begin
# Get project details
data, status_code, headers = api_instance.get_project_with_http_info(project_id)
p status_code # => 2xx
p headers # => { ... }
p data # => <Project>
rescue RankVectors::ApiError => e
puts "Error when calling ProjectsApi->get_project_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| project_id | String | Unique identifier for the project |
- Content-Type: Not defined
- Accept: application/json
<Array> list_projects
List all projects
Get a list of all projects for the authenticated user
require 'time'
require 'rankvectors'
# setup authorization
RankVectors.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = RankVectors::ProjectsApi.new
begin
# List all projects
result = api_instance.list_projects
p result
rescue RankVectors::ApiError => e
puts "Error when calling ProjectsApi->list_projects: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(<Array>, Integer, Hash)> list_projects_with_http_info
begin
# List all projects
data, status_code, headers = api_instance.list_projects_with_http_info
p status_code # => 2xx
p headers # => { ... }
p data # => <Array<Project>>
rescue RankVectors::ApiError => e
puts "Error when calling ProjectsApi->list_projects_with_http_info: #{e}"
endThis endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
sync_project(project_id, opts)
Sync project
Trigger a full sync of project content (used by WordPress and other integrations)
require 'time'
require 'rankvectors'
# setup authorization
RankVectors.configure do |config|
# Configure API key authorization: ApiKeyAuth
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = RankVectors::ProjectsApi.new
project_id = 'proj-123' # String | Unique identifier for the project
opts = {
sync_project_request: RankVectors::SyncProjectRequest.new # SyncProjectRequest |
}
begin
# Sync project
result = api_instance.sync_project(project_id, opts)
p result
rescue RankVectors::ApiError => e
puts "Error when calling ProjectsApi->sync_project: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> sync_project_with_http_info(project_id, opts)
begin
# Sync project
data, status_code, headers = api_instance.sync_project_with_http_info(project_id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <SyncProject200Response>
rescue RankVectors::ApiError => e
puts "Error when calling ProjectsApi->sync_project_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| project_id | String | Unique identifier for the project | |
| sync_project_request | SyncProjectRequest | [optional] |
- Content-Type: application/json
- Accept: application/json