> ## Documentation Index
> Fetch the complete documentation index at: https://gcore.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get task



## OpenAPI

````yaml /api-reference/services_documented/cloud_api.yaml get /cloud/v1/tasks/{task_id}
openapi: 3.1.0
info:
  title: Gcore OpenAPI – Cloud API
  description: >-
    This OpenAPI is an aggregated OpenAPI specification that unifies all Gcore
    products into a single file. It covers Cloud, CDN, DNS, WAAP, DDoS
    Protection, Object Storage, Streaming, and FastEdge services.
  version: '2026-05-14T07:00:22.640261+00:00'
servers:
  - url: https://api.gcore.com
security:
  - APIKey: []
tags:
  - name: Bare Metal
    x-displayName: Bare Metal
  - name: Container as a Service
    x-displayName: Container as a Service
  - name: Cost Reports
    x-displayName: Cost Reports
  - name: DDoS Protection
    x-displayName: DDoS Protection
  - name: Everywhere Inference
    x-displayName: Everywhere Inference
  - name: Everywhere Inference Apps
    x-displayName: Everywhere Inference Apps
  - name: File Shares
    x-displayName: File Shares
  - name: Floating IPs
    x-displayName: Floating IPs
  - name: Function as a Service
    x-displayName: Function as a Service
  - name: GPU Bare Metal
    x-displayName: GPU Bare Metal
  - name: GPU Virtual
    x-displayName: GPU Virtual
  - name: IP Ranges
    x-displayName: IP Ranges
  - name: Images
    x-displayName: Images
  - name: Instances
    x-displayName: Instances
  - name: Load Balancers
    x-displayName: Load Balancers
  - name: Logging
    x-displayName: Logging
  - name: Managed Kubernetes
    x-displayName: Managed Kubernetes
  - name: Managed PostgreSQL
    x-displayName: Managed PostgreSQL
  - name: Networks
    x-displayName: Networks
  - name: Placement Groups
    x-displayName: Placement Groups
  - name: Projects
    x-displayName: Projects
  - name: Quotas
    x-displayName: Quotas
  - name: Regions
    x-displayName: Regions
  - name: Registry
    x-displayName: Registry
  - name: Reservations
    x-displayName: Reservations
  - name: Reserved IPs
    x-displayName: Reserved IPs
  - name: Routers
    x-displayName: Routers
  - name: SSH Keys
    x-displayName: SSH Keys
  - name: Secrets
    x-displayName: Secrets
  - name: Security Groups
    x-displayName: Security Groups
  - name: Snapshot Schedules
    x-displayName: Snapshot Schedules
  - name: Snapshots
    x-displayName: Snapshots
  - name: Tasks
    x-displayName: Tasks
  - name: User Actions
    x-displayName: User Actions
  - name: User Role Assignments
    x-displayName: User Role Assignments
  - name: Volumes
    x-displayName: Volumes
paths:
  /cloud/v1/tasks/{task_id}:
    get:
      tags:
        - Tasks
      summary: Get task
      operationId: TaskInstanceViewSet.get
      parameters:
        - in: path
          name: task_id
          required: true
          description: Task ID
          schema:
            description: Task ID
            title: Task Id
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskSerializer'
      x-codeSamples:
        - lang: Python
          source: |-
            import os
            from gcore import Gcore

            client = Gcore(
                api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
            )
            task = client.cloud.tasks.get(
                "task_id",
            )
            print(task.id)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/G-Core/gcore-go\"\n\t\"github.com/G-Core/gcore-go/option\"\n)\n\nfunc main() {\n\tclient := gcore.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\ttask, err := client.Cloud.Tasks.Get(context.TODO(), \"task_id\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", task.ID)\n}\n"
