Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Anchor
Top
Top

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.

Info
titleBase URL for Group REST API

http://host:port/flexdeploy/rest/administration/security/group

Table of Contents
maxLevel1

Each function returns a JSON group object. The group object has these attributes:

AttributesTypeDescription
descriptionStringThe description of the group.
isFDAdminBooleanThe boolean representing whether the group is a Flex Deploy Administrator.
groupIdLongThe unique Id of the group.
groupNameStringThe unique name of the group.
isActiveBooleanThe boolean representing whether the group is active.
globalPermissionsList<GlobalPermissionPojo>The list of global permissions associated with the group
deploymentPermissionsList<DeploymentPermissionPojo>The list of deployment permissions associated with the group

Additionally, each GlobalPermissionPojo in the list of globalpermissions contains these attributes

AttributesTypeDescription
objectTypeStringThe object type of the global permission
actionTypeStringThe action type of the global permission

Additionally, each DeploymenPermissionPojo in the list of deploymentPermissions contains these attributes

AttributesTypeDescription
environmentIdsList<Long>The list of environment Ids associated with the deployment permissions

Back to Top

...


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. 


Info
titleAPI URL

http://host:port/flexdeploy/rest/administration/security/group/{Id}

Parameters


Parameter

Type

Required

Description

Id

URLYesThis is a URL parameter for the Id which is used to find and return a group


Example

If we had a group in our database with an Id of 10000 and had the following attributes

Code Block
themeEclipse
titleGroup - 10000
{
   "description": "test",
   "isFDAdmin": false,
   "groupId": 10000,
   "groupName": "test",
   "isActive": true,
   "globalPermissions": [   {
      "objectType": "WORKFLOW",
      "actionType": "READ"
   }],
   "deploymentPermissions": {"environmentIds":    [
      18605,
      20610
   ]}
}

When we run a GET request at the following URL

http://host:port/flexdeploy/rest/administration/security/group/10000

The GET request would return the following JSON group object

Code Block
themeEclipse
titleGroup - 10000
{
   "description": "test",
   "isFDAdmin": false,
   "groupId": 10000,
   "groupName": "test",
   "isActive": true,
   "globalPermissions": [   {
      "objectType": "WORKFLOW",
      "actionType": "READ"
   }],
   "deploymentPermissions": {"environmentIds":    [
      18605,
      20610
   ]}
}

Back to Top

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
titleAPI URLs

http://host:port/flexdeploy/rest/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/topology/administration/security/group?groupname=read

* 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 groupname=NAME is the same as searching by groupname=name.

Parameters

AttributesTypeRequiredDescription
groupnameStringNoThe name of the group.

Example

If we had a group in our database with an Id of 10000 and had the following attributes

Code Block
themeEclipse
titleGroup - 10000
{
   "description": "test",
   "isFDAdmin": false,
   "groupId": 10000,
   "groupName": "test",
   "isActive": true,
   "globalPermissions": [   {
      "objectType": "WORKFLOW",
      "actionType": "READ"
   }],
   "deploymentPermissions": {"environmentIds":    [
      18605,
      20610
   ]}
}


When we run a GET request at the following URL

http://host:port/flexdeploy/rest/administration/security/group?groupname=test

The GET request would return the  following JSON group object

Code Block
themeEclipse
titleGroup - 10000
[
{
   "description": "test",
   "isFDAdmin": false,
   "groupId": 10000,
   "groupName": "test",
   "isActive": true,
   "globalPermissions": [   {
      "objectType": "WORKFLOW",
      "actionType": "READ"
   }],
   "deploymentPermissions": {"environmentIds":    [
      18605,
      20610
   ]}
}
]


Back to Top

...


POST

This POST service will create a new group with the same attributes as the given JSON object.

Info
titleAPI URL

http://host:port/flexdeploy/rest/administration/security/group

Parameters

AttributesTypeRequiredDescription
descriptionStringNoThe description of the group.
isFDAdminBooleanNoThe boolean representing whether the group is a Flex Deploy Administrator.
groupIdLongNoThe unique Id of the group.
groupNameStringYesThe unique name of the group.
isActiveBooleanNoThe boolean representing whether the group is active.
globalPermissionsList<GlobalPermissionPojo>NoThe list of global permissions associated with the group
deploymentPermissionsList<DeploymentPermissionPojo>NoThe list of deployment permissions associated with the group

Example

If the POST request receives the following JSON group object,

Code Block
themeEclipse
titleGroup - 10000
{
   "description": "This is a simple group with no permissions.",
   "groupName": "Simple Group",
   "isActive": true,
   "isFDAdmin": false,
   "deploymentPermissions": {"environmentIds": []},
   "globalPermissions":    [
            {
         "actionType": "UPDATE",
         "objectType": "APPROVAL"
      },
            {
         "actionType": "READ",
         "objectType": "NOTIFICATION"
      },
            {
         "actionType": "READ",
         "objectType": "SCHEDULEDTASK"
      },
            {
         "actionType": "READ",
         "objectType": "WORKFLOW"
      }
   ]
}

