Skip to content

Function: createPermissionScheme() ​

ts
function createPermissionScheme(
   client, 
   parameters, 
   options?
): Promise<{
[key: string]: unknown;
  description?: string;
  expand?: string;
  id?: number;
  name: string;
  permissions?: object[];
  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;
}>;

Defined in: src/cloud/api/permissionSchemes.ts:153

Creates a new permission scheme. You can create a permission scheme with or without defining a set of permission grants.

Permissions required:Administer Jira global permission.

Parameters ​

ParameterTypeDescription
clientClient-
parameters{ body: { description?: string; expand?: string; id?: number; name: string; permissions?: object[]; scope?: { project?: { avatarUrls?: { 16x16?: string; 24x24?: string; 32x32?: string; 48x48?: string; }; id?: string; key?: string; name?: string; projectCategory?: { 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; }; expand?: | "all" | "user" | "group" | "field" | string & object | "permissions" | "projectRole" | ( | "all" | "user" | "group" | "field" | string & object | "permissions" | "projectRole")[]; }-
parameters.body{ description?: string; expand?: string; id?: number; name: string; permissions?: object[]; scope?: { project?: { avatarUrls?: { 16x16?: string; 24x24?: string; 32x32?: string; 48x48?: string; }; id?: string; key?: string; name?: string; projectCategory?: { 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; }-
parameters.body.description?stringA description for the permission scheme.
parameters.body.expand?stringThe expand options available for the permission scheme.
parameters.body.id?numberThe ID of the permission scheme.
parameters.body.name?stringThe name of the permission scheme. Must be unique.
parameters.body.permissions?object[]The permission scheme to create or update. See About permission schemes and grants for more information.
parameters.body.scope?{ project?: { avatarUrls?: { 16x16?: string; 24x24?: string; 32x32?: string; 48x48?: string; }; id?: string; key?: string; name?: string; projectCategory?: { 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"; }-
parameters.body.scope.project?{ avatarUrls?: { 16x16?: string; 24x24?: string; 32x32?: string; 48x48?: string; }; id?: string; key?: string; name?: string; projectCategory?: { description?: string; id?: string; name?: string; self?: string; }; projectTypeKey?: | string & object | "software" | "service_desk" | "business" | "product_discovery" | "customer_service"; self?: string; simplified?: boolean; }-
parameters.body.scope.project.avatarUrls?{ 16x16?: string; 24x24?: string; 32x32?: string; 48x48?: string; }-
parameters.body.scope.project.avatarUrls.16x16?stringThe URL of the item's 16x16 pixel avatar.
parameters.body.scope.project.avatarUrls.24x24?stringThe URL of the item's 24x24 pixel avatar.
parameters.body.scope.project.avatarUrls.32x32?stringThe URL of the item's 32x32 pixel avatar.
parameters.body.scope.project.avatarUrls.48x48?stringThe URL of the item's 48x48 pixel avatar.
parameters.body.scope.project.id?stringThe ID of the project.
parameters.body.scope.project.key?stringThe key of the project.
parameters.body.scope.project.name?stringThe name of the project.
parameters.body.scope.project.projectCategory?{ description?: string; id?: string; name?: string; self?: string; }-
parameters.body.scope.project.projectCategory.description?stringThe name of the project category.
parameters.body.scope.project.projectCategory.id?stringThe ID of the project category.
parameters.body.scope.project.projectCategory.name?stringThe description of the project category.
parameters.body.scope.project.projectCategory.self?stringThe URL of the project category.
parameters.body.scope.project.projectTypeKey?| string & object | "software" | "service_desk" | "business" | "product_discovery" | "customer_service"The project type of the project.
parameters.body.scope.project.self?stringThe URL of the project details.
parameters.body.scope.project.simplified?booleanWhether or not the project is simplified.
parameters.body.scope.type?string & object | "PROJECT" | "TEMPLATE"The type of scope.
parameters.body.self?stringThe URL of the permission scheme.
parameters.expand?| "all" | "user" | "group" | "field" | string & object | "permissions" | "projectRole" | ( | "all" | "user" | "group" | "field" | string & object | "permissions" | "projectRole")[]Use expand to include additional information in the response. This parameter accepts a comma-separated list. Note that permissions are always included when you specify any value. Expand options include: - all Returns all expandable information. - field Returns information about the custom field granted the permission. - group Returns information about the group that is granted the permission. - permissions Returns all permission grants for each permission scheme. - projectRole Returns information about the project role granted the permission. - user Returns information about the user who is granted the permission.
options?RequestOptions-

Returns ​

Promise<{ [key: string]: unknown; description?: string; expand?: string; id?: number; name: string; permissions?: object[]; 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; }>