API Reference

Create a new sample

Description

Create a new sample in a matrix. The new sample will be appended to the end of the matrix.

POST /testForms/{testFormId}/testPhases/{testPhaseId}/matrices/{matrixId}/samples

🚧

Required OAuth Scopes:

graph:write

Parameters

ParameterInTypeRequiredDescription
testFormIdpathstringtrueThe unique identifier of the test form
testPhaseIdpathstringtrueThe unique identifier of the test phase
matrixIdpathstringtrueThe unique identifier of the matrix
bodybodyMatrixSampletrueThe properties of the sample to create

Body parameter example

{
  "dataValues": [
    {
      "column": "d795d7a3-e7f7-4b3f-be6a-109653b2929b",
      "value": 789
    },
    {
      "column": "fbd818ec-4fd1-42ad-9112-3c80e71dc2dc",
      "value": 303.3
    }
  ],
  "resultValues": [
    {
      "column": "d795d7a3-e7f7-4b3f-be6a-109653b2c34d",
      "value": "PASS"
    }
  ]
}

Code Samples

curl -X POST https://api.app.wdesk.com/platform/v1/testForms/{testFormId}/testPhases/{testPhaseId}/matrices/{matrixId}/samples  \ 
-H 'Content-Type: application/json' \ 
-H 'Accept: application/json' \ 
-H 'Authorization: Bearer {access-token}'
http POST https://api.app.wdesk.com/platform/v1/testForms/{testFormId}/testPhases/{testPhaseId}/matrices/{matrixId}/samples  \ 
Content-Type:application/json \ 
Accept:application/json \ 
Authorization:"Bearer {access-token}"
wget --method=POST "https://api.app.wdesk.com/platform/v1/testForms/{testFormId}/testPhases/{testPhaseId}/matrices/{matrixId}/samples" \
 --output-document -  \ 
 --header 'Content-Type: application/json' \ 
 --header 'Accept: application/json' \ 
 --header 'Authorization: Bearer {access-token}'
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('https://api.app.wdesk.com/platform/v1/testForms/{testFormId}/testPhases/{testPhaseId}/matrices/{matrixId}/samples', headers = headers)

print(r.json())

Returns

201 - Created

This object represents a single row of a matrix.

Example Responses


{
  "id": "df5a6c7f-15ad-445c-a76a-f457d53f678b",
  "dataValues": [
    {
      "column": "d795d7a3-e7f7-4b3f-be6a-109653b2929b",
      "value": 789
    },
    {
      "column": "fbd818ec-4fd1-42ad-9112-3c80e71dc2dc",
      "value": 303.3
    }
  ],
  "resultValues": [
    {
      "column": "d795d7a3-e7f7-4b3f-be6a-109653b2c34d",
      "value": "PASS"
    }
  ]
}