Scripting

Query and scroll through scripting audit log entries for script executions and automation events.

Query scripting audit log entries

Request

Queries the scripting audit log for entries that match the specified filter and paging parameters. The maximum allowed value for the take parameter is 100.

Security
OAuth2
Path
entityIdinteger, (int64)(NullableOfInt64)

The identifier of the entity to filter audit records.

Example:12345
Query
ScriptTypestring(ScriptUseType)

Gets or sets the type of script usage.

Enum:"UserPreRegistration""UserPostRegistration""UserSignIn""MetadataProcessing""ActionScript""Shared""AIResultProcessing""AIInputProcessing"
ScriptNamestring(String)

Gets or sets the name of the script.

Example:ScriptName=MyCustomScript
ScriptContentIdinteger, (int64)(NullableOfInt64)

Gets or sets the content ID of the script.

Example:ScriptContentId=12345
ScriptContentIdentifierstring(String)

Gets or sets the content identifier of the script.

Example:ScriptContentIdentifier=Script-12345
ErrorMessagestring(String)

Gets or sets the error message associated with the script execution.

Example:ErrorMessage=Script execution failed: Invalid parameter
ExecutionSourcestring(Stylelabs.M.Base.Scripting.Audit.ExecutionSource)

Gets or sets the source of script execution.

Enum:"Automatic""Trigger""WebApi""Command""ExternalAction""MassEdit"
Idstring, (uuid)(NullableOfGuid)

The unique identifier of the audit entry.

EventTypestring(EventType)

The type of event to filter audit entries.

Enum:"Created""Updated""Deleted""Enabled""Disabled""Executed""PackageExported""PackageImported"
Severitystring(Severity)

The severity level to filter audit entries.

Enum:"Debug""Warning""Info""Error""Fatal"
TargetIdinteger, (int64)(NullableOfInt64)

The target entity identifier related to the audit entry.

Example:TargetId=12345
TargetIdentifierstring(String)

The string identifier of the target entity.

Example:TargetIdentifier=Asset-12345
Timestampstring, (date-time)(NullableOfDateTime)

The timestamp to filter audit entries.

Example:Timestamp=2025-09-16
UserIdinteger, (int64)(NullableOfInt64)

The user identifier associated with the audit entry.

Example:UserId=67890
ScrollIdstring(String)

The ID of the scroll session to get the next results for.

Example:ScrollId=scroll-session-abc123
ScrollTimestring, (date-span)(NullableOfTimeSpan)

The time to keep the scroll session active.

Example:ScrollTime=00:05:00
FullTextstring(String)

The full-text search term to filter audit records.

Example:FullText=user login
Rawstring(String)

The raw query string for advanced filtering.

EntityIdinteger, (int64)(NullableOfInt64)

The identifier of the entity to filter audit records.

Example:EntityId=12345
Fromstring, (date-time)(NullableOfDateTime)

The start date of the range filter.

Example:From=2025-01-01
Tostring, (date-time)(NullableOfDateTime)

The end date of the range filter.

Example:To=2025-01-31
Skipinteger, (int32)(NullableOfInt32)

The number of items to skip for pagination. Null if negative.

Default:0
Example:Skip=0
Takeinteger, (int32)(NullableOfInt32)

The number of items to take for pagination. Null if negative.

Default:25
Example:Take=25
Sortstring(String)

The field name to sort by.

Example:Sort=timestamp
Orderstring(SortOrder)

The sort order (ascending or descending).

Enum:"ascending""descending"
Ascendingboolean(Boolean)

Whether the sort order is ascending.

Range.Beginstring, (date-time)(DateTime)
Range.Endstring, (date-time)(DateTime)
curl -i -X GET \
  'https://your-server/api/audit/scripting/query/12345?ScriptType=UserPreRegistration&ScriptName=MyCustomScript&ScriptContentId=12345&ScriptContentIdentifier=Script-12345&ErrorMessage=Script%20execution%20failed%3A%20Invalid%20parameter&ExecutionSource=Automatic&Id=497f6eca-6276-4993-bfeb-53cbbbba6f08&EventType=Created&Severity=Debug&TargetId=12345&TargetIdentifier=Asset-12345&Timestamp=2025-09-16&UserId=67890&ScrollId=scroll-session-abc123&ScrollTime=00%3A05%3A00&FullText=user%20login&Raw=string&EntityId=12345&From=2025-01-01&To=2025-01-31&Skip=0&Take=25&Sort=timestamp&Order=ascending&Ascending=true&Range.Begin=2019-08-24T14%3A15%3A22Z&Range.End=2019-08-24T14%3A15%3A22Z' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Successful operation

Bodyapplication/json
itemsArray of objects or null(ListOfScriptingAuditResource)

Gets or sets the list of items.

total_itemsinteger or null, (int64)(NullableOfInt64)

Gets or sets the total number of items.

returned_itemsinteger or null, (int64)(NullableOfInt64)

Gets or sets the number of returned items.

offsetinteger or null, (int32)(NullableOfInt32)

Gets or sets the offset of the items.

nextobject(Link)

Represents a link to a resource.

previousobject(Link)

Represents a link to a resource.

identifierstring or null(String)

Gets or sets the identifier of the resource.

selfobject(Link)

Represents a link to a resource.

property name*any(JToken)additional property
Response
{ "items": [ { … } ], "total_items": 0, "returned_items": 0, "offset": 0, "next": { "href": "string", "filename_properties": [ … ], "title": "string", "templated": false }, "previous": { "href": "string", "filename_properties": [ … ], "title": "string", "templated": false }, "identifier": "string", "self": { "href": "string", "filename_properties": [ … ], "title": "string", "templated": false }, "property1": null, "property2": null }