1
0
Fork 0

fixed example (#4043)

This commit is contained in:
Jan 2017-12-14 23:40:36 +01:00 committed by GitHub
parent 9cd8c47eb7
commit baf633f953
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 5 deletions

View File

@ -8,7 +8,7 @@
The id of the task to fetch. The id of the task to fetch.
@RESTDESCRIPTION @RESTDESCRIPTION
fetches one existing tasks on the server specified by *id* fetches one existing task on the server specified by *id*
@RESTRETURNCODE{200} @RESTRETURNCODE{200}
The requested task The requested task
@ -17,16 +17,17 @@ The requested task
Fetching a single task by its id Fetching a single task by its id
@EXAMPLE_ARANGOSH_RUN{RestTasksListOne} @EXAMPLE_ARANGOSH_RUN{RestTasksListOne}
var url = "/_api/tasks/statistics-average-collector"; var url = "/_api/tasks";
var response = logCurlRequest('POST', url, JSON.stringify({ id: "testTask", command: "console.log('Hello from task!');", offset: 10000 }));
var response = logCurlRequest('GET', url); var response = logCurlRequest('GET', url + "/testTask");
assert(response.code === 200); assert(response.code === 200);
logJsonResponse(response); logJsonResponse(response);
@END_EXAMPLE_ARANGOSH_RUN @END_EXAMPLE_ARANGOSH_RUN
trying to fetch a non-existing task Trying to fetch a non-existing task
@EXAMPLE_ARANGOSH_RUN{RestTasksListNonExisting} @EXAMPLE_ARANGOSH_RUN{RestTasksListNonExisting}
var url = "/_api/tasks/non-existing-task"; var url = "/_api/tasks/non-existing-task";