Filtering
Filtering allows you to query your content for items which match a set of parameters. You can define these parameters by adding the filter
parameter to your request.
Basic Filtering
The available filter options will depend on the fields that were defined within the content type that is being filtered and the types of those fields. Each field type supports a different set of filters.
Supplying just one filter will only return items which match the specified constraint. For example, the below example will only return books which have a title that equals “My Awesome Book”.
GET /book?filter[title][_eq]=My Awesome Book
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[title][_eq]=My Awesome Book \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
title: { _eq: 'My Awesome Book' }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
If you specify multiple filters, they will be combined using an AND expression. Extending the previous example, the following will only return books that were also published after 1st January 2020.
GET /book?filter[title][_eq]=My Awesome Book&filter[publishedDate][_gt]=2020-01-01
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[title][_eq]=My Awesome Book&filter[publishedDate][_gt]=2020-01-01 \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
title: { _eq: 'My Awesome Book' },
publishedDate: { _gt: '2020-01-01' }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
AND / OR
You can also go further and provide the special _AND
and _OR
filters which allow you to create more complicated filter expressions.
The below example uses the _OR
filter and will only return books which were published after 1st January 2020 but were also given a 5 star rating or are in the “Techology” genre.
GET /book?filter[publishedDate][_gt]=2020-01-01&filter[_OR][][rating][_eq]=5&filter[_OR][][genre][_eq]=Technology
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[publishedDate][_gt]=2020-01-01&filter[_OR][][rating][_eq]=5&filter[_OR][][genre][_eq]=Technology \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
publishedDate: { _gt: "2020-01-01" },
_OR: [
{
rating: { _eq: 5 }
},
{
genre: { _eq: "Technology" }
}
]
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Available Filters for Field Types
As mentioned earlier, the types of filters that are available depends on the fields and the types of those fields that are defined within the content model for the content type being filtered.
This section will cover the list of available filters for each possible field type.
Boolean
_exists
_eq
Filter for records that have the specified field populated or not.
GET /book?filter[booleanField][_exists]=true
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[booleanField][_exists]=true \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
booleanField: { _exists: true }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where the specified field matches the provided value exactly.
GET /book?filter[booleanField][_eq]=false
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[booleanField][_eq]=false \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
booleanField: { _eq: false }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Date/Time
_exists
_eq
_neq
_gt
_gte
_lt
_lte
Filter for records that have the specified field populated or not.
GET /book?filter[dateTimeField][_exists]=true
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[dateTimeField][_exists]=true \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
dateTimeField: { _exists: true }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where the specified field matches the provided value exactly.
The value must be provided in as a valid ISO-8601 string, for example the following values are all valid inputs:
2020-01-01T00:00:00.000Z
2020-01-01T00:00:00.000+0300
2020-01-01T00:00:00
2020-01-01T00:00
2020-01-01
GET /book?filter[dateTimeField][_eq]=2020-01-01
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[dateTimeField][_eq]=2020-01-01 \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
dateTimeField: { _eq: '2020-01-01' }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where the specified field does not match the provided value. Please see the _eq
filter for examples of valid input values.
GET /book?filter[dateTimeField][_neq]=2020-01-01
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[dateTimeField][_neq]=2020-01-01 \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
dateTimeField: { _neq: '2020-01-01' }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where the provided value is greater than the specified fields value. Please see the _eq
filter for examples of valid input values.
GET /book?filter[dateTimeField][_gt]=2020-01-01
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[dateTimeField][_gt]=2020-01-01 \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
dateTimeField: { _gt: '2020-01-01' }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where the provided value is greater than or equal to the specified fields value. Please see the _eq
filter for examples of valid input values.
GET /book?filter[dateTimeField][_gte]=2020-01-01
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[dateTimeField][_gte]=2020-01-01 \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
dateTimeField: { _gte: '2020-01-01' }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where the provided value is less than the specified fields value. Please see the _eq
filter for examples of valid input values.
GET /book?filter[dateTimeField][_lt]=2020-01-01
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[dateTimeField][_lt]=2020-01-01 \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
dateTimeField: { _lt: '2020-01-01' }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where the provided value is less than or equal to the specified fields value. Please see the _eq
filter for examples of valid input values.
GET /book?filter[dateTimeField][_lte]=2020-01-01
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[dateTimeField][_lte]=2020-01-01 \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
dateTimeField: { _lte: '2020-01-01' }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Decimal
_exists
_eq
_neq
_gt
_gte
_lt
_lte
Filter for records that have the specified field populated or not.
GET /book?filter[decimalField][_exists]=true
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[decimalField][_exists]=true \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
decimalField: { _exists: true }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where the specified field matches the provided value exactly.
GET /book?filter[decimalField][_eq]=1.234
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[decimalField][_eq]=1.234 \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
decimalField: { _eq: '1.234' }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where the specified field does not match the provided value.
GET /book?filter[decimalField][_neq]=1.234
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[decimalField][_neq]=1.234 \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
decimalField: { _neq: '1.234' }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where the provided value is greater than the specified fields value.
GET /book?filter[decimalField][_gt]=1.234
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[decimalField][_gt]=1.234 \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
decimalField: { _gt: '1.234' }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where the provided value is greater than or equal to the specified fields value.
GET /book?filter[decimalField][_gte]=1.234
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[decimalField][_gte]=1.234 \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
decimalField: { _gte: '1.234' }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where the provided value is less than the specified fields value.
GET /book?filter[decimalField][_lt]=1.234
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[decimalField][_lt]=1.234 \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
decimalField: { _lt: '1.234' }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where the provided value is less than or equal to the specified fields value.
GET /book?filter[decimalField][_lte]=1.234
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[decimalField][_lte]=1.234 \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
decimalField: { _lte: '1.234' }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Image
Image fields do not currently support filtering, though it will be coming in a future release.
Integer
_exists
_eq
_neq
_gt
_gte
_lt
_lte
Filter for records that have the specified field populated or not.
GET /book?filter[integerField][_exists]=true
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[integerField][_exists]=true \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
integerField: { _exists: true }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where the specified field matches the provided value exactly.
GET /book?filter[integerField][_eq]=42
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[integerField][_eq]=42 \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
integerField: { _eq: 42 }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where the specified field does not match the provided value.
GET /book?filter[integerField][_neq]=42
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[integerField][_neq]=42 \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
integerField: { _neq: 42 }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where the provided value is greater than the specified fields value.
GET /book?filter[integerField][_gt]=42
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[integerField][_gt]=42 \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
integerField: { _gt: 42 }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where the provided value is greater than or equal to the specified fields value.
GET /book?filter[integerField][_gte]=42
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[integerField][_gte]=42 \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
integerField: { _gte: 42 }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where the provided value is less than the specified fields value.
GET /book?filter[integerField][_lt]=42
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[integerField][_lt]=42 \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
integerField: { _lt: 42 }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where the provided value is less than or equal to the specified fields value.
GET /book?filter[integerField][_lte]=42
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[integerField][_lte]=42 \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
integerField: { _lte: 42 }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Markdown
_exists
_contains
_startsWith
_endsWith
Filter for records that have the specified field populated or not.
GET /book?filter[markdownField][_exists]=true
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[markdownField][_exists]=true \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
markdownField: { _exists: true }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where specified fields value contains the provided value.
GET /book?filter[markdownField][_contains]=string value
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[markdownField][_contains]=string value \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
markdownField: { _contains: 'string value' }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where specified fields value starts with the provided value.
GET /book?filter[markdownField][_startsWith]=string value
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[markdownField][_startsWith]=string value \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
markdownField: { _startsWith: 'string value' }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where specified fields value ends with the provided value.
GET /book?filter[markdownField][_endsWith]=string value
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[markdownField][_endsWith]=string value \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
markdownField: { _endsWith: 'string value' }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Relationship
Relationship fields currently only support filtering based on the ID of child content items.
Note: Support for filtering relationship fields by non-ID fields will be coming in a future release.
_eq
Filter for records which contain a relationship to the specified content item.
GET /book?filter[relationshipField][id][_eq]=a90a173d-be9a-40d3-b012-cf3c5bce9d1a
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[relationshipField][id][_eq]=a90a173d-be9a-40d3-b012-cf3c5bce9d1a \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
relationshipField: {
id: { _eq: 'a90a173d-be9a-40d3-b012-cf3c5bce9d1a' }
}
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Select (Dropdown)
_exists
_eq
_neq
_gt
_gte
_lt
_lte
_contains
_startsWith
_endsWith
Filter for records that have the specified field populated or not.
GET /book?filter[selectField][_exists]=true
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[selectField][_exists]=true \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
selectField: { _exists: true }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where the specified field matches the provided value exactly.
GET /book?filter[selectField][_eq]=string value
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[selectField][_eq]=string value \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
selectField: { _eq: 'string value' }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where the specified field does not match the provided value.
GET /book?filter[selectField][_neq]=string value
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[selectField][_neq]=string value \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
selectField: { _neq: 'string value' }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where the provided value is greater than the specified fields value.
GET /book?filter[selectField][_gt]=string value
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[selectField][_gt]=string value \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
selectField: { _gt: 'string value' }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where the provided value is greater than or equal to the specified fields value.
GET /book?filter[selectField][_gte]=string value
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[selectField][_gte]=string value \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
selectField: { _gte: 'string value' }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where the provided value is less than the specified fields value.
GET /book?filter[selectField][_lt]=string value
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[selectField][_lt]=string value \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
selectField: { _lt: 'string value' }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where the provided value is less than or equal to the specified fields value.
GET /book?filter[selectField][_lte]=string value
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[selectField][_lte]=string value \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
selectField: { _lte: 'string value' }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where specified fields value contains the provided value.
GET /book?filter[selectField][_contains]=string value
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[selectField][_contains]=string value \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
selectField: { _contains: 'string value' }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where specified fields value starts with the provided value.
GET /book?filter[selectField][_startsWith]=string value
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[selectField][_startsWith]=string value \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
selectField: { _startsWith: 'string value' }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where specified fields value ends with the provided value.
GET /book?filter[selectField][_endsWith]=string value
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[selectField][_endsWith]=string value \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
selectField: { _endsWith: 'string value' }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Text (Single Line)
_exists
_eq
_neq
_gt
_gte
_lt
_lte
_contains
_startsWith
_endsWith
Filter for records that have the specified field populated or not.
GET /book?filter[textSingleField][_exists]=true
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[textSingleField][_exists]=true \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
textSingleField: { _exists: true }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where the specified field matches the provided value exactly.
GET /book?filter[textSingleField][_eq]=string value
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[textSingleField][_eq]=string value \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
textSingleField: { _eq: 'string value' }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where the specified field does not match the provided value.
GET /book?filter[textSingleField][_neq]=string value
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[textSingleField][_neq]=string value \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
textSingleField: { _neq: 'string value' }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where the provided value is greater than the specified fields value.
GET /book?filter[textSingleField][_gt]=string value
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[textSingleField][_gt]=string value \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
textSingleField: { _gt: 'string value' }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where the provided value is greater than or equal to the specified fields value.
GET /book?filter[textSingleField][_gte]=string value
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[textSingleField][_gte]=string value \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
textSingleField: { _gte: 'string value' }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where the provided value is less than the specified fields value.
GET /book?filter[textSingleField][_lt]=string value
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[textSingleField][_lt]=string value \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
textSingleField: { _lt: 'string value' }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where the provided value is less than or equal to the specified fields value.
GET /book?filter[textSingleField][_lte]=string value
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[textSingleField][_lte]=string value \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
textSingleField: { _lte: 'string value' }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where specified fields value contains the provided value.
GET /book?filter[textSingleField][_contains]=string value
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[textSingleField][_contains]=string value \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
textSingleField: { _contains: 'string value' }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where specified fields value starts with the provided value.
GET /book?filter[textSingleField][_startsWith]=string value
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[textSingleField][_startsWith]=string value \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
textSingleField: { _startsWith: 'string value' }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where specified fields value ends with the provided value.
GET /book?filter[textSingleField][_endsWith]=string value
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[textSingleField][_endsWith]=string value \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
textSingleField: { _endsWith: 'string value' }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Text (Multi Line)
_exists
_contains
_startsWith
_endsWith
Filter for records that have the specified field populated or not.
GET /book?filter[textMultiField][_exists]=true
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[textMultiField][_exists]=true \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
textMultiField: { _exists: true }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where specified fields value contains the provided value.
GET /book?filter[textMultiField][_contains]=string value
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[textMultiField][_contains]=string value \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
textMultiField: { _contains: 'string value' }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where specified fields value starts with the provided value.
GET /book?filter[textMultiField][_startsWith]=string value
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[textMultiField][_startsWith]=string value \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
textMultiField: { _startsWith: 'string value' }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});
Filter for records where specified fields value ends with the provided value.
GET /book?filter[textMultiField][_endsWith]=string value
curl https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi/book?filter[textMultiField][_endsWith]=string value \
-H 'Content-Type: application/vnd.api+json'
const axios = require('axios');
const qs = require('qs');
const requestOptions = {
baseURL: 'https://{SPACE_ID}.spaces.lexascms.com/delivery/jsonapi',
headers: { 'Content-Type': 'application/vnd.api+json' },
paramsSerializer: (params) => qs.stringify(params),
params: {
filter: {
textMultiField: { _endsWith: 'string value' }
}
}
};
axios.get('/book', requestOptions).then(response => {
console.log(response.data);
});