{"openapi":"3.0.4","info":{"title":"Start to Execute Sql in the background","description":"\nAllow for starting a potentially long running query and getting back an immediate response with how to \n- fetch the data in various formats (if available, or if not simply being informed it is not yet ready)\n- view progress information (up until this point)\n- cancel the query (if still running) / clear the data (if already returned)\n\nThis can still error on things like an outright syntax error, but more runtime errors (e.g. from providers) will not\ncause this to error (that will happen when attempting to fetch data)\n\nHere is an example that intentionally takes one minute to run:\n\n```sql\nselect Str, Takes500Ms from Testing1K where UseLinq = true and [Int] <= 120\n```\n\nThis is the only place in the Luminesce WebAPI where the following is supported.\nThis will allow for the same user running a character-identical query not kick off a new query but simply be returned a reference \nto the already running one for up to `N` seconds (where `N` should be `<=` `keepForSeconds`).\n\nThe following error codes are to be anticipated with standard Problem Detail reports:\n- 400 BadRequest - there was something wrong with your query syntax (the issue was detected at parse-time)\n- 401 Unauthorized\n- 403 Forbidden\n","version":"0.0.1"},"servers":[{"url":"https://fbn-prd.lusid.com/honeycomb"}],"paths":{"/api/SqlBackground":{"put":{"tags":["Sql Background Execution"],"summary":"Start to Execute Sql in the background","description":"\nAllow for starting a potentially long running query and getting back an immediate response with how to \n- fetch the data in various formats (if available, or if not simply being informed it is not yet ready)\n- view progress information (up until this point)\n- cancel the query (if still running) / clear the data (if already returned)\n\nThis can still error on things like an outright syntax error, but more runtime errors (e.g. from providers) will not\ncause this to error (that will happen when attempting to fetch data)\n\nHere is an example that intentionally takes one minute to run:\n\n```sql\nselect Str, Takes500Ms from Testing1K where UseLinq = true and [Int] <= 120\n```\n\nThis is the only place in the Luminesce WebAPI where the following is supported.\nThis will allow for the same user running a character-identical query not kick off a new query but simply be returned a reference \nto the already running one for up to `N` seconds (where `N` should be `<=` `keepForSeconds`).\n\nThe following error codes are to be anticipated with standard Problem Detail reports:\n- 400 BadRequest - there was something wrong with your query syntax (the issue was detected at parse-time)\n- 401 Unauthorized\n- 403 Forbidden\n","operationId":"StartQuery","parameters":[{"name":"executionId","in":"query","description":"An explicit ExecutionId to use.  This must be blank OR assigned to a valid GUID-as-a-string.\nIt might be ignored / replaced, for example if using the query cache and a cached query is found.","schema":{"type":"string"}},{"name":"scalarParameters","in":"query","description":"Json encoded dictionary of key-value pairs for scalar parameter values to use in the sql execution.","style":"deepObject","schema":{"type":"object","additionalProperties":{"type":"string"}},"example":{"someParameter":12,"someOtherParameter":"someValue"},"x-nullable":true},{"name":"queryName","in":"query","description":"A name for this query.  This goes into logs and is available in `Sys.Logs.HcQueryStart`.","schema":{"type":"string"},"example":"Intentionally slow test query"},{"name":"timeoutSeconds","in":"query","description":"Maximum time the query may run for, in seconds: <0 → ∞, 0 → 7200 (2h)","schema":{"type":"integer","format":"int32","default":0},"example":1200,"x-nullable":true},{"name":"keepForSeconds","in":"query","description":"Maximum time the result may be kept for, in seconds: <0 → 1200 (20m), 0 → 28800 (8h), max = 2,678,400 (31d)","schema":{"type":"integer","format":"int32","default":0},"example":7200,"x-nullable":true},{"name":"executionFlags","in":"query","description":"Optional request flags for the execution.  Currently limited by may grow in time:\n- ProvideLineage : Should Lineage be requested when running the query?  This must be set in order to later retrieve Lineage.","schema":{"$ref":"/docs/api/luminesce/schemas.json#/components/schemas/SqlExecutionFlags"},"example":"None","x-nullable":true}],"requestBody":{"description":"The LuminesceSql query to kick off.","content":{"text/plain":{"schema":{"type":"string"},"example":"select Str, Takes500Ms from Testing1K where UseLinq = true and [Int] <= 120"}},"required":true},"responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"/docs/api/luminesce/schemas.json#/components/schemas/BackgroundQueryResponse"}},"text/plain":{"schema":{"$ref":"/docs/api/luminesce/schemas.json#/components/schemas/BackgroundQueryResponse"}},"text/json":{"schema":{"$ref":"/docs/api/luminesce/schemas.json#/components/schemas/BackgroundQueryResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"/docs/api/luminesce/schemas.json#/components/schemas/LusidProblemDetails"}},"text/plain":{"schema":{"$ref":"/docs/api/luminesce/schemas.json#/components/schemas/LusidProblemDetails"}},"text/json":{"schema":{"$ref":"/docs/api/luminesce/schemas.json#/components/schemas/LusidProblemDetails"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"/docs/api/luminesce/schemas.json#/components/schemas/LusidProblemDetails"}},"text/plain":{"schema":{"$ref":"/docs/api/luminesce/schemas.json#/components/schemas/LusidProblemDetails"}},"text/json":{"schema":{"$ref":"/docs/api/luminesce/schemas.json#/components/schemas/LusidProblemDetails"}}}}},"security":[{"BearerAuth":[]}],"x-fbn-apistatus":"Stable"}}},"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}}}}