Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added deleteOrg function #8

Merged
merged 1 commit into from
Jan 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading