# Deployments

deployment related operations

## GET /v1/k8s/clusters/{uuid}/deployments

> List deployments

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.21"},"tags":[{"name":"Deployments","description":"deployment related operations"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"schemas":{"Deployments":{"type":"array","items":{"$ref":"#/components/schemas/Deployment"}},"Deployment":{"required":["clusterUuid","created","id","name","namespace","owners","replicas","schedulerName","template","connections"],"properties":{"clusterUuid":{"type":"string","format":"uuid"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"namespace":{"type":"string"},"project":{"type":"string"},"owners":{"writeOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Owner"}},"createdAt":{"type":"string","format":"date-time"},"replicas":{"type":"integer","format":"int32"},"template":{"$ref":"#/components/schemas/PodTemplate"},"schedulerName":{"type":"string"},"username":{"type":"string"},"connections":{"type":"array","items":{"type":"string"}},"serviceId":{"type":"string","format":"uuid"},"revisionId":{"type":"string","format":"uuid"},"inferenceworkloadName":{"type":"string"},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentCondition"}},"nodePool":{"type":"string"}}},"Owner":{"required":["id","kind","name"],"type":"object","properties":{"kind":{"type":"string"},"name":{"type":"string"},"id":{"type":"string","format":"uuid"}}},"PodTemplate":{"required":["containers","resourceRequest"],"properties":{"containers":{"type":"array","items":{"$ref":"#/components/schemas/Container"}},"resourceRequest":{"type":"object","additionalProperties":{"type":"number"}}}},"Container":{"required":["image","name"],"properties":{"image":{"type":"string"},"name":{"type":"string"}}},"DeploymentCondition":{"required":["status","type"],"properties":{"type":{"type":"string","enum":["Available","Progressing","ReplicaFailure"]},"status":{"type":"string","enum":["true","false","Unknown"]},"reason":{"type":"string"},"message":{"type":"string"}}},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}},"Error1":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"}}}},"responses":{"Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error1"}}}}}},"paths":{"/v1/k8s/clusters/{uuid}/deployments":{"get":{"tags":["Deployments"],"summary":"List deployments","deprecated":true,"operationId":"getDeployments","responses":{"200":{"description":"Expected response to a valid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deployments"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"default":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## GET /v1/k8s/clusters/{uuid}/deployments/{deploymentId}

> Get a deployment by id

```json
{"openapi":"3.0.3","info":{"title":"Runai API","version":"2.21"},"tags":[{"name":"Deployments","description":"deployment related operations"}],"servers":[{"url":"https://app.run.ai"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer authentication"}},"schemas":{"Deployment":{"required":["clusterUuid","created","id","name","namespace","owners","replicas","schedulerName","template","connections"],"properties":{"clusterUuid":{"type":"string","format":"uuid"},"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"namespace":{"type":"string"},"project":{"type":"string"},"owners":{"writeOnly":true,"type":"array","items":{"$ref":"#/components/schemas/Owner"}},"createdAt":{"type":"string","format":"date-time"},"replicas":{"type":"integer","format":"int32"},"template":{"$ref":"#/components/schemas/PodTemplate"},"schedulerName":{"type":"string"},"username":{"type":"string"},"connections":{"type":"array","items":{"type":"string"}},"serviceId":{"type":"string","format":"uuid"},"revisionId":{"type":"string","format":"uuid"},"inferenceworkloadName":{"type":"string"},"conditions":{"type":"array","items":{"$ref":"#/components/schemas/DeploymentCondition"}},"nodePool":{"type":"string"}}},"Owner":{"required":["id","kind","name"],"type":"object","properties":{"kind":{"type":"string"},"name":{"type":"string"},"id":{"type":"string","format":"uuid"}}},"PodTemplate":{"required":["containers","resourceRequest"],"properties":{"containers":{"type":"array","items":{"$ref":"#/components/schemas/Container"}},"resourceRequest":{"type":"object","additionalProperties":{"type":"number"}}}},"Container":{"required":["image","name"],"properties":{"image":{"type":"string"},"name":{"type":"string"}}},"DeploymentCondition":{"required":["status","type"],"properties":{"type":{"type":"string","enum":["Available","Progressing","ReplicaFailure"]},"status":{"type":"string","enum":["true","false","Unknown"]},"reason":{"type":"string"},"message":{"type":"string"}}},"Error":{"required":["code","message"],"properties":{"code":{"type":"integer","minimum":100,"maximum":599},"message":{"type":"string"},"details":{"type":"string"}}},"Error1":{"required":["code","message"],"properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"}}}},"responses":{"Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"The specified resource was not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error1"}}}},"serviceUnavailable":{"description":"unexpected error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error1"}}}}}},"paths":{"/v1/k8s/clusters/{uuid}/deployments/{deploymentId}":{"get":{"tags":["Deployments"],"summary":"Get a deployment by id","deprecated":true,"operationId":"getDeployment","responses":{"200":{"description":"A deployment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Deployment"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"503":{"$ref":"#/components/responses/serviceUnavailable"}}}}}}
```
