Hello,
Would like to create multiple TestSets in a single POST API call to POST “https://api.practitest.com/api/v2/projects/YOUR_PROJECT_ID/sets.json”.
Creating a single TestSet goes fine, but when sending a JSON which holds multiple TestSets I get an 500 Error back.
Is anyone able to do this, or is this a limitation of this API?
Best regards
Thomas
Call in curl:
curl -d “@dataMultiple.json” -H “Content-Type:application/json” -X POST https://api.practitest.com/api/v2/projects/[MY Project]/sets.json?api_token=[My token]
dataMultiple.json:
{
“data”: [
{
“type”: “sets”,
“attributes”: {
“name”: “API TEST: Create TestSet via API MULTI SET1 V1”,
“version”: “1”,
“priority”: “highest”,
“custom-fields”: {
“—f-73978”: “Cycle1”
}
},
“instances”: {
“test-ids”: [
6069486,
6096211
]
}
},
{
“type”: “sets”,
“attributes”: {
“name”: “API TEST: Create TestSet via API MULTI SET2 V1”,
“version”: “1”,
“priority”: “highest”,
“custom-fields”: {
“—f-73978”: “Cycle1”
}
},
“instances”: {
“test-ids”: [
6069486,
6045408,
6045409
]
}
}
]
}