Record Data Source only showing partial results

I am attempting to create a site to view the data from a web API on Appian. I set up the integration, which seems to return the results just fine:

However, in the record data source, it only shows the first part of the results:

I would also like to note that I am attempting to adapt from the tutorial on the SpaceX tracker on Appian Academy.

Thanks.

  Discussion posts and replies are publicly visible

  • Your expression rule must return a list of dictionary, not the integration response. Following the tutorial, it should have recommended you to make an expression rule which calls the integration rule and pulls out the body of the response.

  • I'm sorry, perhaps I should have been more clear about what I am trying to do. I already successfully completed the tutorial and made the SpaceX web page. However, I am attempting to make a sort of "spin-off" project using a different API, but mostly the same otherwise. I have been following the tutorial up to this point, but substituting in my other API for the SpaceX one. Unfortunately, when I get to this point, it is only showing the success variable from the response. So I would like to ask, will the process from the tutorial to make a web page to display data from an API only work for SpaceX? and if not, how do I resolve this issue and use it for my own API?

    Thanks and sorry for the confusion

  • It should be much the same process, but I'm guessing that your data is slightly different for the two cases. One thing to keep in mind is that you typically don't directly use your integration rule as the source for your record type. Instead, it's best practice to create an expression rule that takes the results of your integration and formats the results accordingly. Within this expression rule, you can test to make sure you're returning the correct level of data.

    For example, usually when I create a record from a web service, I use a common template like this:

    a!localVariables(
    
      /* Call the integration and store the response in a local variable */
      local!integrationResponse: rule!<your integration rule here>(
    
        /* The record data source will be executed multiple times, passing sequential values {{1, 2, 3...} for batchNumber until an empty set is returned */
        /* The batch size is limited to 1000 records per batch */
        batchNumber: ri!batchNumber
      ),
    
      if(
        /* This will return true if the integration returns a statusCode of 2XX (200-299) */
        local!integrationResponse.success,
    
        /* If needed, modify the expression below to return a list of maps, dictionaries, or CDTs that map to your record data */
        local!integrationResponse.result.body,
    
        /* If the integration is unsuccessful, handle accordingly */
    
        if(
          /* Note: handling of out of bounds exceptions varies by web service */
          local!integrationResponse.result.statusCode = 416,
    
          /* If this is an out of bounds error, return an empty list to finish syncing */
          {},
    
          /* If this is a different error, return the status code */
          local!integrationResponse.result.statusCode
        )
      )
    )

    My guess is that if you plug in your integration into the sample above and use this expression rule as your source, it should work correctly!