Skip to content

Latest commit

 

History

History
536 lines (375 loc) · 16 KB

SubscriptionsApi.md

File metadata and controls

536 lines (375 loc) · 16 KB

SematextCloud::SubscriptionsApi

All URIs are relative to /

Method HTTP request Description
create_for_app_using_post POST /users-web/api/v3/apps/{appId}/subscription Create App subscription
create_for_dash_using_post1 POST /users-web/api/v3/dashboards/{dashId}/subscription Create dashboard subscription
delete_using_delete3 DELETE /users-web/api/v3/subscriptions/{updateableSubscriptionId} Delete subscription
list_using_get2 GET /users-web/api/v3/apps/{appId}/subscriptions Get subscriptions for an App
list_using_get5 GET /users-web/api/v3/subscriptions Get current account's subscriptions
send_app_report_using_post1 POST /users-web/api/v3/apps/{appId}/report/send Email an App report
send_dash_report_using_post1 POST /users-web/api/v3/dashboards/{dashId}/report/send Email a dashboard report
toggle_enabled_using_put PUT /users-web/api/v3/subscriptions/{updateableSubscriptionId} Toggle subscription status
update_for_app_using_put1 PUT /users-web/api/v3/apps/{appId}/subscription Update App subscription
update_for_dash_using_put PUT /users-web/api/v3/dashboards/{dashId}/subscription Update dashboard subscription

create_for_app_using_post

SubscriptionResponse create_for_app_using_post(bodyapp_id)

Create App subscription

Example

# 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::SubscriptionsApi.new
body = SematextCloud::SubscriptionDto.new # SubscriptionDto | subscription
app_id = 789 # Integer | appId


begin
  #Create App subscription
  result = api_instance.create_for_app_using_post(bodyapp_id)
  p result
rescue SematextCloud::ApiError => e
  puts "Exception when calling SubscriptionsApi->create_for_app_using_post: #{e}"
end

Parameters

Name Type Description Notes
body SubscriptionDto subscription
app_id Integer appId

Return type

SubscriptionResponse

Authorization

api_key

HTTP request headers

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

create_for_dash_using_post1

SubscriptionResponse create_for_dash_using_post1(bodydash_id)

Create dashboard subscription

Example

# 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::SubscriptionsApi.new
body = SematextCloud::SubscriptionDashboardDto.new # SubscriptionDashboardDto | subscription
dash_id = 789 # Integer | dashId


begin
  #Create dashboard subscription
  result = api_instance.create_for_dash_using_post1(bodydash_id)
  p result
rescue SematextCloud::ApiError => e
  puts "Exception when calling SubscriptionsApi->create_for_dash_using_post1: #{e}"
end

Parameters

Name Type Description Notes
body SubscriptionDashboardDto subscription
dash_id Integer dashId

Return type

SubscriptionResponse

Authorization

api_key

HTTP request headers

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

delete_using_delete3

GenericMapBasedApiResponse delete_using_delete3(updateable_subscription_id)

Delete subscription

Example

# 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::SubscriptionsApi.new
updateable_subscription_id = 789 # Integer | updateableSubscriptionId


begin
  #Delete subscription
  result = api_instance.delete_using_delete3(updateable_subscription_id)
  p result
rescue SematextCloud::ApiError => e
  puts "Exception when calling SubscriptionsApi->delete_using_delete3: #{e}"
end

Parameters

Name Type Description Notes
updateable_subscription_id Integer updateableSubscriptionId

Return type

GenericMapBasedApiResponse

Authorization

api_key

HTTP request headers

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

list_using_get2

SubscriptionsResponse list_using_get2(app_id)

Get subscriptions for an App

Example

# 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::SubscriptionsApi.new
app_id = 789 # Integer | appId


begin
  #Get subscriptions for an App
  result = api_instance.list_using_get2(app_id)
  p result
rescue SematextCloud::ApiError => e
  puts "Exception when calling SubscriptionsApi->list_using_get2: #{e}"
end

Parameters

Name Type Description Notes
app_id Integer appId

Return type

SubscriptionsResponse

Authorization

api_key

HTTP request headers

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

list_using_get5

SubscriptionsResponse list_using_get5

