osapi.jive.corev3.contents.Attachment

Representation of an attachment object. An example JSON representation looks like this:

{
    "name" : "MyPicture.png",
    "doUpload" : true,
    "type" : "attachment",
    "size" : 7971,
    "contentType" : "img/png",
    "url" : "http://mydomain.com/spreadsheets/MyPicture.png",
    "id" : "1074"
 }
Example:
Minimal JSON for Creating an Attachment

Example of minimum JSON required to create an attachment (for example when creating a document):

 {
  "attachments": [ {
    "doUpload" : true,
    "url" : "http://mydomain.com/spreadsheets/MyPicture.png"
    } ]
 }

Properties

PropertyTypeMode Description
contentTypeStringrequired

The content type of this attachment.

doUploadBooleanrequired

An indicator of whether an attachment is new and should be uploaded.

idStringread-only

Identifier (unique within an object type and Jive instance) of this object. This field is internal to Jive and should not be confused with contentID or placeID used in URIs.

isFollowedBooleanread-only

Whether the current user is following this object.

Availability:

Will be present only for object types that support being followed.

nameStringoptional

Filename of this attachment.

resourcesObjectread-only

Resource links (and related permissions for the requesting person) relevant to this object.

sizeIntegerread-only

The size (in bytes) of this attachment.

statusStringread-only

Published status of this content object.

  • incomplete - Content object is in draft mode
  • awaiting moderation - Content object is waiting for moderation by an approver
  • rejected - Content object has been rejected for publication by an approver
  • published - Content object has been published
typeStringread-only
typeCodeIntegerread-only
urlStringrequired

The URL to retrieve the binary content of this attachment.

→ Fields used by update and create operations
→ Fields used only by create operations
→ Fields not used by update or create operations

Methods

destroy(options)
DELETE /attachments/1234

Retrieves

--

Description

Delete this attachment.

get(options)
GET /attachments/1234

Retrieves

Attachment

Description

Return an updated version of this attachment.

Options:
NameTypeRequiredDescription
fieldsStringfalseNames of the fields to be returned
toURI()

Retrieves

String

Description

Retrieves:
  • A URI representing this attachment, or undefined if no such URI exists