Moogsoft Docs

getUsers

A MoogDb v2 method that returns details of all users.

Back to MoogDb V2 API Method Reference.

Request arguments

Method getUsers takes the following request arguments:

Name

Type

Required

Description

limit

Number

No

Maximum number of users to return. Default is 1000.

Response

Method getUsers returns the following response:

Type

Description

JSON Object

A JSON object containing information on all users, up to the limit.

Examples

The following examples demonstrate typical use of method getUsers:

Request example

Example request to return the details of all users:

var cevent = moogdb.getUsers;

Response example

Example response returning the details of all users:

[
    {
        "uid": 3,
        "teams": [
            "Cloud DevOps"
        ],
        "fullname": "Administrator",
        "username": "admin"
    },
    {
        "uid": 6,
        "teams": [],
        "fullname": "Nagios",
        "username": "Nagios"
    },
    {
        "uid": 5,
        "teams": [],
        "fullname": "Webhook",
        "username": "Webhook"
    }
  ]