Skip to content

Latest commit

 

History

History
324 lines (224 loc) · 9.16 KB

File metadata and controls

324 lines (224 loc) · 9.16 KB

ibutsu_client.GroupApi

All URIs are relative to /api

Method HTTP request Description
add_group POST /group Create a new group
get_group GET /group/{id} Get a group
get_group_list GET /group Get a list of groups
update_group PUT /group/{id} Update a group

add_group

Group add_group(group=group)

Create a new group

Example

  • Bearer (JWT) Authentication (jwt):
import ibutsu_client
from ibutsu_client.models.group import Group
from ibutsu_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api
# See configuration.py for a list of all supported configuration parameters.
configuration = ibutsu_client.Configuration(
    host = "/api"
)

# 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 Bearer authorization (JWT): jwt
configuration = ibutsu_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with ibutsu_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ibutsu_client.GroupApi(api_client)
    group = ibutsu_client.Group() # Group | A group object (optional)

    try:
        # Create a new group
        api_response = api_instance.add_group(group=group)
        print("The response of GroupApi->add_group:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling GroupApi->add_group: %s\n" % e)

Parameters

Name Type Description Notes
group Group A group object [optional]

Return type

Group

Authorization

jwt

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 Group created -
400 Bad request, probably not enough parameters -

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

get_group

Group get_group(id)

Get a group

Example

  • Bearer (JWT) Authentication (jwt):
import ibutsu_client
from ibutsu_client.models.group import Group
from ibutsu_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api
# See configuration.py for a list of all supported configuration parameters.
configuration = ibutsu_client.Configuration(
    host = "/api"
)

# 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 Bearer authorization (JWT): jwt
configuration = ibutsu_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with ibutsu_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ibutsu_client.GroupApi(api_client)
    id = 'id_example' # str | The ID of the group

    try:
        # Get a group
        api_response = api_instance.get_group(id)
        print("The response of GroupApi->get_group:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling GroupApi->get_group: %s\n" % e)

Parameters

Name Type Description Notes
id str The ID of the group

Return type

Group

Authorization

jwt

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Group item -
404 Group not found -

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

get_group_list

GroupList get_group_list(page=page, page_size=page_size)

Get a list of groups

Example

  • Bearer (JWT) Authentication (jwt):
import ibutsu_client
from ibutsu_client.models.group_list import GroupList
from ibutsu_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api
# See configuration.py for a list of all supported configuration parameters.
configuration = ibutsu_client.Configuration(
    host = "/api"
)

# 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 Bearer authorization (JWT): jwt
configuration = ibutsu_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with ibutsu_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ibutsu_client.GroupApi(api_client)
    page = 56 # int | Set the page of items to return, defaults to 1 (optional)
    page_size = 56 # int | Set the number of items per page, defaults to 25 (optional)

    try:
        # Get a list of groups
        api_response = api_instance.get_group_list(page=page, page_size=page_size)
        print("The response of GroupApi->get_group_list:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling GroupApi->get_group_list: %s\n" % e)

Parameters

Name Type Description Notes
page int Set the page of items to return, defaults to 1 [optional]
page_size int Set the number of items per page, defaults to 25 [optional]

Return type

GroupList

Authorization

jwt

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 A list of groups -

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

update_group

Group update_group(id, group=group)

Update a group

Example

  • Bearer (JWT) Authentication (jwt):
import ibutsu_client
from ibutsu_client.models.group import Group
from ibutsu_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api
# See configuration.py for a list of all supported configuration parameters.
configuration = ibutsu_client.Configuration(
    host = "/api"
)

# 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 Bearer authorization (JWT): jwt
configuration = ibutsu_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with ibutsu_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ibutsu_client.GroupApi(api_client)
    id = 'id_example' # str | The ID of the group
    group = ibutsu_client.Group() # Group | A group object (optional)

    try:
        # Update a group
        api_response = api_instance.update_group(id, group=group)
        print("The response of GroupApi->update_group:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling GroupApi->update_group: %s\n" % e)

Parameters

Name Type Description Notes
id str The ID of the group
group Group A group object [optional]

Return type

Group

Authorization

jwt

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Group item -
400 Bad request, probably not enough parameters -
404 Group not found -

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