get_latest_user_agreement

ManagementApi.get_latest_user_agreement(role_id=None, projection_expression=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)

Get the latest user agreement

Returns the user agreement with the highest Version (unix epoch string, sorted descending) plus an S3PresignedUrl for the markdown file (expires in 3600 seconds). The handler does not check system-settings.view. A missing role_id does not return AUTH-1001; it is stored as N/A on the audit log. If no agreements exist, Default_User_Agreement is created (CreatedBy System) and returned. Not paginated.

Parameters:
  • role_id (str) – Amorphic role ID. Used for audit only on this path. The handler does not check permissions. Missing role_id is stored as N/A and the request still proceeds.

  • projection_expression (str) – Comma-separated field names, not trimmed. Omit this query. A non-empty value is applied with the list projection helper to a single object, then S3Path is read to build S3PresignedUrl, which returns RTE-1001. On success without this query, S3PresignedUrl is always added after the stored fields.

  • _request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

  • _content_type (str, Optional) – force content-type for the request.

  • _headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.

  • _host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.

Return type:

GetLatestUserAgreementResponse

Returns:

Returns the result object.

Request and Response Examples

HTTP: GET /user-agreements/latest-version

Success (HTTP 200)

Latest agreement metadata and S3PresignedUrl. When the store was empty, this is the newly created default agreement.

Latest agreement

{
  "AgreementName": "Default_User_Agreement",
  "Description": "Default Agreement",
  "Version": "1548975106",
  "S3Path": "s3://example-misc/user-agreements/1548975106.md",
  "S3PresignedUrl": "https://example-misc.s3.amazonaws.com/user-agreements/1548975106.md?X-Amz-Expires=3600",
  "CreatedBy": "System",
  "CreationTime": "2026-08-01 00:30:12"
}

Errors

Documented error codes: IPV-1002, AUTH-1030, RTE-1001, EMF-1001.

HTTP 400

IPV-1002 if the chosen Version is missing when the item is loaded. AUTH-1030 is not returned on this path.

Version not found

{
  "Message": "IPV-1002 - Invalid UserAgreementVersionId - 1548975106, resource not found."
}

HTTP 500

Uncaught Exception formatted as RTE-1001 via EMF-1001, including a non-empty projectionExpression, default-file read failure, or presigned URL failure.

Uncaught Exception

{
  "Message": "RTE-1001 - 'S3Path'."
}