POST
/api/v1/workspaces/{workspace}/services/{service}/validate-sql Validates a read-only SQL view query and discovers its columns and geometry metadata.
Operation ID: validateSQLView
Authentication
Use one of the following authentication options. Permissions and workspace scope still apply. See authentication and access control.
-
Authorization: Bearer YOUR_ACCESS_TOKEN -
X-API-Key: YOUR_API_KEY
Parameters
-
workspacepath required -
Workspace ID
string -
servicepath required -
Service ID
string
Request body
Required
SQL query to validate
Content type application/json
object
-
sqlstring required
Responses
200 SQL validation result
Content type application/json
400 Bad Request
Content type application/json
401 Unauthorized
Content type application/json
403 Forbidden
Content type application/json
404 Workspace or service not found
Content type application/json
413 Request body exceeds the configured limit
Content type application/json
426 HTTPS required
Content type application/json
429 Request rate exceeded
Content type application/json
503 Data source unavailable
Content type application/json
OpenAPI operation definition
{
"description": "Validates a read-only SQL view query and discovers its columns and geometry metadata.",
"operationId": "validateSQLView",
"parameters": [
{
"description": "Workspace ID",
"in": "path",
"name": "workspace",
"required": true,
"schema": {
"type": "string"
}
},
{
"description": "Service ID",
"in": "path",
"name": "service",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"properties": {
"sql": {
"type": "string"
}
},
"required": [
"sql"
],
"type": "object"
}
}
},
"description": "SQL query to validate",
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ValidateSQLResponse"
}
}
},
"description": "SQL validation result"
},
"400": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "Bad Request"
},
"401": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "Unauthorized"
},
"403": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "Forbidden"
},
"404": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "Workspace or service not found"
},
"413": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "Request body exceeds the configured limit"
},
"426": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "HTTPS required"
},
"429": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "Request rate exceeded"
},
"503": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
},
"description": "Data source unavailable"
}
},
"summary": "Validate SQL view",
"tags": [
"Services"
]
}