Group Operations

Credential Warning

Note: Sys Admin or Client Admin account permissions required to execute group operations. Sys Admin have full control over groups Client Admin can only administer groups within their client

get

/AppSpiderEnterprise/rest/v1/Group/GetGroups

Description

Retrieves a list of Groups.

Parameters

No parameters

Response Messages

Response Status Code

Reason

Description

200

Success

Response contains the list of Groups

Response example:

JSON schema:
1
{
2
"type": "object",
3
"properties": {
4
"Groups": {
5
"type": "array",
6
"items": [
7
{
8
"type": "object",
9
"properties": {
10
"GroupId": {
11
"type": "string"
12
},
13
"GroupName": {
14
"type": "string"
15
}
16
},
17
"required": [
18
"GroupId",
19
"GroupName"
20
]
21
}
22
]
23
},
24
"IsSuccess": {
25
"type": "boolean"
26
},
27
"Reason": {
28
"type": "null"
29
},
30
"ErrorMessage": {
31
"type": "null"
32
},
33
"Links": {
34
"type": "array",
35
"items": [
36
{
37
"type": "object",
38
"properties": {
39
"Rel": {
40
"type": "string"
41
},
42
"Href": {
43
"type": "string"
44
}
45
},
46
"required": [
47
"Rel",
48
"Href"
49
]
50
}
51
]
52
}
53
},
54
"required": [
55
"Groups",
56
"IsSuccess",
57
"Reason",
58
"ErrorMessage",
59
"Links"
60
]
61
}
get

/AppSpiderEnterprise/rest/v1/Group/GetGroup?groupName=<insert groupname></insert>

Description

Retrieves a group by name

Parameters

Name

Type

Required

Description

groupName

string

Y

Group Name

Response Messages

Response Status Code

Reason

Description

200

Success

Response contains Group info

400

Required parameters not provided

400

NotFound

No Group Found

Response example:

JSON schema:
1
{
2
"$schema": "http://json-schema.org/draft-04/schema#",
3
"type": "object",
4
"properties": {
5
"AccountGroupDetailedInfo": {
6
"type": "object",
7
"properties": {
8
"Accounts": {
9
"type": "array",
10
"items": {}
11
},
12
"Roles": {
13
"type": "array",
14
"items": [
15
{
16
"type": "object",
17
"properties": {
18
"RoleId": {
19
"type": "string"
20
},
21
"RoleName": {
22
"type": "string"
23
}
24
},
25
"required": [
26
"RoleId",
27
"RoleName"
28
]
29
}
30
]
31
},
32
"GroupName": {
33
"type": "string"
34
},
35
"ClientId": {
36
"type": "string"
37
},
38
"ClientName": {
39
"type": "null"
40
},
41
"GroupId": {
42
"type": "string"
43
}
44
},
45
"required": [
46
"Accounts",
47
"Roles",
48
"GroupName",
49
"ClientId",
50
"ClientName",
51
"GroupId"
52
]
53
},
54
"IsSuccess": {
55
"type": "boolean"
56
},
57
"Reason": {
58
"type": "null"
59
},
60
"ErrorMessage": {
61
"type": "null"
62
},
63
"Links": {
64
"type": "array",
65
"items": [
66
{
67
"type": "object",
68
"properties": {
69
"Rel": {
70
"type": "string"
71
},
72
"Href": {
73
"type": "string"
74
}
75
},
76
"required": [
77
"Rel",
78
"Href"
79
]
80
}
81
]
82
}
83
},
84
"required": [
85
"AccountGroupDetailedInfo",
86
"IsSuccess",
87
"Reason",
88
"ErrorMessage",
89
"Links"
90
]
91
}
get

/AppSpiderEnterprise/rest/v1/Group/GetGroup?GroupId=<insert groupid></insert>

Description

Retrieves a group by id.

Parameters

Name

Type

Required

Description

groupId

guid

Y

Group Id

Response Messages

Response Status Code

Reason

Description

200

Success

Response contains Group info

400

Required parameters not provided

400

NotFound

No Group Found

Response example:

