Create and Update Values of Test Data Profile Using REST API


With Testsigma, you can create, and update values of the Test Data Profile using API. For more information on creating a test data profile, refer to the documentation on creating a test data profile.


Create Value in Test Data Profile using REST API

This endpoint allows users to create value in Test Data Profile using REST API.

Request Type PATCH
Endpoint https://app.testsigma.com/api/v1/test_data/48
Authorization Bearer <API_Token>
Request Body Type (JSON) Raw
Request Body(JSON)
 { 
"id": 48,
"testDataName": "update parameter with api call",
"testData": null,
"data": [{
"name": "Iteration name",
"expectedToFail": true,
"data": {
"Username": "bhanu",
"Password": "7893",
"User1": "bsk@450.com",
"User2": "1479",
"User3": "bhanuprakash"
}
}]
}
Response Body(JSON)
 { 
"id": 48,
"testDataName": "update",
"data": null,
"createdById": 9,
"updatedById": 14,
"columns": ["User2", "Username", "User1", "User3", "Password"],
"createdDate": 1677479567000,
"updatedDate": 1677493355613,
"passwords": null,
"versionId": 46,
"message": null
}

Update Value in Test Data Profile using REST API

This endpoint allows users to update the value in Test Data Profile using REST API.

Request Type PATCH
Endpoint https://app.testsigma.com/api/v1/test_data/48
Authorization Bearer <API_Token>
Request Body Type (JSON) Raw
Request Body(JSON)
 {
"id": 48,
"testDataName": "update parameter with api call",
"testData": null,
"data": [{
"name": "Iteration name",
"expectedToFail": true,
"data": {
"Username": "bhanu",
"Password": "7893",
"User1": "bsk@450.com",
"User2": "1479",
"User3": "bhanuprakash"
}
}]
}
Response Body(JSON)
 {
"id": 48,
"testDataName": "update",
"data": null,
"createdById": 9,
"updatedById": 14,
"columns": ["User2", "Username", "User1", "User3", "Password"],
"createdDate": 1677479567000,
"updatedDate": 1677492944204,
"passwords": null,
"versionId": 46,
"message": null
}