# Serverless

## Create a Elastic deployment

> Create a Elastic deployment

```json
{"openapi":"3.1.0","info":{"title":"saas-platform","version":"1.0.0"},"tags":[{"name":"OpenapiElasticDeployment","description":"OpenAPI elastic deployment"}],"servers":[{"url":"https://api.yottalabs.ai","description":"Generated server url"}],"security":[{}],"paths":{"/openapi/v1/elastic/deploy/create":{"post":{"tags":["OpenapiElasticDeployment"],"summary":"Create a Elastic deployment","description":"Create a Elastic deployment","operationId":"endpointCreate","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenapiElasticCreateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultOpenapiElasticDetailResponse"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}}}}}}},"components":{"schemas":{"OpenapiElasticCreateRequest":{"type":"object","description":"ElasticDeployCreateRequest","properties":{"name":{"type":"string","description":"Elastic Deployment Name","minLength":1,"pattern":"^(?=[A-Za-z])[A-Za-z0-9@._-]{1,50}$"},"imageRegistry":{"type":"string","description":"Image Registry Url"},"image":{"type":"string","description":"image","maxLength":255,"minLength":1},"resources":{"type":"array","description":"GPU resources","items":{"$ref":"#/components/schemas/OpenapiElasticResource"},"minItems":1},"minSingleCardVramInGb":{"type":"integer","format":"int32","description":"Min GPU Single Card VRAM(GB)","maximum":1536,"minimum":0},"minSingleCardVcpu":{"type":"integer","format":"int32","description":"Min GPU Single Card VCPU"},"minSingleCardRamInGb":{"type":"integer","format":"int32","description":"Min GPU Single Card RAM(GB)","maximum":1536,"minimum":0},"workers":{"type":"integer","format":"int32","description":"Workers","minimum":1},"credentialId":{"type":"string","description":"Credential Id"},"containerVolumeInGb":{"type":"integer","format":"int32","description":"Container volume(GB)","minimum":20},"initializationCommand":{"type":"string","description":"Initialization Command"},"environmentVars":{"type":"array","description":"Environment Variables","items":{"$ref":"#/components/schemas/KeyValuePairDTO"}},"expose":{"$ref":"#/components/schemas/OpenapiExposePort","description":"Expose"},"serviceMode":{"type":"string","description":"Service Mode(ALB,QUEUE,CUSTOM)","minLength":1},"webhookUrl":{"type":"string","description":"Webhook Url"}},"required":["containerVolumeInGb","image","name","resources","serviceMode","workers"]},"OpenapiElasticResource":{"type":"object","properties":{"region":{"type":"string","description":"Region","minLength":1},"gpuType":{"type":"string","description":"GPU Type","minLength":1},"gpuCount":{"type":"integer","format":"int32","description":"GPU Count"}},"required":["gpuCount","gpuType","region"]},"KeyValuePairDTO":{"type":"object","description":"KeyValuePairDTO","properties":{"key":{"type":"string","description":"key","minLength":1},"value":{"type":"string","description":"value","minLength":1}},"required":["key","value"]},"OpenapiExposePort":{"type":"object","description":"Expose","properties":{"port":{"type":"integer","format":"int32","description":"port","maximum":65535,"minimum":1},"protocol":{"type":"string","description":"protocol"}},"required":["port"]},"ResultOpenapiElasticDetailResponse":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"$ref":"#/components/schemas/OpenapiElasticDetailResponse","description":"data"}}},"OpenapiElasticDetailResponse":{"type":"object","description":"ElasticDetail","properties":{"id":{"type":"string","description":"Elastic Deployment ID"},"name":{"type":"string"},"creator":{"type":"string"},"domain":{"type":"string"},"imageRegistry":{"type":"string"},"image":{"type":"string"},"resources":{"type":"array","items":{"$ref":"#/components/schemas/OpenapiElasticResourceResponse"}},"minSingleCardVramInGb":{"type":"integer","format":"int32"},"minSingleCardVcpu":{"type":"integer","format":"int32"},"minSingleCardRamInGb":{"type":"integer","format":"int32"},"credentialId":{"type":"integer","format":"int64"},"containerVolumeInGb":{"type":"integer","format":"int32"},"initializationCommand":{"type":"string"},"environmentVars":{"type":"array","items":{"$ref":"#/components/schemas/KeyValuePairDTO"}},"expose":{"$ref":"#/components/schemas/OpenapiExposePortResponse"},"totalWorkers":{"type":"integer","format":"int32"},"runningWorkers":{"type":"integer","format":"int32"},"cost":{"type":"number"},"perSecondPrice":{"type":"number"},"perHourPrice":{"type":"number"},"serviceMode":{"type":"string"},"webhookUrl":{"type":"string"},"status":{"type":"string"}}},"OpenapiElasticResourceResponse":{"type":"object","description":"ElasticResource","properties":{"region":{"type":"string","description":"Region"},"regionDisplayName":{"type":"string","description":"Region Display Name"},"gpuType":{"type":"string","description":"GPU Type"},"gpuDisplayName":{"type":"string","description":"GPU DisplayName"},"gpuCount":{"type":"integer","format":"int32","description":"GPU Count"},"singleCardVramInGb":{"type":"integer","format":"int32","description":"GPU Single Card VRAM(GB)"},"singleCardVcpu":{"type":"integer","format":"int32","description":"GPU Single Card VCPU"},"singleCardRamInGb":{"type":"integer","format":"int32","description":"GPU Single Card RAM(GB)"}}},"OpenapiExposePortResponse":{"type":"object","description":"ElasticExpose","properties":{"port":{"type":"integer","format":"int32","description":"port"},"protocol":{"type":"string","description":"protocol"}}},"ResultObject":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}}}}}
```

