All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.tnb.jira.validation.generated.api.DashboardsApi Maven / Gradle / Ivy

The newest version!
/*
 * The Jira Cloud platform REST API
 * Jira Cloud platform REST API documentation
 *
 * The version of the OpenAPI document: 1001.0.0-SNAPSHOT
 * Contact: [email protected]
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package software.tnb.jira.validation.generated.api;

import software.tnb.jira.validation.generated.ApiCallback;
import software.tnb.jira.validation.generated.ApiClient;
import software.tnb.jira.validation.generated.ApiException;
import software.tnb.jira.validation.generated.ApiResponse;
import software.tnb.jira.validation.generated.Configuration;
import software.tnb.jira.validation.generated.Pair;
import software.tnb.jira.validation.generated.ProgressRequestBody;
import software.tnb.jira.validation.generated.ProgressResponseBody;

import com.google.gson.reflect.TypeToken;

import java.io.IOException;


import software.tnb.jira.validation.generated.model.AvailableDashboardGadgetsResponse;
import software.tnb.jira.validation.generated.model.Dashboard;
import software.tnb.jira.validation.generated.model.DashboardDetails;
import software.tnb.jira.validation.generated.model.DashboardGadget;
import software.tnb.jira.validation.generated.model.DashboardGadgetResponse;
import software.tnb.jira.validation.generated.model.DashboardGadgetSettings;
import software.tnb.jira.validation.generated.model.DashboardGadgetUpdateRequest;
import software.tnb.jira.validation.generated.model.EntityProperty;
import software.tnb.jira.validation.generated.model.ErrorCollection;
import software.tnb.jira.validation.generated.model.PageBeanDashboard;
import software.tnb.jira.validation.generated.model.PageOfDashboards;
import software.tnb.jira.validation.generated.model.PropertyKeys;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class DashboardsApi {
    private ApiClient localVarApiClient;
    private int localHostIndex;
    private String localCustomBaseUrl;

    public DashboardsApi() {
        this(Configuration.getDefaultApiClient());
    }

    public DashboardsApi(ApiClient apiClient) {
        this.localVarApiClient = apiClient;
    }

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

    public void setApiClient(ApiClient apiClient) {
        this.localVarApiClient = apiClient;
    }

    public int getHostIndex() {
        return localHostIndex;
    }

    public void setHostIndex(int hostIndex) {
        this.localHostIndex = hostIndex;
    }

    public String getCustomBaseUrl() {
        return localCustomBaseUrl;
    }

    public void setCustomBaseUrl(String customBaseUrl) {
        this.localCustomBaseUrl = customBaseUrl;
    }

    /**
     * Build call for addGadget
     * @param dashboardId The ID of the dashboard. (required)
     * @param dashboardGadgetSettings  (required)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     
Status Code Description Response Headers
200 Returned if the request is successful. -
400 Returned if the request is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the dashboard is not found. -
*/ public okhttp3.Call addGadgetCall(Long dashboardId, DashboardGadgetSettings dashboardGadgetSettings, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = dashboardGadgetSettings; // create path and map variables String localVarPath = "/rest/api/3/dashboard/{dashboardId}/gadget" .replace("{" + "dashboardId" + "}", localVarApiClient.escapeString(dashboardId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "OAuth2", "basicAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call addGadgetValidateBeforeCall(Long dashboardId, DashboardGadgetSettings dashboardGadgetSettings, final ApiCallback _callback) throws ApiException { // verify the required parameter 'dashboardId' is set if (dashboardId == null) { throw new ApiException("Missing the required parameter 'dashboardId' when calling addGadget(Async)"); } // verify the required parameter 'dashboardGadgetSettings' is set if (dashboardGadgetSettings == null) { throw new ApiException("Missing the required parameter 'dashboardGadgetSettings' when calling addGadget(Async)"); } return addGadgetCall(dashboardId, dashboardGadgetSettings, _callback); } /** * Add gadget to dashboard * Adds a gadget to a dashboard. **[Permissions](#permissions) required:** None. * @param dashboardId The ID of the dashboard. (required) * @param dashboardGadgetSettings (required) * @return DashboardGadget * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 Returned if the request is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the dashboard is not found. -
*/ public DashboardGadget addGadget(Long dashboardId, DashboardGadgetSettings dashboardGadgetSettings) throws ApiException { ApiResponse localVarResp = addGadgetWithHttpInfo(dashboardId, dashboardGadgetSettings); return localVarResp.getData(); } /** * Add gadget to dashboard * Adds a gadget to a dashboard. **[Permissions](#permissions) required:** None. * @param dashboardId The ID of the dashboard. (required) * @param dashboardGadgetSettings (required) * @return ApiResponse<DashboardGadget> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 Returned if the request is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the dashboard is not found. -
*/ public ApiResponse addGadgetWithHttpInfo(Long dashboardId, DashboardGadgetSettings dashboardGadgetSettings) throws ApiException { okhttp3.Call localVarCall = addGadgetValidateBeforeCall(dashboardId, dashboardGadgetSettings, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Add gadget to dashboard (asynchronously) * Adds a gadget to a dashboard. **[Permissions](#permissions) required:** None. * @param dashboardId The ID of the dashboard. (required) * @param dashboardGadgetSettings (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 Returned if the request is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the dashboard is not found. -
*/ public okhttp3.Call addGadgetAsync(Long dashboardId, DashboardGadgetSettings dashboardGadgetSettings, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = addGadgetValidateBeforeCall(dashboardId, dashboardGadgetSettings, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for copyDashboard * @param id (required) * @param dashboardDetails Dashboard details. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the dashboard is not found or the dashboard is not owned by or shared with the user. -
*/ public okhttp3.Call copyDashboardCall(String id, DashboardDetails dashboardDetails, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = dashboardDetails; // create path and map variables String localVarPath = "/rest/api/3/dashboard/{id}/copy" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "OAuth2", "basicAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call copyDashboardValidateBeforeCall(String id, DashboardDetails dashboardDetails, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling copyDashboard(Async)"); } // verify the required parameter 'dashboardDetails' is set if (dashboardDetails == null) { throw new ApiException("Missing the required parameter 'dashboardDetails' when calling copyDashboard(Async)"); } return copyDashboardCall(id, dashboardDetails, _callback); } /** * Copy dashboard * Copies a dashboard. Any values provided in the `dashboard` parameter replace those in the copied dashboard. **[Permissions](#permissions) required:** None The dashboard to be copied must be owned by or shared with the user. * @param id (required) * @param dashboardDetails Dashboard details. (required) * @return Dashboard * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the dashboard is not found or the dashboard is not owned by or shared with the user. -
*/ public Dashboard copyDashboard(String id, DashboardDetails dashboardDetails) throws ApiException { ApiResponse localVarResp = copyDashboardWithHttpInfo(id, dashboardDetails); return localVarResp.getData(); } /** * Copy dashboard * Copies a dashboard. Any values provided in the `dashboard` parameter replace those in the copied dashboard. **[Permissions](#permissions) required:** None The dashboard to be copied must be owned by or shared with the user. * @param id (required) * @param dashboardDetails Dashboard details. (required) * @return ApiResponse<Dashboard> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the dashboard is not found or the dashboard is not owned by or shared with the user. -
*/ public ApiResponse copyDashboardWithHttpInfo(String id, DashboardDetails dashboardDetails) throws ApiException { okhttp3.Call localVarCall = copyDashboardValidateBeforeCall(id, dashboardDetails, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Copy dashboard (asynchronously) * Copies a dashboard. Any values provided in the `dashboard` parameter replace those in the copied dashboard. **[Permissions](#permissions) required:** None The dashboard to be copied must be owned by or shared with the user. * @param id (required) * @param dashboardDetails Dashboard details. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the dashboard is not found or the dashboard is not owned by or shared with the user. -
*/ public okhttp3.Call copyDashboardAsync(String id, DashboardDetails dashboardDetails, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = copyDashboardValidateBeforeCall(id, dashboardDetails, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createDashboard * @param dashboardDetails Dashboard details. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public okhttp3.Call createDashboardCall(DashboardDetails dashboardDetails, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = dashboardDetails; // create path and map variables String localVarPath = "/rest/api/3/dashboard"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "OAuth2", "basicAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createDashboardValidateBeforeCall(DashboardDetails dashboardDetails, final ApiCallback _callback) throws ApiException { // verify the required parameter 'dashboardDetails' is set if (dashboardDetails == null) { throw new ApiException("Missing the required parameter 'dashboardDetails' when calling createDashboard(Async)"); } return createDashboardCall(dashboardDetails, _callback); } /** * Create dashboard * Creates a dashboard. **[Permissions](#permissions) required:** None. * @param dashboardDetails Dashboard details. (required) * @return Dashboard * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public Dashboard createDashboard(DashboardDetails dashboardDetails) throws ApiException { ApiResponse localVarResp = createDashboardWithHttpInfo(dashboardDetails); return localVarResp.getData(); } /** * Create dashboard * Creates a dashboard. **[Permissions](#permissions) required:** None. * @param dashboardDetails Dashboard details. (required) * @return ApiResponse<Dashboard> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public ApiResponse createDashboardWithHttpInfo(DashboardDetails dashboardDetails) throws ApiException { okhttp3.Call localVarCall = createDashboardValidateBeforeCall(dashboardDetails, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Create dashboard (asynchronously) * Creates a dashboard. **[Permissions](#permissions) required:** None. * @param dashboardDetails Dashboard details. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public okhttp3.Call createDashboardAsync(DashboardDetails dashboardDetails, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createDashboardValidateBeforeCall(dashboardDetails, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteDashboard * @param id The ID of the dashboard. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
204 Returned if the dashboard is deleted. -
400 400 response -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public okhttp3.Call deleteDashboardCall(String id, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/rest/api/3/dashboard/{id}" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "OAuth2", "basicAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteDashboardValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling deleteDashboard(Async)"); } return deleteDashboardCall(id, _callback); } /** * Delete dashboard * Deletes a dashboard. **[Permissions](#permissions) required:** None The dashboard to be deleted must be owned by the user. * @param id The ID of the dashboard. (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
204 Returned if the dashboard is deleted. -
400 400 response -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public void deleteDashboard(String id) throws ApiException { deleteDashboardWithHttpInfo(id); } /** * Delete dashboard * Deletes a dashboard. **[Permissions](#permissions) required:** None The dashboard to be deleted must be owned by the user. * @param id The ID of the dashboard. (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
204 Returned if the dashboard is deleted. -
400 400 response -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public ApiResponse deleteDashboardWithHttpInfo(String id) throws ApiException { okhttp3.Call localVarCall = deleteDashboardValidateBeforeCall(id, null); return localVarApiClient.execute(localVarCall); } /** * Delete dashboard (asynchronously) * Deletes a dashboard. **[Permissions](#permissions) required:** None The dashboard to be deleted must be owned by the user. * @param id The ID of the dashboard. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
204 Returned if the dashboard is deleted. -
400 400 response -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public okhttp3.Call deleteDashboardAsync(String id, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteDashboardValidateBeforeCall(id, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for deleteDashboardItemProperty * @param dashboardId The ID of the dashboard. (required) * @param itemId The ID of the dashboard item. (required) * @param propertyKey The key of the dashboard item property. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
204 Returned if the dashboard item property is deleted. -
400 Returned if the dashboard or dashboard item ID is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user is not the owner of the dashboard. -
404 Returned if the dashboard item is not found or the dashboard is not shared with the user. -
*/ public okhttp3.Call deleteDashboardItemPropertyCall(String dashboardId, String itemId, String propertyKey, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/rest/api/3/dashboard/{dashboardId}/items/{itemId}/properties/{propertyKey}" .replace("{" + "dashboardId" + "}", localVarApiClient.escapeString(dashboardId.toString())) .replace("{" + "itemId" + "}", localVarApiClient.escapeString(itemId.toString())) .replace("{" + "propertyKey" + "}", localVarApiClient.escapeString(propertyKey.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "OAuth2", "basicAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteDashboardItemPropertyValidateBeforeCall(String dashboardId, String itemId, String propertyKey, final ApiCallback _callback) throws ApiException { // verify the required parameter 'dashboardId' is set if (dashboardId == null) { throw new ApiException("Missing the required parameter 'dashboardId' when calling deleteDashboardItemProperty(Async)"); } // verify the required parameter 'itemId' is set if (itemId == null) { throw new ApiException("Missing the required parameter 'itemId' when calling deleteDashboardItemProperty(Async)"); } // verify the required parameter 'propertyKey' is set if (propertyKey == null) { throw new ApiException("Missing the required parameter 'propertyKey' when calling deleteDashboardItemProperty(Async)"); } return deleteDashboardItemPropertyCall(dashboardId, itemId, propertyKey, _callback); } /** * Delete dashboard item property * Deletes a dashboard item property. This operation can be accessed anonymously. **[Permissions](#permissions) required:** The user must be the owner of the dashboard. Note, users with the *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) are considered owners of the System dashboard. * @param dashboardId The ID of the dashboard. (required) * @param itemId The ID of the dashboard item. (required) * @param propertyKey The key of the dashboard item property. (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
204 Returned if the dashboard item property is deleted. -
400 Returned if the dashboard or dashboard item ID is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user is not the owner of the dashboard. -
404 Returned if the dashboard item is not found or the dashboard is not shared with the user. -
*/ public void deleteDashboardItemProperty(String dashboardId, String itemId, String propertyKey) throws ApiException { deleteDashboardItemPropertyWithHttpInfo(dashboardId, itemId, propertyKey); } /** * Delete dashboard item property * Deletes a dashboard item property. This operation can be accessed anonymously. **[Permissions](#permissions) required:** The user must be the owner of the dashboard. Note, users with the *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) are considered owners of the System dashboard. * @param dashboardId The ID of the dashboard. (required) * @param itemId The ID of the dashboard item. (required) * @param propertyKey The key of the dashboard item property. (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
204 Returned if the dashboard item property is deleted. -
400 Returned if the dashboard or dashboard item ID is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user is not the owner of the dashboard. -
404 Returned if the dashboard item is not found or the dashboard is not shared with the user. -
*/ public ApiResponse deleteDashboardItemPropertyWithHttpInfo(String dashboardId, String itemId, String propertyKey) throws ApiException { okhttp3.Call localVarCall = deleteDashboardItemPropertyValidateBeforeCall(dashboardId, itemId, propertyKey, null); return localVarApiClient.execute(localVarCall); } /** * Delete dashboard item property (asynchronously) * Deletes a dashboard item property. This operation can be accessed anonymously. **[Permissions](#permissions) required:** The user must be the owner of the dashboard. Note, users with the *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) are considered owners of the System dashboard. * @param dashboardId The ID of the dashboard. (required) * @param itemId The ID of the dashboard item. (required) * @param propertyKey The key of the dashboard item property. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
204 Returned if the dashboard item property is deleted. -
400 Returned if the dashboard or dashboard item ID is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user is not the owner of the dashboard. -
404 Returned if the dashboard item is not found or the dashboard is not shared with the user. -
*/ public okhttp3.Call deleteDashboardItemPropertyAsync(String dashboardId, String itemId, String propertyKey, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteDashboardItemPropertyValidateBeforeCall(dashboardId, itemId, propertyKey, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for getAllAvailableDashboardGadgets * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 400 response -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public okhttp3.Call getAllAvailableDashboardGadgetsCall(final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/rest/api/3/dashboard/gadgets"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "OAuth2", "basicAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getAllAvailableDashboardGadgetsValidateBeforeCall(final ApiCallback _callback) throws ApiException { return getAllAvailableDashboardGadgetsCall(_callback); } /** * Get available gadgets * Gets a list of all available gadgets that can be added to all dashboards. **[Permissions](#permissions) required:** None. * @return AvailableDashboardGadgetsResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 400 response -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public AvailableDashboardGadgetsResponse getAllAvailableDashboardGadgets() throws ApiException { ApiResponse localVarResp = getAllAvailableDashboardGadgetsWithHttpInfo(); return localVarResp.getData(); } /** * Get available gadgets * Gets a list of all available gadgets that can be added to all dashboards. **[Permissions](#permissions) required:** None. * @return ApiResponse<AvailableDashboardGadgetsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 400 response -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public ApiResponse getAllAvailableDashboardGadgetsWithHttpInfo() throws ApiException { okhttp3.Call localVarCall = getAllAvailableDashboardGadgetsValidateBeforeCall(null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get available gadgets (asynchronously) * Gets a list of all available gadgets that can be added to all dashboards. **[Permissions](#permissions) required:** None. * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 400 response -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public okhttp3.Call getAllAvailableDashboardGadgetsAsync(final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getAllAvailableDashboardGadgetsValidateBeforeCall(_callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getAllDashboards * @param filter The filter applied to the list of dashboards. Valid values are: * `favourite` Returns dashboards the user has marked as favorite. * `my` Returns dashboards owned by the user. (optional) * @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0) * @param maxResults The maximum number of items to return per page. (optional, default to 20) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 Returned if the request is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public okhttp3.Call getAllDashboardsCall(String filter, Integer startAt, Integer maxResults, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/rest/api/3/dashboard"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (filter != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter)); } if (startAt != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("startAt", startAt)); } if (maxResults != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("maxResults", maxResults)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "OAuth2", "basicAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getAllDashboardsValidateBeforeCall(String filter, Integer startAt, Integer maxResults, final ApiCallback _callback) throws ApiException { return getAllDashboardsCall(filter, startAt, maxResults, _callback); } /** * Get all dashboards * Returns a list of dashboards owned by or shared with the user. The list may be filtered to include only favorite or owned dashboards. This operation can be accessed anonymously. **[Permissions](#permissions) required:** None. * @param filter The filter applied to the list of dashboards. Valid values are: * `favourite` Returns dashboards the user has marked as favorite. * `my` Returns dashboards owned by the user. (optional) * @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0) * @param maxResults The maximum number of items to return per page. (optional, default to 20) * @return PageOfDashboards * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 Returned if the request is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public PageOfDashboards getAllDashboards(String filter, Integer startAt, Integer maxResults) throws ApiException { ApiResponse localVarResp = getAllDashboardsWithHttpInfo(filter, startAt, maxResults); return localVarResp.getData(); } /** * Get all dashboards * Returns a list of dashboards owned by or shared with the user. The list may be filtered to include only favorite or owned dashboards. This operation can be accessed anonymously. **[Permissions](#permissions) required:** None. * @param filter The filter applied to the list of dashboards. Valid values are: * `favourite` Returns dashboards the user has marked as favorite. * `my` Returns dashboards owned by the user. (optional) * @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0) * @param maxResults The maximum number of items to return per page. (optional, default to 20) * @return ApiResponse<PageOfDashboards> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 Returned if the request is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public ApiResponse getAllDashboardsWithHttpInfo(String filter, Integer startAt, Integer maxResults) throws ApiException { okhttp3.Call localVarCall = getAllDashboardsValidateBeforeCall(filter, startAt, maxResults, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get all dashboards (asynchronously) * Returns a list of dashboards owned by or shared with the user. The list may be filtered to include only favorite or owned dashboards. This operation can be accessed anonymously. **[Permissions](#permissions) required:** None. * @param filter The filter applied to the list of dashboards. Valid values are: * `favourite` Returns dashboards the user has marked as favorite. * `my` Returns dashboards owned by the user. (optional) * @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0) * @param maxResults The maximum number of items to return per page. (optional, default to 20) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 Returned if the request is invalid. -
401 Returned if the authentication credentials are incorrect or missing. -
*/ public okhttp3.Call getAllDashboardsAsync(String filter, Integer startAt, Integer maxResults, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getAllDashboardsValidateBeforeCall(filter, startAt, maxResults, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getAllGadgets * @param dashboardId The ID of the dashboard. (required) * @param moduleKey The list of gadgets module keys. To include multiple module keys, separate module keys with ampersand: `moduleKey=key:one&moduleKey=key:two`. (optional) * @param uri The list of gadgets URIs. To include multiple URIs, separate URIs with ampersand: `uri=/rest/example/uri/1&uri=/rest/example/uri/2`. (optional) * @param gadgetId The list of gadgets IDs. To include multiple IDs, separate IDs with ampersand: `gadgetId=10000&gadgetId=10001`. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect. -
404 Returned if the dashboard is not found. -
*/ public okhttp3.Call getAllGadgetsCall(Long dashboardId, List moduleKey, List uri, List gadgetId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/rest/api/3/dashboard/{dashboardId}/gadget" .replace("{" + "dashboardId" + "}", localVarApiClient.escapeString(dashboardId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (moduleKey != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "moduleKey", moduleKey)); } if (uri != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "uri", uri)); } if (gadgetId != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "gadgetId", gadgetId)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "OAuth2", "basicAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getAllGadgetsValidateBeforeCall(Long dashboardId, List moduleKey, List uri, List gadgetId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'dashboardId' is set if (dashboardId == null) { throw new ApiException("Missing the required parameter 'dashboardId' when calling getAllGadgets(Async)"); } return getAllGadgetsCall(dashboardId, moduleKey, uri, gadgetId, _callback); } /** * Get gadgets * Returns a list of dashboard gadgets on a dashboard. This operation returns: * Gadgets from a list of IDs, when `id` is set. * Gadgets with a module key, when `moduleKey` is set. * Gadgets from a list of URIs, when `uri` is set. * All gadgets, when no other parameters are set. This operation can be accessed anonymously. **[Permissions](#permissions) required:** None. * @param dashboardId The ID of the dashboard. (required) * @param moduleKey The list of gadgets module keys. To include multiple module keys, separate module keys with ampersand: `moduleKey=key:one&moduleKey=key:two`. (optional) * @param uri The list of gadgets URIs. To include multiple URIs, separate URIs with ampersand: `uri=/rest/example/uri/1&uri=/rest/example/uri/2`. (optional) * @param gadgetId The list of gadgets IDs. To include multiple IDs, separate IDs with ampersand: `gadgetId=10000&gadgetId=10001`. (optional) * @return DashboardGadgetResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect. -
404 Returned if the dashboard is not found. -
*/ public DashboardGadgetResponse getAllGadgets(Long dashboardId, List moduleKey, List uri, List gadgetId) throws ApiException { ApiResponse localVarResp = getAllGadgetsWithHttpInfo(dashboardId, moduleKey, uri, gadgetId); return localVarResp.getData(); } /** * Get gadgets * Returns a list of dashboard gadgets on a dashboard. This operation returns: * Gadgets from a list of IDs, when `id` is set. * Gadgets with a module key, when `moduleKey` is set. * Gadgets from a list of URIs, when `uri` is set. * All gadgets, when no other parameters are set. This operation can be accessed anonymously. **[Permissions](#permissions) required:** None. * @param dashboardId The ID of the dashboard. (required) * @param moduleKey The list of gadgets module keys. To include multiple module keys, separate module keys with ampersand: `moduleKey=key:one&moduleKey=key:two`. (optional) * @param uri The list of gadgets URIs. To include multiple URIs, separate URIs with ampersand: `uri=/rest/example/uri/1&uri=/rest/example/uri/2`. (optional) * @param gadgetId The list of gadgets IDs. To include multiple IDs, separate IDs with ampersand: `gadgetId=10000&gadgetId=10001`. (optional) * @return ApiResponse<DashboardGadgetResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect. -
404 Returned if the dashboard is not found. -
*/ public ApiResponse getAllGadgetsWithHttpInfo(Long dashboardId, List moduleKey, List uri, List gadgetId) throws ApiException { okhttp3.Call localVarCall = getAllGadgetsValidateBeforeCall(dashboardId, moduleKey, uri, gadgetId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get gadgets (asynchronously) * Returns a list of dashboard gadgets on a dashboard. This operation returns: * Gadgets from a list of IDs, when `id` is set. * Gadgets with a module key, when `moduleKey` is set. * Gadgets from a list of URIs, when `uri` is set. * All gadgets, when no other parameters are set. This operation can be accessed anonymously. **[Permissions](#permissions) required:** None. * @param dashboardId The ID of the dashboard. (required) * @param moduleKey The list of gadgets module keys. To include multiple module keys, separate module keys with ampersand: `moduleKey=key:one&moduleKey=key:two`. (optional) * @param uri The list of gadgets URIs. To include multiple URIs, separate URIs with ampersand: `uri=/rest/example/uri/1&uri=/rest/example/uri/2`. (optional) * @param gadgetId The list of gadgets IDs. To include multiple IDs, separate IDs with ampersand: `gadgetId=10000&gadgetId=10001`. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect. -
404 Returned if the dashboard is not found. -
*/ public okhttp3.Call getAllGadgetsAsync(Long dashboardId, List moduleKey, List uri, List gadgetId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getAllGadgetsValidateBeforeCall(dashboardId, moduleKey, uri, gadgetId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getDashboard * @param id The ID of the dashboard. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 400 response -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the dashboard is not found or the dashboard is not owned by or shared with the user. -
*/ public okhttp3.Call getDashboardCall(String id, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/rest/api/3/dashboard/{id}" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "OAuth2", "basicAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getDashboardValidateBeforeCall(String id, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling getDashboard(Async)"); } return getDashboardCall(id, _callback); } /** * Get dashboard * Returns a dashboard. This operation can be accessed anonymously. **[Permissions](#permissions) required:** None. However, to get a dashboard, the dashboard must be shared with the user or the user must own it. Note, users with the *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) are considered owners of the System dashboard. The System dashboard is considered to be shared with all other users. * @param id The ID of the dashboard. (required) * @return Dashboard * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 400 response -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the dashboard is not found or the dashboard is not owned by or shared with the user. -
*/ public Dashboard getDashboard(String id) throws ApiException { ApiResponse localVarResp = getDashboardWithHttpInfo(id); return localVarResp.getData(); } /** * Get dashboard * Returns a dashboard. This operation can be accessed anonymously. **[Permissions](#permissions) required:** None. However, to get a dashboard, the dashboard must be shared with the user or the user must own it. Note, users with the *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) are considered owners of the System dashboard. The System dashboard is considered to be shared with all other users. * @param id The ID of the dashboard. (required) * @return ApiResponse<Dashboard> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 400 response -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the dashboard is not found or the dashboard is not owned by or shared with the user. -
*/ public ApiResponse getDashboardWithHttpInfo(String id) throws ApiException { okhttp3.Call localVarCall = getDashboardValidateBeforeCall(id, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get dashboard (asynchronously) * Returns a dashboard. This operation can be accessed anonymously. **[Permissions](#permissions) required:** None. However, to get a dashboard, the dashboard must be shared with the user or the user must own it. Note, users with the *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) are considered owners of the System dashboard. The System dashboard is considered to be shared with all other users. * @param id The ID of the dashboard. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 400 response -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the dashboard is not found or the dashboard is not owned by or shared with the user. -
*/ public okhttp3.Call getDashboardAsync(String id, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getDashboardValidateBeforeCall(id, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getDashboardItemProperty * @param dashboardId The ID of the dashboard. (required) * @param itemId The ID of the dashboard item. (required) * @param propertyKey The key of the dashboard item property. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the dashboard, the dashboard item, or dashboard item property is not found, or the dashboard is not owned by or shared with the user. -
*/ public okhttp3.Call getDashboardItemPropertyCall(String dashboardId, String itemId, String propertyKey, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/rest/api/3/dashboard/{dashboardId}/items/{itemId}/properties/{propertyKey}" .replace("{" + "dashboardId" + "}", localVarApiClient.escapeString(dashboardId.toString())) .replace("{" + "itemId" + "}", localVarApiClient.escapeString(itemId.toString())) .replace("{" + "propertyKey" + "}", localVarApiClient.escapeString(propertyKey.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "OAuth2", "basicAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getDashboardItemPropertyValidateBeforeCall(String dashboardId, String itemId, String propertyKey, final ApiCallback _callback) throws ApiException { // verify the required parameter 'dashboardId' is set if (dashboardId == null) { throw new ApiException("Missing the required parameter 'dashboardId' when calling getDashboardItemProperty(Async)"); } // verify the required parameter 'itemId' is set if (itemId == null) { throw new ApiException("Missing the required parameter 'itemId' when calling getDashboardItemProperty(Async)"); } // verify the required parameter 'propertyKey' is set if (propertyKey == null) { throw new ApiException("Missing the required parameter 'propertyKey' when calling getDashboardItemProperty(Async)"); } return getDashboardItemPropertyCall(dashboardId, itemId, propertyKey, _callback); } /** * Get dashboard item property * Returns the key and value of a dashboard item property. A dashboard item enables an app to add user-specific information to a user dashboard. Dashboard items are exposed to users as gadgets that users can add to their dashboards. For more information on how users do this, see [Adding and customizing gadgets](https://confluence.atlassian.com/x/7AeiLQ). When an app creates a dashboard item it registers a callback to receive the dashboard item ID. The callback fires whenever the item is rendered or, where the item is configurable, the user edits the item. The app then uses this resource to store the item's content or configuration details. For more information on working with dashboard items, see [ Building a dashboard item for a JIRA Connect add-on](https://developer.atlassian.com/server/jira/platform/guide-building-a-dashboard-item-for-a-jira-connect-add-on-33746254/) and the [Dashboard Item](https://developer.atlassian.com/cloud/jira/platform/modules/dashboard-item/) documentation. There is no resource to set or get dashboard items. This operation can be accessed anonymously. **[Permissions](#permissions) required:** The user must be the owner of the dashboard or have the dashboard shared with them. Note, users with the *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) are considered owners of the System dashboard. The System dashboard is considered to be shared with all other users, and is accessible to anonymous users when Jira’s anonymous access is permitted. * @param dashboardId The ID of the dashboard. (required) * @param itemId The ID of the dashboard item. (required) * @param propertyKey The key of the dashboard item property. (required) * @return EntityProperty * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the dashboard, the dashboard item, or dashboard item property is not found, or the dashboard is not owned by or shared with the user. -
*/ public EntityProperty getDashboardItemProperty(String dashboardId, String itemId, String propertyKey) throws ApiException { ApiResponse localVarResp = getDashboardItemPropertyWithHttpInfo(dashboardId, itemId, propertyKey); return localVarResp.getData(); } /** * Get dashboard item property * Returns the key and value of a dashboard item property. A dashboard item enables an app to add user-specific information to a user dashboard. Dashboard items are exposed to users as gadgets that users can add to their dashboards. For more information on how users do this, see [Adding and customizing gadgets](https://confluence.atlassian.com/x/7AeiLQ). When an app creates a dashboard item it registers a callback to receive the dashboard item ID. The callback fires whenever the item is rendered or, where the item is configurable, the user edits the item. The app then uses this resource to store the item's content or configuration details. For more information on working with dashboard items, see [ Building a dashboard item for a JIRA Connect add-on](https://developer.atlassian.com/server/jira/platform/guide-building-a-dashboard-item-for-a-jira-connect-add-on-33746254/) and the [Dashboard Item](https://developer.atlassian.com/cloud/jira/platform/modules/dashboard-item/) documentation. There is no resource to set or get dashboard items. This operation can be accessed anonymously. **[Permissions](#permissions) required:** The user must be the owner of the dashboard or have the dashboard shared with them. Note, users with the *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) are considered owners of the System dashboard. The System dashboard is considered to be shared with all other users, and is accessible to anonymous users when Jira’s anonymous access is permitted. * @param dashboardId The ID of the dashboard. (required) * @param itemId The ID of the dashboard item. (required) * @param propertyKey The key of the dashboard item property. (required) * @return ApiResponse<EntityProperty> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the dashboard, the dashboard item, or dashboard item property is not found, or the dashboard is not owned by or shared with the user. -
*/ public ApiResponse getDashboardItemPropertyWithHttpInfo(String dashboardId, String itemId, String propertyKey) throws ApiException { okhttp3.Call localVarCall = getDashboardItemPropertyValidateBeforeCall(dashboardId, itemId, propertyKey, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get dashboard item property (asynchronously) * Returns the key and value of a dashboard item property. A dashboard item enables an app to add user-specific information to a user dashboard. Dashboard items are exposed to users as gadgets that users can add to their dashboards. For more information on how users do this, see [Adding and customizing gadgets](https://confluence.atlassian.com/x/7AeiLQ). When an app creates a dashboard item it registers a callback to receive the dashboard item ID. The callback fires whenever the item is rendered or, where the item is configurable, the user edits the item. The app then uses this resource to store the item's content or configuration details. For more information on working with dashboard items, see [ Building a dashboard item for a JIRA Connect add-on](https://developer.atlassian.com/server/jira/platform/guide-building-a-dashboard-item-for-a-jira-connect-add-on-33746254/) and the [Dashboard Item](https://developer.atlassian.com/cloud/jira/platform/modules/dashboard-item/) documentation. There is no resource to set or get dashboard items. This operation can be accessed anonymously. **[Permissions](#permissions) required:** The user must be the owner of the dashboard or have the dashboard shared with them. Note, users with the *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) are considered owners of the System dashboard. The System dashboard is considered to be shared with all other users, and is accessible to anonymous users when Jira’s anonymous access is permitted. * @param dashboardId The ID of the dashboard. (required) * @param itemId The ID of the dashboard item. (required) * @param propertyKey The key of the dashboard item property. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the dashboard, the dashboard item, or dashboard item property is not found, or the dashboard is not owned by or shared with the user. -
*/ public okhttp3.Call getDashboardItemPropertyAsync(String dashboardId, String itemId, String propertyKey, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getDashboardItemPropertyValidateBeforeCall(dashboardId, itemId, propertyKey, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getDashboardItemPropertyKeys * @param dashboardId The ID of the dashboard. (required) * @param itemId The ID of the dashboard item. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the dashboard or dashboard item is not found, or the dashboard is not owned by or shared with the user. -
*/ public okhttp3.Call getDashboardItemPropertyKeysCall(String dashboardId, String itemId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/rest/api/3/dashboard/{dashboardId}/items/{itemId}/properties" .replace("{" + "dashboardId" + "}", localVarApiClient.escapeString(dashboardId.toString())) .replace("{" + "itemId" + "}", localVarApiClient.escapeString(itemId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "OAuth2", "basicAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getDashboardItemPropertyKeysValidateBeforeCall(String dashboardId, String itemId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'dashboardId' is set if (dashboardId == null) { throw new ApiException("Missing the required parameter 'dashboardId' when calling getDashboardItemPropertyKeys(Async)"); } // verify the required parameter 'itemId' is set if (itemId == null) { throw new ApiException("Missing the required parameter 'itemId' when calling getDashboardItemPropertyKeys(Async)"); } return getDashboardItemPropertyKeysCall(dashboardId, itemId, _callback); } /** * Get dashboard item property keys * Returns the keys of all properties for a dashboard item. This operation can be accessed anonymously. **[Permissions](#permissions) required:** The user must be the owner of the dashboard or have the dashboard shared with them. Note, users with the *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) are considered owners of the System dashboard. The System dashboard is considered to be shared with all other users, and is accessible to anonymous users when Jira’s anonymous access is permitted. * @param dashboardId The ID of the dashboard. (required) * @param itemId The ID of the dashboard item. (required) * @return PropertyKeys * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the dashboard or dashboard item is not found, or the dashboard is not owned by or shared with the user. -
*/ public PropertyKeys getDashboardItemPropertyKeys(String dashboardId, String itemId) throws ApiException { ApiResponse localVarResp = getDashboardItemPropertyKeysWithHttpInfo(dashboardId, itemId); return localVarResp.getData(); } /** * Get dashboard item property keys * Returns the keys of all properties for a dashboard item. This operation can be accessed anonymously. **[Permissions](#permissions) required:** The user must be the owner of the dashboard or have the dashboard shared with them. Note, users with the *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) are considered owners of the System dashboard. The System dashboard is considered to be shared with all other users, and is accessible to anonymous users when Jira’s anonymous access is permitted. * @param dashboardId The ID of the dashboard. (required) * @param itemId The ID of the dashboard item. (required) * @return ApiResponse<PropertyKeys> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the dashboard or dashboard item is not found, or the dashboard is not owned by or shared with the user. -
*/ public ApiResponse getDashboardItemPropertyKeysWithHttpInfo(String dashboardId, String itemId) throws ApiException { okhttp3.Call localVarCall = getDashboardItemPropertyKeysValidateBeforeCall(dashboardId, itemId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get dashboard item property keys (asynchronously) * Returns the keys of all properties for a dashboard item. This operation can be accessed anonymously. **[Permissions](#permissions) required:** The user must be the owner of the dashboard or have the dashboard shared with them. Note, users with the *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) are considered owners of the System dashboard. The System dashboard is considered to be shared with all other users, and is accessible to anonymous users when Jira’s anonymous access is permitted. * @param dashboardId The ID of the dashboard. (required) * @param itemId The ID of the dashboard item. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the dashboard or dashboard item is not found, or the dashboard is not owned by or shared with the user. -
*/ public okhttp3.Call getDashboardItemPropertyKeysAsync(String dashboardId, String itemId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getDashboardItemPropertyKeysValidateBeforeCall(dashboardId, itemId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getDashboardsPaginated * @param dashboardName String used to perform a case-insensitive partial match with `name`. (optional) * @param accountId User account ID used to return dashboards with the matching `owner.accountId`. This parameter cannot be used with the `owner` parameter. (optional) * @param owner This parameter is deprecated because of privacy changes. Use `accountId` instead. See the [migration guide](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. User name used to return dashboards with the matching `owner.name`. This parameter cannot be used with the `accountId` parameter. (optional) * @param groupname As a group's name can change, use of `groupId` is recommended. Group name used to return dashboards that are shared with a group that matches `sharePermissions.group.name`. This parameter cannot be used with the `groupId` parameter. (optional) * @param groupId Group ID used to return dashboards that are shared with a group that matches `sharePermissions.group.groupId`. This parameter cannot be used with the `groupname` parameter. (optional) * @param projectId Project ID used to returns dashboards that are shared with a project that matches `sharePermissions.project.id`. (optional) * @param orderBy [Order](#ordering) the results by a field: * `description` Sorts by dashboard description. Note that this sort works independently of whether the expand to display the description field is in use. * `favourite_count` Sorts by dashboard popularity. * `id` Sorts by dashboard ID. * `is_favourite` Sorts by whether the dashboard is marked as a favorite. * `name` Sorts by dashboard name. * `owner` Sorts by dashboard owner name. (optional, default to name) * @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0) * @param maxResults The maximum number of items to return per page. (optional, default to 50) * @param status The status to filter by. It may be active, archived or deleted. (optional, default to active) * @param expand Use [expand](#expansion) to include additional information about dashboard in the response. This parameter accepts a comma-separated list. Expand options include: * `description` Returns the description of the dashboard. * `owner` Returns the owner of the dashboard. * `viewUrl` Returns the URL that is used to view the dashboard. * `favourite` Returns `isFavourite`, an indicator of whether the user has set the dashboard as a favorite. * `favouritedCount` Returns `popularity`, a count of how many users have set this dashboard as a favorite. * `sharePermissions` Returns details of the share permissions defined for the dashboard. * `editPermissions` Returns details of the edit permissions defined for the dashboard. * `isWritable` Returns whether the current user has permission to edit the dashboard. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 Returned if: * `orderBy` is invalid. * `expand` includes an invalid value. * `accountId` and `owner` are provided. * `groupname` and `groupId` are provided. -
401 401 response -
*/ public okhttp3.Call getDashboardsPaginatedCall(String dashboardName, String accountId, String owner, String groupname, String groupId, Long projectId, String orderBy, Long startAt, Integer maxResults, String status, String expand, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/rest/api/3/dashboard/search"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (dashboardName != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("dashboardName", dashboardName)); } if (accountId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("accountId", accountId)); } if (owner != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("owner", owner)); } if (groupname != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("groupname", groupname)); } if (groupId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("groupId", groupId)); } if (projectId != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("projectId", projectId)); } if (orderBy != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("orderBy", orderBy)); } if (startAt != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("startAt", startAt)); } if (maxResults != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("maxResults", maxResults)); } if (status != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("status", status)); } if (expand != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("expand", expand)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "OAuth2", "basicAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getDashboardsPaginatedValidateBeforeCall(String dashboardName, String accountId, String owner, String groupname, String groupId, Long projectId, String orderBy, Long startAt, Integer maxResults, String status, String expand, final ApiCallback _callback) throws ApiException { return getDashboardsPaginatedCall(dashboardName, accountId, owner, groupname, groupId, projectId, orderBy, startAt, maxResults, status, expand, _callback); } /** * Search for dashboards * Returns a [paginated](#pagination) list of dashboards. This operation is similar to [Get dashboards](#api-rest-api-3-dashboard-get) except that the results can be refined to include dashboards that have specific attributes. For example, dashboards with a particular name. When multiple attributes are specified only filters matching all attributes are returned. This operation can be accessed anonymously. **[Permissions](#permissions) required:** The following dashboards that match the query parameters are returned: * Dashboards owned by the user. Not returned for anonymous users. * Dashboards shared with a group that the user is a member of. Not returned for anonymous users. * Dashboards shared with a private project that the user can browse. Not returned for anonymous users. * Dashboards shared with a public project. * Dashboards shared with the public. * @param dashboardName String used to perform a case-insensitive partial match with `name`. (optional) * @param accountId User account ID used to return dashboards with the matching `owner.accountId`. This parameter cannot be used with the `owner` parameter. (optional) * @param owner This parameter is deprecated because of privacy changes. Use `accountId` instead. See the [migration guide](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. User name used to return dashboards with the matching `owner.name`. This parameter cannot be used with the `accountId` parameter. (optional) * @param groupname As a group's name can change, use of `groupId` is recommended. Group name used to return dashboards that are shared with a group that matches `sharePermissions.group.name`. This parameter cannot be used with the `groupId` parameter. (optional) * @param groupId Group ID used to return dashboards that are shared with a group that matches `sharePermissions.group.groupId`. This parameter cannot be used with the `groupname` parameter. (optional) * @param projectId Project ID used to returns dashboards that are shared with a project that matches `sharePermissions.project.id`. (optional) * @param orderBy [Order](#ordering) the results by a field: * `description` Sorts by dashboard description. Note that this sort works independently of whether the expand to display the description field is in use. * `favourite_count` Sorts by dashboard popularity. * `id` Sorts by dashboard ID. * `is_favourite` Sorts by whether the dashboard is marked as a favorite. * `name` Sorts by dashboard name. * `owner` Sorts by dashboard owner name. (optional, default to name) * @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0) * @param maxResults The maximum number of items to return per page. (optional, default to 50) * @param status The status to filter by. It may be active, archived or deleted. (optional, default to active) * @param expand Use [expand](#expansion) to include additional information about dashboard in the response. This parameter accepts a comma-separated list. Expand options include: * `description` Returns the description of the dashboard. * `owner` Returns the owner of the dashboard. * `viewUrl` Returns the URL that is used to view the dashboard. * `favourite` Returns `isFavourite`, an indicator of whether the user has set the dashboard as a favorite. * `favouritedCount` Returns `popularity`, a count of how many users have set this dashboard as a favorite. * `sharePermissions` Returns details of the share permissions defined for the dashboard. * `editPermissions` Returns details of the edit permissions defined for the dashboard. * `isWritable` Returns whether the current user has permission to edit the dashboard. (optional) * @return PageBeanDashboard * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 Returned if: * `orderBy` is invalid. * `expand` includes an invalid value. * `accountId` and `owner` are provided. * `groupname` and `groupId` are provided. -
401 401 response -
*/ public PageBeanDashboard getDashboardsPaginated(String dashboardName, String accountId, String owner, String groupname, String groupId, Long projectId, String orderBy, Long startAt, Integer maxResults, String status, String expand) throws ApiException { ApiResponse localVarResp = getDashboardsPaginatedWithHttpInfo(dashboardName, accountId, owner, groupname, groupId, projectId, orderBy, startAt, maxResults, status, expand); return localVarResp.getData(); } /** * Search for dashboards * Returns a [paginated](#pagination) list of dashboards. This operation is similar to [Get dashboards](#api-rest-api-3-dashboard-get) except that the results can be refined to include dashboards that have specific attributes. For example, dashboards with a particular name. When multiple attributes are specified only filters matching all attributes are returned. This operation can be accessed anonymously. **[Permissions](#permissions) required:** The following dashboards that match the query parameters are returned: * Dashboards owned by the user. Not returned for anonymous users. * Dashboards shared with a group that the user is a member of. Not returned for anonymous users. * Dashboards shared with a private project that the user can browse. Not returned for anonymous users. * Dashboards shared with a public project. * Dashboards shared with the public. * @param dashboardName String used to perform a case-insensitive partial match with `name`. (optional) * @param accountId User account ID used to return dashboards with the matching `owner.accountId`. This parameter cannot be used with the `owner` parameter. (optional) * @param owner This parameter is deprecated because of privacy changes. Use `accountId` instead. See the [migration guide](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. User name used to return dashboards with the matching `owner.name`. This parameter cannot be used with the `accountId` parameter. (optional) * @param groupname As a group's name can change, use of `groupId` is recommended. Group name used to return dashboards that are shared with a group that matches `sharePermissions.group.name`. This parameter cannot be used with the `groupId` parameter. (optional) * @param groupId Group ID used to return dashboards that are shared with a group that matches `sharePermissions.group.groupId`. This parameter cannot be used with the `groupname` parameter. (optional) * @param projectId Project ID used to returns dashboards that are shared with a project that matches `sharePermissions.project.id`. (optional) * @param orderBy [Order](#ordering) the results by a field: * `description` Sorts by dashboard description. Note that this sort works independently of whether the expand to display the description field is in use. * `favourite_count` Sorts by dashboard popularity. * `id` Sorts by dashboard ID. * `is_favourite` Sorts by whether the dashboard is marked as a favorite. * `name` Sorts by dashboard name. * `owner` Sorts by dashboard owner name. (optional, default to name) * @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0) * @param maxResults The maximum number of items to return per page. (optional, default to 50) * @param status The status to filter by. It may be active, archived or deleted. (optional, default to active) * @param expand Use [expand](#expansion) to include additional information about dashboard in the response. This parameter accepts a comma-separated list. Expand options include: * `description` Returns the description of the dashboard. * `owner` Returns the owner of the dashboard. * `viewUrl` Returns the URL that is used to view the dashboard. * `favourite` Returns `isFavourite`, an indicator of whether the user has set the dashboard as a favorite. * `favouritedCount` Returns `popularity`, a count of how many users have set this dashboard as a favorite. * `sharePermissions` Returns details of the share permissions defined for the dashboard. * `editPermissions` Returns details of the edit permissions defined for the dashboard. * `isWritable` Returns whether the current user has permission to edit the dashboard. (optional) * @return ApiResponse<PageBeanDashboard> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 Returned if: * `orderBy` is invalid. * `expand` includes an invalid value. * `accountId` and `owner` are provided. * `groupname` and `groupId` are provided. -
401 401 response -
*/ public ApiResponse getDashboardsPaginatedWithHttpInfo(String dashboardName, String accountId, String owner, String groupname, String groupId, Long projectId, String orderBy, Long startAt, Integer maxResults, String status, String expand) throws ApiException { okhttp3.Call localVarCall = getDashboardsPaginatedValidateBeforeCall(dashboardName, accountId, owner, groupname, groupId, projectId, orderBy, startAt, maxResults, status, expand, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Search for dashboards (asynchronously) * Returns a [paginated](#pagination) list of dashboards. This operation is similar to [Get dashboards](#api-rest-api-3-dashboard-get) except that the results can be refined to include dashboards that have specific attributes. For example, dashboards with a particular name. When multiple attributes are specified only filters matching all attributes are returned. This operation can be accessed anonymously. **[Permissions](#permissions) required:** The following dashboards that match the query parameters are returned: * Dashboards owned by the user. Not returned for anonymous users. * Dashboards shared with a group that the user is a member of. Not returned for anonymous users. * Dashboards shared with a private project that the user can browse. Not returned for anonymous users. * Dashboards shared with a public project. * Dashboards shared with the public. * @param dashboardName String used to perform a case-insensitive partial match with `name`. (optional) * @param accountId User account ID used to return dashboards with the matching `owner.accountId`. This parameter cannot be used with the `owner` parameter. (optional) * @param owner This parameter is deprecated because of privacy changes. Use `accountId` instead. See the [migration guide](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/) for details. User name used to return dashboards with the matching `owner.name`. This parameter cannot be used with the `accountId` parameter. (optional) * @param groupname As a group's name can change, use of `groupId` is recommended. Group name used to return dashboards that are shared with a group that matches `sharePermissions.group.name`. This parameter cannot be used with the `groupId` parameter. (optional) * @param groupId Group ID used to return dashboards that are shared with a group that matches `sharePermissions.group.groupId`. This parameter cannot be used with the `groupname` parameter. (optional) * @param projectId Project ID used to returns dashboards that are shared with a project that matches `sharePermissions.project.id`. (optional) * @param orderBy [Order](#ordering) the results by a field: * `description` Sorts by dashboard description. Note that this sort works independently of whether the expand to display the description field is in use. * `favourite_count` Sorts by dashboard popularity. * `id` Sorts by dashboard ID. * `is_favourite` Sorts by whether the dashboard is marked as a favorite. * `name` Sorts by dashboard name. * `owner` Sorts by dashboard owner name. (optional, default to name) * @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0) * @param maxResults The maximum number of items to return per page. (optional, default to 50) * @param status The status to filter by. It may be active, archived or deleted. (optional, default to active) * @param expand Use [expand](#expansion) to include additional information about dashboard in the response. This parameter accepts a comma-separated list. Expand options include: * `description` Returns the description of the dashboard. * `owner` Returns the owner of the dashboard. * `viewUrl` Returns the URL that is used to view the dashboard. * `favourite` Returns `isFavourite`, an indicator of whether the user has set the dashboard as a favorite. * `favouritedCount` Returns `popularity`, a count of how many users have set this dashboard as a favorite. * `sharePermissions` Returns details of the share permissions defined for the dashboard. * `editPermissions` Returns details of the edit permissions defined for the dashboard. * `isWritable` Returns whether the current user has permission to edit the dashboard. (optional) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 Returned if: * `orderBy` is invalid. * `expand` includes an invalid value. * `accountId` and `owner` are provided. * `groupname` and `groupId` are provided. -
401 401 response -
*/ public okhttp3.Call getDashboardsPaginatedAsync(String dashboardName, String accountId, String owner, String groupname, String groupId, Long projectId, String orderBy, Long startAt, Integer maxResults, String status, String expand, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getDashboardsPaginatedValidateBeforeCall(dashboardName, accountId, owner, groupname, groupId, projectId, orderBy, startAt, maxResults, status, expand, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for removeGadget * @param dashboardId The ID of the dashboard. (required) * @param gadgetId The ID of the gadget. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
204 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the gadget or the dashboard is not found. -
*/ public okhttp3.Call removeGadgetCall(Long dashboardId, Long gadgetId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/rest/api/3/dashboard/{dashboardId}/gadget/{gadgetId}" .replace("{" + "dashboardId" + "}", localVarApiClient.escapeString(dashboardId.toString())) .replace("{" + "gadgetId" + "}", localVarApiClient.escapeString(gadgetId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "OAuth2", "basicAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call removeGadgetValidateBeforeCall(Long dashboardId, Long gadgetId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'dashboardId' is set if (dashboardId == null) { throw new ApiException("Missing the required parameter 'dashboardId' when calling removeGadget(Async)"); } // verify the required parameter 'gadgetId' is set if (gadgetId == null) { throw new ApiException("Missing the required parameter 'gadgetId' when calling removeGadget(Async)"); } return removeGadgetCall(dashboardId, gadgetId, _callback); } /** * Remove gadget from dashboard * Removes a dashboard gadget from a dashboard. When a gadget is removed from a dashboard, other gadgets in the same column are moved up to fill the emptied position. **[Permissions](#permissions) required:** None. * @param dashboardId The ID of the dashboard. (required) * @param gadgetId The ID of the gadget. (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
204 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the gadget or the dashboard is not found. -
*/ public Object removeGadget(Long dashboardId, Long gadgetId) throws ApiException { ApiResponse localVarResp = removeGadgetWithHttpInfo(dashboardId, gadgetId); return localVarResp.getData(); } /** * Remove gadget from dashboard * Removes a dashboard gadget from a dashboard. When a gadget is removed from a dashboard, other gadgets in the same column are moved up to fill the emptied position. **[Permissions](#permissions) required:** None. * @param dashboardId The ID of the dashboard. (required) * @param gadgetId The ID of the gadget. (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
204 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the gadget or the dashboard is not found. -
*/ public ApiResponse removeGadgetWithHttpInfo(Long dashboardId, Long gadgetId) throws ApiException { okhttp3.Call localVarCall = removeGadgetValidateBeforeCall(dashboardId, gadgetId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Remove gadget from dashboard (asynchronously) * Removes a dashboard gadget from a dashboard. When a gadget is removed from a dashboard, other gadgets in the same column are moved up to fill the emptied position. **[Permissions](#permissions) required:** None. * @param dashboardId The ID of the dashboard. (required) * @param gadgetId The ID of the gadget. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
204 Returned if the request is successful. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the gadget or the dashboard is not found. -
*/ public okhttp3.Call removeGadgetAsync(Long dashboardId, Long gadgetId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = removeGadgetValidateBeforeCall(dashboardId, gadgetId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for setDashboardItemProperty * @param dashboardId The ID of the dashboard. (required) * @param itemId The ID of the dashboard item. (required) * @param propertyKey The key of the dashboard item property. The maximum length is 255 characters. For dashboard items with a spec URI and no complete module key, if the provided propertyKey is equal to \"config\", the request body's JSON must be an object with all keys and values as strings. (required) * @param body (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the dashboard item property is updated. -
201 Returned if the dashboard item property is created. -
400 Returned if: * Request is invalid * Or if all of these conditions are met in the request: * The dashboard item has a spec URI and no complete module key * The value of propertyKey is equal to \"config\" * The request body contains a JSON object whose keys and values are not strings. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user is not the owner of the dashboard. -
404 Returned if the dashboard item is not found or the dashboard is not shared with the user. -
*/ public okhttp3.Call setDashboardItemPropertyCall(String dashboardId, String itemId, String propertyKey, Object body, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = body; // create path and map variables String localVarPath = "/rest/api/3/dashboard/{dashboardId}/items/{itemId}/properties/{propertyKey}" .replace("{" + "dashboardId" + "}", localVarApiClient.escapeString(dashboardId.toString())) .replace("{" + "itemId" + "}", localVarApiClient.escapeString(itemId.toString())) .replace("{" + "propertyKey" + "}", localVarApiClient.escapeString(propertyKey.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "OAuth2", "basicAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call setDashboardItemPropertyValidateBeforeCall(String dashboardId, String itemId, String propertyKey, Object body, final ApiCallback _callback) throws ApiException { // verify the required parameter 'dashboardId' is set if (dashboardId == null) { throw new ApiException("Missing the required parameter 'dashboardId' when calling setDashboardItemProperty(Async)"); } // verify the required parameter 'itemId' is set if (itemId == null) { throw new ApiException("Missing the required parameter 'itemId' when calling setDashboardItemProperty(Async)"); } // verify the required parameter 'propertyKey' is set if (propertyKey == null) { throw new ApiException("Missing the required parameter 'propertyKey' when calling setDashboardItemProperty(Async)"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling setDashboardItemProperty(Async)"); } return setDashboardItemPropertyCall(dashboardId, itemId, propertyKey, body, _callback); } /** * Set dashboard item property * Sets the value of a dashboard item property. Use this resource in apps to store custom data against a dashboard item. A dashboard item enables an app to add user-specific information to a user dashboard. Dashboard items are exposed to users as gadgets that users can add to their dashboards. For more information on how users do this, see [Adding and customizing gadgets](https://confluence.atlassian.com/x/7AeiLQ). When an app creates a dashboard item it registers a callback to receive the dashboard item ID. The callback fires whenever the item is rendered or, where the item is configurable, the user edits the item. The app then uses this resource to store the item's content or configuration details. For more information on working with dashboard items, see [ Building a dashboard item for a JIRA Connect add-on](https://developer.atlassian.com/server/jira/platform/guide-building-a-dashboard-item-for-a-jira-connect-add-on-33746254/) and the [Dashboard Item](https://developer.atlassian.com/cloud/jira/platform/modules/dashboard-item/) documentation. There is no resource to set or get dashboard items. The value of the request body must be a [valid](http://tools.ietf.org/html/rfc4627), non-empty JSON blob. The maximum length is 32768 characters. This operation can be accessed anonymously. **[Permissions](#permissions) required:** The user must be the owner of the dashboard. Note, users with the *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) are considered owners of the System dashboard. * @param dashboardId The ID of the dashboard. (required) * @param itemId The ID of the dashboard item. (required) * @param propertyKey The key of the dashboard item property. The maximum length is 255 characters. For dashboard items with a spec URI and no complete module key, if the provided propertyKey is equal to \"config\", the request body's JSON must be an object with all keys and values as strings. (required) * @param body (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returned if the dashboard item property is updated. -
201 Returned if the dashboard item property is created. -
400 Returned if: * Request is invalid * Or if all of these conditions are met in the request: * The dashboard item has a spec URI and no complete module key * The value of propertyKey is equal to \"config\" * The request body contains a JSON object whose keys and values are not strings. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user is not the owner of the dashboard. -
404 Returned if the dashboard item is not found or the dashboard is not shared with the user. -
*/ public Object setDashboardItemProperty(String dashboardId, String itemId, String propertyKey, Object body) throws ApiException { ApiResponse localVarResp = setDashboardItemPropertyWithHttpInfo(dashboardId, itemId, propertyKey, body); return localVarResp.getData(); } /** * Set dashboard item property * Sets the value of a dashboard item property. Use this resource in apps to store custom data against a dashboard item. A dashboard item enables an app to add user-specific information to a user dashboard. Dashboard items are exposed to users as gadgets that users can add to their dashboards. For more information on how users do this, see [Adding and customizing gadgets](https://confluence.atlassian.com/x/7AeiLQ). When an app creates a dashboard item it registers a callback to receive the dashboard item ID. The callback fires whenever the item is rendered or, where the item is configurable, the user edits the item. The app then uses this resource to store the item's content or configuration details. For more information on working with dashboard items, see [ Building a dashboard item for a JIRA Connect add-on](https://developer.atlassian.com/server/jira/platform/guide-building-a-dashboard-item-for-a-jira-connect-add-on-33746254/) and the [Dashboard Item](https://developer.atlassian.com/cloud/jira/platform/modules/dashboard-item/) documentation. There is no resource to set or get dashboard items. The value of the request body must be a [valid](http://tools.ietf.org/html/rfc4627), non-empty JSON blob. The maximum length is 32768 characters. This operation can be accessed anonymously. **[Permissions](#permissions) required:** The user must be the owner of the dashboard. Note, users with the *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) are considered owners of the System dashboard. * @param dashboardId The ID of the dashboard. (required) * @param itemId The ID of the dashboard item. (required) * @param propertyKey The key of the dashboard item property. The maximum length is 255 characters. For dashboard items with a spec URI and no complete module key, if the provided propertyKey is equal to \"config\", the request body's JSON must be an object with all keys and values as strings. (required) * @param body (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returned if the dashboard item property is updated. -
201 Returned if the dashboard item property is created. -
400 Returned if: * Request is invalid * Or if all of these conditions are met in the request: * The dashboard item has a spec URI and no complete module key * The value of propertyKey is equal to \"config\" * The request body contains a JSON object whose keys and values are not strings. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user is not the owner of the dashboard. -
404 Returned if the dashboard item is not found or the dashboard is not shared with the user. -
*/ public ApiResponse setDashboardItemPropertyWithHttpInfo(String dashboardId, String itemId, String propertyKey, Object body) throws ApiException { okhttp3.Call localVarCall = setDashboardItemPropertyValidateBeforeCall(dashboardId, itemId, propertyKey, body, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Set dashboard item property (asynchronously) * Sets the value of a dashboard item property. Use this resource in apps to store custom data against a dashboard item. A dashboard item enables an app to add user-specific information to a user dashboard. Dashboard items are exposed to users as gadgets that users can add to their dashboards. For more information on how users do this, see [Adding and customizing gadgets](https://confluence.atlassian.com/x/7AeiLQ). When an app creates a dashboard item it registers a callback to receive the dashboard item ID. The callback fires whenever the item is rendered or, where the item is configurable, the user edits the item. The app then uses this resource to store the item's content or configuration details. For more information on working with dashboard items, see [ Building a dashboard item for a JIRA Connect add-on](https://developer.atlassian.com/server/jira/platform/guide-building-a-dashboard-item-for-a-jira-connect-add-on-33746254/) and the [Dashboard Item](https://developer.atlassian.com/cloud/jira/platform/modules/dashboard-item/) documentation. There is no resource to set or get dashboard items. The value of the request body must be a [valid](http://tools.ietf.org/html/rfc4627), non-empty JSON blob. The maximum length is 32768 characters. This operation can be accessed anonymously. **[Permissions](#permissions) required:** The user must be the owner of the dashboard. Note, users with the *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg) are considered owners of the System dashboard. * @param dashboardId The ID of the dashboard. (required) * @param itemId The ID of the dashboard item. (required) * @param propertyKey The key of the dashboard item property. The maximum length is 255 characters. For dashboard items with a spec URI and no complete module key, if the provided propertyKey is equal to \"config\", the request body's JSON must be an object with all keys and values as strings. (required) * @param body (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the dashboard item property is updated. -
201 Returned if the dashboard item property is created. -
400 Returned if: * Request is invalid * Or if all of these conditions are met in the request: * The dashboard item has a spec URI and no complete module key * The value of propertyKey is equal to \"config\" * The request body contains a JSON object whose keys and values are not strings. -
401 Returned if the authentication credentials are incorrect or missing. -
403 Returned if the user is not the owner of the dashboard. -
404 Returned if the dashboard item is not found or the dashboard is not shared with the user. -
*/ public okhttp3.Call setDashboardItemPropertyAsync(String dashboardId, String itemId, String propertyKey, Object body, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = setDashboardItemPropertyValidateBeforeCall(dashboardId, itemId, propertyKey, body, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateDashboard * @param id The ID of the dashboard to update. (required) * @param dashboardDetails Replacement dashboard details. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the dashboard is not found or the dashboard is not owned by the user. -
*/ public okhttp3.Call updateDashboardCall(String id, DashboardDetails dashboardDetails, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = dashboardDetails; // create path and map variables String localVarPath = "/rest/api/3/dashboard/{id}" .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "OAuth2", "basicAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateDashboardValidateBeforeCall(String id, DashboardDetails dashboardDetails, final ApiCallback _callback) throws ApiException { // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling updateDashboard(Async)"); } // verify the required parameter 'dashboardDetails' is set if (dashboardDetails == null) { throw new ApiException("Missing the required parameter 'dashboardDetails' when calling updateDashboard(Async)"); } return updateDashboardCall(id, dashboardDetails, _callback); } /** * Update dashboard * Updates a dashboard, replacing all the dashboard details with those provided. **[Permissions](#permissions) required:** None The dashboard to be updated must be owned by the user. * @param id The ID of the dashboard to update. (required) * @param dashboardDetails Replacement dashboard details. (required) * @return Dashboard * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the dashboard is not found or the dashboard is not owned by the user. -
*/ public Dashboard updateDashboard(String id, DashboardDetails dashboardDetails) throws ApiException { ApiResponse localVarResp = updateDashboardWithHttpInfo(id, dashboardDetails); return localVarResp.getData(); } /** * Update dashboard * Updates a dashboard, replacing all the dashboard details with those provided. **[Permissions](#permissions) required:** None The dashboard to be updated must be owned by the user. * @param id The ID of the dashboard to update. (required) * @param dashboardDetails Replacement dashboard details. (required) * @return ApiResponse<Dashboard> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the dashboard is not found or the dashboard is not owned by the user. -
*/ public ApiResponse updateDashboardWithHttpInfo(String id, DashboardDetails dashboardDetails) throws ApiException { okhttp3.Call localVarCall = updateDashboardValidateBeforeCall(id, dashboardDetails, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Update dashboard (asynchronously) * Updates a dashboard, replacing all the dashboard details with those provided. **[Permissions](#permissions) required:** None The dashboard to be updated must be owned by the user. * @param id The ID of the dashboard to update. (required) * @param dashboardDetails Replacement dashboard details. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Returned if the request is successful. -
400 Returned if the request is not valid. -
401 Returned if the authentication credentials are incorrect or missing. -
404 Returned if the dashboard is not found or the dashboard is not owned by the user. -
*/ public okhttp3.Call updateDashboardAsync(String id, DashboardDetails dashboardDetails, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateDashboardValidateBeforeCall(id, dashboardDetails, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateGadget * @param dashboardId The ID of the dashboard. (required) * @param gadgetId The ID of the gadget. (required) * @param dashboardGadgetUpdateRequest (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
204 Returned if the request is successful. -
400 Returned if the request is invalid. -
401 Returned if the authentication credentials are incorrect. -
404 Returned if the gadget or the dashboard is not found. -
*/ public okhttp3.Call updateGadgetCall(Long dashboardId, Long gadgetId, DashboardGadgetUpdateRequest dashboardGadgetUpdateRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = dashboardGadgetUpdateRequest; // create path and map variables String localVarPath = "/rest/api/3/dashboard/{dashboardId}/gadget/{gadgetId}" .replace("{" + "dashboardId" + "}", localVarApiClient.escapeString(dashboardId.toString())) .replace("{" + "gadgetId" + "}", localVarApiClient.escapeString(gadgetId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "OAuth2", "basicAuth" }; return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateGadgetValidateBeforeCall(Long dashboardId, Long gadgetId, DashboardGadgetUpdateRequest dashboardGadgetUpdateRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'dashboardId' is set if (dashboardId == null) { throw new ApiException("Missing the required parameter 'dashboardId' when calling updateGadget(Async)"); } // verify the required parameter 'gadgetId' is set if (gadgetId == null) { throw new ApiException("Missing the required parameter 'gadgetId' when calling updateGadget(Async)"); } // verify the required parameter 'dashboardGadgetUpdateRequest' is set if (dashboardGadgetUpdateRequest == null) { throw new ApiException("Missing the required parameter 'dashboardGadgetUpdateRequest' when calling updateGadget(Async)"); } return updateGadgetCall(dashboardId, gadgetId, dashboardGadgetUpdateRequest, _callback); } /** * Update gadget on dashboard * Changes the title, position, and color of the gadget on a dashboard. **[Permissions](#permissions) required:** None. * @param dashboardId The ID of the dashboard. (required) * @param gadgetId The ID of the gadget. (required) * @param dashboardGadgetUpdateRequest (required) * @return Object * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
204 Returned if the request is successful. -
400 Returned if the request is invalid. -
401 Returned if the authentication credentials are incorrect. -
404 Returned if the gadget or the dashboard is not found. -
*/ public Object updateGadget(Long dashboardId, Long gadgetId, DashboardGadgetUpdateRequest dashboardGadgetUpdateRequest) throws ApiException { ApiResponse localVarResp = updateGadgetWithHttpInfo(dashboardId, gadgetId, dashboardGadgetUpdateRequest); return localVarResp.getData(); } /** * Update gadget on dashboard * Changes the title, position, and color of the gadget on a dashboard. **[Permissions](#permissions) required:** None. * @param dashboardId The ID of the dashboard. (required) * @param gadgetId The ID of the gadget. (required) * @param dashboardGadgetUpdateRequest (required) * @return ApiResponse<Object> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
204 Returned if the request is successful. -
400 Returned if the request is invalid. -
401 Returned if the authentication credentials are incorrect. -
404 Returned if the gadget or the dashboard is not found. -
*/ public ApiResponse updateGadgetWithHttpInfo(Long dashboardId, Long gadgetId, DashboardGadgetUpdateRequest dashboardGadgetUpdateRequest) throws ApiException { okhttp3.Call localVarCall = updateGadgetValidateBeforeCall(dashboardId, gadgetId, dashboardGadgetUpdateRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Update gadget on dashboard (asynchronously) * Changes the title, position, and color of the gadget on a dashboard. **[Permissions](#permissions) required:** None. * @param dashboardId The ID of the dashboard. (required) * @param gadgetId The ID of the gadget. (required) * @param dashboardGadgetUpdateRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
204 Returned if the request is successful. -
400 Returned if the request is invalid. -
401 Returned if the authentication credentials are incorrect. -
404 Returned if the gadget or the dashboard is not found. -
*/ public okhttp3.Call updateGadgetAsync(Long dashboardId, Long gadgetId, DashboardGadgetUpdateRequest dashboardGadgetUpdateRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateGadgetValidateBeforeCall(dashboardId, gadgetId, dashboardGadgetUpdateRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }