Copy const query = 'query GetIssuePrioritization($getIssuesInput: IssuesInput) { getIssuePrioritization(getIssuesInput: $getIssuesInput) { originalSeverity { label count } oxPrioritization { label count } oxAggregation { label count } slaOverdue { label count } } }';
fetch("https://api.cloud.ox.security/api/apollo-gateway", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "YOUR_API_TOKEN"
},
body: JSON.stringify({
query: query,
// This is an example input showing all available input fields. Only fields marked as required in the schema are mandatory.
variables: {
getIssuesInput: {
scanID: "",
limit: 100,
page: 1,
search: [
{
fieldName: "example",
value: ["example"]
}
],
offset: 0,
sort: {
fields: ["Category"],
order: ["ASC"]
},
owners: ["example"],
tagIds: ["example"],
inventoryFilters: ["New"],
dateRange: {
from: 1749000000000,
to: 1749900000000
},
limitAggItems: 42,
offsetAggItems: 42,
ignoreEnvCheck: true,
exportsOptions: {
flattenAgg: true,
isDemoEnabled: true,
name: "SomeName",
columns: [
{
key: "Severity",
name: "SomeName"
}
],
rowsLimit: 42
},
issueId: "30966426-oxPolicy_securityCloudScan_100-example",
topOffset: 42,
topLevelSearch: "example",
scrollDirection: "example",
openItems: ["digest"],
conditionalFilters: [
{
condition: "AND",
fieldName: "digest",
values: ["example"],
greaterThan: 13.37,
lessThan: 13.37
}
],
getLatestStableData: true,
cursorValue: "example"
}
}
})
})
.then(response => response.json())
.then(result => console.log(JSON.stringify(result, null, 2)))
.catch(error => console.error('Error:', error));