Skip to content

Latest commit

 

History

History
249 lines (186 loc) · 10.7 KB

ProjectPropertiesApi.md

File metadata and controls

249 lines (186 loc) · 10.7 KB

ProjectPropertiesApi

All URIs are relative to https://your-domain.atlassian.com

Method HTTP request Description
deleteProjectProperty DELETE /rest/api/3/project/{projectIdOrKey}/properties/{propertyKey} Delete project property
getProjectProperty GET /rest/api/3/project/{projectIdOrKey}/properties/{propertyKey} Get project property
getProjectPropertyKeys GET /rest/api/3/project/{projectIdOrKey}/properties Get project property keys
setProjectProperty PUT /rest/api/3/project/{projectIdOrKey}/properties/{propertyKey} Set project property

deleteProjectProperty

deleteProjectProperty(projectIdOrKey, propertyKey)

Delete project property

Deletes the property from a project. This operation can be accessed anonymously. Permissions required: Administer Jira global permission or Administer Projects project permission for the project containing the property.

Example

// Import classes:
//import com.xminds.jira.rest.client.ApiClient;
//import com.xminds.jira.rest.client.ApiException;
//import com.xminds.jira.rest.client.Configuration;
//import com.xminds.jira.rest.client.auth.*;
//import com.xminds.jira.rest.client.api.ProjectPropertiesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

ProjectPropertiesApi apiInstance = new ProjectPropertiesApi();
String projectIdOrKey = "projectIdOrKey_example"; // String | The project ID or project key (case sensitive).
String propertyKey = "propertyKey_example"; // String | The project property key. Use [Get project property keys](#api-rest-api-3-project-projectIdOrKey-properties-get) to get a list of all project property keys.
try {
    apiInstance.deleteProjectProperty(projectIdOrKey, propertyKey);
} catch (ApiException e) {
    System.err.println("Exception when calling ProjectPropertiesApi#deleteProjectProperty");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
projectIdOrKey String The project ID or project key (case sensitive).
propertyKey String The project property key. Use Get project property keys to get a list of all project property keys.

Return type

null (empty response body)

Authorization

OAuth2basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

getProjectProperty

EntityProperty getProjectProperty(projectIdOrKey, propertyKey)

Get project property

Returns the value of a project property. This operation can be accessed anonymously. Permissions required: Browse Projects project permission for the project containing the property.

Example

// Import classes:
//import com.xminds.jira.rest.client.ApiClient;
//import com.xminds.jira.rest.client.ApiException;
//import com.xminds.jira.rest.client.Configuration;
//import com.xminds.jira.rest.client.auth.*;
//import com.xminds.jira.rest.client.api.ProjectPropertiesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

ProjectPropertiesApi apiInstance = new ProjectPropertiesApi();
String projectIdOrKey = "projectIdOrKey_example"; // String | The project ID or project key (case sensitive).
String propertyKey = "propertyKey_example"; // String | The project property key. Use [Get project property keys](#api-rest-api-3-project-projectIdOrKey-properties-get) to get a list of all project property keys.
try {
    EntityProperty result = apiInstance.getProjectProperty(projectIdOrKey, propertyKey);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ProjectPropertiesApi#getProjectProperty");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
projectIdOrKey String The project ID or project key (case sensitive).
propertyKey String The project property key. Use Get project property keys to get a list of all project property keys.

Return type

EntityProperty

Authorization

OAuth2basicAuth

HTTP request headers

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

getProjectPropertyKeys

PropertyKeys getProjectPropertyKeys(projectIdOrKey)

Get project property keys

Returns all project property keys for the project. This operation can be accessed anonymously. Permissions required: Browse Projects project permission for the project.

Example

// Import classes:
//import com.xminds.jira.rest.client.ApiClient;
//import com.xminds.jira.rest.client.ApiException;
//import com.xminds.jira.rest.client.Configuration;
//import com.xminds.jira.rest.client.auth.*;
//import com.xminds.jira.rest.client.api.ProjectPropertiesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

ProjectPropertiesApi apiInstance = new ProjectPropertiesApi();
String projectIdOrKey = "projectIdOrKey_example"; // String | The project ID or project key (case sensitive).
try {
    PropertyKeys result = apiInstance.getProjectPropertyKeys(projectIdOrKey);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ProjectPropertiesApi#getProjectPropertyKeys");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
projectIdOrKey String The project ID or project key (case sensitive).

Return type

PropertyKeys

Authorization

OAuth2basicAuth

HTTP request headers

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

setProjectProperty

Object setProjectProperty(body, projectIdOrKey, propertyKey)

Set project property

Sets the value of the project property. You can use project properties to store custom data against the project. The value of the request body must be a valid, non-empty JSON blob. The maximum length is 32768 characters. This operation can be accessed anonymously. Permissions required: Administer Jira global permission or Administer Projects project permission for the project in which the property is created.

Example

// Import classes:
//import com.xminds.jira.rest.client.ApiClient;
//import com.xminds.jira.rest.client.ApiException;
//import com.xminds.jira.rest.client.Configuration;
//import com.xminds.jira.rest.client.auth.*;
//import com.xminds.jira.rest.client.api.ProjectPropertiesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: OAuth2
OAuth OAuth2 = (OAuth) defaultClient.getAuthentication("OAuth2");
OAuth2.setAccessToken("YOUR ACCESS TOKEN");
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");

ProjectPropertiesApi apiInstance = new ProjectPropertiesApi();
Object body = {
  "number" : 5,
  "string" : "string-value"
}; // Object | 
String projectIdOrKey = "projectIdOrKey_example"; // String | The project ID or project key (case sensitive).
String propertyKey = "propertyKey_example"; // String | The key of the project property. The maximum length is 255 characters.
try {
    Object result = apiInstance.setProjectProperty(body, projectIdOrKey, propertyKey);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling ProjectPropertiesApi#setProjectProperty");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body Object
projectIdOrKey String The project ID or project key (case sensitive).
propertyKey String The key of the project property. The maximum length is 255 characters.

Return type

Object

Authorization

OAuth2basicAuth

HTTP request headers

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