Skip to content

Search a portal

GET
/api/v1/portal/{slug}/search
curl --request GET \
--url http://localhost:3000/api/v1/portal/example/search

The 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.

slug
required
string

The portal’s address

q
string

Words to find

lang
string

Search the pages in this language

Hits and assets

Media typeapplication/json
object
data
required
object
hits
required
Array<object>
object
kind
required
string
Allowed values: page section rule
brand
required
string
page
required
string
section

The section’s id: its anchor on the page

string
title
required
string
snippet
required

Plain text around the first word found

string
path
required

The page’s path on the portal, e.g. /logo: the first brand’s pages sit at the top, the others under their brand

string
assets
required
Array<object>
object
id
required
string format: uuid
/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/
filename
required
string
title
required
string | null
description
required
string | null
creator
required
string | null
copyright
required
string | null
mime
required
string
size
required
integer
>= -9007199254740991 <= 9007199254740991
width
required
Any of:
integer
>= -9007199254740991 <= 9007199254740991
height
required
Any of:
integer
>= -9007199254740991 <= 9007199254740991
thumbnail
required

A URL on this host

string | null
preview
required

Larger, for a closer look

string | null
downloads
required
Array<object>
object
preset
required
string
Allowed values: web social story print png original
label
required
string
hint
required
string
url
required
string
filename
required
string
original
required

The file as uploaded

string
focus
required
Any of:
object
x
required
number
y
required
number
updatedAt
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$/
Example
{
"data": {
"hits": [
{
"kind": "page"
}
],
"assets": [
{
"downloads": [
{
"preset": "web"
}
]
}
]
}
}

Not in yet: how to get in

Media typeapplication/json
object
error
required
object
code
required
string
Allowed value: password
message
required
string
detail
required
object
name
required
string
access
required
string
Allowed values: password members
theme
required
object
logo
required

A URL on this host: the portal’s, else its first brand’s mark, else its organization’s

string | null
accent
required

The portal’s, else its first brand’s color, else its organization’s

string | null
background
required
string | null
icon
required

The organization’s, for the browser tab

string | null
product
required

What the organization calls the product

string
Example
{
"error": {
"code": "password",
"detail": {
"access": "password"
}
}
}

An error

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
detail
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"detail": "example"
}
}