Approval - Get approval groups

API Url

Used for loading valid approval groups for current userId.

GET
http://localhost:16010/ProMarkREST/rest/Approval/approval-groups

Permissions: user

Query parameters

FieldTypeDescription
approvalTypeoptionalString

All active approval groups are returned for Administrator. Available approval type options ("protime", "project", "") protime = return only allowed protime approval groups,
project = return only allowed project approval groups. If not defined all allowed protime and project approval groups are returned.

Success 200

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    groupsObject

Collection of approval groups.

      approvalTypeString

Allowed approval types ("project" = allow to approve only project transactions, "protime" = allow to approve only protime transaction, "all"= allow to approve both protime and project transactions).

Allowed values:"protime""project""all"
      descriptionString

Approval group desription.

      idString

Approval group ID.

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

Allowed values:"warning""info"

Success example:

HTTP/1.1 200 OK
{
"response": {
"data": {
"groups": [
{
"id": "01",
"description": "Kem Default".
"approvalType":"all"
},
{
"id": "AGPM1",
"description": "App.group ProManagement 1",
"approvalType":"project"
},
{
"id": "JAO:01",
"description": "JAO approval group",
"approvalType": "protime"
},
{
"id": "AGPM2",
"description": "App.group ProManagement 2",
"approvalType":"protime"
}
]
},
"errorCode": 0,
"errorMessage": ""
}
}