Flagr::DistributionApi

October 19, 2017 ยท View on GitHub

All URIs are relative to http://localhost/api/v1

MethodHTTP requestDescription
find_distributionsGET /flags/{flagID}/segments/{segmentID}/distributions
put_distributionsPUT /flags/{flagID}/segments/{segmentID}/distributions

find_distributions

Array<Distribution> find_distributions(flag_id, segment_id)

Example

# load the gem
require 'rbflagr'

api_instance = Flagr::DistributionApi.new

flag_id = 789 # Integer | numeric ID of the flag

segment_id = 789 # Integer | numeric ID of the segment


begin
  result = api_instance.find_distributions(flag_id, segment_id)
  p result
rescue Flagr::ApiError => e
  puts "Exception when calling DistributionApi->find_distributions: #{e}"
end

Parameters

NameTypeDescriptionNotes
flag_idIntegernumeric ID of the flag
segment_idIntegernumeric ID of the segment

Return type

Array<Distribution>

Authorization

No authorization required

HTTP request headers

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

put_distributions

Array<Distribution> put_distributions(flag_id, segment_id, body)

replace the distribution with the new setting

Example

# load the gem
require 'rbflagr'

api_instance = Flagr::DistributionApi.new

flag_id = 789 # Integer | numeric ID of the flag

segment_id = 789 # Integer | numeric ID of the segment

body = Flagr::PutDistributionsRequest.new # PutDistributionsRequest | array of distributions


begin
  result = api_instance.put_distributions(flag_id, segment_id, body)
  p result
rescue Flagr::ApiError => e
  puts "Exception when calling DistributionApi->put_distributions: #{e}"
end

Parameters

NameTypeDescriptionNotes
flag_idIntegernumeric ID of the flag
segment_idIntegernumeric ID of the segment
bodyPutDistributionsRequestarray of distributions

Return type

Array<Distribution>

Authorization

No authorization required

HTTP request headers

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