UserGroups

UserGroups - Create

Creates a new user group in a Fabric-enabled LogPoint.

POST

https://api-server-host-name/configapi/{pool_UUID}/{logpoint_identifier}/UserGroups

Parameter

Field

Label in UI

Type

Description

description

Description

String

Description of usergroup. Optional Field

name

Name

String

Name of usergroup. Mandatory Field

object_permission

Object Permission

json

Mandatory Field. Specify permission for repos, usergroups, devices and ips. The following parameters should be provided to define object_permission.

include_all_permission: Specifies full permission for repos and device_groups for all logpoints. If include_all_permission key is set as true, user should not give permission parameter in object_permission json.

permission: List of jsons. To define permission, the following parameters should be provided.

  • logpoint_ip: Private IP of the logpoint. Use DistributedLogpoints - List API to obtain the private_ip of the required distributed logpoints. For localhost the logpoint_ip value is “127.0.0.1”. Mandatory Field.

  • include_all_repos: Select/Unselect all repos for the given logpoint. If include_all_repos key is set as true, user should not give repos parameter.

  • repos: Name of the repos. Use Repos - FetchRemoteRepos API to obtain the names of the repos.

  • include_all_device_groups: Select/Unselect all device groups for the given logpoint. If include_all_device_groups key is set as true, user should not give device_groups parameter.

  • device_groups: List of jsons.

    To define device_groups, the following parameters should be provided.

    • name: Name of device group. Use DeviceGroups - List API to obtain the names of the device groups. Mandatory field.

    • include_all_devices: Select/Unselect all devices of given device_groups. If include_all_devices key is set as true, user should not give devices parameter.

    • devices: List of jsons.

    To define devices, the following parameters should be provided.

    • name: Name of devices or logsources. Use Devices - List API to obtain the names of the devices. Use LogSources - List API to obtain the names of the logsources. Mandatory field.

    • include_all_ips: Select/Unselect all ips of given devices or logsources. If include_all_ips key is set as true, user should not give ips parameter.

    • ips: List of ips of devices or logsources. Use Devices - List API to obtain the ips of the devices. Use LogSources - List API to obtain the addresses of the logsources.

query

Universal Query

String

Universal Query for a user group. Optional Field

roles

Permission Group

String

Permission group. Mandatory Field

Request Example

{
    "data": {
        "description": "New usergroup",
        "name": "usergroup1",
        "object_permission": {
            "include_all_permission": false,
            "permission": [
                {
                    "include_all_device_groups": true,
                    "include_all_repos": true,
                    "logpoint_ip": "10.45.1.1"
                },
                {
                    "device_groups": [
                        {
                            "include_all_devices": true,
                            "name": "devicegroup3"
                        },
                        {
                            "devices": [
                                {
                                    "include_all_ips": true,
                                    "name": "device2"
                                }
                            ],
                            "include_all_devices": false,
                            "name": "devicegroup2"
                        },
                        {
                            "devices": [
                                {
                                    "include_all_ips": false,
                                    "ips": [
                                        "10.40.1.2"
                                    ],
                                    "name": "device1"
                                },
                                {
                                    "name": "logsource",
                                    "include_all_ips": false,
                                    "ips": [
                                        "10.40.1.3"
                                    ]
                                }
                            ],
                            "include_all_devices": false,
                            "name": "devicegroup1"
                        }
                    ],
                    "logpoint_ip": "127.0.0.1",
                    "repos": [
                        "_logpoint"
                    ]
                }
            ]
        },
        "query": "col_type=syslog",
        "roles": "5bebd9fdd8aaa42840edc84e"
    }
}

Success Response

{
    "status": "Success",
    "message": "/monitorapi/{pool_UUID}/{logpoint_identifier}/orders/{request_id}"
}

UserGroups - Edit

Edits a new user group in a Fabric-enabled LogPoint.

PUT

https://api-server-host-name/configapi/{pool_UUID}/{logpoint_identifier}/UserGroups/{id}

Parameter

Field

Label in UI

Type

Description

description

Description

String

Description of usergroup. Optional Field

id

-

String

Existing Usergroup id . Obtain the value of the required Usergroup id using Usergroups - List API. Mandatory Field

name

Name

