Skip to main content
GET
/
cloud
/
v3
/
inference
/
{project_id}
/
deployments
Python
import os
from gcore import Gcore

client = Gcore(
    api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
)
page = client.cloud.inference.deployments.list(
    project_id=1,
)
page = page.results[0]
print(page.project_id)
{
  "count": 1,
  "results": [
    {
      "address": "https://example.com",
      "auth_enabled": true,
      "command": "<string>",
      "containers": [
        {
          "address": "https://example.com",
          "deploy_status": {
            "ready": 123,
            "total": 123
          },
          "error_message": "Failed to pull image",
          "region_id": 123,
          "scale": {
            "cooldown_period": 60,
            "max": 123,
            "min": 123,
            "polling_interval": 30,
            "triggers": {
              "cpu": {
                "threshold": 80
              },
              "gpu_memory": {
                "threshold": 80
              },
              "gpu_utilization": {
                "threshold": 80
              },
              "http": {
                "rate": 1,
                "window": 60
              },
              "memory": {
                "threshold": 80
              },
              "sqs": {
                "activation_queue_length": 123,
                "aws_endpoint": "<string>",
                "aws_region": "<string>",
                "queue_length": 123,
                "queue_url": "<string>",
                "scale_on_delayed": true,
                "scale_on_flight": true,
                "secret_name": "<string>"
              }
            }
          }
        }
      ],
      "created_at": "2023-08-22T11:21:00Z",
      "credentials_name": "<string>",
      "description": "<string>",
      "envs": {
        "DEBUG_MODE": "False",
        "KEY": "12345"
      },
      "flavor_name": "<string>",
      "image": "<string>",
      "ingress_opts": {
        "disable_response_buffering": true
      },
      "listening_port": 123,
      "logging": {
        "destination_region_id": 1,
        "enabled": true,
        "retention_policy": {
          "period": 45
        },
        "topic_name": "my-log-name"
      },
      "name": "<string>",
      "object_references": [
        {
          "kind": "AppDeployment",
          "name": "<string>"
        }
      ],
      "probes": {
        "liveness_probe": {
          "enabled": true,
          "probe": {
            "exec": {
              "command": [
                "<string>"
              ]
            },
            "failure_threshold": 123,
            "http_get": {
              "headers": {},
              "host": "127.0.0.1",
              "path": "<string>",
              "port": 123,
              "schema": "<string>"
            },
            "initial_delay_seconds": 123,
            "period_seconds": 123,
            "success_threshold": 123,
            "tcp_socket": {
              "port": 123
            },
            "timeout_seconds": 123
          }
        },
        "readiness_probe": {
          "enabled": true,
          "probe": {
            "exec": {
              "command": [
                "<string>"
              ]
            },
            "failure_threshold": 123,
            "http_get": {
              "headers": {},
              "host": "127.0.0.1",
              "path": "<string>",
              "port": 123,
              "schema": "<string>"
            },
            "initial_delay_seconds": 123,
            "period_seconds": 123,
            "success_threshold": 123,
            "tcp_socket": {
              "port": 123
            },
            "timeout_seconds": 123
          }
        },
        "startup_probe": {
          "enabled": true,
          "probe": {
            "exec": {
              "command": [
                "<string>"
              ]
            },
            "failure_threshold": 123,
            "http_get": {
              "headers": {},
              "host": "127.0.0.1",
              "path": "<string>",
              "port": 123,
              "schema": "<string>"
            },
            "initial_delay_seconds": 123,
            "period_seconds": 123,
            "success_threshold": 123,
            "tcp_socket": {
              "port": 123
            },
            "timeout_seconds": 123
          }
        }
      },
      "project_id": 123,
      "status": "ACTIVE",
      "timeout": 120,
      "api_keys": [
        "key1",
        "key2"
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Path Parameters

project_id
integer
required

Project ID

Query Parameters

limit
integer
default:1000

Optional. Limit the number of returned items

Required range: x <= 1000
offset
integer
default:0

Optional. Offset value is used to exclude the first set of records from the result

Required range: x >= 0

Response

200 - application/json

OK

count
integer
required

Number of objects

Required range: x >= 0
results
InferenceInstanceOutSerializerV3 · object[]
required

Objects