UpCloudLtd / upcloud-go-api

Go client for UpCloud's API
https://pkg.go.dev/github.com/UpCloudLtd/upcloud-go-api/v6
MIT License
42 stars 9 forks source link

Can't access templates created by subaccounts #48

Closed YafimK closed 4 years ago

YafimK commented 4 years ago

hey, it seems you cannot access custom images / templates created by subaccounts using the main account password when using the API (tried with this libary and python) When calling "GetStorages" with 'private' and 'template' as params

storageListReq := request.GetStoragesRequest{
        Access:   "private",
        Type:     "template",
        Favorite: false,
    }
    templateList, err := upc.service.GetStorages(&storageListReq)
    if err != nil {
        return "", fmt.Errorf("service.GetStorages failed: %v", err)
    }
PopoSensei commented 4 years ago

Hi. This is a difference, between types of storage.

From our API documentation:

Public storages

Public storages are visible to all users. Public storages include CD-ROM images and templates. CD-ROM images can be used to install operating systems and to rescue unbootable systems. Templates are used to create servers with a preconfigured operating system.

Private storages

Private storages are visible only to the specific user account and sub-accounts. Users can only create private storages.

Link here: UpCloud 1.2 API Documentation