flagr.TagApi

July 17, 2020 ยท View on GitHub

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

MethodHTTP requestDescription
create_tagPOST /flags/{flagID}/tags
delete_tagDELETE /flags/{flagID}/tags/{tagID}
find_all_tagsGET /tags
find_tagsGET /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

NameTypeDescriptionNotes
flag_idintnumeric ID of the flag
bodyCreateTagRequestcreate 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

NameTypeDescriptionNotes
flag_idintnumeric ID of the flag
tag_idintnumeric 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

NameTypeDescriptionNotes
limitintthe numbers of tags to return[optional]
offsetintreturn tags given the offset, it should usually set together with limit[optional]
value_likestrreturn 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

NameTypeDescriptionNotes
flag_idintnumeric 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]