## Update a Elastic deployment

> Update a specific Elastic deployment

```json
{"openapi":"3.1.0","info":{"title":"saas-platform","version":"1.0.0"},"tags":[{"name":"OpenapiElasticDeployment","description":"OpenAPI elastic deployment"}],"servers":[{"url":"https://api.yottalabs.ai","description":"Generated server url"}],"security":[{}],"paths":{"/openapi/v1/elastic/deploy/{id}/update":{"post":{"tags":["OpenapiElasticDeployment"],"summary":"Update a Elastic deployment","description":"Update a specific Elastic deployment","operationId":"endpointUpdate","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenapiElasticUpdateRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultOpenapiElasticDetailResponse"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}}}}}}},"components":{"schemas":{"OpenapiElasticUpdateRequest":{"type":"object","description":"ElasticDeployUpdateRequest","properties":{"name":{"type":"string","description":"Elastic Deployment Name","minLength":1,"pattern":"^(?=[A-Za-z])[A-Za-z0-9@._-]{1,50}$"},"resources":{"type":"array","description":"GPU resources","items":{"$ref":"#/components/schemas/OpenapiElasticResource"},"minItems":1},"minSingleCardVramInGb":{"type":"integer","format":"int32","description":"Min GPU Single Card VRAM(GB)"},"minSingleCardVcpu":{"type":"integer","format":"int32","description":"Min GPU Single Card VCPU"},"minSingleCardRamInGb":{"type":"integer","format":"int32","description":"Min GPU Single Card RAM(GB)"},"workers":{"type":"integer","format":"int32","description":"Workers","minimum":1},"credentialId":{"type":"string","description":"Credential Id"},"containerVolumeInGb":{"type":"integer","format":"int32","description":"Container volume(GB)","minimum":20},"initializationCommand":{"type":"string","description":"Initialization Command"},"environmentVars":{"type":"array","description":"Environment Variables","items":{"$ref":"#/components/schemas/KeyValuePairDTO"}},"expose":{"$ref":"#/components/schemas/OpenapiExposePort","description":"Expose"},"webhookUrl":{"type":"string","description":"Webhook Url"}},"required":["containerVolumeInGb","name","resources","workers"]},"OpenapiElasticResource":{"type":"object","properties":{"region":{"type":"string","description":"Region","minLength":1},"gpuType":{"type":"string","description":"GPU Type","minLength":1},"gpuCount":{"type":"integer","format":"int32","description":"GPU Count"}},"required":["gpuCount","gpuType","region"]},"KeyValuePairDTO":{"type":"object","description":"KeyValuePairDTO","properties":{"key":{"type":"string","description":"key","minLength":1},"value":{"type":"string","description":"value","minLength":1}},"required":["key","value"]},"OpenapiExposePort":{"type":"object","description":"Expose","properties":{"port":{"type":"integer","format":"int32","description":"port","maximum":65535,"minimum":1},"protocol":{"type":"string","description":"protocol"}},"required":["port"]},"ResultOpenapiElasticDetailResponse":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"$ref":"#/components/schemas/OpenapiElasticDetailResponse","description":"data"}}},"OpenapiElasticDetailResponse":{"type":"object","description":"ElasticDetail","properties":{"id":{"type":"string","description":"Elastic Deployment ID"},"name":{"type":"string"},"creator":{"type":"string"},"domain":{"type":"string"},"imageRegistry":{"type":"string"},"image":{"type":"string"},"resources":{"type":"array","items":{"$ref":"#/components/schemas/OpenapiElasticResourceResponse"}},"minSingleCardVramInGb":{"type":"integer","format":"int32"},"minSingleCardVcpu":{"type":"integer","format":"int32"},"minSingleCardRamInGb":{"type":"integer","format":"int32"},"credentialId":{"type":"integer","format":"int64"},"containerVolumeInGb":{"type":"integer","format":"int32"},"initializationCommand":{"type":"string"},"environmentVars":{"type":"array","items":{"$ref":"#/components/schemas/KeyValuePairDTO"}},"expose":{"$ref":"#/components/schemas/OpenapiExposePortResponse"},"totalWorkers":{"type":"integer","format":"int32"},"runningWorkers":{"type":"integer","format":"int32"},"cost":{"type":"number"},"perSecondPrice":{"type":"number"},"perHourPrice":{"type":"number"},"serviceMode":{"type":"string"},"webhookUrl":{"type":"string"},"status":{"type":"string"}}},"OpenapiElasticResourceResponse":{"type":"object","description":"ElasticResource","properties":{"region":{"type":"string","description":"Region"},"regionDisplayName":{"type":"string","description":"Region Display Name"},"gpuType":{"type":"string","description":"GPU Type"},"gpuDisplayName":{"type":"string","description":"GPU DisplayName"},"gpuCount":{"type":"integer","format":"int32","description":"GPU Count"},"singleCardVramInGb":{"type":"integer","format":"int32","description":"GPU Single Card VRAM(GB)"},"singleCardVcpu":{"type":"integer","format":"int32","description":"GPU Single Card VCPU"},"singleCardRamInGb":{"type":"integer","format":"int32","description":"GPU Single Card RAM(GB)"}}},"OpenapiExposePortResponse":{"type":"object","description":"ElasticExpose","properties":{"port":{"type":"integer","format":"int32","description":"port"},"protocol":{"type":"string","description":"protocol"}}},"ResultObject":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}}}}}
```

