Function: createFilter()
function createFilter(
client,
parameters,
options?
): Promise<{
[key: string]: unknown;
approximateLastUsed?: Date;
description?: string;
editPermissions?: object[];
favourite?: boolean;
favouritedCount?: number;
id?: string;
isWritable?: boolean;
jql?: string;
name: string;
owner?: {
[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;
};
searchUrl?: string;
self?: string;
sharedUsers?: {
[key: string]: unknown;
end-index?: number;
items?: object[];
max-results?: number;
size?: number;
start-index?: number;
};
sharePermissions?: object[];
subscriptions?: {
[key: string]: unknown;
end-index?: number;
items?: object[];
max-results?: number;
size?: number;
start-index?: number;
};
viewUrl?: string;
}>;Defined in: src/cloud/api/filters.ts:29
Creates a filter. The filter is shared according to the default share scope. The filter is not selected as a favorite.
Permissions required: Permission to access Jira.
Parameters
| Parameter | Type | Description |
|---|---|---|
client | Client | - |
parameters | { approximateLastUsed?: unknown; description?: string; editPermissions?: object[]; expand?: | string & object | "sharedUsers" | "subscriptions" | (string & object | "sharedUsers" | "subscriptions")[]; favourite?: boolean; favouritedCount?: number; id?: string; isWritable?: boolean; jql?: string; name: string; overrideSharePermissions?: boolean; owner?: { accountId?: string; accountType?: "unknown" | string & object | "atlassian" | "app" | "customer"; active?: boolean; applicationRoles?: { callback?: Record<string, never>; items?: object[]; max-results?: number; pagingCallback?: Record<string, never>; size?: number; }; appType?: string; avatarUrls?: { 16x16?: string; 24x24?: string; 32x32?: string; 48x48?: string; }; displayName?: string; emailAddress?: string | null; expand?: string; groups?: { callback?: Record<string, never>; items?: object[]; max-results?: number; pagingCallback?: Record<string, never>; size?: number; }; guest?: boolean; locale?: string | null; self?: string; timeZone?: string; }; searchUrl?: string; self?: string; sharedUsers?: { end-index?: number; items?: object[]; max-results?: number; size?: number; start-index?: number; }; sharePermissions?: object[]; subscriptions?: { end-index?: number; items?: object[]; max-results?: number; size?: number; start-index?: number; }; viewUrl?: string; } | - |
parameters.approximateLastUsed? | unknown | [Experimental] Approximate last used time. Returns the date and time when the filter was last used. Returns null if the filter hasn't been used after tracking was enabled. For performance reasons, timestamps aren't updated in real time and therefore may not be exactly accurate. |
parameters.description? | string | A description of the filter. |
parameters.editPermissions? | object[] | The groups and projects that can edit the filter. |
parameters.expand? | | string & object | "sharedUsers" | "subscriptions" | (string & object | "sharedUsers" | "subscriptions")[] | Use expand to include additional information about filter in the response. This parameter accepts a comma-separated list. Expand options include: - sharedUsers Returns the users that the filter is shared with. This includes users that can browse projects that the filter is shared with. If you don't specify sharedUsers, then the sharedUsers object is returned but it doesn't list any users. The list of users returned is limited to 1000, to access additional users append [start-index:end-index] to the expand request. For example, to access the next 1000 users, use ?expand=sharedUsers[1001:2000]. - subscriptions Returns the users that are subscribed to the filter. If you don't specify subscriptions, the subscriptions object is returned but it doesn't list any subscriptions. The list of subscriptions returned is limited to 1000, to access additional subscriptions append [start-index:end-index] to the expand request. For example, to access the next 1000 subscriptions, use ?expand=subscriptions[1001:2000]. |
parameters.favourite? | boolean | Whether the filter is selected as a favorite. |
parameters.favouritedCount? | number | The count of how many users have selected this filter as a favorite, including the filter owner. |
parameters.id? | string | The unique identifier for the filter. |
parameters.isWritable? | boolean | - |
parameters.jql? | string | The JQL query for the filter. For example, project = SSP AND issuetype = Bug. |
parameters.name? | string | The name of the filter. Must be unique. |
parameters.overrideSharePermissions? | boolean | EXPERIMENTAL: Whether share permissions are overridden to enable filters with any share permissions to be created. Available to users with Administer Jira global permission. |
parameters.owner? | { accountId?: string; accountType?: "unknown" | string & object | "atlassian" | "app" | "customer"; active?: boolean; applicationRoles?: { callback?: Record<string, never>; items?: object[]; max-results?: number; pagingCallback?: Record<string, never>; size?: number; }; appType?: string; avatarUrls?: { 16x16?: string; 24x24?: string; 32x32?: string; 48x48?: string; }; displayName?: string; emailAddress?: string | null; expand?: string; groups?: { callback?: Record<string, never>; items?: object[]; max-results?: number; pagingCallback?: Record<string, never>; size?: number; }; guest?: boolean; locale?: string | null; self?: string; timeZone?: string; } | - |
parameters.owner.accountId? | string | The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, 5b10ac8d82e05b22cc7d4ef5. Required in requests. |
parameters.owner.accountType? | "unknown" | string & object | "atlassian" | "app" | "customer" | The user account type. Can take the following values: - atlassian regular Atlassian user account - app system account used for Connect applications and OAuth to represent external systems - customer Jira Service Desk account representing an external service desk |
parameters.owner.active? | boolean | Whether the user is active. |
parameters.owner.applicationRoles? | { callback?: Record<string, never>; items?: object[]; max-results?: number; pagingCallback?: Record<string, never>; size?: number; } | - |
parameters.owner.applicationRoles.callback? | Record<string, never> | - |
parameters.owner.applicationRoles.items? | object[] | - |
parameters.owner.applicationRoles.max-results? | number | - |
parameters.owner.applicationRoles.pagingCallback? | Record<string, never> | - |
parameters.owner.applicationRoles.size? | number | - |
parameters.owner.appType? | string | The app type of the user account when accountType is 'app'. Can take the following values: - service Service Account - agent Rovo Agent Account - unknown Unknown app type |
parameters.owner.avatarUrls? | { 16x16?: string; 24x24?: string; 32x32?: string; 48x48?: string; } | - |
parameters.owner.avatarUrls.16x16? | string | The URL of the item's 16x16 pixel avatar. |
parameters.owner.avatarUrls.24x24? | string | The URL of the item's 24x24 pixel avatar. |
parameters.owner.avatarUrls.32x32? | string | The URL of the item's 32x32 pixel avatar. |
parameters.owner.avatarUrls.48x48? | string | The URL of the item's 48x48 pixel avatar. |
parameters.owner.displayName? | string | The display name of the user. Depending on the user’s privacy setting, this may return an alternative value. |
parameters.owner.emailAddress? | string | null | The email address of the user. Depending on the user’s privacy setting, this may be returned as null. |
parameters.owner.expand? | string | Expand options that include additional user details in the response. |
parameters.owner.groups? | { callback?: Record<string, never>; items?: object[]; max-results?: number; pagingCallback?: Record<string, never>; size?: number; } | - |
parameters.owner.groups.callback? | Record<string, never> | - |
parameters.owner.groups.items? | object[] | - |
parameters.owner.groups.max-results? | number | - |
parameters.owner.groups.pagingCallback? | Record<string, never> | - |
parameters.owner.groups.size? | number | - |
parameters.owner.guest? | boolean | Whether the user is a guest. |
parameters.owner.locale? | string | null | The locale of the user. Depending on the user’s privacy setting, this may be returned as null. |
parameters.owner.self? | string | The URL of the user. |
parameters.owner.timeZone? | string | The time zone specified in the user's profile. If the user's time zone is not visible to the current user (due to user's profile setting), or if a time zone has not been set, the instance's default time zone will be returned. |
parameters.searchUrl? | string | A URL to view the filter results in Jira, using the Search for issues using JQL operation with the filter's JQL string to return the filter results. For example, _https://your-domain.atlassian.net/rest/api/3/search?jql=project+%3D+SSP+AND+issuetype+%3D+Bug_. |
parameters.self? | string | The URL of the filter. |
parameters.sharedUsers? | { end-index?: number; items?: object[]; max-results?: number; size?: number; start-index?: number; } | - |
parameters.sharedUsers.end-index? | number | The index of the last item returned on the page. |
parameters.sharedUsers.items? | object[] | The list of items. |
parameters.sharedUsers.max-results? | number | The maximum number of results that could be on the page. |
parameters.sharedUsers.size? | number | The number of items on the page. |
parameters.sharedUsers.start-index? | number | The index of the first item returned on the page. |
parameters.sharePermissions? | object[] | The groups and projects that the filter is shared with. |
parameters.subscriptions? | { end-index?: number; items?: object[]; max-results?: number; size?: number; start-index?: number; } | - |
parameters.subscriptions.end-index? | number | The index of the last item returned on the page. |
parameters.subscriptions.items? | object[] | The list of items. |
parameters.subscriptions.max-results? | number | The maximum number of results that could be on the page. |
parameters.subscriptions.size? | number | The number of items on the page. |
parameters.subscriptions.start-index? | number | The index of the first item returned on the page. |
parameters.viewUrl? | string | A URL to view the filter results in Jira, using the ID of the filter. For example, _https://your-domain.atlassian.net/issues/?filter=10100_. |
options? | RequestOptions | - |
Returns
Promise<{ [key: string]: unknown; approximateLastUsed?: Date; description?: string; editPermissions?: object[]; favourite?: boolean; favouritedCount?: number; id?: string; isWritable?: boolean; jql?: string; name: string; owner?: { [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; }; searchUrl?: string; self?: string; sharedUsers?: { [key: string]: unknown; end-index?: number; items?: object[]; max-results?: number; size?: number; start-index?: number; }; sharePermissions?: object[]; subscriptions?: { [key: string]: unknown; end-index?: number; items?: object[]; max-results?: number; size?: number; start-index?: number; }; viewUrl?: string; }>