components:
  schemas:
    TaskSerializer:
      properties:
        acknowledged_at:
          anyOf:
            - type: string
            - type: 'null'
          description: If task was acknowledged, this field stores acknowledge timestamp
          title: Acknowledged At
        acknowledged_by:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          description: If task was acknowledged, this field stores `user_id` of the person
          examples:
            - 123
          title: Acknowledged By
        client_id:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          description: The client ID
          examples:
            - 123
          title: Client Id
        created_on:
          anyOf:
            - type: string
            - type: 'null'
          description: Created timestamp
          examples:
            - '2019-06-25T08:42:42Z'
          title: Created On
        created_resources:
          anyOf:
            - $ref: '#/components/schemas/CreatedResources'
            - type: 'null'
          default: null
          description: If the task creates resources, this field will contain their IDs
        data:
          anyOf:
            - {}
            - type: 'null'
          default: null
          description: Task parameters
          examples:
            - block_device_config:
                - boot_index: 0
                  image_id: f01fd9a0-9548-48ba-82dc-a8c8b2d6f2f1
                  name: volume for vm1
                  size: 1
                  source: image
                  type_name: standard
              flavor_name: g1s-shared-1-0.5
              keypair_name: null
              name: cirroz1
              network_config: null
              reservation_id: 01d4925e-f5db-414a-9808-74e08aa4a741
              security_groups: null
          title: Data
        detailed_state:
          anyOf:
            - $ref: '#/components/schemas/TaskDetailedStateEnum'
            - type: 'null'
          default: null
          description: Task detailed state that is more specific to task type
        error:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: The error value
          title: Error
        finished_on:
          anyOf:
            - type: string
            - type: 'null'
          description: Finished timestamp
          title: Finished On
        id:
          description: The task ID
          example: 26986bc0-748a-4448-b836-0a2aa465eb06
          examples:
            - 26986bc0-748a-4448-b836-0a2aa465eb06
          title: Id
          type: string
        job_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: Job ID
          title: Job Id
        lifecycle_policy_id:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          description: Lifecycle policy ID
          title: Lifecycle Policy Id
        project_id:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          description: The project ID
          examples:
            - 123
          title: Project Id
        region_id:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          description: The region ID
          examples:
            - 123
          title: Region Id
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: The request ID
          title: Request Id
        schedule_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: Schedule ID
          title: Schedule Id
        state:
          $ref: '#/components/schemas/TaskState'
          description: The task state
          examples:
            - RUNNING
        task_type:
          description: The task type
          example: create_vm
          examples:
            - create_vm
          title: Task Type
          type: string
        updated_on:
          anyOf:
            - type: string
            - type: 'null'
          description: Last updated timestamp
          title: Updated On
        user_client_id:
          anyOf:
            - type: integer
            - type: 'null'
          default: null
          description: Client, specified in user's JWT
          examples:
            - 123
          title: User Client Id
        user_id:
          description: The user ID that initiated the task
          example: 123
          examples:
            - 123
          title: User Id
          type: integer
      required:
        - id
        - user_id
        - task_type
        - state
        - created_on
      title: TaskSerializer
      type: object
    CreatedResources:
      properties:
        ai_clusters:
          deprecated: true
          description: Deprecated, use 'clusters' instead. IDs of created GPU clusters
          items:
            type: string
          title: Ai Clusters
          type: array
        api_keys:
          description: IDs of created API keys
          items:
            type: string
          title: Api Keys
          type: array
        caas_containers:
          description: IDs of created CaaS containers
          items:
            type: string
          title: Caas Containers
          type: array
        clusters:
          description: IDs of created GPU clusters
          items:
            type: string
          title: Clusters
          type: array
        ddos_profiles:
          description: IDs of created ddos protection profiles
          items:
            type: integer
          title: Ddos Profiles
          type: array
        faas_functions:
          description: IDs of created FaaS functions
          items:
            type: string
          title: Faas Functions
          type: array
        faas_namespaces:
          description: IDs of created FaaS namespaces
          items:
            type: string
          title: Faas Namespaces
          type: array
        file_shares:
          description: IDs of created file shares
          items:
            type: string
          title: File Shares
          type: array
        floatingips:
          description: IDs of created floating IPs
          items:
            type: string
          title: Floatingips
          type: array
        healthmonitors:
          description: IDs of created health monitors
          items:
            type: string
          title: Healthmonitors
          type: array
        images:
          description: IDs of created images
          items:
            type: string
          title: Images
          type: array
        inference_instances:
          description: IDs of created inference instances
          items:
            type: string
          title: Inference Instances
          type: array
        instances:
          description: IDs of created instances
          items:
            type: string
          title: Instances
          type: array
        k8s_clusters:
          description: IDs of created Kubernetes clusters
          items:
            type: string
          title: K8S Clusters
          type: array
        k8s_pools:
          description: IDs of created Kubernetes pools
          items:
            type: string
          title: K8S Pools
          type: array
        l7polices:
          description: IDs of created L7 policies
          items:
            type: string
          title: L7Polices
          type: array
        l7rules:
          description: IDs of created L7 rules
          items:
            type: string
          title: L7Rules
          type: array
        laas_topic:
          description: IDs of created LaaS topics
          items:
            type: string
          title: Laas Topic
          type: array
        listeners:
          description: IDs of created load balancer listeners
          items:
            type: string
          title: Listeners
          type: array
        loadbalancers:
          description: IDs of created load balancers
          items:
            type: string
          title: Loadbalancers
          type: array
        members:
          description: IDs of created pool members
          items:
            type: string
          title: Members
          type: array
        networks:
          description: IDs of created networks
          items:
            type: string
          title: Networks
          type: array
        pools:
          description: IDs of created load balancer pools
          items:
            type: string
          title: Pools
          type: array
        ports:
          description: IDs of created ports
          items:
            type: string
          title: Ports
          type: array
        postgresql_clusters:
          description: IDs of created postgres clusters
          items:
            type: string
          title: Postgresql Clusters
          type: array
        projects:
          description: IDs of created projects
          items:
            type: integer
          title: Projects
          type: array
        registry_registries:
          description: IDs of created registry registries
          items:
            type: string
          title: Registry Registries
          type: array
        registry_users:
          description: IDs of created registry users
          items:
            type: string
          title: Registry Users
          type: array
        routers:
          description: IDs of created routers
          items:
            type: string
          title: Routers
          type: array
        secrets:
          description: IDs of created secrets
          items:
            type: string
          title: Secrets
          type: array
        security_group_rules:
          description: IDs of created security group rules
          items:
            type: string
          title: Security Group Rules
          type: array
        security_groups:
          description: IDs of created security groups
          items:
            type: string
          title: Security Groups
          type: array
        servergroups:
          description: IDs of created server groups
          items:
            type: string
          title: Servergroups
          type: array
        snapshots:
          description: IDs of created volume snapshots
          items:
            type: string
          title: Snapshots
          type: array
        subnets:
          description: IDs of created subnets
          items:
            type: string
          title: Subnets
          type: array
        volumes:
          description: IDs of created volumes
          items:
            type: string
          title: Volumes
          type: array
      title: CreatedResources
      type: object
    TaskDetailedStateEnum:
      enum:
        - CLUSTER_CLEAN_UP
        - CLUSTER_REBUILD
        - CLUSTER_RESIZE
        - CLUSTER_RESUME
        - CLUSTER_SERVER_REBUILD
        - CLUSTER_SUSPEND
        - ERROR
        - FINISHED
        - IPU_SERVERS
        - NETWORK
        - POPLAR_SERVERS
        - POST_DEPLOY_SETUP
        - VIPU_CONTROLLER
      title: TaskDetailedStateEnum
      type: string
    TaskState:
      enum:
        - ERROR
        - FINISHED
        - NEW
        - RUNNING
      title: TaskState
      type: string
  securitySchemes:
    APIKey:
      description: >-
        API key for authentication. Make sure to include the word `apikey`,
        followed by a single space and then your token.

        Example: `apikey 1234$abcdef`
      type: apiKey
      in: header
      name: Authorization

````