## Stop a Elastic deployment

> Stop a specific Elastic deployment

```json
{"openapi":"3.1.0","info":{"title":"saas-platform","version":"1.0.0"},"tags":[{"name":"OpenapiElasticDeployment","description":"OpenAPI elastic deployment"}],"servers":[{"url":"https://api.yottalabs.ai","description":"Generated server url"}],"security":[{}],"paths":{"/openapi/v1/elastic/deploy/{id}/stop":{"post":{"tags":["OpenapiElasticDeployment"],"summary":"Stop a Elastic deployment","description":"Stop a specific Elastic deployment","operationId":"endpointStop","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultVoid"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}}}}}}},"components":{"schemas":{"ResultVoid":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}},"ResultObject":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}}}}}
```

## Scale Elastic Deployment Workers

> Adjust the number of workers for a specific elastic deployment.

```json
{"openapi":"3.1.0","info":{"title":"saas-platform","version":"1.0.0"},"tags":[{"name":"OpenapiElasticDeployment","description":"OpenAPI elastic deployment"}],"servers":[{"url":"https://api.yottalabs.ai","description":"Generated server url"}],"security":[{}],"paths":{"/openapi/v1/elastic/deploy/{id}/workers":{"post":{"tags":["OpenapiElasticDeployment"],"summary":"Scale Elastic Deployment Workers","description":"Adjust the number of workers for a specific elastic deployment.","operationId":"endpointScale","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenapiElasticWorkerScaleRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultVoid"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}}}}}}},"components":{"schemas":{"OpenapiElasticWorkerScaleRequest":{"type":"object","description":"OpenapiScaleWorkersRequest","properties":{"workers":{"type":"integer","format":"int32","description":"workers"}},"required":["workers"]},"ResultVoid":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}},"ResultObject":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}}}}}
```

