JSON Endpoint Schema Choice

The JSON feed is available two different structures. They differ by how related data is referenced.

For example with an event with two speakers, Alice and Bob, and one session Keynote. The feed can be presented in one of two ways.

References By ID

If you choose ‘References By ID’ then related objects are referenced by their id only. For example:

Speakers:

[
    { id: 123, firstName: 'Alice', sessions: [ 125 ] }
    { id: 124, firstName: 'Bob', session: [ 125 ] }
]

Sessions: [

    { id: 125, name: 'Keynote', contributors: [ 123, 124 ] }
]

This structure is recommended if you are going to be importing the data into a database or other demoralized structure.

See References By Id Schema for the full schema.

Embedded References

Note

When using Embedded References the initial response to the GET will return a 302 with a temporary url for the entire document.

If you choose ‘Embed The Referenced Items’ the structure will look like this

Speakers:

[
    { id: 123, firstName: 'Alice', sessions: [
        { id: 125, name: 'Keynote'}
    ] }
    { id: 124, firstName: 'Bob', sessions: [
        { id: 125, name: 'Keynote'}
    ] }
]

Sessions:

[
    { id: 125, name: 'Keynote', contributors: [ 
        { id: 123, firstName: 'Alice' }
        { id: 124, firstName: 'Bob' }
     ] }
]

This structure is recommended if you want to use the feed ‘as is’, i.e. to be easily reference all speaker data when looking at a particular session.

See Embedded Reference Schema for the full schema.


Still can’t find what you’re looking for? Email support@lineupninja.com and one of the team will get back to you as soon as possible.​​​​​