Skip to content

Function: setActors() ​

ts
function setActors(
   client, 
   parameters, 
   options?
): Promise<{
[key: string]: unknown;
  actors?: object[];
  admin?: boolean;
  currentUserRole?: boolean;
  default?: boolean;
  description?: string;
  id?: number;
  name?: string;
  roleConfigurable?: boolean;
  scope?: {
   [key: string]: unknown;
     project?: {
      [key: string]: unknown;
        avatarUrls?: {
         [key: string]: unknown;
           16x16?: string;
           24x24?: string;
           32x32?: string;
           48x48?: string;
        };
        id?: string;
        key?: string;
        name?: string;
        projectCategory?: {
         [key: string]: unknown;
           description?: string;
           id?: string;
           name?: string;
           self?: string;
        };
        projectTypeKey?:   | string & object
           | "software"
           | "service_desk"
           | "business"
           | "product_discovery"
           | "customer_service";
        self?: string;
        simplified?: boolean;
     };
     type?: string & object | "PROJECT" | "TEMPLATE";
  };
  self?: string;
  translatedName?: string;
}>;

Defined in: src/cloud/api/projectRoleActors.ts:52

Sets the actors for a project role for a project, replacing all existing actors.

To add actors to the project without overwriting the existing list, use Add actors to project role.

Permissions required:Administer Projects project permission for the project or Administer Jira global permission.

Parameters ​

ParameterTypeDescription
clientClient-
parameters{ body: { categorisedActors?: Record<string, string[]>; id?: number; }; id: number; projectIdOrKey: string; }-
parameters.body{ categorisedActors?: Record<string, string[]>; id?: number; }-
parameters.body.categorisedActors?Record<string, string[]>The actors to add to the project role. Add groups using: - atlassian-group-role-actor and a list of group names. - atlassian-group-role-actor-id and a list of group IDs. As a group's name can change, use of atlassian-group-role-actor-id is recommended. For example, "atlassian-group-role-actor-id":["eef79f81-0b89-4fca-a736-4be531a10869","77f6ab39-e755-4570-a6ae-2d7a8df0bcb8"]. Add users using atlassian-user-role-actor and a list of account IDs. For example, "atlassian-user-role-actor":["12345678-9abc-def1-2345-6789abcdef12", "abcdef12-3456-789a-bcde-f123456789ab"].
parameters.body.id?numberThe ID of the project role. Use Get all project roles to get a list of project role IDs.
parameters.id?numberThe ID of the project role. Use Get all project roles to get a list of project role IDs.
parameters.projectIdOrKey?stringThe project ID or project key (case sensitive).
options?RequestOptions-

Returns ​

Promise<{ [key: string]: unknown; actors?: object[]; admin?: boolean; currentUserRole?: boolean; default?: boolean; description?: string; id?: number; name?: string; roleConfigurable?: boolean; scope?: { [key: string]: unknown; project?: { [key: string]: unknown; avatarUrls?: { [key: string]: unknown; 16x16?: string; 24x24?: string; 32x32?: string; 48x48?: string; }; id?: string; key?: string; name?: string; projectCategory?: { [key: string]: unknown; description?: string; id?: string; name?: string; self?: string; }; projectTypeKey?: | string & object | "software" | "service_desk" | "business" | "product_discovery" | "customer_service"; self?: string; simplified?: boolean; }; type?: string & object | "PROJECT" | "TEMPLATE"; }; self?: string; translatedName?: string; }>