## Start or resume a Elastic deployment

> Start or resume a specific Elastic deployment

```json
{"openapi":"3.1.0","info":{"title":"saas-platform","version":"1.0.0"},"tags":[{"name":"OpenapiElasticDeployment","description":"OpenAPI elastic deployment"}],"servers":[{"url":"https://api.yottalabs.ai","description":"Generated server url"}],"security":[{}],"paths":{"/openapi/v1/elastic/deploy/{id}/start":{"post":{"tags":["OpenapiElasticDeployment"],"summary":"Start or resume a Elastic deployment","description":"Start or resume a specific Elastic deployment","operationId":"endpointStart","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultVoid"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}}}}}}},"components":{"schemas":{"ResultVoid":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}},"ResultObject":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}}}}}
```

## Delete a Elastic deployment

> Delete a specific Elastic deployment

```json
{"openapi":"3.1.0","info":{"title":"saas-platform","version":"1.0.0"},"tags":[{"name":"OpenapiElasticDeployment","description":"OpenAPI elastic deployment"}],"servers":[{"url":"https://api.yottalabs.ai","description":"Generated server url"}],"security":[{}],"paths":{"/openapi/v1/elastic/deploy/{id}":{"delete":{"tags":["OpenapiElasticDeployment"],"summary":"Delete a Elastic deployment","description":"Delete a specific Elastic deployment","operationId":"endpointDelete_2","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultVoid"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}}}}}}},"components":{"schemas":{"ResultVoid":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}},"ResultObject":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}}}}}
```

## Get all Elastic deployments

> Get all Elastic deployments list

```json
{"openapi":"3.1.0","info":{"title":"saas-platform","version":"1.0.0"},"tags":[{"name":"OpenapiElasticDeployment","description":"OpenAPI elastic deployment"}],"servers":[{"url":"https://api.yottalabs.ai","description":"Generated server url"}],"security":[{}],"paths":{"/openapi/v1/elastic/deploy/list":{"get":{"tags":["OpenapiElasticDeployment"],"summary":"Get all Elastic deployments","description":"Get all Elastic deployments list","operationId":"endpointList_1","parameters":[{"name":"statusList","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultListOpenapiElasticDetailResponse"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}}}}}}},"components":{"schemas":{"ResultListOpenapiElasticDetailResponse":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"type":"array","description":"data","items":{"$ref":"#/components/schemas/OpenapiElasticDetailResponse"}}}},"OpenapiElasticDetailResponse":{"type":"object","description":"ElasticDetail","properties":{"id":{"type":"string","description":"Elastic Deployment ID"},"name":{"type":"string"},"creator":{"type":"string"},"domain":{"type":"string"},"imageRegistry":{"type":"string"},"image":{"type":"string"},"resources":{"type":"array","items":{"$ref":"#/components/schemas/OpenapiElasticResourceResponse"}},"minSingleCardVramInGb":{"type":"integer","format":"int32"},"minSingleCardVcpu":{"type":"integer","format":"int32"},"minSingleCardRamInGb":{"type":"integer","format":"int32"},"credentialId":{"type":"integer","format":"int64"},"containerVolumeInGb":{"type":"integer","format":"int32"},"initializationCommand":{"type":"string"},"environmentVars":{"type":"array","items":{"$ref":"#/components/schemas/KeyValuePairDTO"}},"expose":{"$ref":"#/components/schemas/OpenapiExposePortResponse"},"totalWorkers":{"type":"integer","format":"int32"},"runningWorkers":{"type":"integer","format":"int32"},"cost":{"type":"number"},"perSecondPrice":{"type":"number"},"perHourPrice":{"type":"number"},"serviceMode":{"type":"string"},"webhookUrl":{"type":"string"},"status":{"type":"string"}}},"OpenapiElasticResourceResponse":{"type":"object","description":"ElasticResource","properties":{"region":{"type":"string","description":"Region"},"regionDisplayName":{"type":"string","description":"Region Display Name"},"gpuType":{"type":"string","description":"GPU Type"},"gpuDisplayName":{"type":"string","description":"GPU DisplayName"},"gpuCount":{"type":"integer","format":"int32","description":"GPU Count"},"singleCardVramInGb":{"type":"integer","format":"int32","description":"GPU Single Card VRAM(GB)"},"singleCardVcpu":{"type":"integer","format":"int32","description":"GPU Single Card VCPU"},"singleCardRamInGb":{"type":"integer","format":"int32","description":"GPU Single Card RAM(GB)"}}},"KeyValuePairDTO":{"type":"object","description":"KeyValuePairDTO","properties":{"key":{"type":"string","description":"key","minLength":1},"value":{"type":"string","description":"value","minLength":1}},"required":["key","value"]},"OpenapiExposePortResponse":{"type":"object","description":"ElasticExpose","properties":{"port":{"type":"integer","format":"int32","description":"port"},"protocol":{"type":"string","description":"protocol"}}},"ResultObject":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}}}}}
```

