All URIs are relative to https://api.rankvectors.com
| Method | HTTP request | Description |
|---|---|---|
| create_api_key | POST /api/api-keys | Create API key |
| delete_api_key | DELETE /api/api-keys/{id} | Delete API key |
| list_api_keys | GET /api/api-keys | List API keys |
| update_api_key | PATCH /api/api-keys/{id} | Update API key |
create_api_key(create_api_key_request)
Create API key
Create a new API key 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::APIKeysApi.new
create_api_key_request = RankVectors::CreateApiKeyRequest.new({name: 'WordPress Plugin'}) # CreateApiKeyRequest |
begin
# Create API key
result = api_instance.create_api_key(create_api_key_request)
p result
rescue RankVectors::ApiError => e
puts "Error when calling APIKeysApi->create_api_key: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> create_api_key_with_http_info(create_api_key_request)
begin
# Create API key
data, status_code, headers = api_instance.create_api_key_with_http_info(create_api_key_request)
p status_code # => 2xx
p headers # => { ... }
p data # => <ApiKeyResponse>
rescue RankVectors::ApiError => e
puts "Error when calling APIKeysApi->create_api_key_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| create_api_key_request | CreateApiKeyRequest |
- Content-Type: application/json
- Accept: application/json
delete_api_key(id)
Delete API key
Delete an API key
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::APIKeysApi.new
id = 'id_example' # String | API key ID
begin
# Delete API key
result = api_instance.delete_api_key(id)
p result
rescue RankVectors::ApiError => e
puts "Error when calling APIKeysApi->delete_api_key: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> delete_api_key_with_http_info(id)
begin
# Delete API key
data, status_code, headers = api_instance.delete_api_key_with_http_info(id)
p status_code # => 2xx
p headers # => { ... }
p data # => <DeleteSuggestion200Response>
rescue RankVectors::ApiError => e
puts "Error when calling APIKeysApi->delete_api_key_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | API key ID |
- Content-Type: Not defined
- Accept: application/json
<Array> list_api_keys
List API keys
Get all API keys 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::APIKeysApi.new
begin
# List API keys
result = api_instance.list_api_keys
p result
rescue RankVectors::ApiError => e
puts "Error when calling APIKeysApi->list_api_keys: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(<Array>, Integer, Hash)> list_api_keys_with_http_info
begin
# List API keys
data, status_code, headers = api_instance.list_api_keys_with_http_info
p status_code # => 2xx
p headers # => { ... }
p data # => <Array<ApiKey>>
rescue RankVectors::ApiError => e
puts "Error when calling APIKeysApi->list_api_keys_with_http_info: #{e}"
endThis endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
update_api_key(id, update_api_key_request)
Update API key
Update an API key (activate/deactivate or change name)
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::APIKeysApi.new
id = 'id_example' # String | API key ID
update_api_key_request = RankVectors::UpdateApiKeyRequest.new # UpdateApiKeyRequest |
begin
# Update API key
result = api_instance.update_api_key(id, update_api_key_request)
p result
rescue RankVectors::ApiError => e
puts "Error when calling APIKeysApi->update_api_key: #{e}"
endThis returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> update_api_key_with_http_info(id, update_api_key_request)
begin
# Update API key
data, status_code, headers = api_instance.update_api_key_with_http_info(id, update_api_key_request)
p status_code # => 2xx
p headers # => { ... }
p data # => <ApiKey>
rescue RankVectors::ApiError => e
puts "Error when calling APIKeysApi->update_api_key_with_http_info: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | API key ID | |
| update_api_key_request | UpdateApiKeyRequest |
- Content-Type: application/json
- Accept: application/json