...
Go to the External Share for Jira admin panel and click on the API Keys tab. This will send you to a screen with all previously generated keys.
Click on Create new API key. API key creation popup will appear.
Setup your API key and copy or download it. The template has the following fields:
Key Name - provide your name for the API key, up to 40 characters long.
Key Value - non-modifable field, shows the value of the key.
Reveal - reveals the key. This is NOT one time operation - you can reveal the key at any time.
Download - downloads the key to the selected location.
Get Shares - determines whether get operation is allowed for the key.
List Shares - determines whether list operation is allowed for the key.
Create Shares - determines whether create operation is allowed for the key.
Delete Shares - determines whether delete operation is allowed for the key.
Not valid before - set the start date for key validity.
Not valid after - set the invalidation date for the key.
Allowed IPs - set IPs or IP range that can use the key.
Description - description of the key. Maximum 4000 characters.
Creation Time - non-modifable field, the time when the key was created.
Last Modification Time - non-modifable field, the time when the key was last modified.
Last Usage Time - non-modifable field, the time when the key was last used.
Usage Count - non-modifable field, counter that shows how many times the key was used.
...
Code Block |
---|
Authorization: 'Bearer { KEY_VALUE }' Content-Type: 'application/json' |
With the headers set, you can now perform operations selected from among the following operations: GET, LIST, CREATE, and DELETE.
GET OPERATION
This operation allows you to retrieve a single share based on share uuid. This operation does not accept any additional options and returns JSON with Share data.
...
You may also pass additional fields:
Parameter Name | Description | Default | ||
---|---|---|---|---|
password | Sets password for share. | null | ||
expiration | Expiration timestamp in epoch miliseconds. | null | ||
showComments | All existing comments will be visible on the shared link. | true | ||
allowAddComment | Anyone with access to the link can add comments. | false | ||
showInternalComments | Anyone with access to the link can view internal comments. | false | ||
allowAddInternalComment | Anyone with access to the link can addinternal comments. | false | ||
showAttachments | All existing attachments will be visible on the shared link. | true | ||
allowAddAttachment | Anyone with access to the link can add attachments. | false | ||
allowAddPublicAttachment | Anyone with access to the link can create a public comment with an attachment. | false | ||
showSubtasks | Information about subtasks will be visible on the link. | true | ||
showLinkedIssues | Information about linked issues will be visible on the link. | true | ||
shareSubtasksContent | Information about subtasks will be visible on the link as per share settings. | false | ||
shareLinkedIssuesContent | Information about linked issues will be visible on the link as per share settings. | false | ||
allowWorkflowTransition | Anyone with access to the link can change its status. | false | ||
showWorklog | Anyone with access to the link can see the worklog. | false | ||
showChangelog | Anyone with access to the link can see history items from the changelog. | false | ||
customFields | An array of objects with Custom Field ids that will be available on the link. Example: [{"id":"10020"}, {"id":"10021"}] Refer to the Jira API documentation to retrieve Custom Fields ids: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-fields/ | null | ||
selectedUsersConfig | Pass this object to define list of users that can access the share. You can pass the following fields in this configuration:
| null | ||
expirationExpression | object with | null | ||
jql | generated: |
| ||
board |
| null |
DELETE OPERATION
This operation allows you to delete a single share based on its share uuid. It does not accept any additional options. Upon successful execution, it returns no content (HTTP 204). If an error occurs, a JSON with the error message will be provided.
Example Call:
Code Block |
---|
DELETE https://jira.external-share.com/webapi/share/{ SHARE_UUID } |
Expiration Expression
Expiration Expression field |
|
|
---|---|---|
unit | NANOS | 1,000,000,000th part of the second unit |
| MICROS | 1,000,000th part of the second unit |
| MILLIS | 1000th part of the second unit |
| SECONDS | it is equal to the second in the SI system of units |
| MINUTES | it is equal to 60 seconds |
| HOURS | it is equal to 60 minutes |
| HALF_DAYS | it is equal to 12 hours |
| DAYS | it is equal to 24 Hours |
| WEEKS | it is equal to 7 days |
| MONTHS | estimated duration of a month is one twelfth of 365.2425 Days |
| YEARS | estimated duration of a year is 365.2425 Day |
| DECADES | it is equal to 10 years |
| CENTURIES | it is equal to 100 years |
| MILLENNIA | it is equal to 1000 years |
amount | whole number |
|
Example Call:
Code Block | ||
---|---|---|
| ||
POST https://jira.external-share.com/webapi/share { "issueId": "10001", "type": "ISSUE", "expiration": 1649700933954, "customFields": [{"id":"10020"}, {"id":"10021"}], "selectedUsersConfig": { "allowed": true, "allowedNotification": false, "list": [{"email": "expl@expl2.com"}, {"email": "expl@expl.com"}] } } |
...