Linking Data

One of the many powerful features of Coast is the ability to seamlessly link data from request or response codeblocks to the interactive UIs. If used effectively, data linking on Coast demystifies your API's core features and paints a vivid picture on how an integration would enhance the end-user experience for your prospect.

Request Data Linking

For requests, linking data refers to user inputs on the UI populating & updating their correspoding value in the request codeblock.

Response Data Linking

For responses, linking data refers to data on the UI highlighting their corresponding value in the response code block.

There are 2 ways to create a data link on Coast.

1. On Request/Response Setup

When initially setting up a request/response, on the Format tab, any checked fields will automatically have a data link on the UI.

2. On The Designer

You can also add additional blocks and link them the codeblock directly in the Coast Designer. Add a block, then on the right panel, use the Link To State.

Custom Paths

Coast automatically parses your request and response JSON payloads and identifies the fields that are likely to be important for the end-user experience.

Sometimes, you may wish to link data that Coast did not explicitly pull out (such as a deeply nested object, or a specific index within an array). While on the Edit tab, you can add such fields via the Custom Path.

As a simple example, let's assume you want to establish a data link to the documentNumber field in the following payload:

POST
/signup
{
  "userID": "uid_example",
  "firstName": "Michael",
  "lastName": "Scott",
  "email": "mscott@dundermifflin.com",
  "dateOfBirth": "1961-03-17",
  "ssn": "123-45-6789",
  "documents": [
    {
      "passport": {
        "documentNumber": "AG2980334"
      }
    }
  ]
}

To link the documentNumber field, provide its path in the Custom path... text box and hit Add +