Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

User Groups can be used for various purposes including organizing your Users in your Organization. They can be used to hide or limit custom fields, statuses and policy statuses, they can even be used to grant Inherited Abilities to a User instead of having to add Abilities Directly to a User!

Endpoint: /api/ingress/user_group_members

Methods: POST,PUT,DELETE

API Version Support: v1

Security Notice: Please make sure to use https://esotech.atlassian.net/wiki/spaces/EXTDOC/pages/186744846/API#Endpoint-Protection when giving this access to third party systems as API Keys are unprotected unless specified.

The proper endpoint protection to set for an API using this Endpoint is /api/ingress/user_group_members

Data Formats Supported

form-data, x-www-form-urlencoded Form Parameters or JSON Body with Content-Type: application/json set.

Response Codes

200: Success and Warnings

400: Error

Add: Add User Group Membership

This will attempt to add user group memberships to the users provided. If they already have a membership it will do nothing.

Method: POST

Parameter

Required

Format

Description

Aliases

user_id

csv|int|array - User IDs

One or more User IDs

user_iduser_idsusers

group_id

csv|int|array - Mixed Tag ID’s or Tag Names

One of more Group IDs

group_idgroup_idsgroups

JSON Request Body

{
    "group_id": [ 10, 11 ],
    "user_id": [ 15, 248 ]
}

JSON Success Body

{
    "message": "4 User Groups were Added for 2 Users.",
    "added": 4
}

JSON Warning Body

{
    "message": "No User Groups were Added.",
    "added": 0
}

Replace: Replace User Group Memberships

This will attempt to replace user group memberships to the users provided. It will drop groups that are not provided and add groups that are missing.

Endpoint: /api/ingress/user_group_members

Method: PUT

Parameter

Required

Format

Description

Aliases

user_id

csv|int|array - User IDs

One or more User IDs

user_iduser_idsusers

group_id

csv|int|array - Mixed Tag ID’s or Tag Names

One of more Group IDs

group_idgroup_idsgroups

JSON Request Body

{
    "group_id": [ 10, 11 ],
    "user_id": [ 15, 248 ]
}

JSON Success Body

{
    "message": "4 User Groups were Added and 0 Removed from 2 Users.",
    "added": 4,
    "removed": 0
}

JSON Warning Body

{
    "message": "No User Groups were Updated.",
    "added": 0,
    "removed": 0
}

Remove: Remove User Group Memberships

This will attempt to remove user group memberships from the users provided. If they do not have a membership it will do nothing.

Endpoint: /api/ingress/user_group_members

Method: DELETE

Parameter

Required

Format

Description

Aliases

user_id

csv|int|array - User IDs

One or more User IDs

user_iduser_idsusers

group_id

csv|int|array - Mixed Tag ID’s or Tag Names

One of more Group IDs

group_idgroup_idsgroups

JSON Request Body

{
    "group_id": [ 10, 11 ],
    "user_id": [ 15, 248 ]
}

JSON Success Body

{
    "message": "4 User Groups were Removed from 2 Users.",
    "removed": 4
}

JSON Warning Body

{
    "message": "No User Groups were Removed.",
    "removed": 0
}

Drop: Drop User Group Memberships

This will attempt to drop all user group memberships from the users provided. If they do not have any memberships it will do nothing.

Endpoint: /api/ingress/user_group_members/drop

Method: DELETE

Parameter

Required

Format

Description

Aliases

user_id

csv|int|array - User IDs

One or more User IDs

user_iduser_idsusers

group_id

csv|int|array - Mixed Tag ID’s or Tag Names

One of more Group IDs

group_idgroup_idsgroups

JSON Request Body

{
    "user_id": [ 15, 248 ]
}

JSON Success Body

{
    "message": "4 User Groups were Dropped from 2 Users.",
    "dropped": 4
}

JSON Warning Body

{
    "message": "No User Groups were Dropped.",
    "dropped": 0
}

Errors Possible

Error

Resolution

No API ID Provided

Check API ID in Header or Parameters. See https://esotech.atlassian.net/wiki/spaces/EXTDOC/pages/186744846/API#Using-API-ID-and-API-Key

No API Key Provided

Check API Key in Headers or Parameters. See https://esotech.atlassian.net/wiki/spaces/EXTDOC/pages/186744846/API#Using-API-ID-and-API-Key

Missing User IDs

Check user_idparameter.

Could not Find Users

Check user_idparameter.

Users Found does not match Users Requested

Check user_idparameter.

Missing User Group IDs

Check group_idparameter.

Could not Find User Groups

Check group_idparameter.

User Groups Found does not match User Groups Requested

Check group_idparameter.

  • No labels