# Jobs

## GET /v1/bi/jobs/{uid}

> Returns the status of a specific job.

```json
{"openapi":"3.0.0","info":{"title":"Gormic BI API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"GetJobApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/GetJob_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"GetJob_Data":{"type":"object","properties":{"job":{"$ref":"#/components/schemas/GetJob_Data_Job"}},"required":["job"]},"GetJob_Data_Job":{"type":"object","properties":{"status":{"type":"string","enum":["canceled","completed","failed","pending","running"]},"log":{"type":"string"},"submittedAt":{"type":"string"},"startedAt":{"type":"string"},"outputMimeType":{"type":"string"},"outputFileName":{"type":"string"},"id":{"type":"string"},"downloadUrl":{"type":"string"}},"required":["status","submittedAt","id"]}}},"paths":{"/v1/bi/jobs/{uid}":{"get":{"operationId":"Jobs_get","parameters":[{"name":"uid","required":true,"in":"path","schema":{"type":"string"}},{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetJobApiResponse"}}}}},"summary":"Returns the status of a specific job.","tags":["Jobs"]}}}}
```

## POST /v1/bi/jobs

> Submits a new request to process a specific data model.

```json
{"openapi":"3.0.0","info":{"title":"Gormic BI API","version":"1.0"},"security":[{"api-key":[]}],"components":{"securitySchemes":{"api-key":{"type":"apiKey","in":"header","name":"api-key","description":"API Key"}},"schemas":{"SubmitJobApiRequest":{"type":"object","properties":{"params":{"$ref":"#/components/schemas/SubmitJob_Params"}},"required":["params"]},"SubmitJob_Params":{"type":"object","properties":{"uid":{"type":"string"},"organizationUid":{"type":"string"},"parameters":{"type":"array","items":{"$ref":"#/components/schemas/SubmitJob_Params_ParametersItem"}},"query":{"$ref":"#/components/schemas/ListQueryParams_570588af"},"lang":{"type":"string","enum":["ar","en"]},"template":{"type":"string","enum":["excel-auto"]}},"required":["uid","lang","template"]},"SubmitJob_Params_ParametersItem":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"object"}},"required":["key","value"]},"ListQueryParams_570588af":{"type":"object","properties":{}},"SubmitJobApiResponse":{"type":"object","properties":{"app":{"type":"string"},"service":{"type":"string"},"warnings":{"type":"array","items":{"type":"object"}},"instanceId":{"type":"string"},"requestId":{"type":"string"},"data":{"$ref":"#/components/schemas/SubmitJob_Data"}},"required":["app","service","warnings","instanceId","requestId","data"]},"SubmitJob_Data":{"type":"object","properties":{"jobId":{"type":"string"}},"required":["jobId"]},"SubmitJobApiError":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/SubmitJob_Error"}},"required":["error"]},"SubmitJob_Error":{"type":"object","properties":{"code":{"allOf":[{"$ref":"#/components/schemas/SubmitJob_ErrorCodes_enum"}]}},"required":["code"]},"SubmitJob_ErrorCodes_enum":{"type":"string","enum":["INVALID_DATA_MODEL_PARAMETER","INVALID_INSTANCE_IDS_PARAM","MISSIN_QUERY_PARAM","NOT_ALLOWED","NotFound","UNKOWN_DATA_MODEL_PARAMETER"]}}},"paths":{"/v1/bi/jobs":{"post":{"operationId":"Jobs_submit","parameters":[{"name":"organization-id","in":"header","required":true,"schema":{"type":"string"},"description":"Organization ID"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitJobApiRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitJobApiResponse"}}}},"400":{"description":"Functional Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitJobApiError"}}}}},"summary":"Submits a new request to process a specific data model.","tags":["Jobs"]}}}}
```
