Queries the hosts of a specified organization.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ListOrgHosts

The operation that you want to perform. Set the value to ListOrgHosts.

OrgId Integer Yes 1

The ID of the organization.

Search String No foobar

Specifies the host you want to query.

CurrentPage Integer No 1

The number of the page to return.

Default value: 1.

PageSize Integer No 10

The number of entries to return on each page.

Default value: 10. Maximum value: 10.

Response parameters

Parameter Type Example Description
CurrentPage Integer 1

The number of the returned page.

Default value: 1.

PageSize Integer 10

The number of entries returned per page.

Default value: 10. Maximum value: 10.

Records Array

The list of records.

Hostname String guest

The hostname.

IP String 176.28.50.165

The IP address.

Id Integer 1

The ID of the record.

Index Integer 1

The index number.

OS String windows

The operating system.

OrgId Integer 1

The ID of the organization.

State String up

The status of the host.

UpdatedAt Long 1585738707000

The update time.

RequestId String 2AF23E43-BFF9-4A36-8B4F-B354B806B08B

The ID of the request.

TotalCount Integer 1

The total number of records.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ListOrgHosts
&OrgId=1
&<Common request parameters>

Sample success responses

XML format

<ListOrgHostsResponse>
   <code>200</code>
   <data>
        <TotalCount>1</TotalCount>
        <PageSize>10</PageSize>
        <CurrentPage>1</CurrentPage>
        <Records>
              <OrgId>1</OrgId>
              <OS>Linux 2.6.31 - 2.6.35</OS>
              <State>up</State>
              <IP>192.28.50.165</IP>
              <Hostname></Hostname>
              <Index>1</Index>
              <Id>1</Id>
              <UpdatedAt>1585738707000</UpdatedAt>
        </Records>
   </data>
   <requestId>2AF23E43-BFF9-4A36-8B4F-B354B806B08B</requestId>
   <success>true</success>
</ListOrgHostsResponse>

JSON format

{
    "code": 200,
    "data": {
        "TotalCount": 1,
        "PageSize": 10,
        "CurrentPage": 1,
        "Records": [
            {
                "OrgId": 1,
                "OS": "Linux 2.6.31 - 2.6.35",
                "State": "up",
                "IP": "192.28.50.165",
                "Hostname": "",
                "Index": 1,
                "Id": 1,
                "UpdatedAt": 1585738707000
            }
        ]
    },
    "requestId": "2AF23E43-BFF9-4A36-8B4F-B354B806B08B",
    "success": true
}

Error codes

For a list of error codes, visit the API Error Center.