Skip to content

Latest commit

 

History

History
408 lines (284 loc) · 12.2 KB

File metadata and controls

408 lines (284 loc) · 12.2 KB

ibutsu_client.ProjectApi

All URIs are relative to /api

Method HTTP request Description
add_project POST /project Create a project
get_filter_params GET /project/filter-params/{id} Get a project's filterable parameters
get_project GET /project/{id} Get a single project by ID
get_project_list GET /project Get a list of projects
update_project PUT /project/{id} Update a project

add_project

Project add_project(project=project)

Create a project

Example

  • Bearer (JWT) Authentication (jwt):
import ibutsu_client
from ibutsu_client.models.project import Project
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.ProjectApi(api_client)
    project = ibutsu_client.Project() # Project | A project object (optional)

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

Parameters

Name Type Description Notes
project Project A project object [optional]

Return type

Project

Authorization

jwt

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 A project was created -
400 Bad request, JSON required -

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

get_filter_params

List[str] get_filter_params(id)

Get a project's filterable parameters

Example

  • Bearer (JWT) Authentication (jwt):
import ibutsu_client
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.ProjectApi(api_client)
    id = 'id_example' # str | ID of test project

    try:
        # Get a project's filterable parameters
        api_response = api_instance.get_filter_params(id)
        print("The response of ProjectApi->get_filter_params:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectApi->get_filter_params: %s\n" % e)

Parameters

Name Type Description Notes
id str ID of test project

Return type

List[str]

Authorization

jwt

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 List of filterable parameters from the project's results -
401 Unauthorized - user does not have access to this project -
404 Project not found -

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

get_project

Project get_project(id)

Get a single project by ID

Example

  • Bearer (JWT) Authentication (jwt):
import ibutsu_client
from ibutsu_client.models.project import Project
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.ProjectApi(api_client)
    id = 'id_example' # str | ID of test project

    try:
        # Get a single project by ID
        api_response = api_instance.get_project(id)
        print("The response of ProjectApi->get_project:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectApi->get_project: %s\n" % e)

Parameters

Name Type Description Notes
id str ID of test project

Return type

Project

Authorization

jwt

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Project object -
404 Project not found -

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

get_project_list

ProjectList get_project_list(filter=filter, owner_id=owner_id, group_id=group_id, page=page, page_size=page_size)

Get a list of projects

Example

  • Bearer (JWT) Authentication (jwt):
import ibutsu_client
from ibutsu_client.models.project_list import ProjectList
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.ProjectApi(api_client)
    filter = ['filter_example'] # List[str] | Fields to filter by (optional)
    owner_id = 'owner_id_example' # str | Filter projects by owner ID (optional)
    group_id = 'group_id_example' # str | Filter projects by group ID (optional)
    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 projects
        api_response = api_instance.get_project_list(filter=filter, owner_id=owner_id, group_id=group_id, page=page, page_size=page_size)
        print("The response of ProjectApi->get_project_list:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ProjectApi->get_project_list: %s\n" % e)

Parameters

Name Type Description Notes
filter List[str] Fields to filter by [optional]
owner_id str Filter projects by owner ID [optional]
group_id str Filter projects by group ID [optional]
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

ProjectList

Authorization

jwt

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Array of projects -

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

update_project

Project update_project(id, project=project)

Update a project

Example

  • Bearer (JWT) Authentication (jwt):
import ibutsu_client
from ibutsu_client.models.project import Project
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.ProjectApi(api_client)
    id = 'id_example' # str | ID of test project
    project = ibutsu_client.Project() # Project | A project object (optional)

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

Parameters

Name Type Description Notes
id str ID of test project
project Project A project object [optional]

Return type

Project

Authorization

jwt

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Project object -
400 Bad request, JSON required or not enough parameters -
404 Project not found -

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