## Query worker logs

> Query worker logs with pagination

```json
{"openapi":"3.1.0","info":{"title":"saas-platform","version":"1.0.0"},"tags":[{"name":"OpenapiElasticDeployment","description":"OpenAPI elastic deployment"}],"servers":[{"url":"https://api.yottalabs.ai","description":"Generated server url"}],"security":[{}],"paths":{"/openapi/v1/elastic/deploy/{id}/workers/{workerId}/logs":{"get":{"tags":["OpenapiElasticDeployment"],"summary":"Query worker logs","description":"Query worker logs with pagination","operationId":"queryWorkerLogs","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"workerId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":100}},{"name":"keyword","in":"query","required":false,"schema":{"type":"string"}},{"name":"startTime","in":"query","required":false,"schema":{"type":"string"}},{"name":"endTime","in":"query","required":false,"schema":{"type":"string"}},{"name":"searchAfterTime","in":"query","required":false,"schema":{"type":"string"}},{"name":"searchAfterOffset","in":"query","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"direction","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultOpenapiLogResponse"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}}}}}}},"components":{"schemas":{"ResultOpenapiLogResponse":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"$ref":"#/components/schemas/OpenapiLogResponse","description":"data"}}},"OpenapiLogResponse":{"type":"object","properties":{"logs":{"type":"array","items":{"$ref":"#/components/schemas/Log"}},"hasMore":{"type":"boolean"},"nextSearchAfterTime":{"type":"string"},"nextSearchAfterOffset":{"type":"string"}}},"Log":{"type":"object","properties":{"timestamp":{"type":"string"},"log":{"type":"string"},"offset":{"type":"integer","format":"int64"}}},"ResultObject":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}}}}}
```

## Get Elastic deployment detail

> Retrieve detailed information of a specific elastic deployment by ID.

