added error note in the Cancel operation

This commit is contained in:
csobier 2016-04-08 12:45:30 -04:00
parent 3d99766a60
commit 065331a779

View File

@ -126,12 +126,7 @@ To update an SQL Batch API job, make a PUT request with the following parameters
```bash
HEADERS: PUT /api/v2/sql/job/de305d54-75b4-431b-adb2-eb6b9e546014
BODY: {
“job_id”: “de305d54-75b4-431b-adb2-eb6b9e546014”,
“user”: “cartofante”
“query”: “SELECT cartodb_id FROM user_dataset”,
“status”: “pending”,
“created_at”: “2015-12-15T07:36:25Z”,
“updated_at”: “2015-12-15T07:36:25Z”
"query": “SELECT cartodb_id FROM user_dataset”
}
```
@ -185,6 +180,14 @@ BODY: {
}
```
**Note:** Jobs can only be cancelled while the `status: "running"` or `status: "pending"`, otherwise the SQL Batch API Cancel operation is not allowed. You will receive an error if the job status is anything but "running" or "pending".
```bash
errors: [
“The job status is done, cancel is not allowed”
]
```
## Multi Query Batch Jobs
In some cases, you may need to run multiple SQL queries in one job. The Multi Query batch option enables you run an array of SQL statements, and define the order in which the queries are executed. You can use any of the operations (create, read, list, update, cancel) for the queries in a Multi Query batch job.