Interpreting a Data API response

📘

About this guide

This guide is a reference sheet on how to interpret the different sections of a Data API response.

SectionDescription
Transaction IDThe transaction_id is a unique value that references the API transaction. This reference ID can be used to communicate with Demyst about the transaction without sharing any sensitive data.
RefineThe "refine" section of the response displays the attributes that are defined in the refine section of the saved configuration. These attributes use the raw response data from providers to derive new attributes, or simply rename and highlight them.

The full response from the providers can include hundreds of attributes and complex structuring. The "refine" section gives users a way to customise a Data API by sectioning off the important, cleaned data.
Channel IDThe full response from the providers can include hundreds of attributes and complex structuring. The "refine" section gives users a way to customise a Data API by sectioning off the important, cleaned data.
Refine ErrorsBecause the refine configuration is freely written by users, errors will occur — especially in the development phase. The "refine_errors" section provides feedback on specific attributes when an error occurs.
OutputThe "output" is a container for subsections from each provider that was run. In the example below, only hazardhub_risks_and_enhanced_property2 was run.
DataThe "data" section is Demyst's parsing of the raw response from the data provider. The example only provides three data points, but data providers can return hundreds. Demyst preserves as much of the original response's structure as possible. In this case, the "enhanced_property" and "assessment" sections are included in Demyst's presentation of the data.
Flattened Data (optional)This section takes everything in "data" and presents it as a single level of key-value pairs. It allows the data to be entered as a single row in a table, showing which subsection contains the data point by looking for the key name. This section is not included in responses by default. To receive this section, the "config" section of the configuration must include the setting: "return_flattened_data":true.
Raw Data (optional)The "raw_data" section returns the data exactly as Demyst receives it from the data provider, in the spirit of full transparency. This section is not included in responses by default. To receive this section, the "config" section of the configuration must include the setting: "return_raw_data":true .
CachedThis shows whether the response was fetched live or fetched from the cache. A response will only be fetched from the cache if the request is made in cache mode and an identical request has been made recently.
Response TimeThis value is the time Demyst needed to fetch the data from the provider. It is collected and displayed in a more usable way on the Data API's dashboard, but it can also be collected and analysed through this field in the API response.
VersionThis value is a simple reference to the version of the data product used in the request. Data providers occasionally add or remove data from their responses, or they allow new inputs to be queried. Whenever Demyst updates its connection with a data provider, a new version is created.

By default, Demyst uses the latest implementation and version of all data products. However, a static version is often configured for production purposes, which means that unexpected schema changes can occur.
PipesThis is a legacy section. In most cases, it can safely be ignored.

Sample response

{
  "transaction_id" : "291ada41-d4e4-42c2-8696-25d9c8041b9e",
  "refine" : {
    "approve_applicant":true,
    "applicant_segment":"B",
  },
  "refine_errors" : {

  },
  "output" : {
    "hazardhub_risks_and_enhanced_property2" : {
      "data" : {
        "enhanced_property": {
          "assessment": {
            "assessed_improvement_value": 206160,
            "assessed_land_value": 39360,
            "assessment_year": "2021"
          }
        }
      },
      "cached" : true,
      "response_time" : 363,
      "raw_data": {
        "body": "{\"enhanced_property\":{\"assessment\":{\"Assessed_Improvement_Value\":206160,\"Assessed_Land_Value\":39360,\"Assessment_Year\":\"2021\"}}}"
        "mime_type": "application/json; charset=utf-8"
      },
      "flattened_data" : {
        "enhanced_property.assessment.assessed_improvement_value": 206160,
        "enhanced_property.assessment.assessed_land_value": 39360,
        "enhanced_property.assessment.assessment_year": "2021"
      },
      "version" : 8
    },
  },
  "pipes" : {

  }
}