All URIs are relative to http://localhost/api/v1
Method | HTTP request | Description |
---|---|---|
create_flag | POST /flags | |
delete_flag | DELETE /flags/{flagID} | |
find_flags | GET /flags | |
get_flag | GET /flags/{flagID} | |
get_flag_entity_types | GET /flags/entity_types | |
get_flag_snapshots | GET /flags/{flagID}/snapshots | |
put_flag | PUT /flags/{flagID} | |
set_flag_enabled | PUT /flags/{flagID}/enabled |
Flag create_flag(body)
# load the gem
require 'rbflagr'
api_instance = Flagr::FlagApi.new
body = Flagr::CreateFlagRequest.new # CreateFlagRequest | create a flag
begin
result = api_instance.create_flag(body)
p result
rescue Flagr::ApiError => e
puts "Exception when calling FlagApi->create_flag: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
body | CreateFlagRequest | create a flag |
No authorization required
- Content-Type: application/json
- Accept: application/json
delete_flag(flag_id)
# load the gem
require 'rbflagr'
api_instance = Flagr::FlagApi.new
flag_id = 789 # Integer | numeric ID of the flag
begin
api_instance.delete_flag(flag_id)
rescue Flagr::ApiError => e
puts "Exception when calling FlagApi->delete_flag: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
flag_id | Integer | numeric ID of the flag |
nil (empty response body)
No authorization required
- Content-Type: application/json
- Accept: application/json
Array<Flag> find_flags(opts)
# load the gem
require 'rbflagr'
api_instance = Flagr::FlagApi.new
opts = {
limit: 789, # Integer | the numbers of flags to return
enabled: true, # BOOLEAN | return flags having given enabled status
description: 'description_example', # String | return flags exactly matching given description
tags: 'tags_example', # String | return flags with the given tags (comma separated)
description_like: 'description_like_example', # String | return flags partially matching given description
key: 'key_example', # String | return flags matching given key
offset: 789, # Integer | return flags given the offset, it should usually set together with limit
preload: true # BOOLEAN | return flags with preloaded segments and variants
}
begin
result = api_instance.find_flags(opts)
p result
rescue Flagr::ApiError => e
puts "Exception when calling FlagApi->find_flags: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
limit | Integer | the numbers of flags to return | [optional] |
enabled | BOOLEAN | return flags having given enabled status | [optional] |
description | String | return flags exactly matching given description | [optional] |
tags | String | return flags with the given tags (comma separated) | [optional] |
description_like | String | return flags partially matching given description | [optional] |
key | String | return flags matching given key | [optional] |
offset | Integer | return flags given the offset, it should usually set together with limit | [optional] |
preload | BOOLEAN | return flags with preloaded segments and variants | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
Flag get_flag(flag_id)
# load the gem
require 'rbflagr'
api_instance = Flagr::FlagApi.new
flag_id = 789 # Integer | numeric ID of the flag to get
begin
result = api_instance.get_flag(flag_id)
p result
rescue Flagr::ApiError => e
puts "Exception when calling FlagApi->get_flag: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
flag_id | Integer | numeric ID of the flag to get |
No authorization required
- Content-Type: application/json
- Accept: application/json
Array<String> get_flag_entity_types
# load the gem
require 'rbflagr'
api_instance = Flagr::FlagApi.new
begin
result = api_instance.get_flag_entity_types
p result
rescue Flagr::ApiError => e
puts "Exception when calling FlagApi->get_flag_entity_types: #{e}"
end
This endpoint does not need any parameter.
Array<String>
No authorization required
- Content-Type: application/json
- Accept: application/json
Array<FlagSnapshot> get_flag_snapshots(flag_id)
# load the gem
require 'rbflagr'
api_instance = Flagr::FlagApi.new
flag_id = 789 # Integer | numeric ID of the flag to get
begin
result = api_instance.get_flag_snapshots(flag_id)
p result
rescue Flagr::ApiError => e
puts "Exception when calling FlagApi->get_flag_snapshots: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
flag_id | Integer | numeric ID of the flag to get |
No authorization required
- Content-Type: application/json
- Accept: application/json
Flag put_flag(flag_id, body)
# load the gem
require 'rbflagr'
api_instance = Flagr::FlagApi.new
flag_id = 789 # Integer | numeric ID of the flag to get
body = Flagr::PutFlagRequest.new # PutFlagRequest | update a flag
begin
result = api_instance.put_flag(flag_id, body)
p result
rescue Flagr::ApiError => e
puts "Exception when calling FlagApi->put_flag: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
flag_id | Integer | numeric ID of the flag to get | |
body | PutFlagRequest | update a flag |
No authorization required
- Content-Type: application/json
- Accept: application/json
Flag set_flag_enabled(flag_id, body)
# load the gem
require 'rbflagr'
api_instance = Flagr::FlagApi.new
flag_id = 789 # Integer | numeric ID of the flag to get
body = Flagr::SetFlagEnabledRequest.new # SetFlagEnabledRequest | set flag enabled state
begin
result = api_instance.set_flag_enabled(flag_id, body)
p result
rescue Flagr::ApiError => e
puts "Exception when calling FlagApi->set_flag_enabled: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
flag_id | Integer | numeric ID of the flag to get | |
body | SetFlagEnabledRequest | set flag enabled state |
No authorization required
- Content-Type: application/json
- Accept: application/json