Versions Compared

Key

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

...

...

...

...

...

...

...

...

General Information

...

ServiceAPIMethodData ModelWorkflow
urac/admin/group
/edit
PUT

...

...

Description

This API updates the record of a group that has an id that matches the one sent in the request body. The group should be in the tenant that has the external key sent in the request headers.

Input

...

Type: application/json
NameSourceMandatoryTypeSpecial FormatDescription
gId
id
Query
BodyYESStringN/A
The
Group ID
nameBodyYESString
N/A

Group Name
descriptionBody
YES
NOString
N/ANameSourceMandatoryTypeSpecial FormatDescriptiongIdQueryYESStringN/AThe Group IDnameBodyYESStringN/AdescriptionBodyYESStringN/AconfigBodyYESObjectN/AallowedPackagesYESObjectN/A^([A-Za-z0-9]+)$YESArray of strings

Then keys should follow the pattern : 
^([A-Za-z0-9]+)$

The key is the product code.
The strings inside the array are the package codes.

allowedEnvironmentsNOObjectN/A^([A-Za-z]+)$NOObjectN/AThe environment code with empty object for now 

Output


Group Description
packagesBodyNOArrayArray of ObjectsPackages


NameTypeDescription
productStringProduct Code
packagesArray of StringsAn array of Package Codes


environmentsBodyNOArrayArray of StringsEnvironments

Output

...

Response

SOAJS has a unified response. Check out this link to understand more the schema of SOAJS response 

Valid Response

Code Block
languagejs
titleValid Response Sample
linenumberstrue
collapsetrue
{ 	"
  result": true,
  	"data": true
}

Invalid Response

Code Block
languagejs
titleError Response Sample
linenumberstrue
collapsetrue
{
    "result":false,
    "errors":{
        "codes":[417602],
        "details":[
            {
                "code":417602,
                "message":"InvalidModel grouperror: id+ provided%model_error%"
            }
        ]
    }
}

Response schema

Follow this link to check out the response JSON Schema

SOAJS Error Codes



Code
Description
417Invalid group id provided418Unable to edit Group.
Example (CURL)

Request

Code Block
languagebash
titleCalling Edit Group API
 > CURL -X POST http://127.0.0.1:4000/urac/admin/group/edit?gId=5 -d '{
	"name": "Some Group",
	"description": "group description",
	"config": {
		"allowedPackages": {
			"prod": ["pack"]
		},
	"allowedEnvironments": {
			"PROD": {}
		}
	}
}'

Response

...

languagejs
titleEdit Group API response

...

400

Business logic required data are missing

602Model error: + %model_error%