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)
from __future__ import print_function
import time
import flagr
from flagr.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = flagr.FlagApi()
body = flagr.CreateFlagRequest() # CreateFlagRequest | create a flag
try:
api_response = api_instance.create_flag(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling FlagApi->create_flag: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
body | CreateFlagRequest | create a flag |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_flag(flag_id)
from __future__ import print_function
import time
import flagr
from flagr.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = flagr.FlagApi()
flag_id = 789 # int | numeric ID of the flag
try:
api_instance.delete_flag(flag_id)
except ApiException as e:
print("Exception when calling FlagApi->delete_flag: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
flag_id | int | numeric ID of the flag |
void (empty response body)
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[Flag] find_flags(limit=limit, enabled=enabled, description=description, tags=tags, description_like=description_like, key=key, offset=offset, preload=preload)
from __future__ import print_function
import time
import flagr
from flagr.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = flagr.FlagApi()
limit = 789 # int | the numbers of flags to return (optional)
enabled = true # bool | return flags having given enabled status (optional)
description = 'description_example' # str | return flags exactly matching given description (optional)
tags = 'tags_example' # str | return flags with the given tags (comma separated) (optional)
description_like = 'description_like_example' # str | return flags partially matching given description (optional)
key = 'key_example' # str | return flags matching given key (optional)
offset = 789 # int | return flags given the offset, it should usually set together with limit (optional)
preload = true # bool | return flags with preloaded segments and variants (optional)
try:
api_response = api_instance.find_flags(limit=limit, enabled=enabled, description=description, tags=tags, description_like=description_like, key=key, offset=offset, preload=preload)
pprint(api_response)
except ApiException as e:
print("Exception when calling FlagApi->find_flags: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
limit | int | the numbers of flags to return | [optional] |
enabled | bool | return flags having given enabled status | [optional] |
description | str | return flags exactly matching given description | [optional] |
tags | str | return flags with the given tags (comma separated) | [optional] |
description_like | str | return flags partially matching given description | [optional] |
key | str | return flags matching given key | [optional] |
offset | int | return flags given the offset, it should usually set together with limit | [optional] |
preload | bool | return flags with preloaded segments and variants | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Flag get_flag(flag_id)
from __future__ import print_function
import time
import flagr
from flagr.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = flagr.FlagApi()
flag_id = 789 # int | numeric ID of the flag to get
try:
api_response = api_instance.get_flag(flag_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling FlagApi->get_flag: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
flag_id | int | numeric ID of the flag to get |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[str] get_flag_entity_types()
from __future__ import print_function
import time
import flagr
from flagr.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = flagr.FlagApi()
try:
api_response = api_instance.get_flag_entity_types()
pprint(api_response)
except ApiException as e:
print("Exception when calling FlagApi->get_flag_entity_types: %s\n" % e)
This endpoint does not need any parameter.
list[str]
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[FlagSnapshot] get_flag_snapshots(flag_id)
from __future__ import print_function
import time
import flagr
from flagr.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = flagr.FlagApi()
flag_id = 789 # int | numeric ID of the flag to get
try:
api_response = api_instance.get_flag_snapshots(flag_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling FlagApi->get_flag_snapshots: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
flag_id | int | numeric ID of the flag to get |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Flag put_flag(flag_id, body)
from __future__ import print_function
import time
import flagr
from flagr.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = flagr.FlagApi()
flag_id = 789 # int | numeric ID of the flag to get
body = flagr.PutFlagRequest() # PutFlagRequest | update a flag
try:
api_response = api_instance.put_flag(flag_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling FlagApi->put_flag: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
flag_id | int | numeric ID of the flag to get | |
body | PutFlagRequest | update a flag |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Flag set_flag_enabled(flag_id, body)
from __future__ import print_function
import time
import flagr
from flagr.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = flagr.FlagApi()
flag_id = 789 # int | numeric ID of the flag to get
body = flagr.SetFlagEnabledRequest() # SetFlagEnabledRequest | set flag enabled state
try:
api_response = api_instance.set_flag_enabled(flag_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling FlagApi->set_flag_enabled: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
flag_id | int | numeric ID of the flag to get | |
body | SetFlagEnabledRequest | set flag enabled state |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]