Skip to content

Do Now

Request URL

POST /undo/now/:id

Description

Undo (cancel) an operation that is in the queue. The operation is identified using its ID as a path parameter.

Schema

Property table for undo/now/:id

Property Description Required Schema
id ID of the entity Yes {
  "type": "string"
}

Snippet Examples

javascript

const axios = require('axios');
const config = {
  method: 'POST',
  url: '${AMPLIFI_BASE_URL}/undo/now/:id',
  headers: {
    'Content-Type': "application/json",
    'token': "A long random string token received from /token request"
  },
};

let result;
try {
  result = await axios.request(config);
  if (result.status === 200) {
    console.log(JSON.stringify(result.data));
  }
} catch (err) {
  console.log({
    errCode: err.code,
    responseStatus: err.response && err.response.status,
    data: err.response && JSON.stringify(err.response.data)
  });
}

cURL

curl --location "AMPLIFI_BASE_URL/undo/now/:id"  --header "Content-Type: application/json" --header "token: A long random string token received from /token request" 

Successful Response Examples

200 UNDO/NOW/:ID SUCCESSFUL RESPONSE CANCELLING UNDOABLE ACTION

HEADERS

Header Value
Content-Type application/json
token A long random string token received from /token request

PARAMETERS

Parameter Description Value
id [required] ozqtz

REQUEST BODY

none

RESPONSE BODY

{
    "success": true
}