We'd love to hear from you! Provide  feedback  to earn a badge today. Take our quick survey
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

REST API: Sub collection fields

Received Response
18
Views
5
Comments
edited Nov 28, 2018 11:20AM in Integrations and APIs 5 comments

Summary

How to expand a sub collection?

Content

Hello

Does anyone know how to expand / get specific fields from a sub collection?

Specifically I'd like to get all the columns for a report, without having to do a REST call for each column...

EG

/services/rest/connect/v1.4/analyticsReports

{
  "items": [
    {
      "id": 1,
      "lookupName": "Answer Notifications by Answer",
      "createdTime": "2007-02-01T00:00:00.000Z",
      "updatedTime": "2007-02-01T00:00:00.000Z",
      "links": [
        {
          "rel": "canonical",
          "href": "https://service.elsevier.com/services/rest/connect/v1.4/analyticsReports/1"
        }
      ]
    },
...

Gets all reports, yay

 

/services/rest/connect/v1.4/analyticsReports?fields=name

{
  "items": [
    {
      "id": 1,
      "lookupName": "Answer Notifications by Answer",
      "createdTime": "2007-02-01T00:00:00.000Z",
      "updatedTime": "2007-02-01T00:00:00.000Z",
      "name": "Answer Notifications by Answer",
      "links": [
        {
          "rel": "canonical",
          "href": "https://service.elsevier.com/services/rest/connect/v1.4/analyticsReports/1"
        }
      ]
Tagged:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!