JSON schema:
1
{
2
"$schema": "http://json-schema.org/draft-04/schema#",
3
"type": "object",
4
"properties": {
5
"AccountGroupDetailedInfo": {
6
"type": "object",
7
"properties": {
8
"Accounts": {
9
"type": "array",
10
"items": {}
11
},
12
"Roles": {
13
"type": "array",
14
"items": [
15
{
16
"type": "object",
17
"properties": {
18
"RoleId": {
19
"type": "string"
20
},
21
"RoleName": {
22
"type": "string"
23
}
24
},
25
"required": [
26
"RoleId",
27
"RoleName"
28
]
29
}
30
]
31
},
32
"GroupName": {
33
"type": "string"
34
},
35
"ClientId": {
36
"type": "string"
37
},
38
"ClientName": {
39
"type": "null"
40
},
41
"GroupId": {
42
"type": "string"
43
}
44
},
45
"required": [
46
"Accounts",
47
"Roles",
48
"GroupName",
49
"ClientId",
50
"ClientName",
51
"GroupId"
52
]
53
},
54
"IsSuccess": {
55
"type": "boolean"
56
},
57
"Reason": {
58
"type": "null"
59
},
60
"ErrorMessage": {
61
"type": "null"
62
},
63
"Links": {
64
"type": "array",
65
"items": [
66
{
67
"type": "object",
68
"properties": {
69
"Rel": {
70
"type": "string"
71
},
72
"Href": {
73
"type": "string"
74
}
75
},
76
"required": [
77
"Rel",
78
"Href"
79
]
80
}
81
]
82
}
83
},
84
"required": [
85
"AccountGroupDetailedInfo",
86
"IsSuccess",
87
"Reason",
88
"ErrorMessage",
89
"Links"
90
]
91
}
post

/AppSpiderEnterprise/rest/v1/Group/AddGroup

Description

Add a new group.

Parameters

Name

Type

Required

Description

GroupName

string

Y

Group Name

ClientId

guid

Y

Client Id

Accounts

array

N

Accounts to add to group

UserId

string

N

User Id within (Accounts)

UserName

string

N

User Name within (Accounts)

ClientId

guid

N

Client of user within (Account)

Roles

array

Y

Roles to add to groups

RoleId

guid

Y

Role Id within (Roles)

RoleName

string

Y

Role Name within (Roles)

Request example:

JSON schema:
1
{
2
"type": "object",
3
"properties": {
4
"Accounts": {
5
"type": "array",
6
"items": [
7
{
8
"type": "object",
9
"properties": {
10
"UserId": {
11
"type": "string"
12
},
13
"UserName": {
14
"type": "string"
15
},
16
"ClientId": {
17
"type": "string"
18
}
19
},
20
"required": [
21
"UserId",
22
"UserName",
23
"ClientId"
24
]
25
}
26
]
27
},
28
"Roles": {
29
"type": "array",
30
"items": [
31
{
32
"type": "object",
33
"properties": {
34
"RoleId": {
35
"type": "string"
36
},
37
"RoleName": {
38
"type": "string"
39
}
40
},
41
"required": [
42
"RoleId",
43
"RoleName"
44
]
45
}
46
]
47
},
48
"GroupName": {
49
"type": "string"
50
},
51
"ClientId": {
52
"type": "string"
53
}
54
},
55
"required": [
56
"Accounts",
57
"Roles",
58
"GroupName",
59
"ClientId"
60
]
61
}

Response Messages

Response Status Code

Reason

Description

200

Success

Group added

400

Required parameters not provided

Response example:

JSON schema:
1
{
2
"$schema": "http://json-schema.org/draft-04/schema#",
3
"type": "object",
4
"properties": {
5
"AccountGroupDetailedInfo": {
6
"type": "object",
7
"properties": {
8
"GroupId": {
9
"type": "string"
10
}
11
},
12
"required": [
13
"GroupId"
14
]
15
},
16
"IsSuccess": {
17
"type": "boolean"
18
},
19
"Reason": {
20
"type": "null"
21
},
22
"ErrorMessage": {
23
"type": "null"
24
},
25
"Links": {
26
"type": "array",
27
"items": [
28
{
29
"type": "object",
30
"properties": {
31
"Rel": {
32
"type": "string"
33
},
34
"Href": {
35
"type": "string"
36
}
37
},
38
"required": [
39
"Rel",
40
"Href"
41
]
42
}
43
]
44
}
45
},
46
"required": [
47
"AccountGroupDetailedInfo",
48
"IsSuccess",
49
"Reason",
50
"ErrorMessage",
51
"Links"
52
]
53
}
put

