Destination Status Objects

The FTL server web API represents the operating state of each destination as a JSON object. The API also transmits management commands relating to destinations.

GET persistence/topics

This method retrieves a collection of durable status objects for FTL topics.

Example Request

curl -X GET http://<host>:<port>/api/v1/persistence/topics

Example JSON Representation

Copy
{
 "durables": [
   {
     "name": "dur1",
     "store": "st1",
     "cluster": "RealmPersistenceCluster",
     "matcher": "{\"_ftldest\":\"st1.pub1\"}",
     "template_name": "st1.>",
     "client_id": 0,
     "durable_id": 1,
     "type": "standard-with-prefetch",
     "dynamic": true,
     "message_count": 100,
     "message_size": 110016,
     "unacked_message_count": 100,
     "unacked_message_size": 110016,
     "swap_message_count": 0,
     "swap_message_size": 0,
     "total_redeliveries": 0,
     "expiration_count": 0,
     "browser_count": 0,
     "last_sub_remove_time": 31464,
     "inbound_message_count": 100,
     "inbound_messages_per_sec": 0,
     "inbound_byte_count": 108816,
     "inbound_bytes_per_sec": 0,
     "outbound_message_count": 0,
     "outbound_messages_per_sec": 0,
     "outbound_byte_count": 0,
     "outbound_bytes_per_sec": 0,
     "bytelimit": "",
     "message_limit": 0,
     "max_delivery": 0,
     "durable_ttl": 0,
     "message_ttl": 0,
     "retention_time": 0,
     "destination": "st1.pub1"
   }
  ]
}

DELETE persistence/topics/<topic_name>

This method deletes all durables associated with the specified topic.

<topic_name> in the URI is the topic name.

Example Request

curl -X DELETE http://<host>:<port>/api/v1/persistence/topics/<topic_name>

GET persistence/topics/<topic_name>

This method retrieves a collection of durable status objects for the specified FTL topic.

<topic_name> in the URI is the topic name

Example Request

curl -X GET http://<host>:<port>/api/v1/persistence/topics/<topic_name>

Example JSON Representation

Copy
{
 "durables": [
   {
     "name": "dur1",
     "store": "st1",
     "cluster": "RealmPersistenceCluster",
     "matcher": "{\"_ftldest\":\"st1.pub1\"}",
     "template_name": "st1.>",
     "client_id": 0,
     "durable_id": 1,
     "type": "standard-with-prefetch",
     "dynamic": true,
     "message_count": 100,
     "message_size": 110016,
     "unacked_message_count": 100,
     "unacked_message_size": 110016,
     "swap_message_count": 0,
     "swap_message_size": 0,
     "total_redeliveries": 0,
     "expiration_count": 0,
     "browser_count": 0,
     "last_sub_remove_time": 31464,
     "inbound_message_count": 100,
     "inbound_messages_per_sec": 0,
     "inbound_byte_count": 108816,
     "inbound_bytes_per_sec": 0,
     "outbound_message_count": 0,
     "outbound_messages_per_sec": 0,
     "outbound_byte_count": 0,
     "outbound_bytes_per_sec": 0,
     "bytelimit": "",
     "message_limit": 0,
     "max_delivery": 0,
     "durable_ttl": 0,
     "message_ttl": 0,
     "retention_time": 0,
     "destination": "st1.pub1"
   }
  ]
}

POST persistence/topics/<topic_name>

This method sends a command to all durables associated with the specified topic.

<topic_name> in the URI is the topic name.

Input Data

Supply the command in JSON format. For example: {“cmd”:”purge”}.

Commands

Command Description
{“cmd”:”delete”} Delete durables.
{“cmd”:”purge”} Purge messages from durables.
{“cmd”:”rewind”} Rewind durables.

Example Request

curl -X POST http://<host>:<port>/api/v1/persistence/topics/<topic_name> -d <json_cmd>

DELETE persistence/topics/<topic_name>/durables/<dur_name>

This method deletes the specified durable associated with the specified topic.

  • <topic_name> in the URI is the topic name.

  • <dur_name> in the URI is the durable name.

Example Request

curl -X DELETE http://<host>:<port>/api/v1/persistence/topics/<topic_name>/durables/<dur_name>

GET persistence/topics/<topic_name>/durables/<dur_name>

This method retrieves durable status objects for the specified durable with the specified topic.

  • <topic_name> in the URI is the topic name

  • <dur_name> in the URI is the durable name

Example Request

curl -X GET http://<host>:<port>/api/v1/persistence/topics/<topic_name>/durables/<dur_name>

Example JSON Representation

