Group - Manage the service groups.
WSDL: https://api.cloudmonit.pl/2.0.0/wsdl/Group.wsdl
JSON: https://api.cloudmonit.pl/2.0.0/json/Group.json
This module allows you to create, modify and get information about your service groups.
POST the JSONs to https://api.cloudmonit.pl/2.0.0/json_api.
See the README for more information.
############### create a new group ############## { { "auth" : { "auth" : {}, "login" : "LOGIN", "data" : { "password" : "PASSWORD" "id" : 150507195 }, }, "data" : { "error" : null, "name" : "New group" "version" : "2.0.0" }, } "method" : "Create", "module" : "Group" } ############### list all groups ############## { { "auth" : { "auth" : {}, "login" : "LOGIN", "data" : { "password" : "PASSWORD" "elements" : [ }, { "method" : "Find", "account_id" : 4913, "module" : "Group" "daily_reports" : 1, } "default" : 1, "id" : 150507194, "language" : null, "monthly_reports" : 1, "name" : "Default group", "weekly_reports" : 1 }, { "account_id" : 4913, "daily_reports" : 1, "default" : 0, "id" : 150507195, "language" : null, "monthly_reports" : 1, "name" : "New group", "weekly_reports" : 1 } ], "total" : 2 }, "error" : null, "version" : "2.0.0" } ############### get information about a group, including assigned location IDs ############## { { "auth" : { "auth" : {}, "login" : "LOGIN", "data" : { "password" : "PASSWORD" "account_id" : 4913, }, "daily_reports" : 1, "data" : { "default" : 0, "id" : 150507195 "id" : 150507195, }, "language" : null, "method" : "Read", "location_ids" : [ "module" : "Group" 6, } 7 ], "monthly_reports" : 1, "name" : "New group", "weekly_reports" : 1 }, "error" : null, "version" : "2.0.0" } ############### change monitoring locations ############## { { "auth" : { "auth" : {}, "login" : "LOGIN", "data" : {}, "password" : "PASSWORD" "error" : null, }, "version" : "2.0.0" "data" : { } "id" : 150507195, "location_ids" : [ 3, 5, 6 ] }, "method" : "Update", "module" : "Group" } ############### delete a group ############## { { "auth" : { "auth" : {}, "login" : "LOGIN", "data" : {}, "password" : "PASSWORD" "error" : null, }, "version" : "2.0.0" "data" : { } "id" : 150507195 }, "method" : "Delete", "module" : "Group" }
This method creates a new Group object.
The identifier of the account the group belongs to.
True if the daily reports are enabled for this group.
Defaults to "1"
if not specified.
The default reports and notifications language for this group. If NULL, the account's default language will be used.
Allowed values are: en
, pl
.
The array of monitoring station IDs assigned to this group. All services in this group will be checked from these locations. If not specified, two random locations will be assigned.
An array of unsigned integers.
This array cannot contain duplicate values.
True if the monthly reports are enabled for this group.
Defaults to "1"
if not specified.
The group name.
True if the weekly reports are enabled for this group.
Defaults to "1"
if not specified.
The group's identifier.
This method deletes a service group TOGETHER WITH ALL ITS SERVICES, NOTIFICATION AND REPORT ADDRESSES. Use with extreme caution!
The default group for the account cannot be deleted.
The group's identifier.
Nothing.
This method allows you to fetch information about selected Group objects.
Filters to apply to the results.
An array of objects, each containg the fields:
The filter argument (the text to be contained in the field, or value to be compared). The argument must be of the same type as the field you filter by.
The field to filter the results by.
Allowed values are: account_id
, daily_reports
, default
, id
, language
, monthly_reports
, name
, services_count
, weekly_reports
.
The type of filter. Filters (not_)greater_than and (not_)lower_than compare numbers numerically and string lexicographically. Defaults to "equals".
Allowed values are: contains
, equals
, greater_than
, lower_than
, not_greater_than
, not_lower_than
.
Maximum array length: 10.
Items per page. If not specified, NULL or 0, all elements will be fetched. You should probably specify results ordering as well, if you want the results to be consistent.
The index of the first element to show on page. Items are numbered starting from 0. Default is 0. Only meaningful if limit
is specified as well.
Fields to order the results by, starting from the most significant.
An array of objects, each containg the fields:
The ordering direction, "ascending" or "descending".
Allowed values are: ascending
, descending
.
Defaults to "ascending"
if not specified.
The field to order by. If not specified, the results can be returned in any order.
Allowed values are: account_id
, daily_reports
, default
, id
, language
, monthly_reports
, name
, services_count
, weekly_reports
.
Maximum array length: 10.
The groups of fields to be returned with each object.
An array of strings.
No values are supported at the moment.
This array cannot contain duplicate values.
Defaults to []
if not specified.
An array of objects, each containg the fields:
The identifier of the account the group belongs to.
True if the daily reports are enabled for this group.
True if this is the default group.
The group's identifier.
The default reports and notifications language for this group. If NULL, the account's default language will be used.
Allowed values are: en
, pl
.
True if the monthly reports are enabled for this group.
The group name.
The number of services in the group.
True if the weekly reports are enabled for this group.
The total number of results (not including pagination).
This method can be called by read-only users.
Lists locations assigned to a service group.
Filters to apply to the results.
An array of objects, each containg the fields:
The filter argument (the text to be contained in the field, or value to be compared). The argument must be of the same type as the field you filter by.
The field to filter the results by.
Allowed values are: city
, color
, country
, ip
, link
, location_id
, name
.
The type of filter. Filters (not_)greater_than and (not_)lower_than compare numbers numerically and string lexicographically. Defaults to "equals".
Allowed values are: contains
, equals
, greater_than
, lower_than
, not_greater_than
, not_lower_than
.
Maximum array length: 10.
The group's ID
Items per page. If not specified, NULL or 0, all elements will be fetched. You should probably specify results ordering as well, if you want the results to be consistent.
The index of the first element to show on page. Items are numbered starting from 0. Default is 0. Only meaningful if limit
is specified as well.
Fields to order the results by, starting from the most significant.
An array of objects, each containg the fields:
The ordering direction, "ascending" or "descending".
Allowed values are: ascending
, descending
.
Defaults to "ascending"
if not specified.
The field to order by. If not specified, the results can be returned in any order.
Allowed values are: city
, color
, country
, ip
, link
, location_id
, name
.
Maximum array length: 10.
The groups of fields to be returned with each object.
An array of strings.
No values are supported at the moment.
This array cannot contain duplicate values.
Defaults to []
if not specified.
An array of objects, each containg the fields:
The city that the sensor is located in.
The location's color, given as 6 letters of hexadecimal RGB. This is the color used on the service response time in the Administration Panel.
This value must match the /^[0-9a-f]{6}$/
regular expression.
The country that the sensor is located in.
The IPv4 address of the location.
The network links available in the location.
The location's identifier.
The name of the location.
The total number of results (not including pagination).
This method can be called by read-only users.
Returns the JSON or WSDL specification of the Group
API module.
This method is meant for internal usage in API clients. Unless you are writing one, you probably do not need it.
The specification format you want to use. If omitted, defaults to json
if you call this method using JSON request ot wsdl
if you call this method with SOAP.
Allowed values are: json
, wsdl
.
The specification of the module.
The specification format used.
Allowed values are: json
, wsdl
.
This method can be called by read-only users.
This method allows you to get information about a single Group object.
The group's identifier.
The groups of fields to be returned with the object.
An array of strings.
No values are supported at the moment.
This array cannot contain duplicate values.
Defaults to []
if not specified.
The identifier of the account the group belongs to.
True if the daily reports are enabled for this group.
True if this is the default group.
The group's identifier.
The default reports and notifications language for this group. If NULL, the account's default language will be used.
Allowed values are: en
, pl
.
The array of monitoring station IDs assigned to this group. All services in this group will be checked from these locations.
An array of unsigned integers.
This array cannot contain duplicate values.
True if the monthly reports are enabled for this group.
The group name.
The number of services in the group.
True if the weekly reports are enabled for this group.
This method can be called by read-only users.
Adds a location to a group.
The group's ID
The location's identifier.
Nothing.
Removes a location from a group.
The group's ID
The location's identifier.
Nothing.
This method updates an existing Group object.
True if the daily reports are enabled for this group.
The group's identifier.
The default reports and notifications language for this group. If NULL, the account's default language will be used.
Allowed values are: en
, pl
.
The array of monitoring station IDs assigned to this group. All services in this group will be checked from these locations.
An array of unsigned integers.
This array cannot contain duplicate values.
True if the monthly reports are enabled for this group.
The group name.
True if the weekly reports are enabled for this group.
Nothing.