(logflush)
- createLogFlushForInterval - Flushes all logs for a given interval
- createLogFlushWithIdAndInterval - Flushes a single log for a given interval
- logFlush - Flushes a log specified in an XML file
Flushes all logs for a given interval
import { Jamf } from "jamf-classic-sdk-nodejs";
import { Log } from "jamf-classic-sdk-nodejs/dist/sdk/models/operations";
async function run() {
const sdk = new Jamf({
security: {
password: "<YOUR_PASSWORD_HERE>",
username: "<YOUR_USERNAME_HERE>",
},
});
const res = await sdk.logflush.createLogFlushForInterval({
interval: "<value>",
log: Log.Policy,
});
if (res.statusCode == 200) {
// handle response
}
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.CreateLogFlushForIntervalRequest | ✔️ | The request object to use for the request. |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.CreateLogFlushForIntervalResponse>
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |
Flushes a single log for a given interval
import { Jamf } from "jamf-classic-sdk-nodejs";
import { PathParamLog } from "jamf-classic-sdk-nodejs/dist/sdk/models/operations";
async function run() {
const sdk = new Jamf({
security: {
password: "<YOUR_PASSWORD_HERE>",
username: "<YOUR_USERNAME_HERE>",
},
});
const res = await sdk.logflush.createLogFlushWithIdAndInterval({
id: "<id>",
interval: "<value>",
log: PathParamLog.Policy,
});
if (res.statusCode == 200) {
// handle response
}
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
operations.CreateLogFlushWithIdAndIntervalRequest | ✔️ | The request object to use for the request. |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.CreateLogFlushWithIdAndIntervalResponse>
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |
Flushes a log specified in an XML file
import { Jamf } from "jamf-classic-sdk-nodejs";
import { Interval, Log } from "jamf-classic-sdk-nodejs/dist/sdk/models/shared";
async function run() {
const sdk = new Jamf({
security: {
password: "<YOUR_PASSWORD_HERE>",
username: "<YOUR_USERNAME_HERE>",
},
});
const res = await sdk.logflush.logFlush(new TextEncoder().encode("0x3bDEA554dC"));
if (res.statusCode == 200) {
// handle response
}
}
run();
Parameter | Type | Required | Description |
---|---|---|---|
request |
Uint8Array | ✔️ | The request object to use for the request. |
config |
AxiosRequestConfig | ➖ | Available config options for making requests. |
Promise<operations.LogFlushResponse>
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |