Search for monitors given a parameters combination of: section, refId and user
| Name | Type | Description |
|---|---|---|
| section | string | Section of the monitored object (e.g. tracker, trackeritem). Required. |
| refId | int | Id of the monitored object. Required unless user is provided. |
| user | string | User id or unix name. When provided with section and refId, returns a single record for that user. |
| sort_field | string | Field to sort by. Options: section, refId, userId. Default section. |
| sort_dir | string | Sort direction: asc or desc. Default desc. |
| page_num | int | Page number (zero-based). Default 0. |
| page_size | int | Records per page. Default 20. |
sort_field and sort_dir parameters to control the order in which
records are returned.page_size and page_num parameters to control the set of records
returned.Single record or zero or more MonitorBasic records.
| Name | Type | Description |
|---|---|---|
| section | string | Type of the monitored object |
| refId | int | Id of object monitored |
| user | \gforge\core\models\api\UserBasic |
GET http://api.mygforge.tld/monitor/?section=wiki&refId=227
{
paging: {
page_size: 20,
page_num: 1,
sort_field: "id",
sort_dir: "asc"
},
items: [
{
section: "wiki",
refId: 227,
user: {
id: 8388,
unixName: "someuser",
password: null,
firstname: "John",
lastname: "Doe",
email: "jdoe@gforgegroup.com",
timezone: "America/Argentina/Buenos_Aires",
status: 1,
externalId: null,
isGroup: "N",
ccode: "AR",
language: "en",
theme: 1,
img_url: "/api/user/jdoe/avatar",
html_url: "/user/jdoe",
details_url: "/api/user/jdoe/details",
isSiteAdmin: true,
api_url: "/api/user/jdoe"
}
}
],
links: [
]
}
Sets a monitor on a given entity for the specified user.
| Name | Type | Description |
|---|---|---|
| section | string | Section of the monitored object (e.g. tracker, trackeritem). Required. |
| refId | int | Id of the monitored object. Required. |
| user | string | User id or unix name of the monitoring user. Required. |
The created or existing monitor record.
| Name | Type | Description |
|---|---|---|
| section | string | Type of the monitored object |
| refId | int | Id of object monitored |
| user | \gforge\core\models\api\UserBasic |
Removes a monitor for a given entity and user.
| Name | Type | Description |
|---|---|---|
| section | string | Section of the monitored object (e.g. tracker, trackeritem). Required. |
| refId | int | Id of the monitored object. Required. |
| user | int | User id of the monitoring user to remove. Required. |