Skip to content

Commit

Permalink
Merge pull request #8 from SouthFluff/master
Browse files Browse the repository at this point in the history
Added deleteOrg function
  • Loading branch information
Denislb authored Jan 19, 2024
2 parents 77636cd + 09b6e89 commit f73785e
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 f73785e

Please sign in to comment.