Skip to content

Latest commit

 

History

History
254 lines (191 loc) · 11.1 KB

IssueWorklogPropertiesApi.md

File metadata and controls

254 lines (191 loc) · 11.1 KB

IssueWorklogPropertiesApi

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

Method HTTP request Description
deleteWorklogProperty DELETE /rest/api/3/issue/{issueIdOrKey}/worklog/{worklogId}/properties/{propertyKey} Delete worklog property
getWorklogProperty GET /rest/api/3/issue/{issueIdOrKey}/worklog/{worklogId}/properties/{propertyKey} Get worklog property
getWorklogPropertyKeys GET /rest/api/3/issue/{issueIdOrKey}/worklog/{worklogId}/properties Get worklog property keys
setWorklogProperty PUT /rest/api/3/issue/{issueIdOrKey}/worklog/{worklogId}/properties/{propertyKey} Set worklog property

deleteWorklogProperty

deleteWorklogProperty(issueIdOrKey, worklogId, propertyKey)

Delete worklog property

Deletes a worklog property. This operation can be accessed anonymously. Permissions required: * Browse projects project permission for the project that the issue is in. * If issue-level security is configured, issue-level security permission to view the issue. * If the worklog has visibility restrictions, belongs to the group or has the role visibility is restricted to.

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.IssueWorklogPropertiesApi;

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");

IssueWorklogPropertiesApi apiInstance = new IssueWorklogPropertiesApi();
String issueIdOrKey = "issueIdOrKey_example"; // String | The ID or key of the issue.
String worklogId = "worklogId_example"; // String | The ID of the worklog.
String propertyKey = "propertyKey_example"; // String | The key of the property.
try {
    apiInstance.deleteWorklogProperty(issueIdOrKey, worklogId, propertyKey);
} catch (ApiException e) {
    System.err.println("Exception when calling IssueWorklogPropertiesApi#deleteWorklogProperty");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
issueIdOrKey String The ID or key of the issue.
worklogId String The ID of the worklog.
propertyKey String The key of the property.

Return type

null (empty response body)

Authorization

OAuth2basicAuth

HTTP request headers

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

getWorklogProperty

EntityProperty getWorklogProperty(issueIdOrKey, worklogId, propertyKey)

Get worklog property

Returns the value of a worklog property. This operation can be accessed anonymously. Permissions required: * Browse projects project permission for the project that the issue is in. * If issue-level security is configured, issue-level security permission to view the issue. * If the worklog has visibility restrictions, belongs to the group or has the role visibility is restricted to.

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.IssueWorklogPropertiesApi;

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");

IssueWorklogPropertiesApi apiInstance = new IssueWorklogPropertiesApi();
String issueIdOrKey = "issueIdOrKey_example"; // String | The ID or key of the issue.
String worklogId = "worklogId_example"; // String | The ID of the worklog.
String propertyKey = "propertyKey_example"; // String | The key of the property.
try {
    EntityProperty result = apiInstance.getWorklogProperty(issueIdOrKey, worklogId, propertyKey);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling IssueWorklogPropertiesApi#getWorklogProperty");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
issueIdOrKey String The ID or key of the issue.
worklogId String The ID of the worklog.
propertyKey String The key of the property.

Return type

EntityProperty

Authorization

OAuth2basicAuth

HTTP request headers

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

getWorklogPropertyKeys

PropertyKeys getWorklogPropertyKeys(issueIdOrKey, worklogId)

Get worklog property keys

Returns the keys of all properties for a worklog. This operation can be accessed anonymously. Permissions required: * Browse projects project permission for the project that the issue is in. * If issue-level security is configured, issue-level security permission to view the issue. * If the worklog has visibility restrictions, belongs to the group or has the role visibility is restricted to.

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.IssueWorklogPropertiesApi;

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");

IssueWorklogPropertiesApi apiInstance = new IssueWorklogPropertiesApi();
String issueIdOrKey = "issueIdOrKey_example"; // String | The ID or key of the issue.
String worklogId = "worklogId_example"; // String | The ID of the worklog.
try {
    PropertyKeys result = apiInstance.getWorklogPropertyKeys(issueIdOrKey, worklogId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling IssueWorklogPropertiesApi#getWorklogPropertyKeys");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
issueIdOrKey String The ID or key of the issue.
worklogId String The ID of the worklog.

Return type

PropertyKeys

Authorization

OAuth2basicAuth

HTTP request headers

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

setWorklogProperty

Object setWorklogProperty(body, issueIdOrKey, worklogId, propertyKey)

Set worklog property

Sets the value of a worklog property. Use this operation to store custom data against the worklog. 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: * Browse projects project permission for the project that the issue is in. * If issue-level security is configured, issue-level security permission to view the issue. * Edit all worklogs project permission to update any worklog or Edit own worklogs to update worklogs created by the user. * If the worklog has visibility restrictions, belongs to the group or has the role visibility is restricted to.

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.IssueWorklogPropertiesApi;

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");

IssueWorklogPropertiesApi apiInstance = new IssueWorklogPropertiesApi();
Object body = null; // Object | 
String issueIdOrKey = "issueIdOrKey_example"; // String | The ID or key of the issue.
String worklogId = "worklogId_example"; // String | The ID of the worklog.
String propertyKey = "propertyKey_example"; // String | The key of the issue property. The maximum length is 255 characters.
try {
    Object result = apiInstance.setWorklogProperty(body, issueIdOrKey, worklogId, propertyKey);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling IssueWorklogPropertiesApi#setWorklogProperty");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body Object
issueIdOrKey String The ID or key of the issue.
worklogId String The ID of the worklog.
propertyKey String The key of the issue property. The maximum length is 255 characters.

Return type

Object

Authorization

OAuth2basicAuth

HTTP request headers

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