Search a portal
const url = 'http://localhost:3000/api/v1/portal/example/search';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://localhost:3000/api/v1/portal/example/searchThe pages, sections and rules of every brand it shows, from their latest publish, as far as this visitor may read: nothing hidden or locked is found. Every word must match, each as a prefix; each brand’s best first, 20 at most. Beside them, up to 12 of its collections’ assets.
No key needed.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The portal’s address
Query Parameters
Section titled “Query Parameters”Words to find
Search the pages in this language
Responses
Section titled “Responses”Hits and assets
object
object
object
The section’s id: its anchor on the page
Plain text around the first word found
The page’s path on the portal, e.g. /logo: the first brand’s pages sit at the top, the others under their brand
object
A URL on this host
Larger, for a closer look
object
The file as uploaded
Example
{ "data": { "hits": [ { "kind": "page" } ], "assets": [ { "downloads": [ { "preset": "web" } ] } ] }}Not in yet: how to get in
object
object
object
object
A URL on this host: the portal’s, else its first brand’s mark, else its organization’s
The portal’s, else its first brand’s color, else its organization’s
The organization’s, for the browser tab
What the organization calls the product
Example
{ "error": { "code": "password", "detail": { "access": "password" } }}default
Section titled “default”An error
object
object
Examplegenerated
{ "error": { "code": "example", "message": "example", "detail": "example" }}