Use the APIs to invoke agents in bulk for multiple issues. Bulk invocation responses report session-start outcomes; the agent's work continues asynchronously.
Starts agent sessions for a batch of issues, with an agent and optional prompt specified per invocation. You can submit between 1 and 50 invocations in one request, including multiple invocations for the same issue. Supply numeric issue-ID strings and Rovo agent IDs. Session-start outcomes are returned inline; the agent's work continues asynchronously.
Permissions required:
write:jira-workwrite:issue:jira, read:issue:jiraConnect apps cannot access this REST resource.
string
Requiredarray<BulkAgentSessionInvocation>
RequiredReturned if the request is successful.
Session-start outcomes, not completion of the agent's work.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import { requestJira } from "@forge/bridge";
var bodyData = `{
"clientMutationId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"invocations": [
{
"agentId": "0010fa86-cd74-46eb-a2ee-229a98250b9c",
"issueId": "10001",
"requestId": "64cbeead-43ee-4de6-a535-281417003efd",
"userPrompt": "Summarize the next steps for this issue."
},
{
"agentId": "0010fa86-cd74-46eb-a2ee-229a98250b9c",
"issueId": "10002",
"requestId": "cf399ad9-9835-4fc5-b830-abae6c682f06"
}
]
}`;
const response = await requestJira(`/rest/api/3/agents/bulk/invoke/batch`, {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{
"alreadyStartedCount": 0,
"failedCount": 1,
"rateLimitedCount": 0,
"results": [
{
"agentId": "0010fa86-cd74-46eb-a2ee-229a98250b9c",
"conversationId": "873208ba-213e-4018-99ab-15d994ed94c2",
"issueId": "10001",
"requestId": "64cbeead-43ee-4de6-a535-281417003efd",
"result": "STARTED"
},
{
"agentId": "0010fa86-cd74-46eb-a2ee-229a98250b9c",
"error": {
"message": "The issue does not exist.",
"statusCode": 400,
"type": "ISSUE_NOT_FOUND"
},
"issueId": "10002",
"requestId": "cf399ad9-9835-4fc5-b830-abae6c682f06",
"result": "FAILED"
}
],
"startedCount": 1,
"success": true
}Starts the same agent on between 1 and 50 issues, with an optional prompt shared by every invocation. Supply numeric issue-ID strings, and a Rovo agent ID. Session-start outcomes are returned inline; the agent's work continues asynchronously.
Permissions required:
write:jira-workwrite:issue:jira, read:issue:jiraConnect apps cannot access this REST resource.
string
Requiredstring
Requiredarray<string>
Requiredstring
Returned if the request is successful.
Session-start outcomes, not completion of the agent's work.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// This sample uses Atlassian Forge
// https://developer.atlassian.com/platform/forge/
import { requestJira } from "@forge/bridge";
var bodyData = `{
"agentId": "0010fa86-cd74-46eb-a2ee-229a98250b9c",
"clientMutationId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"issueIds": [
"10001",
"10002",
"10003"
],
"userPrompt": "Summarize the next steps for this issue."
}`;
const response = await requestJira(`/rest/api/3/agents/bulk/invoke/uniform`, {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: bodyData
});
console.log(`Response: ${response.status} ${response.statusText}`);
console.log(await response.json());1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{
"alreadyStartedCount": 1,
"failedCount": 1,
"rateLimitedCount": 1,
"results": [
{
"agentId": "0010fa86-cd74-46eb-a2ee-229a98250b9c",
"conversationId": "873208ba-213e-4018-99ab-15d994ed94c2",
"issueId": "10001",
"requestId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"result": "ALREADY_STARTED"
},
{
"agentId": "0010fa86-cd74-46eb-a2ee-229a98250b9c",
"error": {
"message": "Rate limit exceeded.",
"statusCode": 429,
"type": "RATE_LIMITED"
},
"issueId": "10002",
"requestId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"result": "RATE_LIMITED"
},
{
"agentId": "0010fa86-cd74-46eb-a2ee-229a98250b9c",
"error": {
"message": "The session start could not be confirmed.",
"statusCode": 500,
"type": "IN_DOUBT"
},
"issueId": "10003",
"requestId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"result": "IN_DOUBT"
}
],
"startedCount": 0,
"success": true
}Rate this page: