Target Operations

/AppSpiderEnterprise/rest/v1/Target/GetClientTargets

Description Retrieves the list of targets for the client

Parameters

Parameters

Type

Required

Description

clientId

guid[]

Y

The client Id

Response Messages

Response status code

Reason

200

Response contains the list of targets

400

NotFound

No targets found

Response example:

json
1
{
2
"type": "object",
3
"properties": {
4
"Targets": {
5
"type": "array",
6
"items": {
7
"type": "object",
8
"properties": {
9
"Accounts": {
10
"type":"array",
11
"items": {
12
"type": "object",
13
"properties": {
14
"Status": {
15
"type":"string",
16
"required": true
17
},
18
"StatusNumber": {
19
"type":"integer",
20
"required": true
21
},
22
"Id": {
23
"type":"string",
24
"required": true
25
},
26
"Name": {
27
"type":"string",
28
"required": true
29
},
30
}
31
}
32
}
33
"Groups": {
34
"type":"array",
35
"items": {
36
"type": "object",
37
"properties": {
38
"Status": {
39
"type":"string",
40
"required": true
41
},
42
"StatusNumber": {
43
"type":"integer",
44
"required": true
45
},
46
"Id": {
47
"type":"string",
48
"required": true
49
},
50
"Name": {
51
"type":"string",
52
"required": true
53
},
54
}
55
}
56
}
57
"TargetGroups": {
58
"type":"array",
59
"items": {
60
"type": "object",
61
"properties": {
62
"Id": {
63
"type":"string",
64
"required": true
65
},
66
"Name": {
67
"type":"string",
68
"required": true
69
},
70
}
71
}
72
},
73
"ClientApproved": {
74
"type": "boolean",
75
"required": true
76
},
77
"HasPending": {
78
"type": "boolean",
79
"required": true
80
},
81
"Id": {
82
"type": "string",
83
"required": true
84
},
85
"Host": {
86
"type": "string",
87
"required": true
88
}
89
}
90
},
91
"additionalProperties": false
92
},
93
"IsSuccess": {
94
"type": "boolean",
95
"required": true
96
},
97
"ErrorMessage": {
98
"type":["string", "null"],
99
"required": true
100
},
101
"Reason": {
102
"type":["string", "null"],
103
"required": true
104
},
105
"Links": {
106
"type": "array",
107
"items": {
108
"Rel": {
109
"type":["string", "null"],
110
"required": true
111
},
112
"Href": {
113
"type":["string", "null"],
114
"required": true
115
}
116
}
117
}
118
},
119
},
120
"additionalProperties": false
121
}

/AppSpiderEnterprise/rest/v1/Target/ClientApproval

Description Approves the target for the client ONLY as System Admins

Request Parameters

Parameters

Type

Required

Description

targetId

guid[]

Y

The target Id

Request Body

Parameters

Type

Required

Description

ClientId

guid[]

Y

The clientId

Status

string

Y

The status for the Target

Request example:

json
1
{
2
"type": "object",
3
"properties": {
4
"ClientId": {
5
"type": "string",
6
"required": true
7
},
8
"Status": {
9
"type": "string"",
10
"required": true
11
}
12
},
13
}

Response Messages

Response status code

Reason

Description

200

Status for Target has been set

400

Invalid Target Status

Response example:

json
1
{
2
"type": "object",
3
"properties": {
4
"IsSuccess": {
5
"type": "boolean"",
6
"required": true
7
},
8
"ErrorMessage": {
9
"type":["string", "null"]",
10
"required": true
11
},
12
"Reason": {
13
"type": ["string", "null"]",
14
"required": true
15
},
16
"Links": {
17
"type": "array",
18
"items": {
19
"Rel": {
20
"type":["string", "null"],
21
"required": true
22
},
23
"Href": {
24
"type":["string", "null"],
25
"required": true
26
}
27
}
28
}
29
},
30
},
31
"additionalProperties": false
32
}

/AppSpiderEnterprise/rest/v1/Target/AssignToUserGroup

Description Assigns the user group to the target

Request Parameters

Parameters

Type

Required

Description

targetId

guid[]

Y

The target Id

Request Body

Parameters

Type

Required

Description

GroupIdGroupId

guid[]

Y

The group Id

Request example:

json
1
{
2
"type": "object",
3
"properties": {
4
"GroupId": {
5
"type": "string",
6
"required": true
7
}
8
},
9
}

Response Messages

Response status code

Reason

Description

200

UserGroup added to Target

400

Group is not associated with Client

Response example:

json
1
{
2
"type": "object",
3
"properties": {
4
"IsSuccess": {
5
"type": "boolean"",
6
"required": true
7
},
8
"ErrorMessage": {
9
"type":["string", "null"]",
10
"required": true
11
},
12
"Reason": {
13
"type": ["string", "null"]",
14
"required": true
15
}
16
},
17
}

/AppSpiderEnterprise/rest/v1/Target/RemoveUserGroup

Description Removes the user group from the target

Request Parameters

Parameters

Type

Required

Description

targetId

guid[]

Y

The target Id

Request Body

Parameters

Type

Required

Description

GroupId

guid[]

Y

The group Id

Request example:

json
1
{
2
"type": "object",
3
"properties": {
4
"GroupId": {
5
"type": "string",
6
"required": true
7
}
8
},
9
}

Response Messages

Response status code

Reason

Description

200

UserGroup removed from Target

400

Group is not associated with Client

Response example:

json
1
{
2
"type": "object",
3
"properties": {
4
"IsSuccess": {
5
"type": "boolean"",
6
"required": true
7
},
8
"ErrorMessage": {
9
"type":["string", "null"]",
10
"required": true
11
},
12
"Reason": {
13
"type": ["string", "null"]",
14
"required": true
15
}
16
},
17
}