Running the Policy Test

Start policy test.

Start policy test. Only users with the Standard Registry role are allowed to make the request.

POST/api/v1/policies/{policyId}/test/{testId}/start
Authorization
Path parameters
policyId*string

Policy Id

Example: "000000000000000000000001"
testId*string

Test Id

Example: "000000000000000000000001"
Response

Successful operation.

Body
id*string

Test ID

Example: "000000000000000000000001"
uuid*string

Test UUID

Example: "00000000-0000-0000-0000-000000000000"
name*string

Test Name

Example: "Test Name"
policyId*string

Policy ID

Example: "000000000000000000000001"
owner*string

Test owner

Example: "#did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001"
status*enum

Test status

Example: "New"
NewRunningStoppedSuccessFailure
date*string

Last start date

Example: "1900-01-01T00:00:00.000Z"
duration*string

Test duration

Example: 0
progress*string

Test progress

Example: 0
resultId*string

Test result

Example: "00000000-0000-0000-0000-000000000000"
result*string

Test result

Request
const response = await fetch('/api/v1/policies/{policyId}/test/{testId}/start', {
    method: 'POST',
    headers: {
      "Authorization": "Bearer JWT"
    },
});
const data = await response.json();
Response
{
  "id": "000000000000000000000001",
  "uuid": "00000000-0000-0000-0000-000000000000",
  "name": "Test Name",
  "policyId": "000000000000000000000001",
  "owner": "#did:hedera:testnet:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA_0.0.0000001",
  "status": "New",
  "date": "1900-01-01T00:00:00.000Z",
  "duration": 0,
  "progress": 0,
  "resultId": "00000000-0000-0000-0000-000000000000",
  "result": "text"
}

Last updated