add other collections

This commit is contained in:
2026-02-18 15:04:39 +01:00
parent 2980a31d86
commit 136dc82ab2
136 changed files with 173569 additions and 0 deletions
@@ -0,0 +1,116 @@
info:
name: "[Runner] Get All Contracts"
type: http
seq: 1
http:
method: GET
url: "{{IrisApiUrl}}/contracts;full?page={{runnerCurrentPage}}&sort=pid&dir=asc"
params:
- name: page
value: "{{runnerCurrentPage}}"
type: query
- name: sort
value: pid
type: query
description: |-
The usable fields for sorting are:
- id
- pid
- year
- name
- startDate
- lastModified
- wfItemType.identifier (only for item with validation flow)
- wfItemType.description (only for item with validation flow)
The actual usable sorting filters for a specific resource type are specified in the REST Service Details
- name: dir
value: asc
type: query
auth: inherit
runtime:
scripts:
- type: after-response
code: "test(\"Status code is 200\", function () {\r
\ expect(res.getStatus()).to.equal(200);\r
\r
\ // Get pagination headers\r
\ var currentPage = parseInt(res.getHeader(\"Page\"));\r
\ var totalPages = parseInt(res.getHeader(\"Page-Count\"));\r
\r
\ // If first loop, reset results array\r
\ if (currentPage == 1)\r
\ {\r
\ bru.setVar(\"runnerResultsArray\", JSON.stringify([]));\r
\ }\r
\r
\ // Update result array\r
\ let resultsArray = JSON.parse(bru.getVar(\"runnerResultsArray\"));\r
\ var results = res.getBody();\r
\ resultsArray = resultsArray.concat(results);\r
\ bru.setVar(\"runnerResultsArray\", JSON.stringify(resultsArray));\r
\ \r
\ // Loop decision\r
\ if (currentPage == totalPages)\r
\ {\r
\ // Loop has finished, reset variables and stop\r
\ bru.setVar(\"runnerCurrentPage\", 1);\r
\ bru.deleteVar(\"runnerTotalPages\");\r
// //pm.collectionVariables.unset(\"runnerResultsArray\"); // Do not unset, so you can find results in the env var!\r
\ }\r
\ else\r
\ {\r
\ // Still having pages, update pagination values\r
\ bru.setVar(\"runnerCurrentPage\", ++currentPage);\r
\ bru.setVar(\"runnerTotalPages\", totalPages);\r
\r
\ // Set next request and wait for 1 second before sending the next request. This is to avoid hitting the rate limit.\r
\ bru.runner.setNextRequest(req.getName());\r
\ setTimeout(function(){}, [1000]);\r
\ }\r
});"
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
@@ -0,0 +1,7 @@
info:
name: "[Runner] Get All Contracts"
type: folder
seq: 1
request:
auth: inherit