Core instance files

Delete Core Instance File

Delete a file within a core instance.

DELETEhttps://cloud-api.calyptia.com/v1/core_instance_files/{coreInstanceFileID}
Authorization
Path parameters
coreInstanceFileID*string (uuid)
Response

OK

Body
deleted*boolean
deletedAt*nullable string (date-time)
Request
const response = await fetch('https://cloud-api.calyptia.com/v1/core_instance_files/{coreInstanceFileID}', {
    method: 'DELETE',
    headers: {
      "Authorization": "Bearer <token>"
    },
});
const data = await response.json();
Response
{
  "deleted": false,
  "deletedAt": "2024-09-16T19:18:26.182Z"
}

Update Core Instance File

Update a file within a core instance. The file will be updated with the given name and content. If encypted is set to true, the file will be encrypted using the core instance's encryption key.

PATCHhttps://cloud-api.calyptia.com/v1/core_instance_files/{coreInstanceFileID}
Authorization
Path parameters
coreInstanceFileID*string (uuid)
Body
namenullable string
Example: "myfile"
contentsnullable string (byte)

Optional contents of the file to be updated in base 64 format.

encryptednullable boolean
Response

OK

Body
updatedAt*string (date-time)
Request
const response = await fetch('https://cloud-api.calyptia.com/v1/core_instance_files/{coreInstanceFileID}', {
    method: 'PATCH',
    headers: {
      "Authorization": "Bearer <token>",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "updatedAt": "2024-09-16T19:18:26.182Z"
}