...
...
...
...
...
...
...
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.
...
Include Page |
---|
...
title | Base URL for Group REST API |
---|
...
http://host:port/flexdeploy/rest/administration/security/group
|
Table of Contents | ||
---|---|---|
|
Each function returns a JSON group object. The group object has these attributes:
...
Additionally, each GlobalPermissionPojo in the list of globalpermissions contains these attributes
...
Below is the list of possible global permissions
...
Additionally, each DeploymenPermissionPojo in the list of deploymentPermissions contains these attributes
...
Below is the list of possible global permissions.
Object Type | Action Type |
---|---|
PROJECT | PAGEVIEW |
APPROVAL | READ, UPDATE |
WINDOW | READ, UPDATE |
NOTIFICATION | READ, UPDATE, DELETE |
WORKFLOW | READ, UPDATE |
REPORT | READ |
ENVINSTANCE | READ, UPDATE |
ENVIRONMENT | READ, UPDATE |
INSTANCE | READ, UPDATE |
ENDPOINT | READ, UPDATE |
SCHEDULEDTASK | READ, UPDATE |
PLUGIN | READ, UPLOAD |
PROPERTYSET | READ |
DEFAULTS | READ, UPDATE |
FLEXFIELDS | READ, UPDATE |
TEMPLATE | READ, UPDATE |
USER | READ |
GROUP | READ |
TESTTOOL | READ, UPDATE |
TESTTYPE | READ, UPDATE |
ISSUETRACKINGSYSTEM | READ, UPDATE |
CHANGEMANAGEMENTSYSTEM | READ, UPDATE |
RELEASE | READ, UPDATE, CREATESNAPSHOT, CONFIGUREPROJECTLIST, CONFIGUREPIPLINE, CONFIGURECMS, MANAGELIFECYCLE, GRANTPERMISSIONS |
PIPELINE | READ, UPDATE |
OBJECTTYPE | READ, UPDATE |
CLOUDACCOUNT | READ, UPDATE |
ARTIFACTREPOACCOUNT | READ, UPDATE |
CISERVERACCOUNT | READ, UPDATE |
ANALYSISTOOLACCOUNT | READ, UPDATE |
OTHERTOOLSACCOUNT | READ, UPDATE |
ACCOUNTPROVIDER | READ, UPDATE |
REALM | READ |
CREDENTIAL | READ, UPDATE, DELETE |
CREDENTIALSTORE | READ |
CREDENTIALSTOREPROVIDER | READ |
WEBHOOKFUNCTION | READ, UPDATE, DELETE |
WEBHOOKPROVIDER | READ, UPDATE |
WEBHOOKMESSAGE | READ, VIEWLOGS, VIEWCONTENT, EXECUTE |
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.
...
This GET service will find a group with the given Id and return the JSON representation of the object.
Info | ||
---|---|---|
| ||
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 |
Include Page | ||||
---|---|---|---|---|
|
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
Code Block | ||||
---|---|---|---|---|
| ||||
{ "description": "test", "isFlexDeployAdministrator": false, "groupId": 10000, "groupName": "test", "isActive": true, "globalPermissions": [ { "objectType": "WORKFLOW", "actionType": "READ" }], "deploymentPermissions": {"environmentIdsenvironments": [ 18605, 20610 ], "allEnvironments":false } } |
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
Code Block | ||||
---|---|---|---|---|
| ||||
{ "description": "test", "isFlexDeployAdministrator": false, "groupId": 10000, "groupName": "test", "isActive": true, "globalPermissions": [ { "objectType": "WORKFLOW", "actionType": "READ" }], "deploymentPermissions": {"environmentIdsenvironments": [ 18605, 20610 ], "allEnvironments":false } } |
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.
Info | ||
---|---|---|
| ||
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:groupnamegroupName={groupname} Examples:To search by group name:http://host:port/flexdeploy/rest/topologyv1/administration/security/group?groupnamegroupName=readread |
* searching by group name returns all groups that contain the specified string in their group name
Tip |
---|
The query parameters are not case sensitive. Searching by groupnamegroupName=NAME is the same as searching by groupnamegroupName=name. |
...
Request
Attributes | Type | Required | Description |
---|
groupName | Query - String | No | The name of the group. Contains ignore case type search. |
Example
If we had a group in our database with an Id of 10000 and had the following attributes
...
Include Page | ||||
---|---|---|---|---|
|
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 |
Example
If we had a group in our database with an Id of 10000 and had the following attributes
Code Block | ||||
---|---|---|---|---|
| ||||
{ "description": "test", "isFlexDeployAdministrator": false, "groupId": 10000, "groupName": "test", "isActive": true, "globalPermissions": [ { "objectType": "WORKFLOW", "actionType": "READ" }], "deploymentPermissions": {"environmentIdsenvironments": [ 18605, 20610 ], "allEnvironments":false } } |
When we run a GET request at the following URL
http://host:port/flexdeploy/rest/v1/administration/security/group?groupname=test
The GET request would return the following JSON group object
Code Block | ||||
---|---|---|---|---|
| ||||
[ { "description": "test", "isFlexDeployAdministrator": false, "groupId": 10000, "groupName": "test", "isActive": true, "globalPermissions": [ { "objectType": "WORKFLOW", "actionType": "READ" }], "deploymentPermissions": {"environmentIdsenvironments": [ 18605, 20610 ], "allEnvironments":false } } ] |
POST
This POST service will create a new group with the same attributes as the given JSON object.
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v1/administration/security/group |
...
Request
Attributes | Type | Required | Description |
---|---|---|---|
description | String | No | The description of the group. |
isFlexDeployAdministrator | Boolean | No | The boolean representing whether the group is a Flex Deploy Administrator. |
If isFlexDeployAdministrator is set to null it will default to false. | |||
groupName | String | Yes | The unique name of the group. |
isActive | Boolean | No | The boolean representing whether the group is active. If isActive is set to null it will default to true. |
globalPermissions | List<GlobalPermissionPojo> | No | The list of global permissions associated with the group |
Example
If the POST request receives the following JSON group object,
...
theme | Eclipse |
---|---|
title | Group - 10000 |
...
. If permission is not provided in input, it will be set to false. For example, actionType (READ), objectType (USER) is not present in input, it will be marked as false for this group. GlobalPermissionPojo contains actionType and objectType attributes. | |||
deploymentPermissions | List<DeploymentPermissionPojo> | No | The list of deployment permissions associated with the group. It can be set to
DeploymentPermissionPojo contains allEnvironment (boolean) and environments (array of environment ids). |
Include Page | ||||
---|---|---|---|---|
|
Response Codes
HTTP Code | Description |
---|---|
201 | Group was created |
400 | Bad request |
401 | Authentication failure |
403 | Authorization failure (no access to resource) |
500 | Unexpected internal server error |
Example
If the POST request receives the following JSON group object,
Code Block | ||||
---|---|---|---|---|
| ||||
{ "description": "This is a simple group with no permissions.", "groupName": "Simple Group", "isActive": true, "isFlexDeployAdministrator": false, "deploymentPermissions": {"environments": [], "allEnvironments":false }, "globalPermissions": [ { "actionType": "READUPDATE", "objectType": "SCHEDULEDTASKAPPROVAL" }, { "actionType": "READ", "objectType": "WORKFLOWNOTIFICATION" }, ] } |
The following group object will then be created as a new row in the database.
Code Block | ||||
---|---|---|---|---|
| ||||
{ "description": "This is a simple group with permissions.", { "groupIdactionType": 10000"READ", "groupName": "Simple Group", "isActiveobjectType": true,"SCHEDULEDTASK" "isFlexDeployAdministrator": false, "deploymentPermissions": {"environmentIds": [], "allEnvironments":false }, "globalPermissions": [ { "actionType": "UPDATEREAD", "objectType": "APPROVALWORKFLOW" }, { ] } |
The following group object will then be created as a new row in the database.
Code Block | ||||
---|---|---|---|---|
| ||||
{ "actionTypedescription": "READ",This is a simple group with permissions.", "objectTypegroupId": "NOTIFICATION"10000, "groupName": "Simple }Group", "isActive": true, "isFlexDeployAdministrator": false, { "deploymentPermissions": {"environments": [], "allEnvironments":false }, "globalPermissions": [ { "actionType": "READUPDATE", "objectType": "SCHEDULEDTASKAPPROVAL" }, { "actionType": "READ", "objectType": "WORKFLOWNOTIFICATION" } ] } |
PUT
This PUT service will update all attributes of a group with the given Id based on the attributes of a JSON object parameters.
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/administration/security/group/{Id} |
Parameters
...
},
{
"actionType": "READ",
"objectType": "SCHEDULEDTASK"
},
{
"actionType": "READ",
"objectType": "WORKFLOW"
}
]
} |
PUT
This PUT service will update all attributes of a group with the given Id based on the attributes of a JSON object parameters.
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v1/administration/security/group/{Id} |
Request
Attributes | Type | Required | Description |
---|---|---|---|
description | String | No | The description of the group. |
isFlexDeployAdministrator | Boolean | No | The boolean representing whether the group is a Flex Deploy Administrator. If isFlexDeployAdministrator is updated to null it will default to false. |
groupName | String | Yes | The unique name of the group. |
isActive | Boolean | No | The boolean representing whether the group is active. If isActive is updated to null it will default to true. |
globalPermissions | List<GlobalPermissionPojo> | No | The list of global permissions associated with the group. If permission is not provided in input, it will be set to false. For example, actionType (READ), objectType (USER) is not present in input, it will be marked as false for this group. GlobalPermissionPojo contains actionType and objectType attributes. |
deploymentPermissions | List<DeploymentPermissionPojo> | No | The list of deployment permissions associated with the group. It can be set to
DeploymentPermissionPojo contains allEnvironment (boolean) and environments (array of environment ids). |
Include Page | ||||
---|---|---|---|---|
|
Response Codes
HTTP Code | Description |
---|---|
200 | Group was found and updated |
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
Code Block | ||||
---|---|---|---|---|
| ||||
{ "description": "This is a simple group with no permissions.", "groupName": "Simple Group", "isActive": true, "isFlexDeployAdministrator": false, "deploymentPermissions": {"environmentIdsenvironments": [], "allEnvironments":false }, "globalPermissions": [ { "actionType": "UPDATE", "objectType": "APPROVAL" }, { "actionType": "READ", "objectType": "NOTIFICATION" }, { "actionType": "READ", "objectType": "SCHEDULEDTASK" }, { "actionType": "READ", "objectType": "WORKFLOW" } ] } |
When we run a PUT request at the following URL
http://host:port/flexdeploy/rest/v1/administration/security/group/10000
And the PUT request receives the following JSON group object,
Code Block | ||||
---|---|---|---|---|
| ||||
{ "description": "This is an updated group.", "groupName": "Simple Group Put", "isActive": true, "isFlexDeployAdministrator": false, "deploymentPermissions": {"environmentIdsenvironments": [11001], "allEnvironments":false }, "globalPermissions": [ { "actionType": "UPDATE", "objectType": "APPROVAL" }, { "actionType": "READ", "objectType": "NOTIFICATION" } ] } |
...
Code Block | ||||
---|---|---|---|---|
| ||||
{ "description": "This is an updated group.", "groupName": "Simple Group Put", "isActive": true, "isFlexDeployAdministrator": false, "deploymentPermissions": {"environmentIdsenvironments": [11001], "allEnvironments":false }, "globalPermissions": [ { "actionType": "UPDATE", "objectType": "APPROVAL" }, { "actionType": "READ", "objectType": "NOTIFICATION" } ] } |
...
PATCH
This PATCH service will update an existing group with the information passed through a JSON object. If an attribute of the JSON is null it will not be updated in the group.
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/v1/administration/security/group/{Id} |
...
Request
Attributes | Type | Required | Description | ||
---|---|---|---|---|---|
description | String | No | The description of the group. | ||
isFlexDeployAdministrator | Boolean | No | The boolean representing whether the group is a Flex Deploy Administrator. | ||
groupIdgroupName | LongString | No | The unique Id of the group. | groupName | Stringname of the group. |
isActive | Boolean | No | The boolean representing whether the group is active. | ||
globalPermissions | List<GlobalPermissionPojo> | No | The list of global permissions associated with the group. Existing permissions are not changed, input permissions are marked as true. | ||
deploymentPermissions | List<DeploymentPermissionPojo> | No | The unique name of the group. | ||
isActive | Boolean | No | The boolean representing whether the group is active. | ||
globalPermissions | List<GlobalPermissionPojo> | No | The list of global permissions associated with the group | ||
deploymentPermissions | List<DeploymentPermissionPojo> | No | The list of deployment permissions associated with the group list of deployment permissions associated with the group. If using environments array, environment ids are added to existing deployment environments for group. DeploymentPermissionPojo contains allEnvironment (boolean) and environments (array of environment ids). |
Include Page | ||||
---|---|---|---|---|
|
Response Codes
HTTP Code | Description |
---|---|
200 | Group was found and updated |
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
Code Block | ||||
---|---|---|---|---|
| ||||
{ "description": "This is a simple group with no permissions.", "groupName": "Simple Group", "isActive": true, "isFlexDeployAdministrator": false, "deploymentPermissions": {"environmentIdsenvironments": [], "allEnvironments":false }, "globalPermissions": [ { "actionType": "UPDATE", "objectType": "APPROVAL" }, { "actionType": "READ", "objectType": "NOTIFICATION" }, { "actionType": "READ", "objectType": "SCHEDULEDTASK" }, { "actionType": "READ", "objectType": "WORKFLOW" } ] } |
When we run a PATCH request at the following URL
http://host:port/flexdeploy/rest/v1/administration/security/group/10000
And the PATCH request receives the following JSON group object,
...
Code Block | ||||
---|---|---|---|---|
| ||||
{ "description": "This is an patched group.", "groupName": "Simple Group Patch", "isActive": true, "isFlexDeployAdministrator": false, "deploymentPermissions": {"environmentIdsenvironments": [], "deployAllEnvironments":false }, "globalPermissions": [ { "actionType": "UPDATE", "objectType": "APPROVAL" }, { "actionType": "READ", "objectType": "NOTIFICATION" }, { "actionType": "READ", "objectType": "SCHEDULEDTASK" }, { "actionType": "READ", "objectType": "WORKFLOW" } ] } |
...