All URIs are relative to /
Method | HTTP request | Description |
---|---|---|
create_app_token1 | POST /users-web/api/v3/apps/{appId}/tokens | Create new app token |
delete_app_token1 | DELETE /users-web/api/v3/apps/{appId}/tokens/{tokenId} | Delete app token |
get_app_tokens1 | GET /users-web/api/v3/apps/{appId}/tokens | Get app available tokens |
regenerate_app_token | POST /users-web/api/v3/apps/{appId}/tokens/{tokenId}/regenerate | Regenerate app token) |
update_app_token1 | PUT /users-web/api/v3/apps/{appId}/tokens/{tokenId} | Update app token (enable/disable or name) |
TokenResponse create_app_token1(bodyapp_id)
Create new app token
# load the gem
require 'SematextCloud'
# setup authorization
SematextCloud.configure do |config|
# Configure API key authorization: api_key
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 = SematextCloud::TokensApiControllerApi.new
body = SematextCloud::CreateTokenDto.new # CreateTokenDto | dto
app_id = 789 # Integer | appId
begin
#Create new app token
result = api_instance.create_app_token1(bodyapp_id)
p result
rescue SematextCloud::ApiError => e
puts "Exception when calling TokensApiControllerApi->create_app_token1: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
body | CreateTokenDto | dto | |
app_id | Integer | appId |
- Content-Type: application/json
- Accept: application/json
GenericMapBasedApiResponse delete_app_token1(app_id, token_id)
Delete app token
# load the gem
require 'SematextCloud'
# setup authorization
SematextCloud.configure do |config|
# Configure API key authorization: api_key
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 = SematextCloud::TokensApiControllerApi.new
app_id = 789 # Integer | appId
token_id = 789 # Integer | tokenId
begin
#Delete app token
result = api_instance.delete_app_token1(app_id, token_id)
p result
rescue SematextCloud::ApiError => e
puts "Exception when calling TokensApiControllerApi->delete_app_token1: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
app_id | Integer | appId | |
token_id | Integer | tokenId |
- Content-Type: Not defined
- Accept: application/json
TokensResponse get_app_tokens1(app_id)
Get app available tokens
# load the gem
require 'SematextCloud'
# setup authorization
SematextCloud.configure do |config|
# Configure API key authorization: api_key
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 = SematextCloud::TokensApiControllerApi.new
app_id = 789 # Integer | appId
begin
#Get app available tokens
result = api_instance.get_app_tokens1(app_id)
p result
rescue SematextCloud::ApiError => e
puts "Exception when calling TokensApiControllerApi->get_app_tokens1: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
app_id | Integer | appId |
- Content-Type: Not defined
- Accept: application/json
TokenResponse regenerate_app_token(app_id, token_id)
Regenerate app token)
# load the gem
require 'SematextCloud'
# setup authorization
SematextCloud.configure do |config|
# Configure API key authorization: api_key
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 = SematextCloud::TokensApiControllerApi.new
app_id = 789 # Integer | appId
token_id = 789 # Integer | tokenId
begin
#Regenerate app token)
result = api_instance.regenerate_app_token(app_id, token_id)
p result
rescue SematextCloud::ApiError => e
puts "Exception when calling TokensApiControllerApi->regenerate_app_token: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
app_id | Integer | appId | |
token_id | Integer | tokenId |
- Content-Type: Not defined
- Accept: application/json
TokenResponse update_app_token1(bodyapp_idtoken_id)
Update app token (enable/disable or name)
# load the gem
require 'SematextCloud'
# setup authorization
SematextCloud.configure do |config|
# Configure API key authorization: api_key
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 = SematextCloud::TokensApiControllerApi.new
body = SematextCloud::UpdateTokenDto.new # UpdateTokenDto | dto
app_id = 789 # Integer | appId
token_id = 789 # Integer | tokenId
begin
#Update app token (enable/disable or name)
result = api_instance.update_app_token1(bodyapp_idtoken_id)
p result
rescue SematextCloud::ApiError => e
puts "Exception when calling TokensApiControllerApi->update_app_token1: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
body | UpdateTokenDto | dto | |
app_id | Integer | appId | |
token_id | Integer | tokenId |
- Content-Type: application/json
- Accept: application/json