Skip to content

Latest commit

 

History

History
199 lines (135 loc) · 5.13 KB

TagApi.md

File metadata and controls

199 lines (135 loc) · 5.13 KB

flagr.TagApi

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

Method HTTP request Description
create_tag POST /flags/{flagID}/tags
delete_tag DELETE /flags/{flagID}/tags/{tagID}
find_all_tags GET /tags
find_tags GET /flags/{flagID}/tags

create_tag

Tag create_tag(flag_id, body)

Example

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.TagApi()
flag_id = 789 # int | numeric ID of the flag
body = flagr.CreateTagRequest() # CreateTagRequest | create a tag

try:
    api_response = api_instance.create_tag(flag_id, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TagApi->create_tag: %s\n" % e)

Parameters

Name Type Description Notes
flag_id int numeric ID of the flag
body CreateTagRequest create a tag

Return type

Tag

Authorization

No authorization required

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_tag

delete_tag(flag_id, tag_id)

Example

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.TagApi()
flag_id = 789 # int | numeric ID of the flag
tag_id = 789 # int | numeric ID of the tag

try:
    api_instance.delete_tag(flag_id, tag_id)
except ApiException as e:
    print("Exception when calling TagApi->delete_tag: %s\n" % e)

Parameters

Name Type Description Notes
flag_id int numeric ID of the flag
tag_id int numeric ID of the tag

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

find_all_tags

list[Tag] find_all_tags(limit=limit, offset=offset, value_like=value_like)

Example

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.TagApi()
limit = 789 # int | the numbers of tags to return (optional)
offset = 789 # int | return tags given the offset, it should usually set together with limit (optional)
value_like = 'value_like_example' # str | return tags partially matching given value (optional)

try:
    api_response = api_instance.find_all_tags(limit=limit, offset=offset, value_like=value_like)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TagApi->find_all_tags: %s\n" % e)

Parameters

Name Type Description Notes
limit int the numbers of tags to return [optional]
offset int return tags given the offset, it should usually set together with limit [optional]
value_like str return tags partially matching given value [optional]

Return type

list[Tag]

Authorization

No authorization required

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]

find_tags

list[Tag] find_tags(flag_id)

Example

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.TagApi()
flag_id = 789 # int | numeric ID of the flag

try:
    api_response = api_instance.find_tags(flag_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TagApi->find_tags: %s\n" % e)

Parameters

Name Type Description Notes
flag_id int numeric ID of the flag

Return type

list[Tag]

Authorization

No authorization required

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]