//native
type Miro = {
token: string;
};
/**
* Get case
* Retrieves information about a case in an organization.Required scope organization:cases:management Rate limiting Level 3 Enterprise Guard only This API is available only for Enterprise plan users with the Enterprise Guard add-on. You can only use this endpoint if you have both the Company Admin and eDiscovery Admin roles.
*/
export async function main(auth: Miro, org_id: string, case_id: string) {
const url = new URL(
`https://api.miro.com//v2/orgs/${org_id}/cases/${case_id}`,
);
const response = await fetch(url, {
method: "GET",
headers: {
Authorization: "Bearer " + auth.token,
},
body: undefined,
});
if (!response.ok) {
const text = await response.text();
throw new Error(`${response.status} ${text}`);
}
return await response.json();
}
Submitted by hugo697 235 days ago