Skip to main content
PUT
/
cloud
/
v1
/
shared_image
Create or update shared image
curl --request PUT \
  --url https://api.gcore.com/cloud/v1/shared_image \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": 3,
  "entity_id": 5,
  "entity_type": "reseller",
  "image_ids": [
    "b5b4d65d-945f-4b98-ab6f-332319c724ef",
    "0052a312-e6d8-4177-8e29-b017a3a6b588"
  ],
  "region_id": 1
}
'
{
  "count": 1,
  "results": [
    {
      "id": 3,
      "entity_id": 5,
      "entity_type": "reseller",
      "image_ids": [
        "b5b4d65d-945f-4b98-ab6f-332319c724ef",
        "0052a312-e6d8-4177-8e29-b017a3a6b588"
      ],
      "region_id": 1
    }
  ]
}

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

Body

application/json

Cloud admin can change the set of images. Firstly, they may limit the number of public images available. Secondly, he can share the image to all clients of the reseller, with a specific client and with the project. If the entity isn't showed or has image_ids = None, all public imagesavailable to him. If the entity has image_ids = [], all public images are unavailable to the client.

entity_id
integer
required

Entity ID

entity_type
enum<string>
required

Entity type

Available options:
client,
project,
reseller
image_ids
string[] | null
required

List of shared image IDs available for the projects, clients or resellers

region_id
integer
required

Region ID

Response

200 - application/json

List of shared images

count
integer

Number of objects

results
object[]

Objects