Deletes a created SQL query script file.
Operation description
Queries the list of deployed jobs that are associated with a specified job label and their details. Exact matching by labelKey and labelValue is supported.
Try it now
Test
RAM authorization
Request syntax
DELETE /api/v2/namespaces/{namespace}/sql-file/{sqlFileId} HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| namespace |
string |
No |
The namespace. |
default-namespace |
| sqlFileId |
string |
No |
The unique ID of the SQL script to delete. |
sql-f-abc123xyz |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| workspace |
string |
No |
The workspace ID. |
a14bd5d90a**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response data. |
||
| requestId |
string |
The request ID. |
CBC799F0-AS7S-1D30-8A4F-882ED4DD**** |
| success |
boolean |
Indicates whether the request was successful. |
true |
| httpCode |
integer |
The HTTP status code, which is always 200. Use the success field to determine whether the request was successful. |
200 |
| errorCode |
string |
The error code returned when success is false. This value is empty when success is true. |
"" |
| errorMessage |
string |
The error message returned when success is false. This value is empty when success is true. |
"" |
| data | SqlFile |
The basic information about the deleted file returned after a successful deletion. Only metadata is included. The content field is not returned. This field is valid when success is true. |
{ "jobs": [ { "jid": "4df35f8e54554b23bf7dcd38a151****", "name": "69d001d5-419a-4bfc-9c2e-849cacd3****", "state": "RUNNING", "start-time": 1659154942068, "end-time": -1, "duration": 188161756, "last-modification": 1659154968305, "tasks": { "total": 2, "created": 0, "scheduled": 0, "deploying": 0, "running": 2, "finished": 0, "canceling": 0, "canceled": 0, "failed": 0, "reconciling": 0, "initializing": 0 } } ] } |
Examples
Success response
JSON format
{
"requestId": "CBC799F0-AS7S-1D30-8A4F-882ED4DD****",
"success": true,
"httpCode": 200,
"errorCode": "\"\"",
"errorMessage": "\"\"",
"data": {
"name": "",
"sqlFileId": "",
"parentId": "",
"description": "",
"sessionClusterName": "",
"sqlScript": "",
"workspace": "",
"namespace": "",
"batchMode": ""
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.