All URIs are relative to /api
Method | HTTP request | Description |
---|---|---|
add_project | POST /project | Create a project |
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 |
Project add_project(project)
Create a project
- Bearer (JWT) Authentication (jwt):
import time
import ibutsu_client
from ibutsu_client.api import project_api
from ibutsu_client.model.project import Project
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 = 'YOUR_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 = project_api.ProjectApi(api_client)
project = Project(
id="44941c55-9736-42f6-acce-ca3c4739d0f3",
name="my-project",
title="My project",
owner_id="6b8b01ad-a17e-4ca1-8df5-fadb41439567",
group_id="a16ad60e-bf23-4195-99dc-594858ad3e5e",
) # Project | Project
# example passing only required values which don't have defaults set
try:
# Create a project
api_response = api_instance.add_project(project)
pprint(api_response)
except ibutsu_client.ApiException as e:
print("Exception when calling ProjectApi->add_project: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
project | Project | Project |
- Content-Type: application/json
- Accept: application/json
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]
Project get_project(id)
Get a single project by ID
- Bearer (JWT) Authentication (jwt):
import time
import ibutsu_client
from ibutsu_client.api import project_api
from ibutsu_client.model.project import Project
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 = 'YOUR_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 = project_api.ProjectApi(api_client)
id = "id_example" # str | ID of test project
# example passing only required values which don't have defaults set
try:
# Get a single project by ID
api_response = api_instance.get_project(id)
pprint(api_response)
except ibutsu_client.ApiException as e:
print("Exception when calling ProjectApi->get_project: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | ID of test project |
- Content-Type: Not defined
- Accept: application/json
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]
ProjectList get_project_list()
Get a list of projects
- Bearer (JWT) Authentication (jwt):
import time
import ibutsu_client
from ibutsu_client.api import project_api
from ibutsu_client.model.project_list import ProjectList
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 = 'YOUR_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 = project_api.ProjectApi(api_client)
filter = [
"filter_example",
] # [str] | Fields to filter by (optional)
owner_id = "ownerId_example" # str | Filter projects by owner ID (optional)
group_id = "groupId_example" # str | Filter projects by group ID (optional)
page = 1 # int | Set the page of items to return, defaults to 1 (optional)
page_size = 1 # int | Set the number of items per page, defaults to 25 (optional)
# example passing only required values which don't have defaults set
# and optional values
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)
pprint(api_response)
except ibutsu_client.ApiException as e:
print("Exception when calling ProjectApi->get_project_list: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
filter | [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] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Array of projects | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Project update_project(id)
Update a project
- Bearer (JWT) Authentication (jwt):
import time
import ibutsu_client
from ibutsu_client.api import project_api
from ibutsu_client.model.project import Project
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 = 'YOUR_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 = project_api.ProjectApi(api_client)
id = "id_example" # str | ID of test project
project = Project(
id="44941c55-9736-42f6-acce-ca3c4739d0f3",
name="my-project",
title="My project",
owner_id="6b8b01ad-a17e-4ca1-8df5-fadb41439567",
group_id="a16ad60e-bf23-4195-99dc-594858ad3e5e",
) # Project | Project (optional)
# example passing only required values which don't have defaults set
try:
# Update a project
api_response = api_instance.update_project(id)
pprint(api_response)
except ibutsu_client.ApiException as e:
print("Exception when calling ProjectApi->update_project: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Update a project
api_response = api_instance.update_project(id, project=project)
pprint(api_response)
except ibutsu_client.ApiException as e:
print("Exception when calling ProjectApi->update_project: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | ID of test project | |
project | Project | Project | [optional] |
- Content-Type: application/json
- Accept: application/json
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]