Skip to content

Commit

Permalink
Added deleteOrg function
Browse files Browse the repository at this point in the history
  • Loading branch information
ake committed Jan 19, 2024
1 parent 77636cd commit 09b6e89
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/jira.js
Original file line number Diff line number Diff line change
Expand Up @@ -2112,7 +2112,7 @@ export default class JiraApi {

/** Get Organizations
* [Jira Doc](https://docs.atlassian.com/jira-servicedesk/REST/3.15.1/#servicedeskapi/organization-getOrganizations)
* @name getOrganization
* @name getOrganizations
* @function
* @param {number} [start=0] - The starting index of the returned versions. Base index: 0.
* @param {number} [limit=50] - The maximum number of versions to return per page.
Expand Down Expand Up @@ -2148,6 +2148,23 @@ export default class JiraApi {
}));
}

/** Delete Organization
* [Jira Doc](https://docs.atlassian.com/jira-servicedesk/REST/3.15.1/#servicedeskapi/organization-deleteOrganization)
* @name deleteOrganization
* @function
* @param {string} organizationId - The organization indentifier.
*/
deleteOrganization(organizationId) {
return this.doRequest(this.makeRequestHeader(this.makeServiceDeskUri({
pathname: `/organization/${organizationId}`,
}), {
method: 'DELETE',
headers: {
'X-ExperimentalApi': 'opt-in',
},
}));
}

/** Get Users in an Organization
* [Jira Doc](https://docs.atlassian.com/jira-servicedesk/REST/3.15.1/#servicedeskapi/organization-getUsersInOrganization)
* @name getUsersInOrganization
Expand Down

0 comments on commit 09b6e89

Please sign in to comment.