ApexLog

Represents a debug log.

To retrieve a raw log by ID, use the REST resource: /sobjects/ApexLog/id/Body/. (Available from API version 28.0 or later.)

Supported SOAP Calls

delete(), describeSObjects(), query(), retrieve()

Supported REST HTTP Methods

Query, GET, DELETE

Fields

Field Details
Application
Type
textarea
Properties
Filter, Group, Sort
Description
This value depends on the client type that triggered the log or heap dump.
  • For API clients, this value is the client ID.
  • For browser clients, this value is Browser.

This field is required.

DurationMilliseconds
Type
int
Properties
Filter, Group, Sort
Description
The duration of the transaction in milliseconds. This field is required.
Location
Type
picklist
Properties
Filter, Group, Sort, Nillable, Restricted picklist
Description
Specifies the location of the origin of the log or heap dump. Values are:
  • Monitoring—Generated as part of debug log monitoring, and visible to all administrators. These types of logs are maintained for seven days or until a user deletes them.
  • SystemLog—Generated as part of system log monitoring, and visible only to you. These types of logs are maintained for 24 hours or until the user clears them.
LogLength
Type
int
Properties
Filter, Group, Sort
Description
Length of the log or heap dump in bytes. This field is required.
LogUserId
Type
reference
Properties
Filter, Group, Sort, Nillable
Description
ID of the user whose actions triggered the debug log or heap dump.
Operation
Type
string
Properties
Filter, Group, Sort
Description
Name of the operation that triggered the debug log or heap dump, such as APEXSOAP, Apex Sharing Recalculation, and so on. This field is required.
Request
Type
string
Properties
Filter, Group, Sort
Description
Request type. Values are:
  • API—Request came from an API.
  • Application—Request came from the Salesforce user interface.

This field is required.

RequestIdentifier
Type
string
Properties
Filter, Group, Sort
Description
The unique identifier of the request that triggered the debug log. Use this request identifier to correlate multiple debug logs triggered by the same request.
StartTime
Type
dateTime
Properties
Filter, Sort
Description
Start time of the transaction. This field is required.
Status
Type
string
Properties
Filter, Group, Sort
Description
Status of the transaction. This value is either Success, or the text of an unhandled Apex exception. This field is required.