All URIs are relative to http://localhost/api/v1
Method | HTTP request | Description |
---|---|---|
create_segment | POST /flags/{flagID}/segments | |
delete_segment | DELETE /flags/{flagID}/segments/{segmentID} | |
find_segments | GET /flags/{flagID}/segments | |
put_segment | PUT /flags/{flagID}/segments/{segmentID} | |
put_segments_reorder | PUT /flags/{flagID}/segments/reorder |
Segment create_segment(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.SegmentApi()
flag_id = 789 # int | numeric ID of the flag to get
body = flagr.CreateSegmentRequest() # CreateSegmentRequest | create a segment under a flag
try:
api_response = api_instance.create_segment(flag_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling SegmentApi->create_segment: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
flag_id | int | numeric ID of the flag to get | |
body | CreateSegmentRequest | create a segment under 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_segment(flag_id, segment_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.SegmentApi()
flag_id = 789 # int | numeric ID of the flag
segment_id = 789 # int | numeric ID of the segment
try:
api_instance.delete_segment(flag_id, segment_id)
except ApiException as e:
print("Exception when calling SegmentApi->delete_segment: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
flag_id | int | numeric ID of the flag | |
segment_id | int | numeric ID of the segment |
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[Segment] find_segments(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.SegmentApi()
flag_id = 789 # int | numeric ID of the flag to get
try:
api_response = api_instance.find_segments(flag_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling SegmentApi->find_segments: %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]
Segment put_segment(flag_id, segment_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.SegmentApi()
flag_id = 789 # int | numeric ID of the flag
segment_id = 789 # int | numeric ID of the segment
body = flagr.PutSegmentRequest() # PutSegmentRequest | update a segment
try:
api_response = api_instance.put_segment(flag_id, segment_id, body)
pprint(api_response)
except ApiException as e:
print("Exception when calling SegmentApi->put_segment: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
flag_id | int | numeric ID of the flag | |
segment_id | int | numeric ID of the segment | |
body | PutSegmentRequest | update a segment |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
put_segments_reorder(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.SegmentApi()
flag_id = 789 # int | numeric ID of the flag
body = flagr.PutSegmentReorderRequest() # PutSegmentReorderRequest | reorder segments
try:
api_instance.put_segments_reorder(flag_id, body)
except ApiException as e:
print("Exception when calling SegmentApi->put_segments_reorder: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
flag_id | int | numeric ID of the flag | |
body | PutSegmentReorderRequest | reorder segments |
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]