Visual Story API
The Visual Stories are their own entity type called FlowzVisualStory
, they have only one bundle called default
The Visual Stories are used to make an AMP Visual story on the front end
They mainly use the REST API for their CRUD operations but there is one custom endpoint for the Interactive
stories
REST Endpoints are below
/flowz_visual_story/{flowz_visual_story}: GET, PATCH, DELETE
/entity/flowz_visual_story: POST
The custom endpoints for the service are:
// Returns the bundles
/api/visual-story/bundles
// The search endpoint to use for the CS List
/api/visual-stories/{bundle}/{publicationDomain}
// The Interactive controller, accepts GET & POst
/api/visual-story/interactive/{interactive_id}
// For getting a single story, if no ID then add ?path=/path/xxx
/api/visual-story/{publicationDomain}
/api/visual-story/{publicationDomain}/{id}
Bundles
This is self-explanatory, there is only one bundle at the moment called default
but the endpoint returns the list of Bundles for the entity type eg:
https://indy-api-dev.brightsites.co.uk/api/visual-story/bundles
Search & CMS List
The search endpoint accepts the following arguments:
Query Parameter | Description |
---|---|
q | The search query |
authors | The term ID of the authors of the story to filter by |
status | 1 or 0 whether the story is active or not |
start | Timestamp of the start of a date range |
end | Timestamp of the end of a date range |
limit | The number of items to retrieve |
offset | Where to start, for paging |
eg:
https://indy-api-dev.brightsites.co.uk/api/visual-stories/default/independent.co.uk?status=1&limit=10&offset=0&q=vegan
Accessing the WEB API for a single story
These are the methods the front end can use for accessing the stories
// By Path
https://indy-api-dev.brightsites.co.uk/api/visual-story/independent.co.uk?path=extras/indybest/how-to-go-vegan-food-clothes-st3.html
// By ID
https://indy-api-dev.brightsites.co.uk/api/visual-story/independent.co.uk/3