Query and Monitor Planet

Version: 1.0.0 Workflow: query-and-monitor-planet Category: Monitoring


Description

Query planet information and set up monitoring via streaming.

Prerequisites

Steps

1. Get Planet Information

Parameters:

Parameter Example Value
planet_id 3-1

Data Extraction:

Expected Response:

Error Handling:

Status Action
404 Planet not found - verify planet_id

2. Get Planetary Shield Health

Parameters:

Parameter Value
planet_id ``

Data Extraction:

Expected Response:

Error Handling:

Status Action
404 Planet not found or no shield data

3. Check for Active Raids

Parameters:

Parameter Value
planet_id ``

Data Extraction:

Expected Response:

Response may be null if no active raid.

Error Handling:

Status Action
404 Planet not found (null response is valid if no active raid)

4. Get All Structs on Planet

Parameters:

Parameter Value
planet_id ``

Data Extraction:

Expected Response:

Error Handling:

Status Action
404 Planet not found or no structs

5. Subscribe to Planet Updates via GRASS/NATS

Set up real-time monitoring via streaming.

Subscription:

Events:

Documentation: See protocols/streaming.md

Error Handling:

Error Action
connection_error NATS connection failed - check NATS server
subscription_error Subscription failed - verify subject pattern

Result

{
  "planet": {
    "id": "",
    "name": "",
    "owner_id": "",
    "shield": {
      "health": "",
      "max_health": "",
      "health_percentage": ""
    },
    "raid": {
      "active": "",
      "info": ""
    },
    "structs": {
      "count": "",
      "list": ""
    }
  },
  "monitoring": {
    "streaming_subject": "structs.planet.",
    "status": "subscribed"
  }
}

Notes

This workflow demonstrates querying planet information and setting up real-time monitoring. Steps 2-4 can be executed in parallel for better performance. Step 5 establishes a streaming connection for real-time updates.