Querying the Host Configuration
Function
This API is used to query the host configuration for a specified event type in a specified time range. You can specify the dimension of data to be queried.

This API is provided for SAP Monitor in the HANA scenario to query the host configuration. In other scenarios, the host configuration cannot be queried with this API.
Debugging
You can debug the API in API Explorer which supports automatic authentication. API Explorer can automatically generate and debug example SDK code.
URI
GET /V1.0/{project_id}/event-data
- Parameter description
Table 1 Parameter description Parameter
Mandatory
Description
project_id
Yes
Definition
Project ID, which is used to specify the project that an asset belongs to. You can query the assets of a project by project ID. You can obtain the project ID from the API or console. For details about how to obtain the project ID, see Obtaining a Project ID.
- Parameters that are used to query the host configuration
Parameter
Mandatory
Type
Description
namespace
Yes
String
Definition
Namespace of the queried service. For details, see Services Interconnected with Cloud Eye.
Constraints
N/A
Range
The namespace must be in the service.item format. service and item must be strings, and each must start with a letter and contain only letters (case-insensitive), digits, and underscores (_). In addition, service cannot start with SYS, AGT, or SRE. namespace cannot be SERVICE.BMS because this namespace has been used by the system. The value can contain 3 to 32 characters. For example, the ECS namespace is SYS.ECS, and the DDS namespace is SYS.DDS.
Default Value
N/A
type
Yes
String
Definition
Event type. It can contain only letters, underscores (_), and hyphens (-). It must start with a letter and cannot exceed 64 characters, for example, instance_host_info.
Constraints
N/A
Range
The value cannot exceed 64 characters.
Regular matching: ^([a-z]|[A-Z]){1}([a-z]|[A-Z]|[0-9]|_|-)*$
Default Value
N/A
from
Yes
String
Definition
Start time of the query. The value is a UNIX timestamp, in milliseconds.
Constraints
N/A
Range
N/A
Default Value
N/A
to
Yes
String
Definition
End time of the query. The value is a UNIX timestamp, in milliseconds.
Constraints
from must be earlier than to.
Range
N/A
Default Value
N/A
dim
Yes
String
Definition
Monitoring dimension, for example, instance_id for ECSs. For details about the dimensions corresponding to the monitoring metrics of each service, see the monitoring metrics description of the corresponding service in Services Interconnected with Cloud Eye.
Constraints
N/A
Range
Metric dimension. A maximum of 3 dimensions are supported, numbered from 0 and in the dim.{i}=key,value format. key cannot exceed 32 characters and value cannot exceed 256 characters.
Example: dim.0=instance_id,i-12345
Default Value
N/A
- Example: Query the configuration information about the ECS whose ID is 33328f02-3814-422e-b688-bfdba93d4051 and type is instance_host_info.
GET https://{Cloud Eye endpoint}/V1.0/{project_id}/event-data?namespace=SYS.ECS&dim.0=instance_id,33328f02-3814-422e-b688-bfdba93d4051&type=instance_host_info&from=1450234543422&to=1450320943422
Request
None
Response
- Response parameters
Table 2 Parameter description Parameter
Type
Description
datapoints
Array of objects
Definition
Configuration list.
If the corresponding configuration information does not exist, datapoints is an empty array and is [].
For details, see Table 3.
Table 3 datapoints data structure description Parameter
Type
Description
type
String
Definition
Event type, for example, instance_host_info.
Range
N/A
timestamp
Long
Definition
Time when the event was reported. The value is a UNIX timestamp, in milliseconds.
Range
N/A
value
String
Definition
Host configuration information.
Range
N/A
- Example response
{ "datapoints": [ { "type": "instance_host_info", "timestamp": 1450231200000, "value": "xxx" }, { "type": "instance_host_info", "timestamp": 1450231800000, "value": "xxx" } ] }
Returned Values
- Normal
- Abnormal
Returned Value
Description
400 Bad Request
Request error.
401 Unauthorized
The authentication information is not provided or is incorrect.
403 Forbidden
Access to the requested page is forbidden.
408 Request Timeout
The request timed out.
429 Too Many Requests
Concurrent requests are excessive.
500 Internal Server Error
Failed to complete the request because of an internal service error.
503 Service Unavailable
The service is currently unavailable.
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot