Function: createPermissionScheme()
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
| Parameter | Type | Description |
|---|---|---|
client | Client | - |
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? | string | A description for the permission scheme. |
parameters.body.expand? | string | The expand options available for the permission scheme. |
parameters.body.id? | number | The ID of the permission scheme. |
parameters.body.name? | string | The 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? | string | The URL of the item's 16x16 pixel avatar. |
parameters.body.scope.project.avatarUrls.24x24? | string | The URL of the item's 24x24 pixel avatar. |
parameters.body.scope.project.avatarUrls.32x32? | string | The URL of the item's 32x32 pixel avatar. |
parameters.body.scope.project.avatarUrls.48x48? | string | The URL of the item's 48x48 pixel avatar. |
parameters.body.scope.project.id? | string | The ID of the project. |
parameters.body.scope.project.key? | string | The key of the project. |
parameters.body.scope.project.name? | string | The name of the project. |
parameters.body.scope.project.projectCategory? | { description?: string; id?: string; name?: string; self?: string; } | - |
parameters.body.scope.project.projectCategory.description? | string | The name of the project category. |
parameters.body.scope.project.projectCategory.id? | string | The ID of the project category. |
parameters.body.scope.project.projectCategory.name? | string | The description of the project category. |
parameters.body.scope.project.projectCategory.self? | string | The 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? | string | The URL of the project details. |
parameters.body.scope.project.simplified? | boolean | Whether or not the project is simplified. |
parameters.body.scope.type? | string & object | "PROJECT" | "TEMPLATE" | The type of scope. |
parameters.body.self? | string | The 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; }>