Skip to content

Latest commit

 

History

History
441 lines (319 loc) · 13.6 KB

ProjectsApi.md

File metadata and controls

441 lines (319 loc) · 13.6 KB

ProjectsApi

Method HTTP request Description
addProject POST /projects Create a new project
getItemTypesInProject GET /projects/{projectId}/itemtypes Get all item types for the project with the specified ID
getProject GET /projects/{projectId} Get the project with the specified ID
getProjects GET /projects Get all projects
getTagsInProject GET /projects/{projectId}/tags Get all tags for the project with the specified ID
postAttachment POST /projects/{projectId}/attachments Create a new attachment in the project with the specified ID
putProject PUT /projects/{projectId} Update the project with the specified ID

addProject

CreatedResponse addProject(body)

Create a new project

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ProjectsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

ProjectsApi apiInstance = new ProjectsApi();
RequestProject body = new RequestProject(); // RequestProject | 
try {
    CreatedResponse result = apiInstance.addProject(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ProjectsApi#addProject");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body RequestProject

Return type

CreatedResponse

Authorization

basic, oauth2

HTTP request headers

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

getItemTypesInProject

ItemTypeDataListWrapper getItemTypesInProject(projectId, startAt, maxResults, include)

Get all item types for the project with the specified ID

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ProjectsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

ProjectsApi apiInstance = new ProjectsApi();
Integer projectId = 56; // Integer | 
Integer startAt = 56; // Integer | 
Integer maxResults = 56; // Integer | If not set, this defaults to 20. This cannot be larger than 50
List<String> include = Arrays.asList("include_example"); // List<String> | Links to include as full objects in the linked map
try {
    ItemTypeDataListWrapper result = apiInstance.getItemTypesInProject(projectId, startAt, maxResults, include);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ProjectsApi#getItemTypesInProject");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
projectId Integer
startAt Integer [optional]
maxResults Integer If not set, this defaults to 20. This cannot be larger than 50 [optional]
include List<String> Links to include as full objects in the linked map [optional]

Return type

ItemTypeDataListWrapper

Authorization

basic, oauth2

HTTP request headers

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

getProject

ProjectDataWrapper getProject(projectId, include)

Get the project with the specified ID

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ProjectsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

ProjectsApi apiInstance = new ProjectsApi();
Integer projectId = 56; // Integer | 
List<String> include = Arrays.asList("include_example"); // List<String> | Links to include as full objects in the linked map
try {
    ProjectDataWrapper result = apiInstance.getProject(projectId, include);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ProjectsApi#getProject");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
projectId Integer
include List<String> Links to include as full objects in the linked map [optional]

Return type

ProjectDataWrapper

Authorization

basic, oauth2

HTTP request headers

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

getProjects

ProjectDataListWrapper getProjects(startAt, maxResults, include)

Get all projects

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ProjectsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

ProjectsApi apiInstance = new ProjectsApi();
Integer startAt = 56; // Integer | 
Integer maxResults = 56; // Integer | If not set, this defaults to 20. This cannot be larger than 50
List<String> include = Arrays.asList("include_example"); // List<String> | Links to include as full objects in the linked map
try {
    ProjectDataListWrapper result = apiInstance.getProjects(startAt, maxResults, include);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ProjectsApi#getProjects");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
startAt Integer [optional]
maxResults Integer If not set, this defaults to 20. This cannot be larger than 50 [optional]
include List<String> Links to include as full objects in the linked map [optional]

Return type

ProjectDataListWrapper

Authorization

basic, oauth2

HTTP request headers

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

getTagsInProject

TagDataListWrapper getTagsInProject(projectId, startAt, maxResults, include)

Get all tags for the project with the specified ID

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ProjectsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

ProjectsApi apiInstance = new ProjectsApi();
Integer projectId = 56; // Integer | 
Integer startAt = 56; // Integer | 
Integer maxResults = 56; // Integer | If not set, this defaults to 20. This cannot be larger than 50
List<String> include = Arrays.asList("include_example"); // List<String> | Links to include as full objects in the linked map
try {
    TagDataListWrapper result = apiInstance.getTagsInProject(projectId, startAt, maxResults, include);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ProjectsApi#getTagsInProject");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
projectId Integer
startAt Integer [optional]
maxResults Integer If not set, this defaults to 20. This cannot be larger than 50 [optional]
include List<String> Links to include as full objects in the linked map [optional]

Return type

TagDataListWrapper

Authorization

basic, oauth2

HTTP request headers

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

postAttachment

CreatedResponse postAttachment(body, projectId)

Create a new attachment in the project with the specified ID

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ProjectsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

ProjectsApi apiInstance = new ProjectsApi();
RequestAttachment body = new RequestAttachment(); // RequestAttachment | 
Integer projectId = 56; // Integer | 
try {
    CreatedResponse result = apiInstance.postAttachment(body, projectId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ProjectsApi#postAttachment");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body RequestAttachment
projectId Integer

Return type

CreatedResponse

Authorization

basic, oauth2

HTTP request headers

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

putProject

AbstractRestResponse putProject(body, projectId)

Update the project with the specified ID

Example

// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.ProjectsApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

// Configure OAuth2 access token for authorization: oauth2
OAuth oauth2 = (OAuth) defaultClient.getAuthentication("oauth2");
oauth2.setAccessToken("YOUR ACCESS TOKEN");

ProjectsApi apiInstance = new ProjectsApi();
RequestProject body = new RequestProject(); // RequestProject | 
Integer projectId = 56; // Integer | 
try {
    AbstractRestResponse result = apiInstance.putProject(body, projectId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ProjectsApi#putProject");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body RequestProject
projectId Integer

Return type

AbstractRestResponse

Authorization

basic, oauth2

HTTP request headers

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