Retrieve details about a node group
GET api/node_groups/node-group-id
Retrieves details about a single node group.
Request syntax
get api/node_groups/<node_group_id>
Request parameters
The request accepts no parameters.
Response syntax
{
"id": integer,
"name": "string",
"template_name": "string",
"virtual_type": null,
"type_of_server": null,
"created_at": "timestamp",
"updated_at": "timestamp",
"node_group_role_id": integer,
"group_type": "string",
"hierarchy_field_id": null,
"properties": {
}
}
Response parameters
If the action is successful, an HTTP 200 response is returned. The following data is returned in JSON format.
| Field | Type | Description |
|---|---|---|
id | Integer | The ID of the node group. |
name | String | The name of the node group. |
template_name | String | The name of the template used to create the node group. |
virtual_type | String | If the server type is virtual, this is the type of virtual server. |
type_of_server | String | The server type for nodes in the node group. |
created_at | Timestamp | The timestamp of when the node group was created. |
updated_at | Timestamp | The timestamp of when the node group was last updated. Upon initial creation, the created_at and updated_at values will be the same. |
node_group_role_id | Integer | The ID of the node group role associated with the node group. |
group_type | String | The type of nodes that will be part of the node group. |
hierarchy_field_id | Integer | The levels of hierarchy attribute for the node group. |
properties | Array of Objects | The properties associated with the node group. |
Errors
The following are common errors returned by this API.
| Code | Message | Cause |
|---|---|---|
| - | - | - |
Examples
Example 1: Retrieve details about a node group.
This example retrieves details about a node group with ID 1953.
ruby api.rb <customer_code> get api/node_groups/1953
Response
{
"id": 1953,
"name": "Cluster Lab HA",
"template_name": "cluster_lab_ha",
"virtual_type": null,
"type_of_server": null,
"created_at": "2024-08-28T18:28:12.459Z",
"updated_at": "2024-08-28T18:28:12.459Z",
"node_group_role_id": 1,
"group_type": "regular",
"hierarchy_field_id": null,
"properties": {
"example_property1": "API_KEY=123EXAMPLEkey",
"example_property2": "example_value2",
"example_property3": "example_value3",
"example_property4": "example_value4"
}
}
Example 2: Retrieve the value of a specific property from a node group.
This example retrieves the value of the example_property1 property for the 1953 node group.
ruby api.rb <customer_code> get api/node_groups/1953/property/example_property1
Response
{
"value": "API_KEY=123EXAMPLEkey"
}