### Java - Get Version Components and Compare Versions
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/com/atlassian/servicedesk/api/info/Version
This Java snippet demonstrates how to retrieve major, minor, and bug fix version components using the getMajorVersion(), getMinorVersion(), and getBugFixVersion() methods. It also includes examples of comparing versions using isGreaterThan(), isLessThan(), isGreaterThanOrEqualTo(), and isLessThanOrEqualTo().
```java
public interface Version {
int getBugFixVersion();
int getMajorVersion();
int getMinorVersion();
String getQualifier();
boolean isGreaterThan(Version that);
boolean isGreaterThanOrEqualTo(Version that);
boolean isLessThan(Version that);
boolean isLessThanOrEqualTo(Version that);
}
```
--------------------------------
### Get Build Date
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/index-all
Retrieves the date when a build was created. This method is part of the PublicSoftwareInfo interface.
```java
getBuildDate() - Method in interface com.atlassian.servicedesk.api.info.PublicSoftwareInfo
```
--------------------------------
### Get Customer Request Details
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/com/atlassian/servicedesk/api/request/package-summary
Retrieves detailed information about a specific customer request.
```APIDOC
## GET /rest/servicedeskapi/request/{issueIdOrKey}
### Description
Retrieves the details of a specific customer request using its ID or key.
### Method
GET
### Endpoint
/rest/servicedeskapi/request/{issueIdOrKey}
### Parameters
#### Path Parameters
- **issueIdOrKey** (string) - Required - The ID or key of the customer request.
### Response
#### Success Response (200)
- **issueId** (string) - The ID of the request.
- **issueKey** (string) - The key of the request.
- **summary** (string) - The summary of the request.
- **description** (object) - The description of the request.
- **plain** (string) - The plain text description.
- **rich** (string) - The rich text description.
- **status** (string) - The current status of the request.
- **reporter** (object) - Information about the reporter.
- **accountId** (string) - The account ID of the reporter.
- **displayName** (string) - The display name of the reporter.
- **createdDate** (string) - The date the request was created.
- **updatedDate** (string) - The date the request was last updated.
#### Response Example
```json
{
"issueId": "10001",
"issueKey": "CSD-123",
"summary": "Need assistance with my account",
"description": {
"plain": "My account is locked and I cannot log in.",
"rich": "
My account is locked and I cannot log in.
"
},
"status": "Open",
"reporter": {
"accountId": "5f9b3f0c4a1b2c3d4e5f6a7b",
"displayName": "John Doe"
},
"createdDate": "2023-10-27T10:00:00.000+0000",
"updatedDate": "2023-10-27T11:30:00.000+0000"
}
```
```
--------------------------------
### Get Build Change Set
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/index-all
Retrieves the change set information for a build. This method is part of the PublicSoftwareInfo interface.
```java
getBuildChangeSet() - Method in interface com.atlassian.servicedesk.api.info.PublicSoftwareInfo
```
--------------------------------
### Get All Match Conditions for Project
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/index-all
Retrieves all conditions that match for a given project. This method is part of the TimeMetricConditionFactory interface within the SLA condition SPI.
```java
getAllMatchConditions(Project) - Method in interface com.atlassian.servicedesk.spi.sla.condition.TimeMetricConditionFactory
Get all conditions applicable for a given project
```
--------------------------------
### Get Approvals by Query
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/index-all
Retrieves a paginated list of Approvals based on a provided ApprovalQuery. This method is available in the ApprovalService interface and requires an ApplicationUser context.
```java
getApprovals(ApplicationUser, ApprovalQuery) - Method in interface com.atlassian.servicedesk.api.approval.ApprovalService
Retrieve a page of `Approval` of a particular `ApprovalQuery`
```
--------------------------------
### Get All Hit Conditions for Project
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/index-all
Retrieves all conditions applicable to a given project. This method is part of the TimeMetricConditionFactory interface in the SLA condition SPI.
```java
getAllHitConditions(Project) - Method in interface com.atlassian.servicedesk.spi.sla.condition.TimeMetricConditionFactory
Get all conditions applicable for a given project
```
--------------------------------
### Get Customer Request Create Meta
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/com/atlassian/servicedesk/api/field/RequestTypeFieldService
Retrieves the CustomerRequestCreateMeta, which contains information necessary to create a customer request. The available fields depend on the logged-in user's permissions and the request type's field configuration.
```APIDOC
## GET /rest/servicedeskapi/request/meta
### Description
Retrieve the `CustomerRequestCreateMeta` which can be used to create a `CustomerRequest`. Note that the list of fields eligible is varied by the logging in user's permission and/or the request type's field configuration.
### Method
GET
### Endpoint
/rest/servicedeskapi/request/meta
### Parameters
#### Query Parameters
- **user** (ApplicationUser) - Required - The user executing this request.
- **requestTypeFieldQuery** (RequestTypeFieldQuery) - Required - Query parameter, where `ServiceDesk` and `RequestType` are required.
### Request Example
```json
{
"user": "user_key",
"requestTypeFieldQuery": {
"serviceDeskId": "your_service_desk_id",
"requestTypeId": "your_request_type_id"
}
}
```
### Response
#### Success Response (200)
- **customerRequestMeta** (CustomerRequestCreateMeta) - Contains metadata for creating a customer request.
#### Response Example
```json
{
"customerRequestMeta": {
"fields": [
{
"id": "summary",
"name": "Summary",
"type": "text",
"required": true
},
{
"id": "description",
"name": "Description",
"type": "textarea",
"required": false
}
]
}
}
```
#### Error Response
- **ServiceDeskServiceException** - Thrown on error.
```
--------------------------------
### Get Feedback Details with RequestFeedbackDetailsService
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/index-all
Fetches Request Feedback Details for a given user and issue. This method is conditional on the user being the reporter, the issue being a valid service desk request, and feedback being enabled.
```java
interface com.atlassian.servicedesk.api.feedback.RequestFeedbackDetailsService {
// ...
RequestFeedbackDetails getRequestFeedbackDetails(ApplicationUser user, Issue issue);
// ...
}
```
--------------------------------
### Project Migration and Parameters
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/allclasses-index
Documentation for migrating projects and related parameters, including builder classes.
```APIDOC
## Project Migration and Parameters
### Description
Classes and builders for migrating projects and specifying migration parameters.
### Classes
- **MigrateProjectParameters**
- Builder: `MigrateProjectParameters.Builder`
- Description: Builder to construct the `MigrateProjectParameters`.
- **NoExceptionsCallable**
- Description: Callable replacement that doesn't throw checked Exceptions.
- **NoSuchEntityException**
- Description: A generic exception thrown by Jira Service Management when an Entity required for an operation can't be found.
```
--------------------------------
### Queue Creation and Update Parameters
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/index-all
Methods for setting parameters when creating or updating queues.
```APIDOC
## Queue Parameters API
### Description
Provides methods to set parameters for creating and updating queues, including name, JQL, and order.
### Methods
#### `getName()`
- **Description**: Gets or sets the name of the queue.
- **Interface**: `com.atlassian.servicedesk.api.queue.QueueCreateParameters`, `com.atlassian.servicedesk.api.queue.QueueUpdateParameters`
#### `getJql()`
- **Description**: Gets or sets the JQL query for the queue.
- **Interface**: `com.atlassian.servicedesk.api.queue.QueueCreateParameters`, `com.atlassian.servicedesk.api.queue.QueueUpdateParameters`
#### `getOrder()`
- **Description**: Gets or sets the order of the queue.
- **Interface**: `com.atlassian.servicedesk.api.queue.QueueCreateParameters`
### Request Example (Conceptual)
```json
{
"name": "High Priority Issues",
"jql": "priority = Highest",
"order": 1
}
```
```
--------------------------------
### Build MigrateProjectParameters with Builder - Java
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/com/atlassian/servicedesk/api/project/creation/package-summary
Demonstrates how to use the Builder pattern to construct MigrateProjectParameters objects. This is useful for configuring parameters before migrating a project.
```java
import com.atlassian.servicedesk.api.project.creation.MigrateProjectParameters;
// Example usage of the builder
MigrateProjectParameters params = MigrateProjectParameters.newBuilder()
.withSourceProjectId("project-key-123")
.withTargetProjectTemplate("service-desk-template-key")
.build();
```
--------------------------------
### Customer Request Status
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/index-all
Provides methods to get the status and transition time of a customer request.
```APIDOC
## CustomerRequest.CustomerRequestStatus
### Description
Provides methods to get the status and transition time of a customer request.
### Method
(Not specified, typically accessed via a CustomerRequest object)
### Endpoint
(Not specified)
### Parameters
(Not specified)
### Request Example
(Not applicable for interface)
### Response
#### Success Response (200)
- **status** (String) - Display status of a customer request
- **statusInstant** (DateTime) - Time on which the status transition
### Response Example
(Not specified)
```
--------------------------------
### Get Customer Portal Link URI (Java)
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/com/atlassian/servicedesk/api/feedback/RequestFeedbackToken
Provides the URI for the customer portal where users can access the request feedback form. This method allows direct linking to the feedback mechanism.
```java
public URI getCustomerPortalLink()
```
--------------------------------
### Get Approver Decision
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/index-all
Retrieves the decision made by an Approver. This method is part of the Approver interface.
```java
getApproverDecision() - Method in interface com.atlassian.servicedesk.api.approval.Approver
Get decision of `Approver`
```
--------------------------------
### RequestFeedbackDetails Constructor
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/com/atlassian/servicedesk/api/feedback/RequestFeedbackDetails
Constructs a new RequestFeedbackDetails object with the specified details for requesting feedback on a Jira Service Management issue.
```APIDOC
## Constructor: RequestFeedbackDetails
### Description
Constructs a new RequestFeedbackDetails object.
### Parameters
#### Path Parameters
* None
#### Query Parameters
* None
#### Request Body
* **recipient** (com.atlassian.jira.user.ApplicationUser) - Required - The user who will receive the feedback request.
* **issue** (com.atlassian.jira.issue.Issue) - Required - The Jira issue for which feedback is requested.
* **feedbackQuestion** (String) - Required - The question to be asked when requesting feedback.
* **requestFeedbackToken** (RequestFeedbackToken) - Required - The token details required to submit feedback.
* **feedbackScale** (int) - Required - The scale to be used for providing feedback (e.g., 5 for 4 out of 5).
### Request Example
```json
{
"recipient": "user_object",
"issue": "issue_object",
"feedbackQuestion": "How satisfied were you with our support?",
"requestFeedbackToken": "token_object",
"feedbackScale": 5
}
```
### Response
#### Success Response (200)
* None (This is a constructor)
#### Response Example
* None
```
--------------------------------
### Project and Software Info API
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/overview-tree
This section provides API endpoints for project migration and retrieving public software information.
```APIDOC
## Project and Software Info API
### Description
Endpoints for migrating projects and retrieving public software information.
### Endpoints
#### Project Migration
* `com.atlassian.servicedesk.api.project.creation.MigrateProjectParameters`: Parameters for migrating a project.
* `com.atlassian.servicedesk.api.project.creation.MigrateProjectParameters.Builder`: Builder for `MigrateProjectParameters`.
#### Public Software Information
* `com.atlassian.servicedesk.api.info.PublicSoftwareInfo`: Represents public software information.
```
--------------------------------
### Get Attachments
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/index-all
Retrieves attachments associated with a Service Desk comment. This method is part of the ServiceDeskComment interface.
```java
getAttachments() - Method in interface com.atlassian.servicedesk.api.comment.ServiceDeskComment
```
--------------------------------
### Get Approver User
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/index-all
Retrieves the ApplicationUser associated with an Approver. This method is defined within the Approver interface.
```java
getApproverUser() - Method in interface com.atlassian.servicedesk.api.approval.Approver
Get `ApplicationUser` of `Approver`
```
--------------------------------
### Customer Creation Parameters API
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/index-all
API for setting parameters when creating a customer.
```APIDOC
## Customer Creation Parameters API
### Description
This section defines methods for setting parameters when creating a new customer entity.
### Methods
#### `fullName(String)`
**Description**: Sets the full name for the customer being created.
**Method**: N/A (Builder method)
**Endpoint**: N/A
### Parameters
- **fullName** (String) - Required - The complete name of the customer.
```
--------------------------------
### Construct Jira Service Desk Comment Queries (Java)
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/com/atlassian/servicedesk/api/comment/ServiceDeskCommentQuery
Examples demonstrate building ServiceDeskCommentQuery objects to retrieve comments from a Jira issue. The builder allows filtering for public, internal, or both types of comments.
```java
// Query both public and internal comments (default behavior)
ServiceDeskCommentQuery query = commentService.newQueryBuilder().issue(issue).build();
// Query public comments only
ServiceDeskCommentQuery query = commentService.newQueryBuilder().issue(issue).publicComment(true).internalComment(false).build();
// Query internal comments only
ServiceDeskCommentQuery query = commentService.newQueryBuilder().issue(issue).publicComment(false).internalComment(true).build();
```
--------------------------------
### Get Approval Comment Text
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/index-all
Retrieves the text content of an approval comment. This method is part of the ApprovalComment interface.
```java
getComment() - Method in interface com.atlassian.servicedesk.api.approval.ApprovalComment
```
--------------------------------
### Customer Transition Service
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/com/atlassian/servicedesk/api/request/transition/package-summary
Provides methods for customers to transition their requests. This includes querying available transitions and executing them.
```APIDOC
## Customer Transition Service API
### Description
This service allows customers to transition a `CustomerRequest`. It provides functionality to query available transitions and execute them.
### Method
Not applicable (Service Interface)
### Endpoint
Not applicable (Service Interface)
### Parameters
#### Query Parameters
- **customerTransitionQuery** (`CustomerTransitionQuery`) - Required - Parameters to query available `CustomerTransition` of a `CustomerRequest`.
### Request Example
```json
{
"customerTransitionQuery": {
"request": "request-id"
}
}
```
### Response
#### Success Response (200)
- **customerTransitions** (`List`) - A list of available customer transitions for the request.
#### Response Example
```json
{
"customerTransitions": [
{
"id": "close",
"name": "Close Request",
"description": "Marks the request as closed."
}
]
}
```
## Customer Transition Execution
### Description
This interface defines the information required to execute a customer transition on a `CustomerRequest`.
### Method
Not applicable (Interface)
### Endpoint
Not applicable (Interface)
### Parameters
#### Request Body
- **customerTransitionExecutionParameters** (`CustomerTransitionExecutionParameters`) - Required - The parameters needed to execute the transition.
### Request Example
```json
{
"customerTransitionExecutionParameters": {
"transitionId": "close",
"comment": "Request resolved."
}
}
```
### Response
#### Success Response (200)
- **Transition status** - Indicates whether the transition was successful.
#### Response Example
```json
{
"status": "SUCCESS"
}
```
```
--------------------------------
### Expansion Utility
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/index-all
Utilities for managing expansions, including checking for recursive expansions.
```APIDOC
## POST /rest/servicedeskapi/util/expansion/Expansions/checkRecursiveExpansion
### Description
Checks if a given expansion string is being recursively expanded.
### Method
POST
### Endpoint
/rest/servicedeskapi/util/expansion/Expansions/checkRecursiveExpansion
### Parameters
#### Request Body
- **expansionKey** (string) - Required - The expansion key to check.
### Response
#### Success Response (200)
- **isRecursive** (boolean) - True if the expansion is recursive, false otherwise.
#### Response Example
```json
{
"isRecursive": false
}
```
```
--------------------------------
### CustomerCreateParameters
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/com/atlassian/servicedesk/api/customer/CustomerCreateParameters
Information supplied to `CustomerService.createCustomer` to create a new customer. This includes methods to retrieve the customer's email and full name.
```APIDOC
## CustomerCreateParameters
### Description
Information supplied to `CustomerService.createCustomer` to create a new customer. This interface provides methods to get the customer's email and full name.
### Method
N/A (Interface definition)
### Endpoint
N/A (Interface definition)
### Parameters
#### Path Parameters
None
#### Query Parameters
None
#### Request Body
This interface defines parameters for a request body, but is not a request body itself.
- **email** (String) - Required - The email address of the customer.
- **fullName** (String) - Required - The full name of the customer.
### Request Example
```json
{
"email": "customer@example.com",
"fullName": "John Doe"
}
```
### Response
#### Success Response (200)
N/A (This is a parameter definition, not an endpoint that returns data)
#### Response Example
N/A
```
--------------------------------
### Get Bug Fix Version
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/index-all
Retrieves the version associated with a bug fix. This method is part of the Version interface.
```java
getBugFixVersion() - Method in interface com.atlassian.servicedesk.api.info.Version
```
--------------------------------
### Jira Service Management API Overview
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/com/atlassian/servicedesk/api/package-summary
This section provides an overview of the Jira Service Management API, its purpose, and the key packages available for integration. It also lists common exceptions that may be encountered.
```APIDOC
## Jira Service Management API
### Description
Provides interfaces for integrating with Jira Service Management. These interfaces are public and intended for use by non-Atlassian plugins, with compatibility guarantees between releases.
### Related Packages
* **com.atlassian.servicedesk.api.approval**: Package for managing approvals.
* **com.atlassian.servicedesk.api.comment**: Package for managing comments.
* **com.atlassian.servicedesk.api.customer**: Package for managing customers.
* **com.atlassian.servicedesk.api.event**: Package for handling events.
* **com.atlassian.servicedesk.api.feedback**: Package for feedback management.
* **com.atlassian.servicedesk.api.field**: Package for managing fields.
* **com.atlassian.servicedesk.api.info**: Package for retrieving information.
* **com.atlassian.servicedesk.api.license**: Package for license management.
* **com.atlassian.servicedesk.api.notification**: Package for notification management.
* **com.atlassian.servicedesk.api.organization**: Package for organization management.
* **com.atlassian.servicedesk.api.permission**: Package for permission management.
* **com.atlassian.servicedesk.api.portal**: Package for portal management.
* **com.atlassian.servicedesk.api.queue**: Package for queue management.
* **com.atlassian.servicedesk.api.request**: Package for request management.
* **com.atlassian.servicedesk.api.requesttype**: Package for request type management.
* **com.atlassian.servicedesk.api.user**: Package for user management.
### Common Exceptions
* **AuthorizationException**: The current user is not authorized to perform the action.
* **BadRequestException**: The request to the server is malformed.
* **ServiceDeskServiceException**: Base exception for errors in Jira Service Management. Contains an error key and a translated message.
* **ForbiddenException**: The current user cannot perform the action.
* **NoSuchEntityException**: A required entity for an operation could not be found.
* **ServerException**: A general server-side error occurred.
### Key Interfaces
* **ServiceDesk**: Represents a service project.
* **ServiceDeskManager**: Provides access to `ServiceDesk` objects without permission checks.
* **ServiceDeskService**: Provides access to `ServiceDesk` objects.
```
--------------------------------
### Get SLA Breach Time
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/index-all
Retrieves the breach time for an ongoing SLA cycle. This method is part of the SlaInformationOngoingCycle interface.
```java
getBreachTime() - Method in interface com.atlassian.servicedesk.api.sla.info.SlaInformationOngoingCycle
```
--------------------------------
### Get Avatar URL
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/index-all
Retrieves the URL of an avatar for a request type allowed entity. This method is part of the RequestTypeAllowedEntityDTO interface.
```java
getAvatarUrl() - Method in interface com.atlassian.servicedesk.api.requesttype.RequestTypeAllowedEntityDTO
```
--------------------------------
### Customer Request Transition API
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/index-all
This section details the API for executing customer transitions on customer requests. It allows for programmatic control over request workflows from a customer's perspective.
```APIDOC
## POST /rest/servicedeskapi/1.0/requests/{requestID}/transitions/customer
### Description
Executes a `CustomerTransition` for a `CustomerRequest`. This endpoint allows for the transition of a customer request through its defined workflow, potentially changing its status or triggering associated actions.
### Method
POST
### Endpoint
`/rest/servicedeskapi/1.0/requests/{requestID}/transitions/customer`
### Parameters
#### Path Parameters
- **requestID** (string) - Required - The unique identifier of the customer request to be transitioned.
#### Query Parameters
None
#### Request Body
- **customerTransitionExecutionParameters** (object) - Required - An object containing the parameters necessary to execute the customer transition.
- **transitionName** (string) - Required - The name or key of the customer transition to execute.
- **comment** (string) - Optional - A comment to associate with the transition.
- **attachments** (array of objects) - Optional - A list of attachments to associate with the transition.
- **filename** (string) - Required - The name of the attachment file.
- **content** (string) - Required - The base64 encoded content of the attachment.
### Request Example
```json
{
"transitionName": "Approve Request",
"comment": "Approved by customer."
}
```
### Response
#### Success Response (200)
- **status** (string) - Indicates the success of the transition.
- **message** (string) - A confirmation message.
#### Response Example
```json
{
"status": "SUCCESS",
"message": "Customer transition executed successfully."
}
```
```
--------------------------------
### Get Request Type Allowlist
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/index-all
Retrieves the allowlist of permissions for a specific request type. This method is defined in the RequestTypePermission interface.
```java
getAllowlist() - Method in interface com.atlassian.servicedesk.api.requesttype.RequestTypePermission
Get the allowlist of permissions for this request type.
```
--------------------------------
### Builder Methods
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/index-all
This section details various builder methods used across different Jira Service Management API components for constructing objects and parameters.
```APIDOC
## Builder Methods
### Description
This section outlines various `build()` methods used in the Jira Service Management API for constructing objects and parameters.
### Common Builder Usages
- **Approvals:** `ApprovalQuery.Builder`
- **Comments:** `ServiceDeskCommentCreateParameters.Builder`, `ServiceDeskCommentQuery.Builder`
- **Customers:** `CustomerCreateParameters.Builder`
- **Fields:** `RequestTypeFieldValueImpl.BuilderImpl`, `RequestTypeFieldQuery.Builder`, `RequestTypeFieldValue.Builder`
- **Organizations:** `CreateOrganizationParameters.Builder`, `OrganizationServiceDeskUpdateParameters.Builder`, `OrganizationsQuery.Builder`, `UsersInOrganizationQuery.Builder`, `UsersOrganizationUpdateParameters.Builder`
- **Projects:** `MigrateProjectParameters.Builder`
- **Queues:** `QueueCreateParameters.Builder`, `QueueQuery.Builder`, `QueueRequestQuery.Builder`, `QueueUpdateParameters.Builder`
- **Requests:** `CustomerRequestCreateParameters.Builder`, `CustomerRequestIssueQuery.Builder`, `CustomerRequestQuery.Builder`, `CustomerRequestStatusQuery.Builder`, `CustomerRequestUpdateParameters.Builder`
- **Request Participants:** `RequestParticipantQuery.Builder`, `RequestParticipantUpdateParameters.Builder`
- **Request Transitions:** `CustomerTransitionExecutionParameters.Builder`, `CustomerTransitionQuery.Builder`
- **Request Types:** `CustomerRequestTypeQuery.Builder`, `RequestTypeCreateParameters.Builder`, `RequestTypeDeleteParameters.Builder`, `RequestTypeQuery.Builder`, `RequestTypeUpdateParameters.Builder`
- **SLA:** `SlaInformationQuery.Builder`
- **Util:** `PagedResponseImpl.Builder`
### Specific Builder Examples
- **Customer Request Transitions:** `CustomerTransitionExecutionParameters.Builder` - Build the parameters.
- **Customer Request Types:** `CustomerRequestTypeQuery.Builder` - Build the query.
- **Request Type Query:** `RequestTypeQuery.Builder` - Build the query.
- **SLA Hit Condition History:** `HitConditionHistoryBuilder` - Build a history object.
- **SLA Match Condition History:** `MatchConditionHistoryBuilder` - Build a MatchConditionHistory object.
- **Paged Response:** `PagedResponseImpl.Builder` - Used for building paged responses.
```
--------------------------------
### Customer Request Creation Parameters
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/index-all
Methods for setting parameters when creating customer requests, including the user to create on behalf of.
```APIDOC
## CustomerRequestCreateParameters
### Description
Provides methods to configure parameters for creating customer requests.
### Methods
#### `raiseOnBehalfOf()`
- **Description**: Returns an `Optional` representing the username to create the customer request on behalf of.
- **Method**: Getter
- **Endpoint**: N/A (Java method)
#### `raiseOnBehalfOf(String username)`
- **Description**: Sets the user to create this customer request on behalf of.
- **Method**: Setter
- **Endpoint**: N/A (Java method)
#### `raiseOnBehalfOf(Optional username)`
- **Description**: Sets the user to create this customer request on behalf of.
- **Method**: Setter
- **Endpoint**: N/A (Java method)
```
--------------------------------
### Get Service Desk Comment Text
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/index-all
Retrieves the text content of a Service Desk comment. This method is part of the ServiceDeskComment interface.
```java
getComment() - Method in interface com.atlassian.servicedesk.api.comment.ServiceDeskComment
```
--------------------------------
### Get SLA Change Items
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/index-all
Retrieves all changes made to an issue that caused an SLA event. This method is part of the SLAChangeEvent interface.
```java
getChangeItems() - Method in interface com.atlassian.servicedesk.api.sla.event.SLAChangeEvent
The changes that were made to the issue with the action that caused the event.
```
--------------------------------
### CustomerCreateParameters Builder API
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/com/atlassian/servicedesk/api/customer/CustomerCreateParameters.Builder
This section details the methods available for building customer creation parameters.
```APIDOC
## CustomerCreateParameters Builder API
### Description
This API provides methods to build `CustomerCreateParameters` objects.
### Method Summary
Instance Methods:
- `email(String email)`: Sets the customer's email address.
- `fullName(String fullName)`: Sets the customer's full name.
- `build()`: Constructs and returns the `CustomerCreateParameters` object.
### Method Details
#### `email(String email)`
##### Description
Sets the customer's email address.
##### Method
`email`
##### Parameters
- **email** (String) - Required - The email address of the customer.
##### Returns
`CustomerCreateParameters.Builder` - The builder instance for chaining.
#### `fullName(String fullName)`
##### Description
Sets the customer's full name.
##### Method
`fullName`
##### Parameters
- **fullName** (String) - Required - The full name of the customer.
##### Returns
`CustomerCreateParameters.Builder` - The builder instance for chaining.
#### `build()`
##### Description
Constructs and returns the `CustomerCreateParameters` object.
##### Method
`build`
##### Returns
`CustomerCreateParameters` - The fully constructed customer creation parameters object.
```
--------------------------------
### Expansions Parser
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/index-all
Static methods for parsing and converting expansion collections into strings.
```APIDOC
## ExpansionsParser
### Description
Provides utility methods for parsing and converting `Expansion` collections.
### Methods
#### asString(Expansion[])
**Description**: Converts a collection of `Expansion`s into a single string.
**Class**: `com.atlassian.servicedesk.api.util.expansion.ExpansionsParser`
**Parameters**:
* **expansions** (Expansion[]) - Required - The collection of expansions to convert.
#### asString(Expansions)
**Description**: Converts an `Expansions` collection into a single string.
**Class**: `com.atlassian.servicedesk.api.util.expansion.ExpansionsParser`
**Parameters**:
* **expansions** (Expansions) - Required - The `Expansions` collection to convert.
```
--------------------------------
### Get Service Desk Comment By Jira Comment
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/com/atlassian/servicedesk/api/comment/ServiceDeskCommentService
Retrieves a service desk comment based on its associated Jira Comment object.
```APIDOC
## POST /rest/servicedeskapi/comment/jiraComment
### Description
Gets a `ServiceDeskComment` from an associated `Comment`. Each `ServiceDeskComment` is associated with exactly one `Comment`.
### Method
POST
### Endpoint
/rest/servicedeskapi/comment/jiraComment
### Parameters
#### Request Body
- **comment** (com.atlassian.jira.issue.comments.Comment) - Required - The JIRA `Comment` object.
### Request Example
```json
{
"comment": {
"id": 456,
"author": {"name": "jira_user"},
"body": "This is a Jira comment.",
"created": "2023-10-27T09:00:00.000+0000"
}
}
```
### Response
#### Success Response (200)
- **ServiceDeskComment** (object) - The `ServiceDeskComment` associated with the given `Comment`.
#### Response Example
```json
{
"id": 123,
"author": {"displayName": "John Doe"},
"body": {"value": "This is a comment.", "representation": "plain"},
"created": "2023-10-27T10:00:00.000+0000",
"updated": "2023-10-27T10:00:00.000+0000",
"public": true
}
```
#### Error Response
- **ServiceDeskServiceException** - Thrown on error.
```
--------------------------------
### Get Organization by ID
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/index-all
Retrieves a customer organization by its ID. Access is restricted to agents or members of the organization. This method is part of the OrganizationService interface.
```java
getById(ApplicationUser, Integer) - Method in interface com.atlassian.servicedesk.api.organization.OrganizationService
Gets customer organization by ID if user is an agent or a member of the organization.
```
--------------------------------
### Project Migration API
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/index-all
API for migrating existing projects to become Jira Service Desk projects.
```APIDOC
## POST /jira/servicedesk/api/project/migrate
### Description
Migrates an existing project to be a Jira Service Desk project.
### Method
POST
### Endpoint
/jira/servicedesk/api/project/migrate
### Parameters
#### Request Body
- **user** (Object) - Required - The user performing the migration.
- **accountId** (String) - Required - The account ID of the user.
- **migrateProjectParameters** (Object) - Required - Parameters for migrating the project.
- **projectId** (String) - Required - The ID of the project to migrate.
- **serviceDeskName** (String) - Optional - The desired name for the new service desk.
- **serviceDeskKey** (String) - Optional - The desired key for the new service desk.
### Request Example
```json
{
"user": {
"accountId": "5b10ac8d82e05b22cc7d4349"
},
"migrateProjectParameters": {
"projectId": "10001",
"serviceDeskName": "New Service Desk",
"serviceDeskKey": "NSD"
}
}
```
### Response
#### Success Response (200)
- **migratedServiceDesk** (Object) - Information about the newly created service desk.
- **id** (String) - The ID of the migrated service desk.
- **key** (String) - The key of the migrated service desk.
- **name** (String) - The name of the migrated service desk.
#### Response Example
```json
{
"migratedServiceDesk": {
"id": "10002",
"key": "NSD",
"name": "New Service Desk"
}
}
```
```
--------------------------------
### License Information
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/index-all
Method for retrieving the service desk license information for an instance.
```APIDOC
## GET /rest/servicedeskapi/license
### Description
Retrieves the `ServiceDeskLicense` for the current instance.
### Method
GET
### Endpoint
`/rest/servicedeskapi/license`
### Parameters
None
### Response
#### Success Response (200)
- **license** (object) - The service desk license details.
- **type** (string) - The type of license.
- **expiryDate** (string) - The license expiry date.
#### Response Example
```json
{
"license": {
"type": "per-user",
"expiryDate": "2024-12-31T23:59:59.000Z"
}
}
```
```
--------------------------------
### Retrieve Service Desk for Project with ServiceDeskService
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/index-all
Returns the ServiceDesk associated with a given Project object. This method requires an ApplicationUser and the Project.
```java
interface com.atlassian.servicedesk.api.ServiceDeskService {
// ...
ServiceDesk getServiceDeskForProject(ApplicationUser user, Project project);
// ...
}
```
--------------------------------
### Get Service Desk Comment by ID with ServiceDeskCommentService
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/index-all
Retrieves a ServiceDeskComment using its unique Long ID. Requires an ApplicationUser and the comment's ID.
```java
interface com.atlassian.servicedesk.api.comment.ServiceDeskCommentService {
// ...
ServiceDeskComment getServiceDeskCommentById(ApplicationUser user, Long commentId);
// ...
}
```
--------------------------------
### User Information
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/index-all
Methods for retrieving user details and checking user permissions.
```APIDOC
## User API
### Description
Provides methods for retrieving user-specific information, such as locale and checking user credentials.
### Methods
#### `getLocale()`
- **Description**: Gets the locale of the `SDUser`.
- **Interface**: `com.atlassian.servicedesk.api.user.SDUser`
#### `getKey()`
- **Description**: Gets the key for a `CheckedUser`.
- **Interface**: `com.atlassian.servicedesk.api.user.CheckedUser`
#### `getName()`
- **Description**: Gets the name of the `CheckedUser`.
- **Interface**: `com.atlassian.servicedesk.api.user.CheckedUser`
### Response Example (Conceptual)
```json
{
"locale": "en_US",
"userKey": "user-123",
"userName": "John Doe"
}
```
```
--------------------------------
### Get Service Desk Comment Event Text
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/index-all
Retrieves the text content of a Service Desk comment event. This method is part of the ServiceDeskCommentEvent interface.
```java
getComment() - Method in interface com.atlassian.servicedesk.api.event.ServiceDeskCommentEvent
```
--------------------------------
### SLA Condition and Metric
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/index-all
Methods for retrieving SLA conditions, metrics, and associated events.
```APIDOC
## SLA Condition and Metric API
### Description
This API provides access to Service Level Agreement (SLA) conditions and time metrics, allowing for detailed configuration and retrieval of SLA-related data.
### Methods
#### `getMatchCondition(String)`
- **Description**: Retrieves an SLA time metric condition by its ID.
- **Interface**: `com.atlassian.servicedesk.spi.sla.condition.TimeMetricConditionFactory`
- **Parameters**:
- **conditionId** (string) - Required - The unique identifier of the condition.
#### `getMatchEvent()`
- **Description**: Gets the SLA match event associated with an entry in the match condition history.
- **Interface**: `com.atlassian.servicedesk.api.sla.condition.MatchConditionHistory.Entry`
#### `getOngoingCycle()`
- **Description**: Retrieves the ongoing SLA cycle information.
- **Interface**: `com.atlassian.servicedesk.api.sla.info.SlaInformation`
#### `getName(I18nHelper)`
- **Description**: Gets the display name of a time metric condition.
- **Interface**: `com.atlassian.servicedesk.spi.sla.condition.TimeMetricCondition`
- **Parameters**:
- **i18nHelper** (I18nHelper) - Required - Helper for internationalization.
#### `getNameHtml(I18nHelper)`
- **Description**: Gets the display name of a time metric condition in HTML format.
- **Interface**: `com.atlassian.servicedesk.spi.sla.condition.TimeMetricHitCondition`, `com.atlassian.servicedesk.spi.sla.condition.TimeMetricMatchCondition`
- **Parameters**:
- **i18nHelper** (I18nHelper) - Required - Helper for internationalization.
#### `getName()` (for SlaInformation and TimeMetric)
- **Description**: Gets the name of the SLA information or time metric.
- **Interface**: `com.atlassian.servicedesk.api.sla.info.SlaInformation`, `com.atlassian.servicedesk.api.sla.metrics.TimeMetric`
### Response Example (Conceptual)
```json
{
"conditionId": "condition-abc",
"conditionName": "Customer Responded",
"matchEvent": {
"eventType": "RESPONDED",
"timestamp": "2023-10-27T10:00:00Z"
},
"ongoingCycle": {
"startTime": "2023-10-27T09:00:00Z",
"goalTime": "2023-10-27T11:00:00Z"
},
"slaName": "First Response Time",
"metricName": "Response Time"
}
```
```
--------------------------------
### Get Checked User
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/index-all
A helper method to wrap the `getCurrentUserByType[CheckedUser]` functionality, providing a checked user object. This method is part of the UserFactory interface.
```java
getCheckedUser() - Method in interface com.atlassian.servicedesk.api.user.UserFactory
Helper method to wrap getCurrentUserByType[CheckedUser].
```
--------------------------------
### Utilities and Paging API
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/overview-tree
Documentation for utility classes and interfaces, particularly those related to pagination.
```APIDOC
## Utilities and Paging API
### Description
Utility classes and interfaces, including mechanisms for handling paginated responses and requests.
### Classes
#### Paging
* `com.atlassian.servicedesk.api.util.paging.PagedResponse`: Represents a paginated response containing a list of items.
* `com.atlassian.servicedesk.api.util.paging.PagedRequest`: Base class for paginated requests.
* `com.atlassian.servicedesk.api.util.paging.LimitedPagedRequest`: A paginated request with a defined limit.
#### Callable Utilities
* `com.atlassian.servicedesk.api.customer.NoExceptionsCallable`: A callable that does not throw exceptions.
```
--------------------------------
### Service Desk Project Details
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/com/atlassian/servicedesk/api/ServiceDesk
Retrieve details about a Service Desk project, including its ID, underlying Jira Project ID, and name.
```APIDOC
## GET /websites/atlassian_jira-servicedesk/project_details
### Description
Retrieves the ID, underlying Jira Project ID, and name of a Service Desk project.
### Method
GET
### Endpoint
/websites/atlassian_jira-servicedesk/project_details
### Parameters
#### Path Parameters
None
#### Query Parameters
None
#### Request Body
None
### Request Example
None
### Response
#### Success Response (200)
- **id** (int) - The ID of the service desk.
- **projectId** (long) - The ID of the underlying Jira's `Project`.
- **projectName** (String) - The name of the underlying Jira's `Project`.
#### Response Example
```json
{
"id": 12345,
"projectId": 67890,
"projectName": "Example Service Desk"
}
```
```
--------------------------------
### CustomerTransitionExecutionParameters Builder
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/index-all
Provides methods to set the transition ID for customer transition execution parameters.
```APIDOC
## CustomerTransitionExecutionParameters.Builder
### Description
Provides methods to set the transition ID for customer transition execution parameters.
### Method
transitionId(Integer transitionId)
### Endpoint
(Not specified)
### Parameters
#### Path Parameters
- **transitionId** (Integer) - Required - Transition Id of the transition to execute.
### Request Example
(Not specified)
### Response
(Not specified)
```
--------------------------------
### Get Creation Date - Java
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/com/atlassian/servicedesk/api/approval/Approval
Retrieves the date when the approval was created. Returns an Instant object.
```java
Instant getCreatedDate()
Creation date of `Approval`
```
--------------------------------
### Get Approval Name - Java
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/com/atlassian/servicedesk/api/approval/Approval
Retrieves the name of the approval. This method is part of the Approval interface.
```java
String getName()
Name of `Approval`
```
--------------------------------
### Portal Information
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/index-all
Methods for retrieving portal and login page details.
```APIDOC
## Portal API
### Description
Provides methods to access information related to the customer portal, including its name and login page elements.
### Methods
#### `getName()`
- **Description**: Gets the name of the `Portal`.
- **Interface**: `com.atlassian.servicedesk.api.portal.Portal`
#### `getLogoUrl()`
- **Description**: Returns the global logo image relative URL for the portal login page.
- **Class**: `com.atlassian.servicedesk.api.portal.login.PortalLoginPageDataContext`
### Response Example (Conceptual)
```json
{
"portalName": "IT Support Portal",
"logoUrl": "/images/logo.png"
}
```
```
--------------------------------
### ServiceDeskCommentQuery Builder API
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/com/atlassian/servicedesk/api/comment/ServiceDeskCommentQuery.Builder
This section details the methods available for building a ServiceDeskCommentQuery. The builder allows setting the issue, pagination, and visibility of comments.
```APIDOC
## ServiceDeskCommentQuery Builder API
### Description
Provides methods to construct a `ServiceDeskCommentQuery` object. You can set the issue, pagination, and specify whether comments should be public or internal.
### Methods
- `issue(com.atlassian.jira.issue.Issue issue)`: Sets the issue for the comment query.
- `pagedRequest(PagedRequest pagedRequest)`: Sets the pagination for the comment query.
- `publicComment(Boolean publicComment)`: Sets whether to include public comments. Defaults to true if not provided.
- `internalComment(Boolean internalComment)`: Sets whether to include internal comments. Defaults to true if not provided.
- `build()`: Constructs and returns the `ServiceDeskCommentQuery` object.
```
--------------------------------
### Get Attachment Content
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/index-all
Provides a basic representation of the actual content of an email attachment. This method is part of the Attachment interface within the email attachment SPI.
```java
getAttachmentContent() - Method in interface com.atlassian.servicedesk.spi.email.attachment.ServiceDeskEmailAttachmentMatcher.Attachment
A basic representation of the actual attachment content.
```
--------------------------------
### Get Approvers for Approval
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/index-all
Returns a list of Approver objects associated with a given Approval. This method requires an ApplicationUser and the Approval object, and is part of the ApprovalService interface.
```java
getApprovers(ApplicationUser, Approval) - Method in interface com.atlassian.servicedesk.api.approval.ApprovalService
Return a list of `Approver` for a given `approval`
```
--------------------------------
### Get Approval Condition
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/index-all
Retrieves the condition object associated with an approval. This object encapsulates the type and level of accomplishment for the condition. This method is part of the Approval interface.
```java
getApprovalCondition() - Method in interface com.atlassian.servicedesk.api.approval.Approval
Gets condition object which encapsulate type of condition and level of accomplishment
```
--------------------------------
### Create Customer Request
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/com/atlassian/servicedesk/api/request/package-summary
Allows the creation of a new customer request in a service project.
```APIDOC
## POST /rest/servicedeskapi/request
### Description
Creates a new customer request within a Jira Service Desk project.
### Method
POST
### Endpoint
/rest/servicedeskapi/request
### Parameters
#### Query Parameters
- **issueTypeId** (string) - Required - The ID of the issue type for the request.
- **requestTypeId** (string) - Required - The ID of the request type.
#### Request Body
- **fields** (object) - Required - A map of field IDs to their values for the request.
- **summary** (string) - Required - The summary of the customer request.
- **description** (object) - Optional - The description of the customer request.
- **plain** (string) - The plain text description.
- **rich** (string) - The rich text description.
- **reporter** (object) - Optional - Information about the reporter.
- **accountId** (string) - The account ID of the reporter.
- **attachments** (array) - Optional - A list of attachments for the request.
- **name** (string) - The name of the attachment.
- **mediaType** (string) - The media type of the attachment.
- **data** (string) - Base64 encoded content of the attachment.
### Request Example
```json
{
"fields": {
"summary": "Need assistance with my account",
"description": {
"plain": "My account is locked and I cannot log in."
},
"reporter": {
"accountId": "5f9b3f0c4a1b2c3d4e5f6a7b"
}
}
}
```
### Response
#### Success Response (201)
- **issueId** (string) - The ID of the newly created issue.
- **issueKey** (string) - The key of the newly created issue.
- **self** (string) - The URL of the created request.
#### Response Example
```json
{
"issueId": "10001",
"issueKey": "CSD-123",
"self": "https://your-domain.atlassian.net/rest/servicedeskapi/request/10001"
}
```
```
--------------------------------
### Get Status ID - Java
Source: https://docs.atlassian.com/jira-servicedesk/11.3.1/com/atlassian/servicedesk/api/approval/Approval
Retrieves the workflow status ID associated with the approval. Returns a String.
```java
String getStatusId()
The workflow status Id associated with `Approval`
```