PUT /wiki/rest/api/content/{id}/child/attachment/{attachmentId}

Updates the attachment properties, i.e. the non-binary data of an attachment like the filename, media-type, comment, and parent container.

Permissions required: Permission to update the content.

Servers

Path parameters

Name Type Required Description
id String Yes

The ID of the content that the attachment is attached to.

attachmentId String Yes

The ID of the attachment to update.

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
id String Yes
container Object No

Container for content. This can be either a space (containing a page or blogpost) or a page/blog post (containing an attachment or comment)

version Object Yes
version.confRev String No

The revision id provided by confluence to be used as a revision in Synchrony

version.number Integer Yes

Set this to the current version number incremented by one

version._expandable Object No
version._expandable.collaborators String No
version._expandable.content String No
version.minorEdit Boolean Yes

If minorEdit is set to 'true', no notification email or activity stream will be generated for the change.

version.by Object No
version.by.username String No

This property is no longer available and will be removed from the documentation soon. Use accountId instead. See the deprecation notice for details.

version.by.accountId String No

The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192.

version.by._expandable Object No
version.by._expandable.personalSpace String No
version.by._expandable.operations String No
version.by._expandable.details String No
version.by.publicName String No

The public name or nickname of the user. Will always contain a value.

version.by.displayName String No

The displays name of the user. Depending on the user's privacy setting, this may be the same as publicName.

version.by.isGuest Boolean No

Whether the user is a guest user

version.by.profilePicture Object No

This object represents an icon. If used as a profilePicture, this may be returned as null, depending on the user's privacy setting.

version.by.profilePicture.height Integer Yes
version.by.profilePicture.width Integer Yes
version.by.profilePicture.isDefault Boolean Yes
version.by.profilePicture.path String Yes
version.by.details Object No
version.by.details.business Object No
version.by.details.business.location String No

This property has been deprecated due to privacy changes. There is no replacement. See the migration guide for details.

version.by.details.business.department String No

This property has been deprecated due to privacy changes. There is no replacement. See the migration guide for details.

version.by.details.business.position String No

This property has been deprecated due to privacy changes. There is no replacement. See the migration guide for details.

version.by.details.personal Object No
version.by.details.personal.email String No

This property has been deprecated due to privacy changes. Use the User.email property instead. See the migration guide for details.

version.by.details.personal.phone String No

This property has been deprecated due to privacy changes. There is no replacement. See the migration guide for details.

version.by.details.personal.im String No

This property has been deprecated due to privacy changes. There is no replacement. See the migration guide for details.

version.by.details.personal.website String No

This property has been deprecated due to privacy changes. There is no replacement. See the migration guide for details.

version.by._links Object No
version.by._links.Embeddable Object No
version.by._links.ContentId String No
version.by.userKey String No

This property is no longer available and will be removed from the documentation soon. Use accountId instead. See the deprecation notice for details.

version.by.email String No

The email address of the user. Depending on the user's privacy setting, this may return an empty string.

version.by.type String Yes

Possible values:

  • "unknown"
  • "known"
  • "anonymous"
  • "user"
version.by.accountType String No

The account type of the user, may return empty string if unavailable. App is if the user is a bot user created on behalf of an Atlassian app.

Possible values:

  • ""
  • "atlassian"
  • "app"
version.by.isExternalCollaborator Boolean No

This is deprecated. Use isGuest instead to find out whether the user is a guest user.

version.by.timeZone String No

This displays user time zone. Depending on the user's privacy setting, this may return null.

version.by.externalCollaborator Boolean No

This is deprecated. Use isGuest instead to find out whether the user is a guest user.

version.by.operations[] Array No
version.by.operations[].targetType String Yes

The space or content type that the operation applies to. Could be one of- - application - page - blogpost - comment - attachment - space

version.by.operations[].operation String Yes

The operation itself.

Possible values:

  • "clear_permissions"
  • "purge"
  • "copy"
  • "delete"
  • "administer"
  • "archive"
  • "use"
  • "export"
  • "restrict_content"
  • "read"
  • "restore"
  • "create"
  • "create_space"
  • "move"
  • "update"
  • "purge_version"
version.syncRevSource String No

Source of the synchrony revision

version._links Object No
version._links.Embeddable Object No
version._links.ContentId String No
version.contentTypeModified Boolean No