Copy
{
  "name": "dur1",
  "store": "st1",
  "cluster": "RealmPersistenceCluster",
  "matcher": "{\"_ftldest\":\"st1.pub1\"}",
  "template_name": "st1.>",
  "client_id": 0,
  "durable_id": 1,
  "type": "standard-with-prefetch",
  "dynamic": true,
  "message_count": 100,
  "message_size": 110016,
  "unacked_message_count": 100,
  "unacked_message_size": 110016,
  "swap_message_count": 0,
  "swap_message_size": 0,
  "total_redeliveries": 0,
  "expiration_count": 0,
  "browser_count": 0,
  "last_sub_remove_time": 31464,
  "inbound_message_count": 100,
  "inbound_messages_per_sec": 0,
  "inbound_byte_count": 108816,
  "inbound_bytes_per_sec": 0,
  "outbound_message_count": 0,
  "outbound_messages_per_sec": 0,
  "outbound_byte_count": 0,
  "outbound_bytes_per_sec": 0,
  "bytelimit": "",
  "message_limit": 0,
  "max_delivery": 0,
  "durable_ttl": 0,
  "message_ttl": 0,
  "retention_time": 0,
  "destination": "st1.pub1"
}

POST persistence/topics/<topic_name>/durables/<dur_name>

This method sends a command to the specified durable associated with the specified topic.

  • <topic_name> in the URI is the topic name.

  • <dur_name> in the URI is the durable name.

Input Data

Supply the command in JSON format. For example: {“cmd”:”purge”}.

Commands

Command Description
{“cmd”:”delete”} Delete a durable.
{“cmd”:”purge”} Purge messages from a durable.
{“cmd”:”rewind”} Rewind a durable.

Example Request

curl -X POST http://<host>:<port>/api/v1/persistence/topics/<topic_name>/durables/<dur_name> -d <json_cmd>

GET persistence/queues

This method retrieves a collection of status objects for FTL queues.

Example Request

curl -X GET http://<host>:<port>/api/v1/persistence/queues

Example JSON Representation

Copy
{
  "queues": [
    {
      "name": "_dest_Q:pub0",
      "store": "ftl.persistent.store",
      "cluster": "ftl.default.cluster",
      "matcher": "{\"_ftldest\": \"Q:pub0\"}",
      "template_name": "Q:>",
      "client_id": 0,
      "durable_id": 1,
      "type": "shared",
      "dynamic": true,
      "message_count": 10,
      "message_size": 11040,
      "unacked_message_count": 10,
      "unacked_message_size": 11040,
      "swap_message_count": 0,
      "swap_message_size": 0,
      "total_redeliveries": 0,
      "expiration_count": 0,
      "browser_count": 0,
      "last_sub_remove_time": 17082,
      "inbound_message_count": 10,
      "inbound_messages_per_sec": 0,
      "inbound_byte_count": 10730,
      "inbound_bytes_per_sec": 0,
      "outbound_message_count": 0,
      "outbound_messages_per_sec": 0,
      "outbound_byte_count": 0,
      "outbound_bytes_per_sec": 0,
      "bytelimit": "",
      "message_limit": 0,
      "max_delivery": 0,
      "durable_ttl": 0,
      "message_ttl": 0,
      "retention_time": 0,
      "destination": "Q:pub0"
    }
  ]
}

DELETE persistence/queues/<queue_name>

This method deletes the specified queue.

<queue_name> in the URI is the queue name.

Example Request

curl -X DELETE http://<host>:<port>/api/v1/persistence/queues/<queue_name>

GET persistence/queues/<queue_name>

This method retrieves a status object for the specified queue.

<queue_name> in the URI is the queue name

Example Request

curl -X GET http://<host>:<port>/api/v1/persistence/queues/<queue_name>

Example JSON Representation

Copy
{
  "name": "_dest_Q:pub0",
  "store": "ftl.persistent.store",
  "cluster": "ftl.default.cluster",
  "matcher": "{\"_ftldest\": \"Q:pub0\"}",
  "template_name": "Q:>",
  "client_id": 0,
  "durable_id": 1,
  "type": "shared",
  "dynamic": true,
  “message_count": 10,
  "message_size": 11040,
  "unacked_message_count": 10,
  "unacked_message_size": 11040,
  "swap_message_count": 0,
  "swap_message_size": 0,
  "total_redeliveries": 0,
  "expiration_count": 0,
  "browser_count": 0,
  "last_sub_remove_time": 17082,
  "inbound_message_count": 10,
  "inbound_messages_per_sec": 0,
  "inbound_byte_count": 10730,
  "inbound_bytes_per_sec": 0,
  "outbound_message_count": 0,
  "outbound_messages_per_sec": 0,
  "outbound_byte_count": 0,
  "outbound_bytes_per_sec": 0,
  "bytelimit": "",
  "message_limit": 0,
  "max_delivery": 0,
  "durable_ttl": 0,
  "message_ttl": 0,
  "retention_time": 0,
  "destination": "Q:pub0"
}

