Skip to content

Latest commit

 

History

History
569 lines (424 loc) · 17.7 KB

TagsApi.md

File metadata and controls

569 lines (424 loc) · 17.7 KB

pyjama.TagsApi

All URIs are relative to http://<jama_endpoint>/rest/latest

Method HTTP request Description
add_tag POST /tags Create a new tag in the project with the specified ID
delete_tag DELETE /tags/{id} Delete the tag with the specified ID
get_tag GET /tags/{id} Get the tag with the specified ID
get_tag_items GET /tags/{id}/items Get all items that have the tag with the specified ID
get_tags GET /tags Get all tags for the project with the specified ID
put_tag PUT /tags/{id} Update the tag with the specified ID

add_tag

CreatedResponse add_tag(body)

Create a new tag in the project with the specified ID

Example

  • Basic Authentication (basic):
  • OAuth Authentication (oauth2):
import time
import pyjama
from pyjama.api import tags_api
from pyjama.model.request_tag import RequestTag
from pyjama.model.created_response import CreatedResponse
from pprint import pprint
# Defining the host is optional and defaults to http://<jama_endpoint>/rest/latest
# See configuration.py for a list of all supported configuration parameters.
configuration = pyjama.Configuration(
    host = "http://<jama_endpoint>/rest/latest"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basic
configuration = pyjama.Configuration(
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD'
)

# Configure OAuth2 access token for authorization: oauth2
configuration = pyjama.Configuration(
    host = "http://<jama_endpoint>/rest/latest"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Enter a context with an instance of the API client
with pyjama.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = tags_api.TagsApi(api_client)
    body = RequestTag(
        name="name_example",
        project=1,
    ) # RequestTag | 

    # example passing only required values which don't have defaults set
    try:
        # Create a new tag in the project with the specified ID
        api_response = api_instance.add_tag(body)
        pprint(api_response)
    except pyjama.ApiException as e:
        print("Exception when calling TagsApi->add_tag: %s\n" % e)

Parameters

Name Type Description Notes
body RequestTag

Return type

CreatedResponse

Authorization

basic, oauth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 successful operation -

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

delete_tag

AbstractRestResponse delete_tag(id)

Delete the tag with the specified ID

Example

  • Basic Authentication (basic):
  • OAuth Authentication (oauth2):
import time
import pyjama
from pyjama.api import tags_api
from pyjama.model.abstract_rest_response import AbstractRestResponse
from pprint import pprint
# Defining the host is optional and defaults to http://<jama_endpoint>/rest/latest
# See configuration.py for a list of all supported configuration parameters.
configuration = pyjama.Configuration(
    host = "http://<jama_endpoint>/rest/latest"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basic
configuration = pyjama.Configuration(
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD'
)

# Configure OAuth2 access token for authorization: oauth2
configuration = pyjama.Configuration(
    host = "http://<jama_endpoint>/rest/latest"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Enter a context with an instance of the API client
with pyjama.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = tags_api.TagsApi(api_client)
    id = 1 # int | 

    # example passing only required values which don't have defaults set
    try:
        # Delete the tag with the specified ID
        api_response = api_instance.delete_tag(id)
        pprint(api_response)
    except pyjama.ApiException as e:
        print("Exception when calling TagsApi->delete_tag: %s\n" % e)

Parameters

Name Type Description Notes
id int

Return type

AbstractRestResponse

Authorization

basic, oauth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 successful operation -

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

get_tag

TagDataWrapper get_tag(id)

Get the tag with the specified ID

Example

  • Basic Authentication (basic):
  • OAuth Authentication (oauth2):
import time
import pyjama
from pyjama.api import tags_api
from pyjama.model.tag_data_wrapper import TagDataWrapper
from pprint import pprint
# Defining the host is optional and defaults to http://<jama_endpoint>/rest/latest
# See configuration.py for a list of all supported configuration parameters.
configuration = pyjama.Configuration(
    host = "http://<jama_endpoint>/rest/latest"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basic
configuration = pyjama.Configuration(
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD'
)

# Configure OAuth2 access token for authorization: oauth2
configuration = pyjama.Configuration(
    host = "http://<jama_endpoint>/rest/latest"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Enter a context with an instance of the API client
with pyjama.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = tags_api.TagsApi(api_client)
    id = 1 # int | 
    include = [
        "include_example",
    ] # [str] | Links to include as full objects in the linked map (optional)

    # example passing only required values which don't have defaults set
    try:
        # Get the tag with the specified ID
        api_response = api_instance.get_tag(id)
        pprint(api_response)
    except pyjama.ApiException as e:
        print("Exception when calling TagsApi->get_tag: %s\n" % e)

    # example passing only required values which don't have defaults set
    # and optional values
    try:
        # Get the tag with the specified ID
        api_response = api_instance.get_tag(id, include=include)
        pprint(api_response)
    except pyjama.ApiException as e:
        print("Exception when calling TagsApi->get_tag: %s\n" % e)

Parameters

Name Type Description Notes
id int
include [str] Links to include as full objects in the linked map [optional]

Return type

TagDataWrapper

Authorization

basic, oauth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 successful operation -

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

get_tag_items

ItemDataListWrapper get_tag_items(id)

Get all items that have the tag with the specified ID

Example

  • Basic Authentication (basic):
  • OAuth Authentication (oauth2):
import time
import pyjama
from pyjama.api import tags_api
from pyjama.model.item_data_list_wrapper import ItemDataListWrapper
from pprint import pprint
# Defining the host is optional and defaults to http://<jama_endpoint>/rest/latest
# See configuration.py for a list of all supported configuration parameters.
configuration = pyjama.Configuration(
    host = "http://<jama_endpoint>/rest/latest"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basic
configuration = pyjama.Configuration(
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD'
)

# Configure OAuth2 access token for authorization: oauth2
configuration = pyjama.Configuration(
    host = "http://<jama_endpoint>/rest/latest"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Enter a context with an instance of the API client
with pyjama.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = tags_api.TagsApi(api_client)
    id = 1 # int | 
    start_at = 1 # int |  (optional)
    max_results = 1 # int | If not set, this defaults to 20. This cannot be larger than 50 (optional)
    include = [
        "include_example",
    ] # [str] | Links to include as full objects in the linked map (optional)

    # example passing only required values which don't have defaults set
    try:
        # Get all items that have the tag with the specified ID
        api_response = api_instance.get_tag_items(id)
        pprint(api_response)
    except pyjama.ApiException as e:
        print("Exception when calling TagsApi->get_tag_items: %s\n" % e)

    # example passing only required values which don't have defaults set
    # and optional values
    try:
        # Get all items that have the tag with the specified ID
        api_response = api_instance.get_tag_items(id, start_at=start_at, max_results=max_results, include=include)
        pprint(api_response)
    except pyjama.ApiException as e:
        print("Exception when calling TagsApi->get_tag_items: %s\n" % e)

Parameters

Name Type Description Notes
id int
start_at int [optional]
max_results int If not set, this defaults to 20. This cannot be larger than 50 [optional]
include [str] Links to include as full objects in the linked map [optional]

Return type

ItemDataListWrapper

Authorization

basic, oauth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 successful operation -

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

get_tags

TagDataListWrapper get_tags(project)

Get all tags for the project with the specified ID

Example

  • Basic Authentication (basic):
  • OAuth Authentication (oauth2):
import time
import pyjama
from pyjama.api import tags_api
from pyjama.model.tag_data_list_wrapper import TagDataListWrapper
from pprint import pprint
# Defining the host is optional and defaults to http://<jama_endpoint>/rest/latest
# See configuration.py for a list of all supported configuration parameters.
configuration = pyjama.Configuration(
    host = "http://<jama_endpoint>/rest/latest"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basic
configuration = pyjama.Configuration(
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD'
)

# Configure OAuth2 access token for authorization: oauth2
configuration = pyjama.Configuration(
    host = "http://<jama_endpoint>/rest/latest"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Enter a context with an instance of the API client
with pyjama.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = tags_api.TagsApi(api_client)
    project = 1 # int | 
    start_at = 1 # int |  (optional)
    max_results = 1 # int | If not set, this defaults to 20. This cannot be larger than 50 (optional)
    include = [
        "include_example",
    ] # [str] | Links to include as full objects in the linked map (optional)

    # example passing only required values which don't have defaults set
    try:
        # Get all tags for the project with the specified ID
        api_response = api_instance.get_tags(project)
        pprint(api_response)
    except pyjama.ApiException as e:
        print("Exception when calling TagsApi->get_tags: %s\n" % e)

    # example passing only required values which don't have defaults set
    # and optional values
    try:
        # Get all tags for the project with the specified ID
        api_response = api_instance.get_tags(project, start_at=start_at, max_results=max_results, include=include)
        pprint(api_response)
    except pyjama.ApiException as e:
        print("Exception when calling TagsApi->get_tags: %s\n" % e)

Parameters

Name Type Description Notes
project int
start_at int [optional]
max_results int If not set, this defaults to 20. This cannot be larger than 50 [optional]
include [str] Links to include as full objects in the linked map [optional]

Return type

TagDataListWrapper

Authorization

basic, oauth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 successful operation -

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

put_tag

AbstractRestResponse put_tag(id, body)

Update the tag with the specified ID

Example

  • Basic Authentication (basic):
  • OAuth Authentication (oauth2):
import time
import pyjama
from pyjama.api import tags_api
from pyjama.model.request_tag import RequestTag
from pyjama.model.abstract_rest_response import AbstractRestResponse
from pprint import pprint
# Defining the host is optional and defaults to http://<jama_endpoint>/rest/latest
# See configuration.py for a list of all supported configuration parameters.
configuration = pyjama.Configuration(
    host = "http://<jama_endpoint>/rest/latest"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basic
configuration = pyjama.Configuration(
    username = 'YOUR_USERNAME',
    password = 'YOUR_PASSWORD'
)

# Configure OAuth2 access token for authorization: oauth2
configuration = pyjama.Configuration(
    host = "http://<jama_endpoint>/rest/latest"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'

# Enter a context with an instance of the API client
with pyjama.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = tags_api.TagsApi(api_client)
    id = 1 # int | 
    body = RequestTag(
        name="name_example",
        project=1,
    ) # RequestTag | 

    # example passing only required values which don't have defaults set
    try:
        # Update the tag with the specified ID
        api_response = api_instance.put_tag(id, body)
        pprint(api_response)
    except pyjama.ApiException as e:
        print("Exception when calling TagsApi->put_tag: %s\n" % e)

Parameters

Name Type Description Notes
id int
body RequestTag

Return type

AbstractRestResponse

Authorization

basic, oauth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 successful operation -

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