Skip to content

Latest commit

 

History

History
150 lines (106 loc) · 7.7 KB

README.md

File metadata and controls

150 lines (106 loc) · 7.7 KB

Logflush

(logflush)

Available Operations

createLogFlushForInterval

Flushes all logs for a given interval

Example Usage

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();

Parameters

Parameter Type Required Description
request operations.CreateLogFlushForIntervalRequest ✔️ The request object to use for the request.
config AxiosRequestConfig Available config options for making requests.

Response

Promise<operations.CreateLogFlushForIntervalResponse>

Errors

Error Object Status Code Content Type
errors.SDKError 4xx-5xx /

createLogFlushWithIdAndInterval

Flushes a single log for a given interval

Example Usage

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();

Parameters

Parameter Type Required Description
request operations.CreateLogFlushWithIdAndIntervalRequest ✔️ The request object to use for the request.
config AxiosRequestConfig Available config options for making requests.

Response

Promise<operations.CreateLogFlushWithIdAndIntervalResponse>

Errors

Error Object Status Code Content Type
errors.SDKError 4xx-5xx /

logFlush

Flushes a log specified in an XML file

Example Usage

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();

Parameters

Parameter Type Required Description
request Uint8Array ✔️ The request object to use for the request.
config AxiosRequestConfig Available config options for making requests.

Response

Promise<operations.LogFlushResponse>

Errors

Error Object Status Code Content Type
errors.SDKError 4xx-5xx /