/AppSpiderEnterprise/rest/v1/Group/UpdateGroup?groupId<insert groupid></insert>

Description

Add a new group.

Parameters

Name

Type

Required

Description

GroupId

guid

Y

request parameter Group Id to update

GroupName

string

Y

Group Name

ClientId

guid

Y

Client Id of group

Accounts

array

N

Accounts to add to group

UserId

string

N

User Id within (Accounts)

UserName

string

N

User Name within (Accounts)

ClientId

guid

N

Client of user within (Account)

Roles

array

Y

Roles to add to groups

RoleId

guid

Y

Role Id within (Roles)

RoleName

string

Y

Role Name within (Roles)

Request example:

JSON schema:
1
{
2
"type": "object",
3
"properties": {
4
"Accounts": {
5
"type": "array",
6
"items": [
7
{
8
"type": "object",
9
"properties": {
10
"UserId": {
11
"type": "string"
12
},
13
"UserName": {
14
"type": "string"
15
},
16
"ClientId": {
17
"type": "string"
18
}
19
},
20
"required": [
21
"UserId",
22
"UserName",
23
"ClientId"
24
]
25
}
26
]
27
},
28
"Roles": {
29
"type": "array",
30
"items": [
31
{
32
"type": "object",
33
"properties": {
34
"RoleId": {
35
"type": "string"
36
},
37
"RoleName": {
38
"type": "string"
39
}
40
},
41
"required": [
42
"RoleId",
43
"RoleName"
44
]
45
}
46
]
47
},
48
"GroupName": {
49
"type": "string"
50
},
51
"ClientId": {
52
"type": "string"
53
}
54
},
55
"required": [
56
"Accounts",
57
"Roles",
58
"GroupName",
59
"ClientId"
60
]
61
}

Response Messages

Response Status Code

Reason

Description

200

Success

Group Updated

400

Required parameters not provided

Response example:

JSON schema:
1
{
2
"$schema": "http://json-schema.org/draft-04/schema#",
3
"type": "object",
4
"properties": {
5
"AccountGroupDetailedInfo": {
6
"type": "object",
7
"properties": {
8
"GroupId": {
9
"type": "string"
10
}
11
},
12
"required": [
13
"GroupId"
14
]
15
},
16
"IsSuccess": {
17
"type": "boolean"
18
},
19
"Reason": {
20
"type": "null"
21
},
22
"ErrorMessage": {
23
"type": "null"
24
},
25
"Links": {
26
"type": "array",
27
"items": [
28
{
29
"type": "object",
30
"properties": {
31
"Rel": {
32
"type": "string"
33
},
34
"Href": {
35
"type": "string"
36
}
37
},
38
"required": [
39
"Rel",
40
"Href"
41
]
42
}
43
]
44
}
45
},
46
"required": [
47
"AccountGroupDetailedInfo",
48
"IsSuccess",
49
"Reason",
50
"ErrorMessage",
51
"Links"
52
]
53
}
delete

/AppSpiderEnterprise/rest/v1/Group/DeleteGroup?groupId<insert groupid></insert>

Description

Delete a group

Parameters

No parameters

Response Messages

Response Status Code

Reason

Description

200

Success

Group has been deleted

Response example:

JSON schema:
1
{
2
"$schema": "http://json-schema.org/draft-04/schema#",
3
"type": "object",
4
"properties": {
5
"AccountGroupDetailedInfo": {
6
"type": "null"
7
},
8
"IsSuccess": {
9
"type": "boolean"
10
},
11
"Reason": {
12
"type": "null"
13
},
14
"ErrorMessage": {
15
"type": "null"
16
},
17
"Links": {
18
"type": "array",
19
"items": [
20
{
21
"type": "object",
22
"properties": {
23
"Rel": {
24
"type": "string"
25
},
26
"Href": {
27
"type": "string"
28
}
29
},
30
"required": [
31
"Rel",
32
"Href"
33
]
34
}
35
]
36
}
37
},
38
"required": [
39
"AccountGroupDetailedInfo",
40
"IsSuccess",
41
"Reason",
42
"ErrorMessage",
43
"Links"
44
]
45
}