Get current account's subscriptions

Example

# 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::SubscriptionsApi.new

begin
  #Get current account's subscriptions
  result = api_instance.list_using_get5
  p result
rescue SematextCloud::ApiError => e
  puts "Exception when calling SubscriptionsApi->list_using_get5: #{e}"
end

Parameters

This endpoint does not need any parameter.

Return type

SubscriptionsResponse

Authorization

api_key

HTTP request headers

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

send_app_report_using_post1

MailReportResponse send_app_report_using_post1(bodyapp_id)

Email an App report

Example

# 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::SubscriptionsApi.new
body = SematextCloud::ReportInfo.new # ReportInfo | emailDto
app_id = 789 # Integer | appId


begin
  #Email an App report
  result = api_instance.send_app_report_using_post1(bodyapp_id)
  p result
rescue SematextCloud::ApiError => e
  puts "Exception when calling SubscriptionsApi->send_app_report_using_post1: #{e}"
end

Parameters

Name Type Description Notes
body ReportInfo emailDto
app_id Integer appId

Return type

MailReportResponse

Authorization

api_key

HTTP request headers

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

send_dash_report_using_post1

MailReportResponse send_dash_report_using_post1(bodydash_id)

Email a dashboard report

Example

# 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::SubscriptionsApi.new
body = SematextCloud::ReportInfo.new # ReportInfo | emailDto
dash_id = 789 # Integer | dashId


begin
  #Email a dashboard report
  result = api_instance.send_dash_report_using_post1(bodydash_id)
  p result
rescue SematextCloud::ApiError => e
  puts "Exception when calling SubscriptionsApi->send_dash_report_using_post1: #{e}"
end

Parameters

Name Type Description Notes
body ReportInfo emailDto
dash_id Integer dashId

Return type

MailReportResponse

Authorization

api_key

HTTP request headers

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

toggle_enabled_using_put

SubscriptionResponse toggle_enabled_using_put(bodyupdateable_subscription_id)

Toggle subscription status

Example

# 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::SubscriptionsApi.new
body = SematextCloud::UpdateSubscriptionDto.new # UpdateSubscriptionDto | dto
updateable_subscription_id = 789 # Integer | updateableSubscriptionId


begin
  #Toggle subscription status
  result = api_instance.toggle_enabled_using_put(bodyupdateable_subscription_id)
  p result
rescue SematextCloud::ApiError => e
  puts "Exception when calling SubscriptionsApi->toggle_enabled_using_put: #{e}"
end

Parameters

Name Type Description Notes
body UpdateSubscriptionDto dto
updateable_subscription_id Integer updateableSubscriptionId

Return type

SubscriptionResponse

Authorization

api_key

HTTP request headers

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

update_for_app_using_put1

SubscriptionResponse update_for_app_using_put1(bodyapp_id)

Update App subscription

Example

# 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::SubscriptionsApi.new
body = SematextCloud::SubscriptionDto.new # SubscriptionDto | subscription
app_id = 789 # Integer | appId


begin
  #Update App subscription
  result = api_instance.update_for_app_using_put1(bodyapp_id)
  p result
rescue SematextCloud::ApiError => e
  puts "Exception when calling SubscriptionsApi->update_for_app_using_put1: #{e}"
end

Parameters

Name Type Description Notes
body SubscriptionDto subscription
app_id Integer appId

Return type

SubscriptionResponse

Authorization

api_key

HTTP request headers

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

update_for_dash_using_put

SubscriptionResponse update_for_dash_using_put(bodydash_id)

Update dashboard subscription

Example

# 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::SubscriptionsApi.new
body = SematextCloud::SubscriptionDashboardDto.new # SubscriptionDashboardDto | subscription
dash_id = 789 # Integer | dashId


begin
  #Update dashboard subscription
  result = api_instance.update_for_dash_using_put(bodydash_id)
  p result
rescue SematextCloud::ApiError => e
  puts "Exception when calling SubscriptionsApi->update_for_dash_using_put: #{e}"
end

Parameters

Name Type Description Notes
body SubscriptionDashboardDto subscription
dash_id Integer dashId

Return type

SubscriptionResponse

Authorization

api_key

HTTP request headers

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