API requests and response logs.
- getLog - Get Log
- listLogs - List Logs
- listPlatformLogs - List Platform Logs
- listStepLogs - List Step Logs
Get Log
import { StackOne } from "@stackone/stackone-client-ts";
import { QueryParamInclude } from "@stackone/stackone-client-ts/sdk/models/operations";
const stackOne = new StackOne({
security: {
password: "",
username: "",
},
});
async function run() {
const result = await stackOne.requestLogs.getLog({
id: "<id>",
include: QueryParamInclude.StepLogs,
});
console.log(result);
}
run();The standalone function version of this method:
import { StackOneCore } from "@stackone/stackone-client-ts/core.js";
import { requestLogsGetLog } from "@stackone/stackone-client-ts/funcs/requestLogsGetLog.js";
import { QueryParamInclude } from "@stackone/stackone-client-ts/sdk/models/operations";
// Use `StackOneCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const stackOne = new StackOneCore({
security: {
password: "",
username: "",
},
});
async function run() {
const res = await requestLogsGetLog(stackOne, {
id: "<id>",
include: QueryParamInclude.StepLogs,
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("requestLogsGetLog failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.StackoneGetLogRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.StackoneGetLogResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.BadRequestResponse | 400 | application/json |
| errors.UnauthorizedResponse | 401 | application/json |
| errors.ForbiddenResponse | 403 | application/json |
| errors.NotFoundResponse | 404 | application/json |
| errors.RequestTimedOutResponse | 408 | application/json |
| errors.ConflictResponse | 409 | application/json |
| errors.UnprocessableEntityResponse | 422 | application/json |
| errors.TooManyRequestsResponse | 429 | application/json |
| errors.InternalServerErrorResponse | 500 | application/json |
| errors.NotImplementedResponse | 501 | application/json |
| errors.BadGatewayResponse | 502 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
List Logs
import { StackOne } from "@stackone/stackone-client-ts";
import {
OrderBy,
OrderDirection,
QueryParamOrderBy,
QueryParamOrderDirection,
StackoneListLogsQueryParamInclude,
} from "@stackone/stackone-client-ts/sdk/models/operations";
const stackOne = new StackOne({
security: {
password: "",
username: "",
},
});
async function run() {
const result = await stackOne.requestLogs.listLogs({
filter: {
accountIds: "45355976281015164504,45355976281015164505",
actions: "download,upload",
childResources: "documents,time-off",
endDate: new Date("2020-01-01T00:00:00.000Z"),
httpMethods: "GET,POST",
orderBy: QueryParamOrderBy.Service,
orderDirection: QueryParamOrderDirection.Asc,
providers: "ashby,greenhouse",
requestIds: "adbf752f-6457-4ddd-89b3-98ae2252b83b,adbf752f-6457-4ddd-89b3-98ae2252b83c",
resources: "employees,users",
services: "hris,ats",
sourceTypes: "DASHBOARD,SYNTHETIC_WEBHOOK",
startDate: new Date("2020-01-01T00:00:00.000Z"),
statusCodes: "200,400",
subResources: "documents,employees",
success: true,
},
include: StackoneListLogsQueryParamInclude.StepLogs,
orderBy: OrderBy.Duration,
orderDirection: OrderDirection.Asc,
});
console.log(result);
}
run();The standalone function version of this method:
import { StackOneCore } from "@stackone/stackone-client-ts/core.js";
import { requestLogsListLogs } from "@stackone/stackone-client-ts/funcs/requestLogsListLogs.js";
import {
OrderBy,
OrderDirection,
QueryParamOrderBy,
QueryParamOrderDirection,
StackoneListLogsQueryParamInclude,
} from "@stackone/stackone-client-ts/sdk/models/operations";
// Use `StackOneCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const stackOne = new StackOneCore({
security: {
password: "",
username: "",
},
});
async function run() {
const res = await requestLogsListLogs(stackOne, {
filter: {
accountIds: "45355976281015164504,45355976281015164505",
actions: "download,upload",
childResources: "documents,time-off",
endDate: new Date("2020-01-01T00:00:00.000Z"),
httpMethods: "GET,POST",
orderBy: QueryParamOrderBy.Service,
orderDirection: QueryParamOrderDirection.Asc,
providers: "ashby,greenhouse",
requestIds: "adbf752f-6457-4ddd-89b3-98ae2252b83b,adbf752f-6457-4ddd-89b3-98ae2252b83c",
resources: "employees,users",
services: "hris,ats",
sourceTypes: "DASHBOARD,SYNTHETIC_WEBHOOK",
startDate: new Date("2020-01-01T00:00:00.000Z"),
statusCodes: "200,400",
subResources: "documents,employees",
success: true,
},
include: StackoneListLogsQueryParamInclude.StepLogs,
orderBy: OrderBy.Duration,
orderDirection: OrderDirection.Asc,
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("requestLogsListLogs failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.StackoneListLogsRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.StackoneListLogsResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.BadRequestResponse | 400 | application/json |
| errors.UnauthorizedResponse | 401 | application/json |
| errors.ForbiddenResponse | 403 | application/json |
| errors.NotFoundResponse | 404 | application/json |
| errors.RequestTimedOutResponse | 408 | application/json |
| errors.ConflictResponse | 409 | application/json |
| errors.UnprocessableEntityResponse | 422 | application/json |
| errors.TooManyRequestsResponse | 429 | application/json |
| errors.InternalServerErrorResponse | 500 | application/json |
| errors.NotImplementedResponse | 501 | application/json |
| errors.BadGatewayResponse | 502 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
List Platform Logs
import { StackOne } from "@stackone/stackone-client-ts";
import {
StackoneListPlatformLogsQueryParamOrderBy,
StackoneListPlatformLogsQueryParamOrderDirection,
StackoneListPlatformLogsQueryParamRequestLogsOrderBy,
StackoneListPlatformLogsQueryParamRequestLogsOrderDirection,
} from "@stackone/stackone-client-ts/sdk/models/operations";
const stackOne = new StackOne({
security: {
password: "",
username: "",
},
});
async function run() {
const result = await stackOne.requestLogs.listPlatformLogs({
filter: {
accountIds: "45355976281015164504,45355976281015164505",
actions: "download,upload",
categories: "hris,ats",
endDate: new Date("2020-01-01T00:00:00.000Z"),
httpMethods: "GET,POST",
orderBy: StackoneListPlatformLogsQueryParamRequestLogsOrderBy.EventDatetime,
orderDirection: StackoneListPlatformLogsQueryParamRequestLogsOrderDirection.Asc,
requestIds: "adbf752f-6457-4ddd-89b3-98ae2252b83b,adbf752f-6457-4ddd-89b3-98ae2252b83c",
resources: "employees,users",
sourceTypes: "DASHBOARD,SYNTHETIC_WEBHOOK",
startDate: new Date("2020-01-01T00:00:00.000Z"),
statusCodes: "200,400",
success: true,
},
orderBy: StackoneListPlatformLogsQueryParamOrderBy.Duration,
orderDirection: StackoneListPlatformLogsQueryParamOrderDirection.Asc,
});
console.log(result);
}
run();The standalone function version of this method:
import { StackOneCore } from "@stackone/stackone-client-ts/core.js";
import { requestLogsListPlatformLogs } from "@stackone/stackone-client-ts/funcs/requestLogsListPlatformLogs.js";
import {
StackoneListPlatformLogsQueryParamOrderBy,
StackoneListPlatformLogsQueryParamOrderDirection,
StackoneListPlatformLogsQueryParamRequestLogsOrderBy,
StackoneListPlatformLogsQueryParamRequestLogsOrderDirection,
} from "@stackone/stackone-client-ts/sdk/models/operations";
// Use `StackOneCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const stackOne = new StackOneCore({
security: {
password: "",
username: "",
},
});
async function run() {
const res = await requestLogsListPlatformLogs(stackOne, {
filter: {
accountIds: "45355976281015164504,45355976281015164505",
actions: "download,upload",
categories: "hris,ats",
endDate: new Date("2020-01-01T00:00:00.000Z"),
httpMethods: "GET,POST",
orderBy: StackoneListPlatformLogsQueryParamRequestLogsOrderBy.EventDatetime,
orderDirection: StackoneListPlatformLogsQueryParamRequestLogsOrderDirection.Asc,
requestIds: "adbf752f-6457-4ddd-89b3-98ae2252b83b,adbf752f-6457-4ddd-89b3-98ae2252b83c",
resources: "employees,users",
sourceTypes: "DASHBOARD,SYNTHETIC_WEBHOOK",
startDate: new Date("2020-01-01T00:00:00.000Z"),
statusCodes: "200,400",
success: true,
},
orderBy: StackoneListPlatformLogsQueryParamOrderBy.Duration,
orderDirection: StackoneListPlatformLogsQueryParamOrderDirection.Asc,
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("requestLogsListPlatformLogs failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.StackoneListPlatformLogsRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.StackoneListPlatformLogsResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.BadRequestResponse | 400 | application/json |
| errors.UnauthorizedResponse | 401 | application/json |
| errors.ForbiddenResponse | 403 | application/json |
| errors.NotFoundResponse | 404 | application/json |
| errors.RequestTimedOutResponse | 408 | application/json |
| errors.ConflictResponse | 409 | application/json |
| errors.UnprocessableEntityResponse | 422 | application/json |
| errors.TooManyRequestsResponse | 429 | application/json |
| errors.InternalServerErrorResponse | 500 | application/json |
| errors.NotImplementedResponse | 501 | application/json |
| errors.BadGatewayResponse | 502 | application/json |
| errors.SDKError | 4XX, 5XX | */* |
List Step Logs
import { StackOne } from "@stackone/stackone-client-ts";
import {
StackoneListStepLogsQueryParamOrderBy,
StackoneListStepLogsQueryParamOrderDirection,
} from "@stackone/stackone-client-ts/sdk/models/operations";
const stackOne = new StackOne({
security: {
password: "",
username: "",
},
});
async function run() {
const result = await stackOne.requestLogs.listStepLogs({
filter: {
accountIds: "45355976281015164504,45355976281015164505",
actions: "download,upload",
childResources: "documents,time-off",
endDate: new Date("2020-01-01T00:00:00.000Z"),
httpMethods: "GET,POST",
providers: "ashby,greenhouse",
requestIds: "adbf752f-6457-4ddd-89b3-98ae2252b83b,adbf752f-6457-4ddd-89b3-98ae2252b83c",
resources: "employees,users",
services: "hris,ats",
startDate: new Date("2020-01-01T00:00:00.000Z"),
statusCodes: "200,400",
subResources: "documents,employees",
success: true,
},
orderBy: StackoneListStepLogsQueryParamOrderBy.EventDatetime,
orderDirection: StackoneListStepLogsQueryParamOrderDirection.Asc,
});
console.log(result);
}
run();The standalone function version of this method:
import { StackOneCore } from "@stackone/stackone-client-ts/core.js";
import { requestLogsListStepLogs } from "@stackone/stackone-client-ts/funcs/requestLogsListStepLogs.js";
import {
StackoneListStepLogsQueryParamOrderBy,
StackoneListStepLogsQueryParamOrderDirection,
} from "@stackone/stackone-client-ts/sdk/models/operations";
// Use `StackOneCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const stackOne = new StackOneCore({
security: {
password: "",
username: "",
},
});
async function run() {
const res = await requestLogsListStepLogs(stackOne, {
filter: {
accountIds: "45355976281015164504,45355976281015164505",
actions: "download,upload",
childResources: "documents,time-off",
endDate: new Date("2020-01-01T00:00:00.000Z"),
httpMethods: "GET,POST",
providers: "ashby,greenhouse",
requestIds: "adbf752f-6457-4ddd-89b3-98ae2252b83b,adbf752f-6457-4ddd-89b3-98ae2252b83c",
resources: "employees,users",
services: "hris,ats",
startDate: new Date("2020-01-01T00:00:00.000Z"),
statusCodes: "200,400",
subResources: "documents,employees",
success: true,
},
orderBy: StackoneListStepLogsQueryParamOrderBy.EventDatetime,
orderDirection: StackoneListStepLogsQueryParamOrderDirection.Asc,
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("requestLogsListStepLogs failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.StackoneListStepLogsRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.StackoneListStepLogsResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.BadRequestResponse | 400 | application/json |
| errors.UnauthorizedResponse | 401 | application/json |
| errors.ForbiddenResponse | 403 | application/json |
| errors.NotFoundResponse | 404 | application/json |
| errors.RequestTimedOutResponse | 408 | application/json |
| errors.ConflictResponse | 409 | application/json |
| errors.UnprocessableEntityResponse | 422 | application/json |
| errors.TooManyRequestsResponse | 429 | application/json |
| errors.InternalServerErrorResponse | 500 | application/json |
| errors.NotImplementedResponse | 501 | application/json |
| errors.BadGatewayResponse | 502 | application/json |
| errors.SDKError | 4XX, 5XX | */* |