POST persistence/queues/<queue_name>

This method sends a command to the specified queue.

<queue_name> in the URI is the queue name.

Input Data

Supply the command in JSON format. For example: {“cmd”:”purge”}.

Commands

Field Description
{“cmd”:”delete”} Delete a queue.
{“cmd”:”purge”} Purge messages from a queue.
{“cmd”:”rewind”} Rewind a queue.

Example Request

curl -X POST http://<host>:<port>/api/v1/persistence/queues/<queue_name> -d <json_cmd>

GET persistence/maps

This method retrieves a collection of status objects for FTL maps.

Example Request

curl -X GET http://<host>:<port>/api/v1/persistence/maps

Example JSON Representation

Copy
{
  "durables": [
    {
      "name": "_dest_M:st1.map1",
      "store": "st1",
      "cluster": "RealmPersistenceCluster",
      "matcher": "{\"_ftldest\":\"M:st1.map1\",\"_map\":\"_dest_M:st1.map1\",\"_value\":true,\"_key\":true}",
      "key": "_key",
      "no_match": true,
      "template_name": "M:st1.>",
      "client_id": 1038,
      "durable_id": 1,
      "type": "lastvalue",
      "dynamic": true,
      "subscribers": [],
      "message_count": 25,
      "message_size": 2365,
      "unacked_message_count": 25,
      "unacked_message_size": 2365,
      "swap_message_count": 0,
      "swap_message_size": 0,
      "total_redeliveries": 0,
      "expiration_count": 0,
      "browser_count": 0,
      "last_sub_remove_time": 0,
      "inbound_message_count": 26,
      "inbound_messages_per_sec": 0,
      "inbound_byte_count": 1862,
      "inbound_bytes_per_sec": 0,
      "outbound_message_count": 0,
      "outbound_messages_per_sec": 0,
      "outbound_byte_count": 0,
      "outbound_bytes_per_sec": 0,
      "bytelimit": "",
      "message_limit": 0,
      "max_delivery": 0,
      "durable_ttl": 0,
      "message_ttl": 0,
      "retention_time": 0,
      "destination": "M:st1.map1"
    }
  ]
}

DELETE persistence/maps/<map_name>

This method deletes the specified map.

<map_name> in the URI is the map name.

Example Request

curl -X DELETE http://<host>:<port>/api/v1/persistence/maps/<map_name>

GET persistence/maps/<map_name>

This method retrieves a status object for the specified map.

<map_name> in the URI is the map name

Example Request

curl -X GET http://<host>:<port>/api/v1/persistence/maps/<map_name>

Example JSON Representation

Copy
{
  "name": "_dest_M:st1.map1",
  "store": "st1",
  "cluster": "RealmPersistenceCluster",
  "matcher": "{\"_ftldest\":\"M:st1.map1\",\"_map\":\"_dest_M:st1.map1\",\"_value\":true,\"_key\":true}",
  "key": "_key",
  "no_match": true,
  "template_name": "M:st1.>",
  "client_id": 1038,
  "durable_id": 1,
  "type": "lastvalue",
  "dynamic": true,
  "subscribers": [],
  "message_count": 25,
  "message_size": 2365,
  "unacked_message_count": 25,
  "unacked_message_size": 2365,
  "swap_message_count": 0,
  "swap_message_size": 0,
  "total_redeliveries": 0,
  "expiration_count": 0,
  "browser_count": 0,
  "last_sub_remove_time": 0,
  "inbound_message_count": 26,
  "inbound_messages_per_sec": 0,
  "inbound_byte_count": 1862,
  "inbound_bytes_per_sec": 0,
  "outbound_message_count": 0,
  "outbound_messages_per_sec": 0,
  "outbound_byte_count": 0,
  "outbound_bytes_per_sec": 0,
  "bytelimit": "",
  "message_limit": 0,
  "max_delivery": 0,
  "durable_ttl": 0,
  "message_ttl": 0,
  "retention_time": 0,
  "destination": "M:st1.map1"
}

POST persistence/maps/<map_name>

This method sends a command to the specified map.

<map_name> in the URI is the map name.

Input Data

Supply the command in JSON format. For example: {“cmd”:”purge”}.

Commands

Command Description
{“cmd”:”delete”} Delete a map.
{“cmd”:”purge”} Purge messages from a map.

Example Request

curl -X POST http://<host>:<port>/api/v1/persistence/maps/<map_name> -d <json_cmd>