String

Name of usergroup. Mandatory Field

object_permission

Object Permission

json

Mandatory Field. Specify permission for repos, usergroups, devices and ips. The following parameters should be provided to define object_permission.

include_all_permission: Specifies full permission for repos and device_groups for all logpoints. If include_all_permission key is set as true, user should not give permission parameter in object_permission json.

permission: List of jsons. To define permission, the following parameters should be provided.

  • logpoint_ip: Private IP of the logpoint. Use DistributedLogpoints - List API to obtain the private_ip of the required distributed logpoints. For localhost the logpoint_ip value is “127.0.0.1”. Mandatory Field.

  • include_all_repos: Select/Unselect all repos for the given logpoint. If include_all_repos key is set as true, user should not give repos parameter.

  • repos: Name of the repos. Use Repos - FetchRemoteRepos API to obtain the names of the repos.

  • include_all_device_groups: Select/Unselect all device groups for the given logpoint. If include_all_device_groups key is set as true, user should not give device_groups parameter.

  • device_groups: List of jsons.

    To define device_groups, the following parameters should be provided.

    • name: Name of device group. Use DeviceGroups - List API to obtain the names of the device groups. Mandatory field.

    • include_all_devices: Select/Unselect all devices of given device_groups. If include_all_devices key is set as true, user should not give devices parameter.

    • devices: List of jsons.

    To define devices, the following parameters should be provided.

    • name: Name of devices or logsources. Use Devices - List API to obtain the names of the devices. Use LogSources - List API to obtain the names of the logsources. Mandatory field.

    • include_all_ips: Select/Unselect all ips of given devices or logsources. If include_all_ips key is set as true, user should not give ips parameter.

    • ips: List of ips of devices or logsources. Use Devices - List API to obtain the ips of the devices. Use LogSources - List API to obtain the addresses of the logsources.

query

Universal Query

String

Universal Query for a user group. Optional Field

roles

Permission Group

String

Permission group. Mandatory Field

Request Example

{
    "data": {
        "description": "New usergroup",
        "name": "usergroup1",
        "object_permission": {
            "include_all_permission": false,
            "permission": [
                {
                    "include_all_device_groups": true,
                    "include_all_repos": true,
                    "logpoint_ip": "10.45.1.1"
                },
                {
                    "device_groups": [
                        {
                            "include_all_devices": true,
                            "name": "devicegroup3"
                        },
                        {
                            "devices": [
                                {
                                    "include_all_ips": true,
                                    "name": "device2"
                                }
                            ],
                            "include_all_devices": false,
                            "name": "devicegroup2"
                        },
                        {
                            "devices": [
                                {
                                    "include_all_ips": false,
                                    "ips": [
                                        "10.40.1.2"
                                    ],
                                    "name": "device1"
                                },
                                {
                                    "name": "logsource",
                                    "include_all_ips": false,
                                    "ips": [
                                        "10.40.1.3"
                                    ]
                                }
                            ],
                            "include_all_devices": false,
                            "name": "devicegroup1"
                        }
                    ],
                    "logpoint_ip": "127.0.0.1",
                    "repos": [
                        "_logpoint"
                    ]
                }
            ]
        },
        "query": "col_type=syslog",
        "roles": "5bebd9fdd8aaa42840edc84e"
    }
}

Success Response

{
    "status": "Success",
    "message": "/monitorapi/{pool_UUID}/{logpoint_identifier}/orders/{request_id}"
}

UserGroups - Get

Fetches a User Group with given ID.

GET

https://api-server-host-name/configapi/{pool_UUID}/{logpoint_identifier}/UserGroups/{id}

Parameter

Field

Label in UI

Type

Description

id

-

String

ID of the existing usergroup that you want to fetch.

Success Response

