Save a view of a list
POST
/api/views
const url = 'https://forge.example.com/api/views';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"list":"example","name":"example","query":"example","shared":false}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://forge.example.com/api/views \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "list": "example", "name": "example", "query": "example", "shared": false }'A view keeps the search, scope, filters, sort, hidden columns, density and rows a page, never the page itself. Administrators may save one for the whole organization.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
list
required
string
name
required
string
query
null | string
shared
boolean
Responses
Section titled “Responses”OK
Media typeapplication/json
object
id
required
string format: uuid
list
required
string
name
required
string
query
required
string
shared
required
boolean
owner
required
object
id
required
string format: uuid
displayName
required
string
canChange
required
boolean
updatedAt
required
string format: date-time
version
required
integer | string format: int32
pinned
boolean
pinnedAt
null | string format: date-time
Example
{ "pinned": false}default
Section titled “default”A refusal or an error, as a problem document. A model or draft you may not see answers 404, as one that does not exist.
Media typeapplication/problem+json
object
type
string
title
string
status
integer
detail
string
instance
string
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}