Herald
OpenapiLegal

List both agreement types with their source, current effective version, and version history for the realm.

Admin — requires `inject_identity` + `settings.view` + `has_access_to_realm`. `source` is derived per-type from `has_custom` (Custom when a realm custom version exists, otherwise Default).

GET
/api/legal/admin/{realmId}/agreements

Admin — requires inject_identity + settings.view + has_access_to_realm. source is derived per-type from has_custom (Custom when a realm custom version exists, otherwise Default).

Path Parameters

realmId*string

Realm ID

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/legal/admin/string/agreements"
{  "agreements": [    {      "agreement_type": "terms_of_service",      "current_version": {        "agreement_type": "string",        "effective_at": "2019-08-24T14:15:22Z",        "external_url": "string",        "mode": "full_text",        "summary": "string",        "title": "string",        "version_id": "9e94c502-ca41-4342-a7f7-af96b444512c",        "version_no": 0      },      "history": [        {          "effective_at": "2019-08-24T14:15:22Z",          "external_url": "string",          "mode": "full_text",          "source": "default",          "version_id": "9e94c502-ca41-4342-a7f7-af96b444512c",          "version_label": "string",          "version_no": 0        }      ],      "source": "default"    }  ]}
{  "code": "string",  "details": null,  "message": "string",  "requestId": "string",  "status": 0}
{  "code": "string",  "details": null,  "message": "string",  "requestId": "string",  "status": 0}
{  "code": "string",  "details": null,  "message": "string",  "requestId": "string",  "status": 0}
{  "code": "string",  "details": null,  "message": "string",  "requestId": "string",  "status": 0}