The following group object will then be created as a new row in the database.

Code Block
themeEclipse
titleGroup - 10000
{
   "description": "This is a simple group with permissions.",
   "groupId": 10000,
   "groupName": "Simple Group",
   "isActive": true,
   "isFDAdmin": false,
   "deploymentPermissions": {"environmentIds": []},
   "globalPermissions":    [
            {
         "actionType": "UPDATE",
         "objectType": "APPROVAL"
      },
            {
         "actionType": "READ",
         "objectType": "NOTIFICATION"
      },
            {
         "actionType": "READ",
         "objectType": "SCHEDULEDTASK"
      },
            {
         "actionType": "READ",
         "objectType": "WORKFLOW"
      }
   ]
}


Back to Top

...

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
titleAPI URL

http://host:port/flexdeploy/administration/security/group/{Id}

Parameters

AttributesTypeRequiredDescription
descriptionStringNoThe description of the group.
isFDAdminBooleanNoThe boolean representing whether the group is a Flex Deploy Administrator.
groupIdLongNoThe unique Id of the group.
groupNameStringYesThe unique name of the group.
isActiveBooleanNoThe boolean representing whether the group is active.
globalPermissionsList<GlobalPermissionPojo>NoThe list of global permissions associated with the group
deploymentPermissionsList<DeploymentPermissionPojo>NoThe list of deployment permissions associated with the group

Example

If we had a group in our database with an Id of 10000 and had the following attributes

Code Block
themeEclipse
titleGroup - 10000
{
   "description": "This is a simple group with no permissions.",
   "groupName": "Simple Group",
   "isActive": true,
   "isFDAdmin": false,
   "deploymentPermissions": {"environmentIds": []},
   "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/administration/security/group/10000

And the PUT request receives the following JSON group object,

Code Block
themeEclipse
titleEnvironment PUT Receive JSON
{
   "description": "This is an updated group.",
   "groupName": "Simple Group Put",
   "isActive": true,
   "isFDAdmin": false,
   "deploymentPermissions": {"environmentIds": [11001]},
   "globalPermissions":    [
            {
         "actionType": "UPDATE",
         "objectType": "APPROVAL"
      },
            {
         "actionType": "READ",
         "objectType": "NOTIFICATION"
      }
   ]
}


The PUT request would then update the group with Id 10000 and return the  following JSON group object

Code Block
themeEclipse
titleGroup - 10000
{
   "description": "This is an updated group.",
   "groupName": "Simple Group Put",
   "isActive": true,
   "isFDAdmin": false,
   "deploymentPermissions": {"environmentIds": [11001]},
   "globalPermissions":    [
            {
         "actionType": "UPDATE",
         "objectType": "APPROVAL"
      },
            {
         "actionType": "READ",
         "objectType": "NOTIFICATION"
      }
   ]
}


Back to Top

...

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
titleAPI URL

http://host:port/flexdeploy/administration/security/group/{Id}

Parameters

AttributesTypeRequiredDescription
descriptionStringNoThe description of the group.
isFDAdminBooleanNoThe boolean representing whether the group is a Flex Deploy Administrator.
groupIdLongNoThe unique Id of the group.
groupNameStringNoThe unique name of the group.
isActiveBooleanNoThe boolean representing whether the group is active.
globalPermissionsList<GlobalPermissionPojo>NoThe list of global permissions associated with the group
deploymentPermissionsList<DeploymentPermissionPojo>NoThe list of deployment permissions associated with the group

Example

If we had a group in our database with an Id of 10000 and had the following attributes

Code Block
themeEclipse
titleGroup - 10000
{
   "description": "This is a simple group with no permissions.",
   "groupName": "Simple Group",
   "isActive": true,
   "isFDAdmin": false,
   "deploymentPermissions": {"environmentIds": []},
   "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/administration/security/group/10000

And the PATCH request receives the following JSON group object,

Code Block
themeEclipse
titleGroup - 10000
{
   "description": "This is an patched group.",
   "groupName": "Simple Group Patch",
   "isActive": null
}

The PATCH request would then update the group with Id 10000 and return the following JSON group object

Code Block
themeEclipse
titleGroup - 10000
{
   "description": "This is an patched group.",
   "groupName": "Simple Group Patch",
   "isActive": true,
   "isFDAdmin": false,
   "deploymentPermissions": {"environmentIds": []},
   "globalPermissions":    [
            {
         "actionType": "UPDATE",
         "objectType": "APPROVAL"
      },
            {
         "actionType": "READ",
         "objectType": "NOTIFICATION"
      },
            {
         "actionType": "READ",
         "objectType": "SCHEDULEDTASK"
      },
            {
         "actionType": "READ",
         "objectType": "WORKFLOW"
      }
   ]
}


Back to Top

...