What are the REST API endpoints for...

Tuesday, May 15, 2018 4:21:01 AM

(I did look here: https://api.inflectra.com/Spira/Services/v4_0/RestService.aspx)

We would like to programmatically add test cases to a specific folder in a project. To do this requires several steps:

* identify the project ID (done; list all projects)

* find the folder ID by name (not done. This might be one of...

* list all folders in the project, and search by name to find the ID (not implemented?)

* search folder by name and get the ID (not implemented?)

* add the test case: projects/{project_id}/test-cases?parent_test_folder_id={parent_test_folder_id}

How the hot fudge do we find out that test folder ID?

Thanks, your product is really great, we love it

2 Replies
Tuesday, May 15, 2018 8:40:01 PM
Avatar
re: soglesby on Tuesday, May 15, 2018 4:21:01 AM

Hi Scott,

I would actually recommend using the newer v5.0 API if you are running Spira v5.0 or later:

https://api.inflectra.com/Spira/Services/v5_0/RestService.aspx

(it has more endpoints and natively uses the new folder system, vs. mapping it to what v4.0 used to have)

You can get all the folders (names, IDs, etc.) with: 

https://api.inflectra.com/Spira/Services/v5_0/RestServiceOperation.aspx?uri=projects%2f%7bproject_id%7d%2ftest-folders&method=GET

For more specific answers, also feel free to log a help desk ticket.

Regards

Jim

Friday, June 8, 2018 8:27:51 PM
Avatar
re: inflectra.jimx on Tuesday, May 15, 2018

Just following up, for others: Jim's answer helped a lot, use the 5.0 API as shown

Statistics
  • Started: Tuesday, May 15, 2018 4:21:01 AM
  • Last Reply: Friday, June 8, 2018 8:27:51 PM
  • Replies: 2
  • Views: 404