Skip to Content
kosemdocs
ReferenceAPIEnvironments

Refresh image in project

Resolves an image's source again, and prepares what it names now, if that is new. kosem does this itself every hour for an image that follows its tag. Environments keep the version they run until they're reset.

POST
/v1/projects/{project}/images/{image}/refresh

Resolves an image's source again, and prepares what it names now, if that is new.

kosem does this itself every hour for an image that follows its tag. Environments keep the version they run until they're reset.

Authorization

bearer
headerAuthorizationBearer <token>

An access token, or an API key.

Path Parameters

project*string

The project's ID.

Match^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$
image*string

The image's ID.

Match^img_[0-7][0-9a-hjkmnp-tv-z]{25}$

Response Body

OK

application/json
  1. response
availability*

For an organization's image: the projects whose environments use it. A project's image is available to none.

checkTime?string

When kosem last resolved its source; unset until it has.

Formatdate-time
createTime*string

When the image was created.

Formatdate-time
displayName*string

What people call the image.

followTag*boolean

Whether kosem resolves its tag again every hour, as RefreshImage does, so that it prepares each new version. A source named by a digest never moves.

keepVersions*integer

How many of its newest versions it keeps. An older one is deleted once no environment runs it.

Formatint32
name*string

Resource name, organizations/{organization_id}/images/{image_id} or projects/{project_id}/images/{image_id}.

refreshReason*string

Why kosem's last check of its tag couldn't refresh it, which leaves it as it was; empty once a check can.

registry?string

The registry that kosem signs in with to pull it, when it's private.

source*string

The image's reference, with a tag or a digest, in its shortest spelling, such as node:24 for docker.io/library/node:24. Set when the image is created, and never changed.

state*string

PREPARING until its latest version is ready to run, READY once it is, and FAILED if kosem can't prepare it.

Value in"PREPARING""READY""FAILED"
stateReason*string

Why kosem can't prepare it, when it can't.

updateTime*string

When the image last changed.

Formatdate-time
versions*array<>

What its source named each time it was resolved, newest first.

Example Request
curl -X POST 'https://api.kosem.ai/v1/projects/string/images/string/refresh'
Example Response
{
  "availability": {
    "allProjects": true,
    "projects": [
      "string"
    ]
  },
  "checkTime": "2019-08-24T14:15:22Z",
  "createTime": "2019-08-24T14:15:22Z",
  "displayName": "string",
  "followTag": true,
  "keepVersions": 0,
  "name": "string",
  "refreshReason": "string",
  "registry": "string",
  "source": "string",
  "state": "PREPARING",
  "stateReason": "string",
  "updateTime": "2019-08-24T14:15:22Z",
  "versions": [
    {
      "createTime": "2019-08-24T14:15:22Z",
      "digest": "string",
      "environments": 0,
      "prepareTime": "2019-08-24T14:15:22Z",
      "sizeBytes": 0
    }
  ]
}