Table of contents
Forms
Download API definition:
GET https://api.bentley.com/forms/{id}/auditTrailEntries

Retrieves a reverse-chronologically-ordered list of all changes that have been made to this form data instance, including authors, dates, and old vs. new property values.

Permissions

To use this endpoint, the user is required to have the ProjectWise Forms View (Forms_ViewAccess) permission for the project, or for the form's definition if form definition security is specified. (Having any other ProjectWise Forms permission automatically grants the View permission as well.)

Authentication

Requires Authorization header with valid Bearer token for scope forms:read.

For more documentation on authorization and how to get access token visit OAUTH2 Authorization page.

Request parameters

Name
In
Required?
Description
id
template
Yes

The ID of the form data instance for which to retrieve the audit trail.

Request headers

Name
Required?
Description
Authorization
Yes

OAuth access token with scope forms:read

Accept
No

Setting to application/vnd.bentley.itwin-platform.v1+json is recommended.

Response 200 OK

OK

json
{
    "auditTrailEntries": [{
            "id": "cdefMNUYw02hNz19awLcRglMXtJ6wX1Au90K-x30000",
            "changeBy": "Sue User2",
            "changeById": "f4fa6f4f-0000-1111-2222-f4fa6f4fa6f4",
            "changeDateTime": "2020-11-23T17:51:47.3533335Z",
            "action": "Modified",
            "changes": [{
                "property": "Severity",
                "oldValue": "Medium",
                "newValue": "High"
            }]
        },
        {
            "id": "cdefMNUYw02hNz19awLcRszUhyKBA2hFroBiHF70000",
            "changeBy": "Joe User",
            "changeById": "9e399e39-0000-1111-2222-8d8a8d8a8d8a",
            "changeDateTime": "2020-11-23T17:48:48.9505035Z",
            "action": "Opened",
            "changes": [{
                "property": "Closed",
                "oldValue": null,
                "newValue": "False"
            }]
        },
        {
            "id": "cdefMNUYw02hNz19awLcRvLVYgvQ009DsFLTfxs0000",
            "changeBy": "Joe User",
            "changeById": "9e399e39-0000-1111-2222-8d8a8d8a8d8a",
            "changeDateTime": "2020-11-23T17:48:48.9505035Z",
            "action": "Status",
            "changes": [{
                "property": "Status",
                "oldValue": null,
                "newValue": "Open"
            }]
        },
        {
            "id": "cdefMNUYw02hNz19awLcRlgCKHZ7PHZFnGYz4P_0000",
            "changeBy": "Joe User",
            "changeById": "9e399e39-0000-1111-2222-8d8a8d8a8d8a",
            "changeDateTime": "2020-11-23T17:48:48.8254245Z",
            "action": "Assigned",
            "changes": [{
                    "property": "AssignedTo",
                    "oldValue": null,
                    "newValue": "Sue User2"
                },
                {
                    "property": "AssignedToId",
                    "oldValue": null,
                    "newValue": "f4fa6f4f-0000-1111-2222-f4fa6f4fa6f4"
                }
            ]
        },
        {
            "id": "cdefMNUYw02hNz19awLcRkCOCh-gk3ZEhnNzf1A0000",
            "changeBy": "Joe User",
            "changeById": "9e399e39-0000-1111-2222-8d8a8d8a8d8a",
            "changeDateTime": "2020-11-23T17:48:48.7941806Z",
            "action": "Created",
            "changes": []
        }
    ]
}

Response 401 Unauthorized

This response indicates that request lacks valid authentication credentials. Access token might not been provided, issued by the wrong issuer, does not have required scopes or request headers were malformed.

json
{
    "error": {
        "code": "HeaderNotFound",
        "message": "Header Authorization was not found in the request. Access denied."
    }
}

Response 404 Not Found

This response indicates that the specified form data instance does not exist or is inaccessible to the user.

json
{
    "error": {
        "code": "FormDataNotFound",
        "message": "Requested form data is not available.",
        "target": "id"
    }
}

Response 429 Too many requests

This response indicates that the user has sent too many requests in a given amount of time.

json
{
    "error": {
        "code": "TooManyRequests",
        "message": "More requests were received than the subscription rate-limit allows."
    }
}

Response headers

Name
Description
retry-after

The number of requests exceeds the rate-limit for the client subscription.

Audit Trail

TableSchema
Name
Type
Description
auditTrailEntries

Audit Trail Entry (get)

Information about a single occurrence of a change to this form.

TableSchema
Name
Type
Description
id
String

String that uniquely identifies this entry.

changeBy
String

The display name (i.e., given name and surname) of the user who made this change.

changeById
String

The GUID of the user who made this change.

changeDateTime
Date-time

The date and time of this change.

action
String

The type of change that was made to the form. Possible values: 'Created', 'Modified', 'Assigned', 'Status', 'Closed', 'Opened', 'Draft', 'Deleted', 'Undeleted', 'File Attached', 'File Removed', 'Form Raised'

changes
Object[]

The individual property modifications that were made in this changeset.

Error Response

Gives details for an error that occurred while handling the request. Note that clients MUST NOT assume that every failed request will produce an object of this schema, or that all of the properties in the response will be non-null, as the error may have prevented this response from being constructed.

TableSchema
Name
Type
Description
error.code
String

Short string indicating the general category of error that occurred, such as '{Resource}NotFound'.

error.message
String

Longer string explaining to developers why the error occurred.

error.target
String,null

If relevant, this is the name of the property, URL template parameter, or query parameter that caused the error.

Error

Contains error information and an optional array of more specific errors.

TableSchema
Name
Type
Description
code
String

One of a server-defined set of error codes.

message
String

A human-readable representation of the error.

target
String

The target of the error.

details

Optional array of more specific errors.

Error Details

Contains error information.

TableSchema
Name
Type
Description
code
String

One of a server-defined set of error codes.

message
String

A human-readable representation of the error.

target
String

The target of the error.

Error Response

Gives details for an error that occurred while handling the request. Note that clients MUST NOT assume that every failed request will produce an object of this schema, or that all of the properties in the response will be non-null, as the error may have prevented this response from being constructed.

TableSchema
Name
Type
Description
error

Error information.