Skip to content
You're viewing the v2 docs. Looking for v1?Go to v1 docs
Docs
Testsigma
Popular questions
↑↓ to navigate↵ to selectesc to close
Book a demo

Create profile value

PATCH/test_data/{id}
Base URL https://app.testsigma.com/api/v1Region

Create values in a test data profile using the REST API.

Authenticate with your API key as a Bearer token in the Authorization header. How to authenticate →
idID of the test data profile.
idID of the test data profile.
testDataNameName of the test data profile.
testDataLegacy inline test data; set to null when using the data array.
dataArray of data set objects to create in the profile.
data[].nameName of the data set (iteration).
data[].expectedToFailWhether the iteration is expected to fail.
data[].dataKey-value map of parameter names to values for the iteration.
idID of the test data profile.
testDataNameName of the test data profile.
dataInline data payload; null when data sets are stored.
createdByIdID of the user who created the profile.
updatedByIdID of the user who last updated the profile.
columnsArray of parameter (column) names in the profile.
createdDateCreation timestamp (epoch milliseconds).
updatedDateLast update timestamp (epoch milliseconds).
passwordsEncrypted password columns, if any.
versionIdVersion ID of the test data profile.
messageStatus message, if any.
Request
curl -X PATCH \
  'https://app.testsigma.com/api/v1/test_data/{id}' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "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"
        }
      }
    ]
  }'
const response = await fetch('https://app.testsigma.com/api/v1/test_data/{id}', {
  method: 'PATCH',
  headers: {
    'Authorization': 'Bearer <API_KEY>',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
      "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"
              }
          }
      ]
  })
});
const data = await response.json();
import requests

response = requests.patch(
  'https://app.testsigma.com/api/v1/test_data/{id}',
  headers={
    'Authorization': 'Bearer <API_KEY>',
    'Content-Type': 'application/json'
  },
  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"
              }
          }
      ]
  }
)
data = response.json()
Response200 OK
{
  "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
}

Was this page helpful?