Get Core Hosts

Get Core Hosts
Get a collection of hosts

Get a collection of host scoped by organization

Request
URI
GET
https://{api_host}/api/inventory/{org_id}/core/hosts
COPY
Path Parameters
string
org_id
Required

organization identifier

Query Parameters
string
deployment_id
Optional

parent deployment identifier

string
cluster_id
Optional

parent cluster identifier

boolean
include_deleted_resources
Optional
Constraints: default: false

should the deleted resources be included in the results?

boolean
calculate_totals
Optional
Constraints: default: true

Indicates whether the response should correctly populate total_elements and total_pages properties. These properties are not always needed, and the calls are faster when calculate_totals=false. Don't rely on their values when passing calculate_totals=false. If you need correct values for total_pages and total_elements, pass calculate_totals=true.

integer
page
Optional
Constraints: default: 0

Zero-based page index (0..N)

integer
size
Optional
Constraints: default: 20

The size of the page to be returned

string of array
sort
Optional

Sorting criteria in the format: property(,asc|desc). Default sort order is ascending. Multiple sort criteria are supported.


Responses
200

OK

Returns HostResponse of type(s) application/json
{
    "content": [
        {
            "id": "string",
            "name": "string",
            "deployment_id": "string",
            "cluster_id": "string",
            "org_id": "string",
            "state": {
                "phase": "string",
                "sub_phase": "string",
                "display_name": "string",
                "error_msg": "string",
                "error_code": "string",
                "provider": "string",
                "internal_error_msg": "string",
                "internal_error_code": "string"
            },
            "capacity": {
                "cpu_mhz": 0,
                "memory_bytes": 0,
                "storage_bytes": 0
            },
            "creator": {
                "user_name": "string",
                "user_id": "string",
                "client_id": "string",
                "timestamp": "string"
            },
            "updater": {
                "user_name": "string",
                "user_id": "string",
                "client_id": "string",
                "timestamp": "string"
            },
            "internal_creator": {
                "user_name": "string",
                "user_id": "string",
                "client_id": "string",
                "timestamp": "string"
            },
            "deleted": false,
            "resource_version": 0
        }
    ],
    "pageable": {
        "page_size": 0,
        "page_number": 0
    },
    "first": false,
    "last": false,
    "total_pages": 0,
    "total_elements": 0,
    "number_of_elements": 0,
    "size": 0,
    "number": 0
}
array of object
content
Optional

List of hosts

object
pageable
Optional

pageable

boolean
first
Optional

first

boolean
last
Optional

last

integer As int32 As int32
total_pages
Optional

Total number of pages

integer As int64 As int64
total_elements
Optional

Total number of elements

integer As int32 As int32
number_of_elements
Optional

Number of elements returned in current page

integer As int32 As int32
size
Optional

Number of elements allowed in each page

integer As int32 As int32
number
Optional

Page number/offset (0-indexed)


401

Unauthorized

Operation doesn't return any data structure

403

Forbidden

Operation doesn't return any data structure

Code Samples
COPY
                    curl -H 'Authorization: <value>' https://{api_host}/api/inventory/{org_id}/core/hosts