Create instance from alias fails with: no such file or directory

I’m starting a container instance from a private remote image using a POST to /1.0/instances with the following post data for the source:

source: {
          type: 'image',
          alias: 'connector/main/amd64-latest',
          mode: 'pull',
          server: 'https://server-ip:8443',
          protocol: 'lxd',
          secret: 'image-secret', 
          certificate: 'PEM Certificate',
}

I get the following error response from the server when using lxc monitor:

location: none
metadata:
  context: {}
  level: dbug
  message: 'Failure for task operation: daebc5ab-855f-4c7a-ada8-0703b1a697e0: open
    /var/snap/lxd/common/lxd/images/connector/main/amd64-latest: no such file or
    directory'
timestamp: "2021-05-04T20:23:51.008903725+02:00"
type: logging

If I instead of using the alias-property in the source configuration use fingerprint it works but in the documentation with an example for a private remote image only the alias is used.

I’m currently using an extra request to /1.0/images/aliases/<name> to get the target and use that as the fingerprint in the source object for the post request to /1.0/instances. But would like to ask if it is supposed to work with the alias or if the fingerprint should always be added in this case?

Feels like it should work, though looking at our client we seem to deref the alias in the client and then pass the fingerprint to the server. So that probably explains why this issue didn’t show up so far as most users use the CLI.

Alright, thank you for the response! I’ll continue using the fingerprint for now as that is working fine.