question

Upvotes
Accepted
1 0 1 1

How to grab data from the body and from the response of the call and use this data in the next call for the bulk run

Hi Guys,

I have got an interesting task and am not sure how to proceed with this. Maybe you could recommend to me the ways.

POST | URL: ........./release

I have 1 POST request to create the Release for each Project. The request body has the "ProjectID" on it and in the Response body I have got the "ReleaseID"


POST | URL: ............/cycle

The 2nd POST request is to add the "Cycle" to the created release by using the individual "ReleaseIDs" we received in the response body of the previous call and also we need to use the "ProjectID" from the previous request body


Here are the requests to make it more clear:

1st call Body: ____WE NEED to grab "ProjectID" from here

"release": {

"name": "TEST API Releas35",

"description": "",

"startDate": "",

"targetDate": "",

"projectID": "5149"

}


Response: _____WE NEED to grab "releaseID" from here

{

"success": true,

"code": "AD.RELEASE_SUCCESSFUL",

"message": "Release added successfully.",

"data": [

{

"ENTITY_KEY": "{RELEASE$}(TEST API Releas35)",

"releaseID": 39168,

"releaseName": "TEST API Releas35",

"builds": [

{

"name": "LKGB",

"isArchive": false,

"buildID": 70785

}

]

}

]

}



2nd call_to add the cycle to this release:


{

"cycle": {

"name": "{ {cycle2}}",

"startDate": "",

"targetDate": "",

"projectID": "{ {QMprojectID}}",

"releaseID": "{ {versionID}}"

}

}


P.s. We would do that by running the CVC file that has over 50 "ProjectIDs"

Actually, we would send the following requests:

1st:

{

"release": {

"name": "{ {version}}",

"description": "{ {description}}",

"startDate": "{ {Qmstartdate}}",

"targetDate": "{ {Qmtargetdate}}",

"projectID": "{ {QMprojectID}}"

}

2nd:

{

"cycle": {

"name": "{ {cycle2}}",

"startDate": "",

"targetDate": "",

"projectID": "{ {QMprojectID}}",

"releaseID": "{ {releaseID}}"

}

}

Example of the excel file we use:
1651082421034.png

apipostmantesting
1651082421034.png (42.9 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

hi @okviga ,

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?

If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,
AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,


AHS


1 Answer

· Write an Answer
Upvotes
Accepted
22k 59 14 21

Hello @okviga,

You don't seem to be using a Refintiv product/API. For this generic programming question, I would recommend that you ask at stackoverflow.com.


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.