Skip to main content
GET
/
relay
/
v1
/
policies
/
{policyId}
/
history
Get version history for a policy
curl --request GET \
  --url https://api.swarmd.ai/relay/v1/policies/{policyId}/history \
  --header 'Authorization: Bearer <token>'
{
  "totalPages": 123,
  "totalElements": 123,
  "numberOfElements": 123,
  "first": true,
  "last": true,
  "pageable": {
    "pageNumber": 123,
    "paged": true,
    "unpaged": true,
    "pageSize": 123,
    "offset": 123,
    "sort": {
      "unsorted": true,
      "sorted": true,
      "empty": true
    }
  },
  "size": 123,
  "content": [
    {
      "policyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "version": "<string>",
      "name": "<string>",
      "description": "<string>",
      "config": {
        "enabledLegs": {
          "requestFromSource": true,
          "requestToSink": true,
          "responseFromSink": true,
          "responseToSource": true
        },
        "entity": {
          "type": "BANK_ACCOUNT_NUMBER",
          "scoreThreshold": 0.5,
          "action": "LOG"
        },
        "type": "COMMUNICATION_AUDIT"
      },
      "disabled": true,
      "createdBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "validFrom": "2023-11-07T05:31:56Z",
      "validTo": "2023-11-07T05:31:56Z",
      "createdAt": "2023-11-07T05:31:56Z",
      "changes": {
        "name": {
          "previousValue": "<string>",
          "currentValue": "<string>"
        },
        "description": {
          "previousValue": "<string>",
          "currentValue": "<string>"
        },
        "config": {
          "previousValue": {
            "enabledLegs": {
              "requestFromSource": true,
              "requestToSink": true,
              "responseFromSink": true,
              "responseToSource": true
            },
            "entity": {
              "type": "BANK_ACCOUNT_NUMBER",
              "scoreThreshold": 0.5,
              "action": "LOG"
            },
            "type": "COMMUNICATION_AUDIT"
          },
          "currentValue": {
            "enabledLegs": {
              "requestFromSource": true,
              "requestToSink": true,
              "responseFromSink": true,
              "responseToSource": true
            },
            "entity": {
              "type": "BANK_ACCOUNT_NUMBER",
              "scoreThreshold": 0.5,
              "action": "LOG"
            },
            "type": "COMMUNICATION_AUDIT"
          }
        },
        "validFrom": {
          "previousValue": "2023-11-07T05:31:56Z",
          "currentValue": "2023-11-07T05:31:56Z"
        },
        "validTo": {
          "previousValue": "2023-11-07T05:31:56Z",
          "currentValue": "2023-11-07T05:31:56Z"
        }
      }
    }
  ],
  "number": 123,
  "sort": {
    "unsorted": true,
    "sorted": true,
    "empty": true
  },
  "empty": true
}

Authorizations

Authorization
string
header
required

JWT token (USER, AGENT, or SERVICE auth)

Path Parameters

policyId
string<uuid>
required

Query Parameters

pageable
object
required

Response

200 - application/json

OK

totalPages
integer<int32>
totalElements
integer<int64>
numberOfElements
integer<int32>
first
boolean
last
boolean
pageable
object
size
integer<int32>
content
object[]
number
integer<int32>
sort
object
empty
boolean