Is it possible to retrieve the newly added ID from a newly added Issue via REST API?
For clarification, I am adding the Issue via REST. I want to add notes under it (also via REST) but need an Issue ID for posting the notes.
REST API - getting Mantis Issue ID of newly added Issue?
Moderators: Developer, Contributor
-
- Posts: 66
- Joined: 11 Jan 2024, 19:32
Re: REST API - getting Mantis Issue ID of newly added Issue?
The ID is part of the response that you get when creating the issue.
See the example response at https://documenter.getpostman.com/view/ ... 9f9205a954
See the example response at https://documenter.getpostman.com/view/ ... 9f9205a954
-
- Posts: 66
- Joined: 11 Jan 2024, 19:32
Re: REST API - getting Mantis Issue ID of newly added Issue?
Yep, this works perfectly (in PHP)
Code: Select all
$arr_response = json_decode($response,true);
$issue_id = $arr_response['issue']['id'];
echo "<p>issue_id $issue_id<br>";