Get specific host details
get
/api/hosts/{host_id}
Retrieves details of a host. You identify the host using the host_id parameter.
Request
Path Parameters
-
host_id: string
host_id
Security
-
Authorization: apiKey
Type:
apiKey
Response
Supported Media Types
- application/json
200 Response
200 Response
Nested Schema : info
Type:
Show Source
object
-
cpu:
integer
-
docker_api_version:
string
-
docker_version:
string
-
host_id:
string
-
host_version:
string
-
hostname:
string
-
info_updated_at:
string
-
ip_addresses:
string
-
is_active:
boolean
-
last_seen:
integer
-
location:
string
-
memory:
integer
-
memory_mb:
integer
-
num_cpus:
integer
-
num_images:
integer
-
pool_id:
string
-
provider:
string
-
running_cnts:
integer
-
uptime:
string
Default Response
Error Payload
Examples
The following example shows how to get the details of a specific Oracle Container Cloud Service host. You perform this task by submitting a GET request to the REST resource using cURL. For more information about cURL, see Use cURL.
Note: The command in this example uses the URL structure https://rest_server_url/resource-path
, where rest_server_url
is the manager node for the Oracle Cloud Container instance. See Send Requests for the appropriate URL structure to use for Oracle Public Cloud.
cURL Command
curl -sk
-X "GET"
-H "Authorization: Bearer b39f09c71c297f1d"
"https://rest_server_url/api/hosts/host_id"
In this example, replace host_id with the ID of the host, which you can find by submitting a GET method to the /api/hosts/
endpoint.
Example of Response Body
{
"host": {
"host_id": "host_id",
"pool_id": "default"
},
"info": {
"host_id": "host_id",
"pool_id": "default",
"hostname": "demowkr0",
"ip_addresses": "eth0: ip_address, docker0: ip_address, public_ip: ip_address",
"memory_mb": 7477,
"memory": 3,
"cpu": 0,
"num_cpus": 2,
"provider": "OPC",
"location": "unknown",
"docker_version": "1.10.3",
"docker_api_version": "1.22",
"host_version": "16.4.2-977-origin/release/angelina-f2d3cc7-dirty",
"info_updated_at": "2016-10-26T18:36:46.021445589-04:00",
"uptime": "1 day, 14:32",
"running_cnts": 1,
"num_images": 1,
"last_seen": 1477521405,
"is_active": true
}
}