Request Parameters
Parameter
|
Description
|
Valid values
|
Mandatory
|
task-id
|
Job identifier
|
•update_repositories—update Server repository. •newbies—set the action under the newbie stations. |
yes
|
action
|
Action under a newbie station
|
•approve—approve the access of the stations to the Server, •cancelonconnect—cancel an action specified to execute at the next connection of a station to the Server, •reject—reject the station. |
no
|
id
|
Identifier of a newbie station
|
-
|
no
|
group
|
Group to which a newbie station will be added
|
-
|
no
|
|
The action, group and id parameters are set only if task-id=newbies.
|
Request Example
1.For task-id=update_repositories http://192.168.1.1:9080/api/server/tasks.ds?task-id=update_repositories
2.For task-id=newbies http://192.168.1.1:9080/api/server/tasks.ds?task-id=newbies&action=approve&id=50393916-d21d-b211-a829-e404ce518192&group=1
|
If the action parameter is set to approve, the group parameter must be specified.
|
Response Documents Structure
•XML response. •JSON response. XML Response Structure
1.For task-id=update_repositories
<drweb-avdesk-api api_version="4.1.3" timestamp="1395910152" server="192.168.1.1" srv_version="10.01.0.201707130" status="true">
<task id="update_repositories" status="success"/>
</drweb-avdesk-api>
|
2.For task-id=newbies
<drweb-avdesk-api api_version="4.1.3" timestamp="1395915519" server="192.168.1.1" srv_version="10.01.0.201707130" status="true">
<task id="newbies" status="failed" message="Group ID is not specified"/>
</drweb-avdesk-api>
|
Description of XML Response Parameters
The <task /> element contains information on requested job.
The <task />element:
Attribute
|
Description
|
id
|
Job identifier. Can take the following values:
•update_repositories—the job to update the Server repository, •newbies—set an action under the newbie station. |
status
|
Job execution state:
•success—job successfully executed, •failed—job failed. |
message
|
Message on error occurred during job execution. If the job completed successfully, the message attribute contains the empty message string.
|
JSON Response Structure
1.For task-id=update_repositories
{ "head": {
"status": true,
"timestamp": 1395910221,
"api": {
"version": 40103
},
"server": {
"name": "192.168.1.1",
"version": 1000201707130,
"uuid": "1023dcd7-d11d-b211-896d-8804c0842edb"
}
},
"data": {
"task": {
"id": "update_repositories",
"status": "success"
}
}
}
|
2.For task-id=newbies
{
"head": {
"status": true,
"timestamp": 1395915555,
"api": {
"version": 40103
},
"server": {
"name": "192.168.1.1",
"version": "1000201707130",
"uuid": "1023dcd7-d11d-b211-896d-8804c0842edb"}},
"data": {
"task": {
"id": "newbies",
"status": "failed"}}}
|
Description of JSON Response Parameters
The task block contains information on requested job.
The task block elements:
Field name
|
Description
|
id
|
Job identifier. Can take the following values:
•update_repositories—the job to update the Server repository, •newbies—set an action under the newbie station. |
status
|
Job execution state:
•success—job successfully executed, •failed—job failed. |
message
|
Message on error occurred during job execution. If the job completed successfully, the message attribute contains the empty message string.
|
|