The Operation specific metadata returned by creating an instance is null

hi,
I called the create instance interface (POST /1.0/instances), and the metadata object in the operation object in the response result was empty, which prevented me from getting the fds information. However, in the Incus API documentation, I saw that the metadata object in the response result was not empty.

Here is my request information

POST https://192.168.1.101:8443/1.0/instances
request body:
{
  "architecture": "aarch64",
  "devices": {
    "root": {
      "path": "/",
      "pool": "default",
      "type": "disk"
    }
  },
  "name": "foo",
  "profiles": [
    "default"
  ],
  "source": {
    "fingerprint": "929c0ba72e21",
    "type": "image"
  },
  "type": "container"
}

response body:
{
    "type": "async",
    "status": "Operation created",
    "status_code": 100,
    "operation": "/1.0/operations/c0840bcc-2abf-4c05-aa4b-395b963a882b?project=default",
    "error_code": 0,
    "error": "",
    "metadata": {
        "id": "c0840bcc-2abf-4c05-aa4b-395b963a882b",
        "class": "task",
        "description": "Creating instance",
        "created_at": "2024-08-06T18:00:48.915370103+08:00",
        "updated_at": "2024-08-06T18:00:48.915370103+08:00",
        "status": "Running",
        "status_code": 103,
        "resources": {
            "containers": [
                "/1.0/instances/foo"
            ],
            "instances": [
                "/1.0/instances/foo"
            ]
        },
        "metadata": null,
        "may_cancel": false,
        "err": "",
        "location": "hci03"
    }
}

I want to get the fds information of the operation object by calling the create instance interface, and use the websocket protocol to call /1.0/operations/{id}/websocket?secret=xxx to get the resource creation status.

Is there something wrong with my request for information?

Any help will be appreciated.

I found that the class of the response operation object is task, how to specify the class is websocket?

You’d only get websockets back if you’re creating an instance from a websocket source (migration).

In your case, you’re creating an instance from an image, so you’re going to be getting a normal background operation (task) that you can monitor.