{
    "active": true,
    "description": "New usergroup",
    "id": "60e82304689d753ab310f1fe",
    "lpadmin": false,
    "name": "usergroup1",
    "object_permission": {
        "include_all_permission": false,
        "permitted": [
            {
                "device_groups": [
                    {
                        "devices": [
                            {
                                "ips": [
                                    "10.45.1.1"
                                ],
                                "name": "device1"
                            }
                        ],
                        "name": "devicegroup1"
                    }
                ],
                "logpoint_ip": "127.0.0.1",
                "logpoint_name": "LogPoint10",
                "repos": [
                    "_logpoint"
                ]
            },
            {
                "device_groups": [
                    {
                        "devices": [
                            {
                                "ips": [
                                    "10.3.4.5",
                                    "10.7.7.11"
                                ],
                                "name": "device2"
                            },
                            {
                                "ips": [
                                    "10.7.8.1",
                                    "10.7.8.2"
                                ],
                                "name": "device3"
                            }
                        ],
                        "name": "devicegroup2"
                    }
                ],
                "logpoint_ip": "10.232.21.1",
                "logpoint_name": "LogPoint11",
                "repos": [
                    "_LogPointAlerts",
                    "_logpoint",
                    "default"
                ]
            }
        ]
    },
    "permission_group": "60dd435d3f7ba781e7035326",
    "query": "col_type=syslog",
    "tid": "",
    "useradmin": false,
    "users": []
}

UserGroups - List

Lists all existing User Groups.

GET

https://api-server-host-name/configapi/{pool_UUID}/{logpoint_identifier}/UserGroups

Success Response

[
    {
        "active": true,
        "description": "New usergroup",
        "id": "60e82304689d753ab310f1fe",
        "lpadmin": false,
        "name": "usergroup1",
        "object_permission": {
            "include_all_permission": false,
            "permitted": [
                {
                    "device_groups": [
                        {
                            "devices": [
                                {
                                    "ips": [
                                        "10.45.1.1"
                                    ],
                                    "name": "device1"
                                }
                            ],
                            "name": "devicegroup1"
                        }
                    ],
                    "logpoint_ip": "127.0.0.1",
                    "logpoint_name": "LogPoint10",
                    "repos": [
                        "_logpoint"
                    ]
                },
                {
                    "device_groups": [
                        {
                            "devices": [
                                {
                                    "ips": [
                                        "10.3.4.5",
                                        "10.7.7.11"
                                    ],
                                    "name": "device2"
                                },
                                {
                                    "ips": [
                                        "10.7.8.1",
                                        "10.7.8.2"
                                    ],
                                    "name": "device3"
                                }
                            ],
                            "name": "devicegroup2"
                        }
                    ],
                    "logpoint_ip": "10.232.21.1",
                    "logpoint_name": "LogPoint11",
                    "repos": [
                        "_LogPointAlerts",
                        "_logpoint",
                        "default"
                    ]
                }
            ]
        },
        "permission_group": "60dd435d3f7ba781e7035326",
        "query": "col_type=syslog",
        "tid": "",
        "useradmin": false,
        "users": []
    }
]

UserGroups - RefreshList

Syncs the current User Group List with LogPoint’s User Group List.

POST

https://api-server-host-name/configapi/{pool_UUID}/{logpoint_identifier}/UserGroups/refreshlist

Request Example

{
    "data": {}
}

Success Response

{
    "status": "Success",
    "message": "/monitorapi/{pool_UUID}/{logpoint_identifier}/orders/{request_id}"
}

UserGroups - Trash

Removes the usergroup with given ID.

DELETE

https://api-server-host-name/configapi/{pool_UUID}/{logpoint_identifier}/UserGroups/{id}

Parameter

Field

Label in UI

Type

Description

id

-

String

ID of the existing device that you want to delete. Mandatory Field

Success Response

{
    "status": "Success",
    "message": "/monitorapi/{pool_UUID}/{logpoint_identifier}/orders/{request_id}"
}

Note

  1. You can use the Ungrouped value in the device_groups parameter of the UserGroups - Create and UserGroups - Edit APIs to include the devices that do not belong to any device groups.

  2. While configuring the user groups for remote LogPoint instances, if you are using the Ungrouped value then at least one of the given devices must not belong to any device group for the API to execute successfully.

  3. You must execute the UserGroups - RefreshList API until the data in the API Server is synced with the Fabric-enabled LogPoint data in the following cases:

  • After adding or deleting distributed LogPoints.

  • After creating, editing, or deleting repos, device groups, and devices.

  • After creating or editing user groups.


Helpful?

We are glad this guide helped.


Please don't include any personal information in your comment

Contact Support