Skip to content

Latest commit

 

History

History
391 lines (293 loc) · 13.1 KB

PicklistsApi.md

File metadata and controls

391 lines (293 loc) · 13.1 KB

pyjama.PicklistsApi

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

Method HTTP request Description
add_pick_list_option POST /picklists/{picklistId}/options Create a new pick list option for the pick list with the specified ID
get_pick_list GET /picklists/{picklistId} Get the pick list with the specified ID
get_pick_list_options GET /picklists/{picklistId}/options Get all pick list options for the pick list with the specified ID
get_pick_lists GET /picklists Get all pick lists

add_pick_list_option

CreatedResponse add_pick_list_option(picklist_id, body)

Create a new pick list option for the pick list with the specified ID

Example

  • Basic Authentication (basic):
  • OAuth Authentication (oauth2):
import time
import pyjama
from pyjama.api import picklists_api
from pyjama.model.created_response import CreatedResponse
from pyjama.model.request_pick_list_option import RequestPickListOption
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 = picklists_api.PicklistsApi(api_client)
    picklist_id = 1 # int | 
    body = RequestPickListOption(
        description="description_example",
        name="name_example",
        value="value_example",
        color="000000",
        sort_order=1,
        default=True,
    ) # RequestPickListOption | 

    # example passing only required values which don't have defaults set
    try:
        # Create a new pick list option for the pick list with the specified ID
        api_response = api_instance.add_pick_list_option(picklist_id, body)
        pprint(api_response)
    except pyjama.ApiException as e:
        print("Exception when calling PicklistsApi->add_pick_list_option: %s\n" % e)

Parameters

Name Type Description Notes
picklist_id int
body RequestPickListOption

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]

get_pick_list

PickListDataWrapper get_pick_list(picklist_id)

Get the pick list with the specified ID

Example

  • Basic Authentication (basic):
  • OAuth Authentication (oauth2):
import time
import pyjama
from pyjama.api import picklists_api
from pyjama.model.pick_list_data_wrapper import PickListDataWrapper
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 = picklists_api.PicklistsApi(api_client)
    picklist_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 pick list with the specified ID
        api_response = api_instance.get_pick_list(picklist_id)
        pprint(api_response)
    except pyjama.ApiException as e:
        print("Exception when calling PicklistsApi->get_pick_list: %s\n" % e)

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

Parameters

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

Return type

PickListDataWrapper

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_pick_list_options

PickListOptionDataListWrapper get_pick_list_options(picklist_id)

Get all pick list options for the pick list with the specified ID

Example

  • Basic Authentication (basic):
  • OAuth Authentication (oauth2):
import time
import pyjama
from pyjama.api import picklists_api
from pyjama.model.pick_list_option_data_list_wrapper import PickListOptionDataListWrapper
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 = picklists_api.PicklistsApi(api_client)
    picklist_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 pick list options for the pick list with the specified ID
        api_response = api_instance.get_pick_list_options(picklist_id)
        pprint(api_response)
    except pyjama.ApiException as e:
        print("Exception when calling PicklistsApi->get_pick_list_options: %s\n" % e)

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

Parameters

Name Type Description Notes
picklist_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

PickListOptionDataListWrapper

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_pick_lists

PickListDataListWrapper get_pick_lists()

Get all pick lists

Example

  • Basic Authentication (basic):
  • OAuth Authentication (oauth2):
import time
import pyjama
from pyjama.api import picklists_api
from pyjama.model.pick_list_data_list_wrapper import PickListDataListWrapper
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 = picklists_api.PicklistsApi(api_client)
    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
    # and optional values
    try:
        # Get all pick lists
        api_response = api_instance.get_pick_lists(start_at=start_at, max_results=max_results, include=include)
        pprint(api_response)
    except pyjama.ApiException as e:
        print("Exception when calling PicklistsApi->get_pick_lists: %s\n" % e)

Parameters

Name Type Description Notes
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

PickListDataListWrapper

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]