circle-info
Squadcast is now SolarWinds Incident Response

AuditLogs

Overview

Available Operations

  • list - List all Audit Logs

  • export - Initiate an asynchronous export of audit logs based on the provided filters. The export file will be generated and available for download. Use 'Get details of Audit Logs export history by ID' API to retrieve the download URL.

  • list_export_history - List all Audit Logs export history

  • get_export_history_by_id - Get details of Audit Logs export history by ID

  • get_by_id - Get audit log by ID

list

List all Audit Logs Returns array of audit logs for given team and filters

Example Usage

from datetime import date
from squadcast_sdk import SquadcastSDK


with SquadcastSDK(
    bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as ss_client:

    res = ss_client.audit_logs.list(page_size=832442, page_number=555332, start_date=date.fromisoformat("2023-03-04"), end_date=date.fromisoformat("2024-08-07"))

    while res is not None:
        # Handle items

        res = res.next()

Parameters

Parameter
Type
Required
Description

page_size

int

✔️

N/A

page_number

int

✔️

N/A

start_date

✔️

N/A

end_date

✔️

N/A

action

List[str]

N/A

resource

List[str]

N/A

actor

List[str]

N/A

team

List[str]

N/A

client

N/A

retries

Configuration to override the default retry behavior of the client.

Response

models.AuditLogsListAuditLogsResponse

Errors

Error Type
Status Code
Content Type

errors.BadRequestError

400

application/json

errors.UnauthorizedError

401

application/json

errors.PaymentRequiredError

402

application/json

errors.ForbiddenError

403

application/json

errors.NotFoundError

404

application/json

errors.ConflictError

409

application/json

errors.UnprocessableEntityError

422

application/json

errors.InternalServerError

500

application/json

errors.BadGatewayError

502

application/json

errors.ServiceUnavailableError

503

application/json

errors.GatewayTimeoutError

504

application/json

errors.SDKDefaultError

4XX, 5XX

*/*

export

Export Audit logs Initiates export of audit logs based on provided filters

Example Usage

Parameters

Parameter
Type
Required
Description

filters

✔️

N/A

name

str

✔️

N/A

export_type

✔️

N/A

description

Optional[str]

N/A

retries

Configuration to override the default retry behavior of the client.

Response

models.V3AuditLogsExportAuditLogsResponse

Errors

Error Type
Status Code
Content Type

errors.BadRequestError

400

application/json

errors.UnauthorizedError

401

application/json

errors.PaymentRequiredError

402

application/json

errors.ForbiddenError

403

application/json

errors.NotFoundError

404

application/json

errors.ConflictError

409

application/json

errors.UnprocessableEntityError

422

application/json

errors.InternalServerError

500

application/json

errors.BadGatewayError

502

application/json

errors.ServiceUnavailableError

503

application/json

errors.GatewayTimeoutError

504

application/json

errors.SDKDefaultError

4XX, 5XX

*/*

list_export_history

List all Audit Logs export history Returns array of audit logs export history

Example Usage

Parameters

Parameter
Type
Required
Description

page_size

int

✔️

N/A

page_number

int

✔️

N/A

retries

Configuration to override the default retry behavior of the client.

Response

models.AuditLogsListAuditLogsExportHistoryResponse

Errors

Error Type
Status Code
Content Type

errors.BadRequestError

400

application/json

errors.UnauthorizedError

401

application/json

errors.PaymentRequiredError

402

application/json

errors.ForbiddenError

403

application/json

errors.NotFoundError

404

application/json

errors.ConflictError

409

application/json

errors.UnprocessableEntityError

422

application/json

errors.InternalServerError

500

application/json

errors.BadGatewayError

502

application/json

errors.ServiceUnavailableError

503

application/json

errors.GatewayTimeoutError

504

application/json

errors.SDKDefaultError

4XX, 5XX

*/*

get_export_history_by_id

Get details of Audit Logs export history by ID Returns audit log export history details for the specified ID

Example Usage

Parameters

Parameter
Type
Required
Description

id

str

✔️

N/A

retries

Configuration to override the default retry behavior of the client.

Response

models.V3AuditLogsGetAuditLogExportHistoryByIDResponse

Errors

Error Type
Status Code
Content Type

errors.BadRequestError

400

application/json

errors.UnauthorizedError

401

application/json

errors.PaymentRequiredError

402

application/json

errors.ForbiddenError

403

application/json

errors.NotFoundError

404

application/json

errors.ConflictError

409

application/json

errors.UnprocessableEntityError

422

application/json

errors.InternalServerError

500

application/json

errors.BadGatewayError

502

application/json

errors.ServiceUnavailableError

503

application/json

errors.GatewayTimeoutError

504

application/json

errors.SDKDefaultError

4XX, 5XX

*/*

get_by_id

Get audit log by ID Returns audit log details for the specified ID

Example Usage

Parameters

Parameter
Type
Required
Description

id

str

✔️

N/A

retries

Configuration to override the default retry behavior of the client.

Response

models.V3AuditLogsGetAuditLogByIDResponse

Errors

Error Type
Status Code
Content Type

errors.BadRequestError

400

application/json

errors.UnauthorizedError

401

application/json

errors.PaymentRequiredError

402

application/json

errors.ForbiddenError

403

application/json

errors.NotFoundError

404

application/json

errors.ConflictError

409

application/json

errors.UnprocessableEntityError

422

application/json

errors.InternalServerError

500

application/json

errors.BadGatewayError

502

application/json

errors.ServiceUnavailableError

503

application/json

errors.GatewayTimeoutError

504

application/json

errors.SDKDefaultError

4XX, 5XX

*/*

Last updated