ViewsCreate View

Create View

Create a new view to configure and save custom field filters for later use.

curl -X POST "https://api.datafiniti.co/v4/views" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "name": "John Doe",
  "fields": [
    "example_string"
  ]
}'
{
  "name": "John Doe",
  "fields": [
    "example_string"
  ],
  "created_at": "2024-12-25T10:00:00Z"
}
POST
/views
POST
Bearer Token
Bearer Tokenstring
Required

Bearer token obtained from the /auth endpoint. Include in requests as: Authorization: Bearer <token>

Bearer token obtained from the /auth endpoint. Include in requests as: Authorization: Bearer <token>
Content-Typestring
Required

The media type of the request body

Options: application/json
namestring

Name for the view

fieldsarray

List of fields to include in the view

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. Bearer token obtained from the /auth endpoint. Include in requests as: Authorization: Bearer <token>

Body

application/json
namestring

Name for the view

fieldsarray

List of fields to include in the view

Responses

namestring

View name

fieldsstring[]

Fields included in this view

created_atstring

Timestamp when the view was created

While you can dynamically filter your search results, many times it will be more convenient to configure a view, and save it for later use. Once created, you can simply include view: <view_name> in your future search requests.