All URIs are relative to http://localhost/api/v1
Method | HTTP request | Description |
---|---|---|
create_variant | POST /flags/{flagID}/variants | |
delete_variant | DELETE /flags/{flagID}/variants/{variantID} | |
find_variants | GET /flags/{flagID}/variants | |
put_variant | PUT /flags/{flagID}/variants/{variantID} |
Variant create_variant(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.VariantApi()
flag_id = 789 # int | numeric ID of the flag
body = flagr.CreateVariantRequest() # CreateVariantRequest | create a variant
try:
api_response = api_instance.create_variant(flag_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling VariantApi->create_variant: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
flag_id | int | numeric ID of the flag | |
body | CreateVariantRequest | create a variant |
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_variant(flag_id, variant_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.VariantApi()
flag_id = 789 # int | numeric ID of the flag
variant_id = 789 # int | numeric ID of the variant
try:
api_instance.delete_variant(flag_id, variant_id)
except ApiException as e:
print("Exception when calling VariantApi->delete_variant: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
flag_id | int | numeric ID of the flag | |
variant_id | int | numeric ID of the variant |
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[Variant] find_variants(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.VariantApi()
flag_id = 789 # int | numeric ID of the flag
try:
api_response = api_instance.find_variants(flag_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling VariantApi->find_variants: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
flag_id | int | numeric ID of the 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]
Variant put_variant(flag_id, variant_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.VariantApi()
flag_id = 789 # int | numeric ID of the flag
variant_id = 789 # int | numeric ID of the variant
body = flagr.PutVariantRequest() # PutVariantRequest | update a variant
try:
api_response = api_instance.put_variant(flag_id, variant_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling VariantApi->put_variant: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
flag_id | int | numeric ID of the flag | |
variant_id | int | numeric ID of the variant | |
body | PutVariantRequest | update a variant |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]