Skip to content

Latest commit

 

History

History
192 lines (120 loc) · 4.06 KB

ProjectApi.md

File metadata and controls

192 lines (120 loc) · 4.06 KB

ibutsu.ProjectApi

All URIs are relative to http://localhost/api

Method HTTP request Description
addProject POST /project Create a project
getProject GET /project/{id} Get a single project by ID
getProjectList GET /project Get a list of projects
updateProject PUT /project/{id} Update a project

addProject

Project addProject(project)

Create a project

Example

import ibutsu from '@ibutsu/client';

let apiInstance = new ibutsu.ProjectApi();
let project = new ibutsu.Project(); // Project | Project
apiInstance.addProject(project).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
project Project Project

Return type

Project

Authorization

No authorization required

HTTP request headers

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

getProject

Project getProject(id)

Get a single project by ID

Example

import ibutsu from '@ibutsu/client';

let apiInstance = new ibutsu.ProjectApi();
let id = "id_example"; // String | ID of test project
apiInstance.getProject(id).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
id String ID of test project

Return type

Project

Authorization

No authorization required

HTTP request headers

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

getProjectList

ProjectList getProjectList(opts)

Get a list of projects

Example

import ibutsu from '@ibutsu/client';

let apiInstance = new ibutsu.ProjectApi();
let opts = {
  'ownerId': "ownerId_example", // String | Filter projects by owner ID
  'groupId': "groupId_example", // String | Filter projects by group ID
  'page': 56, // Number | Set the page of items to return, defaults to 1
  'pageSize': 56 // Number | Set the number of items per page, defaults to 25
};
apiInstance.getProjectList(opts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
ownerId String Filter projects by owner ID [optional]
groupId String Filter projects by group ID [optional]
page Number Set the page of items to return, defaults to 1 [optional]
pageSize Number Set the number of items per page, defaults to 25 [optional]

Return type

ProjectList

Authorization

No authorization required

HTTP request headers

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

updateProject

Project updateProject(id, opts)

Update a project

Example

import ibutsu from '@ibutsu/client';

let apiInstance = new ibutsu.ProjectApi();
let id = "id_example"; // String | ID of test project
let opts = {
  'project': new ibutsu.Project() // Project | Project
};
apiInstance.updateProject(id, opts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
id String ID of test project
project Project Project [optional]

Return type

Project

Authorization

No authorization required

HTTP request headers

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