```json
{"openapi":"3.1.0","info":{"title":"saas-platform","version":"1.0.0"},"tags":[{"name":"OpenapiElasticDeployment","description":"OpenAPI elastic deployment"}],"servers":[{"url":"https://api.yottalabs.ai","description":"Generated server url"}],"security":[{}],"paths":{"/openapi/v1/elastic/deploy/{id}":{"get":{"tags":["OpenapiElasticDeployment"],"summary":"Get Elastic deployment detail","description":"Retrieve detailed information of a specific elastic deployment by ID.","operationId":"endpointDetail","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultOpenapiElasticDetailResponse"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}}}}}}},"components":{"schemas":{"ResultOpenapiElasticDetailResponse":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"$ref":"#/components/schemas/OpenapiElasticDetailResponse","description":"data"}}},"OpenapiElasticDetailResponse":{"type":"object","description":"ElasticDetail","properties":{"id":{"type":"string","description":"Elastic Deployment ID"},"name":{"type":"string"},"creator":{"type":"string"},"domain":{"type":"string"},"imageRegistry":{"type":"string"},"image":{"type":"string"},"resources":{"type":"array","items":{"$ref":"#/components/schemas/OpenapiElasticResourceResponse"}},"minSingleCardVramInGb":{"type":"integer","format":"int32"},"minSingleCardVcpu":{"type":"integer","format":"int32"},"minSingleCardRamInGb":{"type":"integer","format":"int32"},"credentialId":{"type":"integer","format":"int64"},"containerVolumeInGb":{"type":"integer","format":"int32"},"initializationCommand":{"type":"string"},"environmentVars":{"type":"array","items":{"$ref":"#/components/schemas/KeyValuePairDTO"}},"expose":{"$ref":"#/components/schemas/OpenapiExposePortResponse"},"totalWorkers":{"type":"integer","format":"int32"},"runningWorkers":{"type":"integer","format":"int32"},"cost":{"type":"number"},"perSecondPrice":{"type":"number"},"perHourPrice":{"type":"number"},"serviceMode":{"type":"string"},"webhookUrl":{"type":"string"},"status":{"type":"string"}}},"OpenapiElasticResourceResponse":{"type":"object","description":"ElasticResource","properties":{"region":{"type":"string","description":"Region"},"regionDisplayName":{"type":"string","description":"Region Display Name"},"gpuType":{"type":"string","description":"GPU Type"},"gpuDisplayName":{"type":"string","description":"GPU DisplayName"},"gpuCount":{"type":"integer","format":"int32","description":"GPU Count"},"singleCardVramInGb":{"type":"integer","format":"int32","description":"GPU Single Card VRAM(GB)"},"singleCardVcpu":{"type":"integer","format":"int32","description":"GPU Single Card VCPU"},"singleCardRamInGb":{"type":"integer","format":"int32","description":"GPU Single Card RAM(GB)"}}},"KeyValuePairDTO":{"type":"object","description":"KeyValuePairDTO","properties":{"key":{"type":"string","description":"key","minLength":1},"value":{"type":"string","description":"value","minLength":1}},"required":["key","value"]},"OpenapiExposePortResponse":{"type":"object","description":"ElasticExpose","properties":{"port":{"type":"integer","format":"int32","description":"port"},"protocol":{"type":"string","description":"protocol"}}},"ResultObject":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}}}}}
```

## Get all workers of a Elastic deployment

> Get all workers of a specific Elastic deployment

```json
{"openapi":"3.1.0","info":{"title":"saas-platform","version":"1.0.0"},"tags":[{"name":"OpenapiElasticDeployment","description":"OpenAPI elastic deployment"}],"servers":[{"url":"https://api.yottalabs.ai","description":"Generated server url"}],"security":[{}],"paths":{"/openapi/v1/elastic/deploy/{id}/workers":{"get":{"tags":["OpenapiElasticDeployment"],"summary":"Get all workers of a Elastic deployment","description":"Get all workers of a specific Elastic deployment","operationId":"endpointWorkers","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"name":"statusList","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultListOpenapiElasticWorkerResponse"}}}},"400":{"description":"Bad Request","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}}},"500":{"description":"Internal Server Error","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResultObject"}}}}}}}},"components":{"schemas":{"ResultListOpenapiElasticWorkerResponse":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"type":"array","description":"data","items":{"$ref":"#/components/schemas/OpenapiElasticWorkerResponse"}}}},"OpenapiElasticWorkerResponse":{"type":"object","description":"ElasticWorker","properties":{"id":{"type":"string","description":"Worker ID"},"region":{"type":"string","description":"Region"},"regionDisplayName":{"type":"string","description":"Region Display Name"},"gpuType":{"type":"string","description":"GPU Type"},"gpuDisplayName":{"type":"string","description":"GPU DisplayName"},"gpuCount":{"type":"integer","format":"int32","description":"GPU Count"},"singleCardVramInGb":{"type":"integer","format":"int32","description":"GPU Single Card VRAM(GB)"},"singleCardVcpu":{"type":"integer","format":"int32","description":"GPU Single Card VCPU"},"singleCardRamInGb":{"type":"integer","format":"int32","description":"GPU Single Card RAM(GB)"},"uptime":{"type":"integer","format":"int64","description":"Uptime(Milliseconds)"},"cost":{"type":"number","description":"Cost(Dollars)"},"status":{"type":"string","description":"Status"}}},"ResultObject":{"type":"object","properties":{"message":{"type":"string","description":"message"},"code":{"type":"integer","format":"int32","description":"code"},"data":{"description":"data"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.yottalabs.ai/api-and-sdk/api-reference-v1/serverless.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
