Skip to content

Function: getAttachment() ​

ts
function getAttachment(
   client, 
   parameters, 
   options?
): Promise<{
[key: string]: unknown;
  author?: {
   [key: string]: unknown;
     accountId?: string;
     accountType?: "unknown" | string & object | "atlassian" | "app" | "customer";
     active?: boolean;
     applicationRoles?: {
      [key: string]: unknown;
        callback?: {
         [key: string]: unknown;
        };
        items?: object[];
        max-results?: number;
        pagingCallback?: {
         [key: string]: unknown;
        };
        size?: number;
     };
     appType?: string;
     avatarUrls?: {
      [key: string]: unknown;
        16x16?: string;
        24x24?: string;
        32x32?: string;
        48x48?: string;
     };
     displayName?: string;
     emailAddress?: string;
     expand?: string;
     groups?: {
      [key: string]: unknown;
        callback?: {
         [key: string]: unknown;
        };
        items?: object[];
        max-results?: number;
        pagingCallback?: {
         [key: string]: unknown;
        };
        size?: number;
     };
     guest?: boolean;
     locale?: string;
     self?: string;
     timeZone?: string;
  };
  content?: string;
  created?: Date;
  filename?: string;
  id?: number;
  mimeType?: string;
  properties?: Record<string, any>;
  self?: string;
  size?: number;
  thumbnail?: string;
}>;

Defined in: src/cloud/api/issueAttachments.ts:128

Returns the metadata for an attachment. Note that the attachment itself is not returned.

This operation can be accessed anonymously.

Permissions required:

  • Browse projects project permission for the project that the issue is in.
  • If issue-level security is configured, issue-level security permission to view the issue.
  • If attachments are added in private comments, the comment-level restriction will be applied.

Parameters ​

ParameterTypeDescription
clientClient-
parameters{ id: string; }-
parameters.idstringThe ID of the attachment.
options?RequestOptions-

Returns ​

Promise<{ [key: string]: unknown; author?: { [key: string]: unknown; accountId?: string; accountType?: "unknown" | string & object | "atlassian" | "app" | "customer"; active?: boolean; applicationRoles?: { [key: string]: unknown; callback?: { [key: string]: unknown; }; items?: object[]; max-results?: number; pagingCallback?: { [key: string]: unknown; }; size?: number; }; appType?: string; avatarUrls?: { [key: string]: unknown; 16x16?: string; 24x24?: string; 32x32?: string; 48x48?: string; }; displayName?: string; emailAddress?: string; expand?: string; groups?: { [key: string]: unknown; callback?: { [key: string]: unknown; }; items?: object[]; max-results?: number; pagingCallback?: { [key: string]: unknown; }; size?: number; }; guest?: boolean; locale?: string; self?: string; timeZone?: string; }; content?: string; created?: Date; filename?: string; id?: number; mimeType?: string; properties?: Record<string, any>; self?: string; size?: number; thumbnail?: string; }>