Versions Compared

Key

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

General Information

...

ServiceAPIMethod
uracadmin/group/addPOST


Data Model: %Link to Data Model% Groups

Workflow: %Link to Architecture Page%

...

NameSourceMandatoryTypeSpecial FormatDescription
tIdBody or QueryYESStringN/Athe Id of the tenant where this group is added
tCodeBody or QueryYESStringN/Athe code of the tenant
codeBodyYESStringN/A 
nameBodyYESStringN/A 
descriptionBodyYESStringN/A 

 

Output

...

Valid Response

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

 

Invalid Response

Code Block
languagejs
titleError Response Sample
{
    "result":false,
    "errors":{
        "codes":[400421],
        "details":[
            {
                "code":400421,
                "message":"ProblemGroup code withalready theexists. providedChoose passwordanother"
            }
        ]
    }
}



Error Codes


 

Database Error
Code
Description
400
421Group code already exists. Choose another
600Database connection error
611invalid tenant id provided


Example (CURL)

...

Request

Code Block
languagebash
titleCalling YOUR Add Group API
 > CURL -X POST http://127.0.0.1:4000/.../urac/admin/group/add?tId=5551aca9e179c39b760f7a1a&tCode=DBTN -d 'code=gold&name=Gold&description=Group Description' 

Response

Code Block
languagejs
titleYOUR Add Group API response
{
	"result": true,
	"data": {
		"_id": "57063608622c47b5c097d19b",
		"..."
	}true
}