Versions Compared

Key

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

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.

...

Table of Contents
maxLevel2

Below is the list of possible global permissions.

...

READ, UPDATE

...

READ, UPDATE

...

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. 

...

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/v1/administration/security/group/{Id}

Request

Parameter

Type

Required

Description

Id

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

Include Page
FD60:REST V1 Group Response
FD60:REST V1 Group Response

Response Codes

HTTP CodeDescription
200Group was found and returned
400Bad request
401Authentication failure
403Authorization failure (no access to resource)
404Group not found
500Unexpected internal server error

Example

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

Code Block
themeEclipse
titleGroup - 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

Code Block
themeEclipse
titleGroup - 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.

Info
titleAPI URLs

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

Request

...

Parameter

...

Type

...

Required

...

Description

...

Id

...

Response Codes

...

?

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

Tip

The query parameters are not case sensitive. Searching by groupName=NAME is the same as searching by groupName=name.

Request

AttributesTypeRequiredDescription
groupNameQuery - StringNo

The name of the group.

Contains ignore case type search.

Include Page
FD60:REST V1 Group Response
FD60:REST V1 Group Response

Response Codes

HTTP CodeDescription
200Search successful and results returned
400Bad request
401Authentication failure
403Authorization failure (no access to resource)
404Group not found
500Unexpected internal server error

Example

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

Code Block
themeEclipse
titleGroup - 10000
{
    "descriptioncreatedOn": "test2023-01-27T23:55:06.602+0000",
    "isFlexDeployAdministratorupdatedOn": false,"2023-01-27T23:55:06.602+0000",
    "groupIdupdatedBy": 10000"fdadmin",
    "groupNameversionNumber": "test"1,
    "isActive": true,
    "globalPermissionsdescription": [null,
  {       "objectTypegroupName": "WORKFLOWJUNIT_Group1",
 
    "actionTypecreatedBy": "READ"
   }]fdadmin",
   "deploymentPermissions": {"environmentsgroupId":    [
      18605,
      206101000,
   ], 	"allEnvironmentsisAdminGroup":false }true
}

When we run a GET request at the following URL

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

The GET request would return the the  following JSON group object

Code Block
themeEclipse
titleGroup - 10000
[
{
    "descriptioncreatedOn": "test2023-01-27T23:55:06.602+0000",
    "isFlexDeployAdministratorupdatedOn": false,"2023-01-27T23:55:06.602+0000",
    "groupIdupdatedBy": 10000"fdadmin",
    "groupNameversionNumber": "test"1,
    "isActive": true,
    "globalPermissionsdescription": [null,
  {       "objectType"groupName": "WORKFLOWJUNIT_Group1",
 
    "actionTypecreatedBy": "READ"
   }]fdadmin",
   "deploymentPermissions": {"environmentsgroupId":    [
      18605,
      206101000,
   ], 	"allEnvironmentsisAdminGroup":false true
}
}

...

]

POST

This

...

POST service will

...

create a new group with the same attributes as the given JSON object.

Info
titleAPI URLsURL

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

Tip

The query parameters are not case sensitive. Searching by groupName=NAME is the same as searching by groupName=name.

Request

...

The name of the group.

...

Request

AttributesTypeRequiredDescription
descriptionStringNoThe description of the group.
isAdminGroupBooleanNoThe boolean representing whether the group is a Flex Deploy Administrator. If isAdminGroup is set to null it will default to false.
groupNameStringYesThe unique name of the group.
isActiveBooleanNoThe boolean representing whether the group is active. If isActive is set to null it will default to true.

Include Page
FD60:REST V1 Group Response
FD60:REST V1 Group Response

Response Codes

HTTP CodeDescription
200Search successful and results returned201Group was created
400Bad request
401Authentication failure
403Authorization failure (no access to resource)
500Unexpected internal server error

Example

If we had a group in our database with an Id of 10000 and had the following attributesthe POST request receives the following JSON group object,

