Group API
Groups can be accessed and modified through this API using four services: GET, POST, PUT, and PATCH. These four services allow for the retrieval, creation, complete update, and partial update of groups.
Authentication - Use Basic Authentication for this API.
GET
There are two implementations of GET. One will find a group with the given Id and return the JSON representation of the group . The other will find a list of groups matching the parameters supplied to it.
GET by ID
This GET service will find a group with the given Id and return the JSON representation of the object.
API URL
http://host:port/flexdeploy/rest/v1/administration/security/group/{Id}
Request
Parameter | Type | Required | Description |
|---|---|---|---|
Id | URL | Yes | This is a URL parameter for the Id which is used to find and return a group |
Response
| Attributes | Type | Description |
|---|---|---|
| description | String | The description of the group. |
| isAdminGroup | Boolean | The boolean representing whether the group is a Flex Deploy Administrator. If isAdminGroupis updated to null, it will default to false. |
| groupId | Long | The unique Id of the group. |
| groupName | String | The unique name of the group. |
| isActive | Boolean | The boolean representing whether the group is active. If isActive is updated to null it will default to true. |
Response Codes
HTTP Code | Description |
|---|---|
200 | Group was found and returned |
400 | Bad request |
401 | Authentication failure |
403 | Authorization failure (no access to resource) |
404 | Group not found |
500 | Unexpected internal server error |
Example
If we had a group in our database with an Id of 10000 and had the following attributes
Group - 10000
{
"isActive": true,
"description": null,
"groupName": "JUNIT_Group1",
"createdBy": "fdadmin",
"groupId": 1000,
"isAdminGroup": true
}When we run a GET request at the following URL
http://host:port/flexdeploy/rest/v1/administration/security/group/10000
The GET request would return the following JSON group object
Group - 10000
{
"createdOn": "2023-01-27T23:55:06.602+0000",
"updatedOn": "2023-01-27T23:55:06.602+0000",
"updatedBy": "fdadmin",
"versionNumber": 1,
"isActive": true,
"description": null,
"groupName": "JUNIT_Group1",
"createdBy": "fdadmin",
"groupId": 1000,
"isAdminGroup": true
}GET (Using Query Parameters)
This GET service will return a list of groups in the form of JSON objects based on the query parameters group name. Groups are only returned if they match all of the specified query parameters. If no query parameters are given this request will return the entire list of groups.
API URLs
http://host:port/flexdeploy/rest/v1/administration/security/group?
Append the following character sequences to the above URL to specify Query parameters.
Use '&' between successive query parameters:
groupName={groupname}
Examples:
To search by group name:
http://host:port/flexdeploy/rest/v1/administration/security/group?groupName=read
* searching by group name returns all groups that contain the specified string in their group name
The query parameters are not case sensitive. Searching by groupName=NAME is the same as searching by groupName=name.
Request
Attributes | Type | Required | Description |
|---|---|---|---|
groupName | Query - String | No | The name of the group. Contains ignore case type search. |
Response
| Attributes | Type | Description |
|---|---|---|
| description | String | The description of the group. |
| isAdminGroup | Boolean | The boolean representing whether the group is a Flex Deploy Administrator. If isAdminGroupis updated to null, it will default to false. |
| groupId | Long | The unique Id of the group. |
| groupName | String | The unique name of the group. |
| isActive | Boolean | The boolean representing whether the group is active. If isActive is updated to null it will default to true. |
Response Codes
HTTP Code | Description |
|---|---|
200 | Search successful and results returned |
400 | Bad request |
401 | Authentication failure |
403 | Authorization failure (no access to resource) |
500 | Unexpected internal server error |
- style