True if content type is modifed in this version (e.g. page to blog)

version.friendlyWhen String No
version.collaborators Object No
version.collaborators._links Object No
version.collaborators._links.Embeddable Object No
version.collaborators._links.ContentId String No
version.collaborators.users[] Array No
version.collaborators.users[].username String No

This property is no longer available and will be removed from the documentation soon. Use accountId instead. See the deprecation notice for details.

version.collaborators.users[].accountId String No

The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192.

version.collaborators.users[]._expandable Object No
version.collaborators.users[]._expandable.personalSpace String No
version.collaborators.users[]._expandable.operations String No
version.collaborators.users[]._expandable.details String No
version.collaborators.users[].publicName String No

The public name or nickname of the user. Will always contain a value.

version.collaborators.users[].displayName String No

The displays name of the user. Depending on the user's privacy setting, this may be the same as publicName.

version.collaborators.users[].isGuest Boolean No

Whether the user is a guest user

version.collaborators.users[].profilePicture Object No

This object represents an icon. If used as a profilePicture, this may be returned as null, depending on the user's privacy setting.

version.collaborators.users[].profilePicture.height Integer Yes
version.collaborators.users[].profilePicture.width Integer Yes
version.collaborators.users[].profilePicture.isDefault Boolean Yes
version.collaborators.users[].profilePicture.path String Yes
version.collaborators.users[].details Object No
version.collaborators.users[].details.business Object No
version.collaborators.users[].details.business.location String No

This property has been deprecated due to privacy changes. There is no replacement. See the migration guide for details.

version.collaborators.users[].details.business.department String No

This property has been deprecated due to privacy changes. There is no replacement. See the migration guide for details.

version.collaborators.users[].details.business.position String No

This property has been deprecated due to privacy changes. There is no replacement. See the migration guide for details.

version.collaborators.users[].details.personal Object No
version.collaborators.users[].details.personal.email String No

This property has been deprecated due to privacy changes. Use the User.email property instead. See the migration guide for details.

version.collaborators.users[].details.personal.phone String No

This property has been deprecated due to privacy changes. There is no replacement. See the migration guide for details.

version.collaborators.users[].details.personal.im String No

This property has been deprecated due to privacy changes. There is no replacement. See the migration guide for details.

version.collaborators.users[].details.personal.website String No

This property has been deprecated due to privacy changes. There is no replacement. See the migration guide for details.

version.collaborators.users[]._links Object No
version.collaborators.users[]._links.Embeddable Object No
version.collaborators.users[]._links.ContentId String No
version.collaborators.users[].userKey String No

This property is no longer available and will be removed from the documentation soon. Use accountId instead. See the deprecation notice for details.

version.collaborators.users[].email String No

The email address of the user. Depending on the user's privacy setting, this may return an empty string.

version.collaborators.users[].type String Yes

Possible values:

  • "unknown"
  • "known"
  • "anonymous"
  • "user"
version.collaborators.users[].accountType String No

The account type of the user, may return empty string if unavailable. App is if the user is a bot user created on behalf of an Atlassian app.

Possible values:

  • ""
  • "atlassian"
  • "app"
version.collaborators.users[].isExternalCollaborator Boolean No

This is deprecated. Use isGuest instead to find out whether the user is a guest user.

version.collaborators.users[].timeZone String No

This displays user time zone. Depending on the user's privacy setting, this may return null.

version.collaborators.users[].externalCollaborator Boolean No

This is deprecated. Use isGuest instead to find out whether the user is a guest user.

version.collaborators.users[].operations[] Array No
version.collaborators.users[].operations[].targetType String Yes

The space or content type that the operation applies to. Could be one of- - application - page - blogpost - comment - attachment - space

version.collaborators.users[].operations[].operation String Yes

The operation itself.

Possible values:

  • "clear_permissions"
  • "purge"
  • "copy"
  • "delete"
  • "administer"
  • "archive"
  • "use"
  • "export"
  • "restrict_content"
  • "read"
  • "restore"
  • "create"
  • "create_space"
  • "move"
  • "update"
  • "purge_version"
version.collaborators.userKeys[] Array No
version.message String No
version.when String Yes
version.syncRev String No

The revision id provided by Synchrony

type String Yes

Set this to "attachment"

title String No
metadata Object No
metadata.mediaType String No
status String No
extensions Object No

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.