artifacts

Update Artifact

Changed on

Update an artifact's name, location, or template flag. Send at least one of name, space_id, folder_id, or is_template.

On a document, diagram, or folder, each field you send needs the same permission it needs in Auctor:

  • name needs permission to rename the file.
  • is_template needs permission to edit the file.
  • folder_id, or a space_id other than the file's current space, needs permission to move the file. Moving a folder also needs permission to move everything inside it.
  • folder_id also needs permission to add files to the destination folder.
  • A space_id other than the file's current space also needs the API key's user to be a member of that space.

Moving a document, diagram, or folder out of the organization space also needs the permission to download it that GET /v2/artifacts/{artifact_id} asks for, on the file and on everything inside a moved folder.

If any check fails, the request returns 403 and nothing is changed. An M2M token has no user, so it can update only files with no restriction on themselves or on any folder above them, and that includes the destination folder and everything inside a moved folder.

These file-role checks apply only once file permissions are turned on for your organization. Until then, the request doesn't run them.

Returns 503 if file roles can't be read. Retry the request.

patch/v2/artifacts/{artifact_id}

Request

  • Base URL
    https://api.getauctor.com (the document declares no server; this is the origin it was published from)
  • URL
    https://api.getauctor.com/v2/artifacts/{artifact_id}
  • Auth
    none declared

Path parameters

artifact_idstring required

Query parameters

type'session' | 'document' | 'diagram' | 'folder' required
id_typestring

Request body

namestring nullable
space_idstring nullable
folder_idstring nullable
is_templateboolean nullable

Response

Successful Response

idstring required
type'session' | 'document' | 'diagram' | 'folder' required
namestring required
space_idstring required
folder_idsstring[]
created_atstring required
last_content_updated_atstring nullable

Last time the document or diagram content itself changed; unchanged by renames and moves. Null for sessions.

external_idsobject

Changes