GetAppliedMachineGroups

Last Updated: Mar 31, 2017

Lists configured machines.

Example:

GET /configs/{configName}/machinegroups

Request syntax

  1. GET /configs/{configName}/machinegroups HTTP/1.1
  2. Authorization: <AuthorizationString>
  3. Date: <GMT Date>
  4. Host: <Project Endpoint>
  5. x-log-apiversion: 0.6.0
  6. x-log-signaturemethod: hmac-sha1

Request parameters

URL parameters:

Name Type Required or Not Description
ConfigName string Yes The configuration name

Request header

No special request header is available. For details about the public request header of the API, refer to Public Request Header.

Response header

No special response header is available. For details about the public response header of the API, refer to Public Response Header.

Response element

When the request is successful. The response Body includes a list of all machines in the specified machine group in the following format:

Name Type Description
count Integer The number of returned machine groups.
machinegroups String array The list of returned machine groups.
  1. {
  2. "count":2,
  3. "machinegroups":
  4. ["group1","group2"]
  5. }

Error code

In addition to general error codes of the API, the following special error codes may be returned:

HTTP Status Code ErrorCode Error Message
404 GroupNotExist group {GroupName} not exist
500 InternalServerError internal server error

Detailed description

None

Example

Request example:
  1. GET /configs/logtail-config-sample/machinegroups
  2. Header:
  3. {
  4. "Content-Length": 0,
  5. "x-log-signaturemethod": "hmac-sha1",
  6. "x-log-bodyrawsize": 0,
  7. "User-Agent": "log-python-sdk-v-0.6.0",
  8. "Host": "ali-test-project.cn-hangzhou-devcommon-intranet.sls.aliyuncs.com",
  9. "Date": "Mon, 09 Nov 2015 09:51:38 GMT",
  10. "x-log-apiversion": "0.6.0",
  11. "Authorization": "LOG 94to3z418yupi6ikawqqd370:+6bo4MSUt/dyNa72kXeGCkVOi+4="
  12. }
Response example:
  1. Header :
  2. {
  3. "content-length": "44",
  4. "server": "nginx/1.6.1",
  5. "connection": "close",
  6. "date": "Mon, 09 Nov 2015 09:51:38 GMT",
  7. "content-type": "application/json",
  8. "x-log-requestid": "56406CAA99248CAA230BE828"
  9. }
  10. Body:
  11. {
  12. "count": 1,
  13. "machinegroups":
  14. [
  15. "sample-group"
  16. ]
  17. }
Thank you! We've received your feedback.