API for Collecting Dynamic Status v1
Function
Collects dynamic status.
Format
Operation type: GET
URL: https://{ip}:{port}/v1/status
- The {ip} field prioritizes reading the environment variable MIES_CONTAINER_MANAGEMENT_IP. If the environment variable does not exist, managementIpAddress in the configuration file is used. If managementIpAddress does not exist in the configuration file, ipAddress in the configuration file is used.
- The {port} field prioritizes reading the managementPort parameter in the configuration file. If the configuration file does not contain the managementPort parameter, the port parameter in the configuration file is used.
Request Parameters
None
Usage Example
Request example:
GET https://{ip}:{port}/v1/status
{
"service": {
"roleStatus": "RoleUnknown",
"currentRole": "prefill"
},
"resource": {
"availSlotsNum": 200,
"availBlockNum": 1024
},
"peers": ["1.2.3.4", "5.6.7.8"]
}
Output Description
Field |
Mandatory/Optional |
Type |
Description |
|---|---|---|---|
service |
Mandatory |
Structure |
Service attributes. |
service.roleStatus |
Mandatory |
String |
Role status of the current service. Possible values:
In the prefill-decode hybrid deployment scenario, the value is always RoleReady. |
service.currentRole |
Mandatory |
String |
Role of the current instance. Possible values:
In the prefill-decode hybrid deployment scenario, the value is always none. In the prefill-decode disaggregation scenario, if roleStatus is RoleReady, the value is prefill or decode. Otherwise, the value is none. |
resource |
Mandatory |
Structure |
Remaining resources. |
resource.availSlotsNum |
Mandatory |
Integer |
Number of available slots. |
resource.availBlockNum |
Mandatory |
Integer |
Number of available blocks. |
peers |
Optional |
String array |
The array member is the IP address, indicating the prefill instance that has been successfully connected.
|