Get a host group by ID
1 min
GET
https://openapi.sine.co/v1/api/hosts/groups/{id}
Path Parameters
- idstring<uuid>requiredExampleDescriptionFormatuuid
Header Parameters
- x-sine-team-idstring<uuid>requiredDescriptionFormatuuid
Responses
200
- object
- idstring<uuid>requiredExampleFormatuuid
- namestringrequiredExampleDescription
- privateboolean
- siteobject
- idstring<uuid>Formatuuid
- namestringExample
400
- objectExample
{ "code": "BAD_REQUEST", "message": "The request is invalid" }- codestringExampleDescription
- messagestringExampleDescription
401
- objectExample
{ "code": "UNAUTHORIZED", "message": "Invalid authentication credentials" }- codestringExampleDescription
- messagestringExampleDescription
403
- objectExample
{ "code": "FORBIDDEN", "message": "You are not allowed to access this information" }- codestringExampleDescription
- messagestringExampleDescription
404
- objectExample
{ "code": "SITE_NOT_FOUND", "message": "SiteNotFoundError" }- codestringExampleDescription
- messagestringExampleDescription
424
- objectExample
{ "code": "CONSUMER_ERROR", "message": "Unexpected error while communicating with downstream service, please try again" }- codestringExampleDescription
- messagestringExampleDescription
429
- objectExample
{ "code": "RATE_LIMITED", "message": "API rate limit exceeded" }- codestringExampleDescription
- messagestringExampleDescription
500
- objectExample
{ "code": "INTERNAL_SERVER_ERROR", "message": "Something went wrong, please try again later" }- codestringExampleDescription
- messagestringExampleDescription
curl
curl --request GET \
--url https://openapi.sine.co/v1/api/hosts/groups/{id} \
--header 'accept: application/json' \
--header 'x-sine-team-id: string<uuid>'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
myHeaders.append("x-sine-team-id", "string<uuid>");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://openapi.sine.co/v1/api/hosts/groups/{id}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));python
import requests
import json
url = "https://openapi.sine.co/v1/api/hosts/groups/{id}"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json',
'x-sine-team-id': 'string<uuid>'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
200
// OK - Host group returned successfully
{
"id": "ecbc5ca7-d6e1-4133-90a0-e7070d993f18",
"name": "Host Group Name",
"private": false,
"site": {
"id": "",
"name": "Site Name"
}
}400
// Bad request
{
"code": "BAD_REQUEST",
"message": "The request is invalid"
}401
// Unauthorized
{
"code": "UNAUTHORIZED",
"message": "Invalid authentication credentials"
}403
// Forbidden
{
"code": "FORBIDDEN",
"message": "You are not allowed to access this information"
}404
// Resource not found
{
"code": "SITE_NOT_FOUND",
"message": "SiteNotFoundError"
}424
// Service dependency failed
{
"code": "CONSUMER_ERROR",
"message": "Unexpected error while communicating with downstream service, please try again"
}429
// Too many requests
{
"code": "RATE_LIMITED",
"message": "API rate limit exceeded"
}500
// Internal server error
{
"code": "INTERNAL_SERVER_ERROR",
"message": "Something went wrong, please try again later"
}