Code Block
themeEclipse
titleGroup - 10000
{
   "description": "test",This is a simple "isFlexDeployAdministrator": false,
   "groupId": 10000group with no permissions.",
   "groupName": "testSimple Group",
   "isActive": true,
   "globalPermissionsisAdminGroup": [false,
  { "allEnvironments":false
	}
}

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

Code Block
themeEclipse
titleGroup - 10000
{
   "objectTypedescription": "WORKFLOW",
  This is a simple group with permissions.",
   "actionTypegroupId": "READ"
   }]10000,
   "deploymentPermissionsgroupName": {"environmentsSimple Group":,
   [
"isActive": true,
     18605,
      20610
"isAdminGroup": false,
  ], 	"allEnvironments":false
  	}
}

...

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/rest/v1/administration/security/group

...

The GET request would return the  following JSON group object

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

POST

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

API
Info
title

/{Id}

Request

AttributesTypeRequiredDescription
descriptionStringNoThe description of the group.
isAdminGroupBooleanNoThe boolean representing whether the group is a Flex Deploy Administrator. If isAdminGroup is updated to null it will default to false.
groupNameStringYesThe unique name of the group.
isActiveBooleanNoThe boolean representing whether the group is active. If isActive is updated to null it will default to true.

Include Page
FD60:REST V1 Group Response
FD60:REST V1 Group Response

Response Codes

HTTP CodeDescription
200Group was found and updated
400Bad request
401Authentication failure
403Authorization failure (no access to resource)
404Group not found
500Unexpected internal server error

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,
   "isAdminGroup": false,
   "allEnvironments":false
}

When we run a PUT request at the following URL

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

...

Request

...

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.

...

The list of deployment permissions associated with the group. It can be set to

  • all environments
    • allEnvironments: true, environments: []
  • specific environments
    • allEnvironments: false, environments: [1, 2, 3]
  • no environments.
    • allEnvironments: false, environments: []

DeploymentPermissionPojo contains allEnvironment (boolean) and environments (array of environment ids).

...

/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,
   "isAdminGroup": false,
   "allEnvironments":false
}

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,
   "isAdminGroup": false,
   "allEnvironments":false
	}
}

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/rest/v1/administration/security/group/{Id}

Request

AttributesTypeRequiredDescription
descriptionStringNoThe description of the group.
isAdminGroup
BooleanNoThe boolean representing whether the group is a Flex Deploy Administrator.
groupNameStringNoThe unique name of the group.
isActiveBooleanNoThe boolean representing whether the group is active.

Include Page
FD60:REST V1 Group Response
FD60:REST V1 Group Response

Response Codes

HTTP CodeDescription
201200Group was createdfound and updated
400Bad request
401Authentication failure
403Authorization failure (no access to resource)
404Group not found
500Unexpected internal server error

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,
   "isFlexDeployAdministrator": false,
   "deploymentPermissions": {"environments": [],
   "allEnvironments":false
	},
   "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,
   "isFlexDeployAdministrator": false,
   "deploymentPermissions": {"environments": [],
   "allEnvironments":false
  	},
   "globalPermissions":    [
            {
         "actionType": "UPDATE",
         "objectType": "APPROVAL"
      },
            {
         "actionType": "READ",
         "objectType": "NOTIFICATION"
      },
            {
         "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
titleAPI URL

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

Request

...

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.

...

The list of deployment permissions associated with the group. It can be set to

  • all environments
    • allEnvironments: true, environments: []
  • specific environments
    • allEnvironments: false, environments: [1, 2, 3]
  • no environments.
    • allEnvironments: false, environments: []

DeploymentPermissionPojo contains allEnvironment (boolean) and environments (array of environment ids).

...

Response Codes

...

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,
   "isFlexDeployAdministrator": false,
   "deploymentPermissions": {"environments": [],
   "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
themeEclipse
titleEnvironment PUT Receive JSON
{
   "description": "This is an updated group.",
   "groupName": "Simple Group Put",
   "isActive": true,
   "isFlexDeployAdministrator": false,
   "deploymentPermissions": {"environments": [11001],
   "allEnvironments":false
	},
   "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,
   "isFlexDeployAdministrator": false,
   "deploymentPermissions": {"environments": [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
titleAPI URL

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

Request

...

The 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).

...

Response Codes

...

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,
   "isFlexDeployAdministrator": false,
   "deploymentPermissions": {"environments": [],
   "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
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

...

themeEclipse
titleGroup - 10000

...

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,
   "isAdminGroup": false,
}

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
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,
   "isAdminGroup": false,
}