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

@ -1,6 +1,6 @@
@startDocuBlock JSF_get_api_tasks
@brief Retrieves one currently active server task
@brief Retrieves one currently active server task
@RESTHEADER{GET /_api/tasks/{id}, Fetch one task with id}
@ -8,7 +8,7 @@
The id of the task to fetch.
@RESTDESCRIPTION
fetches one existing tasks on the server specified by *id*
fetches one existing task on the server specified by *id*
@RESTRETURNCODE{200}
The requested task
@ -17,16 +17,17 @@ The requested task
Fetching a single task by its id
@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);
logJsonResponse(response);
@END_EXAMPLE_ARANGOSH_RUN
trying to fetch a non-existing task
Trying to fetch a non-existing task
@EXAMPLE_ARANGOSH_RUN{RestTasksListNonExisting}
var url = "/_api/tasks/non-existing-task";