Mock Field Definitions
  • 05 Dec 2022
  • Dark
  • PDF

Mock Field Definitions

  • Dark
  • PDF

Article summary

Mock data is simply the response from the other system. It will typically be JSON, but it should match the datatype or responseDatatype that is defined in the action.json.

  • In this example, all the fields are unique to the response and determined by the external system.

Sample Mock Data

  "data": {
    "authentication": {
      "authentication-method": [
          "priority": 1,
          "scope": "remote",
          "statistics": {
            "called": 2,
            "failure": 3,
            "skipped": 10,
            "success": 10
          "type": "tacacs"

  • There is also an older format for mock data that allows you to put status information into the response (for testing purposes, i.e. errors).
    • status: This field represents the status code that is returned from the other system. It is not part of the mock data. To test out an error, the status field can be set to an error code.
    • response: This is the object that will contain the mock data. Instead of just putting the mock data into the file, it should be added in the response object.
  • Since mock data is not an actual HTTP response, it does not contain headers to specify information such as the status of the request. Therefore, including a status can be beneficial.

Sample Mock Data

  "status": 200,
  "response": { 

Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.