Flotiq User API (2.0.1)

Download OpenAPI specification:Download

Flotiq Developers: hello@flotiq.com URL: https://flotiq.com

Getting started

This is your Flotiq User API that allows you to access your data through the Content API that you defined.

Access to data

There are several methods that you can use to access your data:

  • Live API docs - available via Try it out button available next to each endpoint
  • Copying example code on the right side of each endpoint
  • By downloading the SDKs available in mulitple languages.
  • By downloading the Postman collection and importing it into Postman.

Each of these methods is described in length in the user documentation.

Authorization

In order to make use of the provided documentation, example code, SDKs and so on - you will need to pull out your API key. We recommend that you start with the ReadOnly API Key which will allow you to make all the GET requests but will error-out when you try to modify content. Please remember to replace the key for POST, PUT and DELETE calls.

It's also possible to use scoped API keys - you can create those in the API keys section of the Flotiq user interface. This will allow you to create a key that only authorizes access to a specific content type (or a set of content types, if you choose so). Read more about how to use and create API keys in the API keys documentation.

Object access

Once you define a Content Type it will become available in your Content API as a set of endpoints that will allow you to work with objects:

  • create
  • list
  • update
  • delete
  • batch create
  • retrieve single object.

Hydration

When you build Content Types that have relation to others your objects will optionally support hydration of related entities. The endpoints that support object retrieval accept a hydrate parameter, which can be used to easily fetch hydrated objects. Since this breaks the standard REST concepts - it's not enabled by default, but it's a very handy feature that allows to reduce the amount of HTTP requests sent over the wire and we strongly recommend to use it.

Authentication

HeaderApiKeyAuth

Personal Auth token generated for user in Headless CMS application

Security Scheme Type API Key
Header parameter name: X-AUTH-TOKEN

Content: Event

createEvent

Allows you to create object of Event type.

Request Body schema: application/json
id
required
string^[a-zA-Z0-9-_.,:=!?#$%&(\`\’\{\}" ]*$

Unique ID of the object

date
required
string non-empty ^$|^([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d...
name
required
string non-empty
slug
required
string non-empty
Array of objects (DataSource) >= 0 items
price
string
address
required
string non-empty
excerpt
string
Array of objects (DataSource) >= 0 items
description
string

Responses

Request samples

Content type
application/json
{
  • "id": "event-1",
  • "date": "date",
  • "name": "name",
  • "slug": "slug",
  • "image": [
    ],
  • "price": "price",
  • "address": "address",
  • "excerpt": "excerpt",
  • "gallery": [
    ],
  • "description": "description"
}

Response samples

Content type
application/json
{
  • "id": "event-1",
  • "internal": {
    },
  • "date": "date",
  • "name": "name",
  • "slug": "slug",
  • "image": [
    ],
  • "price": "price",
  • "address": "address",
  • "excerpt": "excerpt",
  • "gallery": [
    ],
  • "description": "description"
}

listEvent

List objects of Event type.

query Parameters
page
number >= 1
Default: 1
Example: page=1

Listing page number, 1-based

limit
number >= 1
Default: 20
Example: limit=20

Page limit

order_by
string
Default: "internal.createdAt"
Example: order_by=internal.updatedAt

Order by field

order_direction
string
Default: "asc"
Example: order_direction=asc

Order direction

hydrate
number [ 0 .. 1 ]
Default: 0
Example: hydrate=0

Should hydrate relations of object, for now only one level of hydration is possible

filters
string
Default: "{}"
Example: filters={"slug":{"type":"contains","filter":"test"},"title":{"type":"contains","filter":"test"}}

List filters

ids[]
Array of strings

Ids of objects to return.

Responses

Request samples

var client = new RestClient("https://api.flotiq.com/api/v1/content/event?page=1&limit=20&order_by=internal.createdAt&order_direction=asc&hydrate=0&filters=%7B%7D&ids%5B%5D=SOME_ARRAY_VALUE");
var request = new RestRequest(Method.GET);
request.AddHeader("X-AUTH-TOKEN", "f42a50abdedb94da5ff573d08cbaee97");
IRestResponse response = client.Execute(request);

Response samples

Content type
application/json
{
  • "total_count": 1,
  • "count": 1,
  • "total_pages": 1,
  • "current_page": 1,
  • "data": [
    ]
}

batchCreateEvent

Allows you to create or create and update up to 100 objects of Event type.

query Parameters
updateExisting
boolean
Default: false

Overwrite existing objects

Request Body schema: application/json
Array ()
id
required
string^[a-zA-Z0-9-_.,:=!?#$%&(\`\’\{\}" ]*$

Unique ID of the object

date
required
string non-empty ^$|^([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d...
name
required
string non-empty
slug
required
string non-empty
Array of objects (DataSource) >= 0 items
price
string
address
required
string non-empty
excerpt
string
Array of objects (DataSource) >= 0 items
description
string

Responses

Request samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Response samples

Content type
application/json
{
  • "batch_total_count": 2,
  • "batch_success_count": 2,
  • "batch_error_count": 0,
  • "errors": [ ]
}

batchPatchEvent

Allows you to update up to 100 objects of Event type.

Request Body schema: application/json
Array ()
id
required
string^[a-zA-Z0-9-_.,:=!?#$%&(\`\’\{\}" ]*$

Unique ID of the object

date
required
string non-empty ^$|^([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d...
name
required
string non-empty
slug
required
string non-empty
Array of objects (DataSource) >= 0 items
price
string
address
required
string non-empty
excerpt
string
Array of objects (DataSource) >= 0 items
description
string

Responses

Request samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Response samples

Content type
application/json
{
  • "batch_total_count": 2,
  • "batch_success_count": 2,
  • "batch_error_count": 0,
  • "errors": [ ]
}

getRemovedEvent

Get ids of removed Event objects.

query Parameters
deletedAfter
string
Example: deletedAfter=2020-01-01 12:00:00

Date from which ids of removed objects should be returned

Responses

Request samples

var client = new RestClient("https://api.flotiq.com/api/v1/content/event/removed?deletedAfter=SOME_STRING_VALUE");
var request = new RestRequest(Method.GET);
request.AddHeader("X-AUTH-TOKEN", "f42a50abdedb94da5ff573d08cbaee97");
IRestResponse response = client.Execute(request);

Response samples

Content type
application/json
[
  • "event-1"
]

batchDeleteEvent

Allows you to delete up to 100 objects of Event type.
Request body accepts an array of content object IDs that are to be deleted.

Request Body schema: application/json
Array ()
string

Responses

Request samples

Content type
application/json
[
  • "event-1",
  • "event-2"
]

Response samples

Content type
application/json
{
  • "deletedCount": 2
}

getEventVersions

Return version of Event object.

path Parameters
id
required
string
Example: event-1

ContentObject identifier

versionId
required
string
Example: version-1

ContentObject version identifier

Responses

Request samples

var client = new RestClient("https://api.flotiq.com/api/v1/content/event/event-1/version/version-1");
var request = new RestRequest(Method.GET);
request.AddHeader("X-AUTH-TOKEN", "f42a50abdedb94da5ff573d08cbaee97");
IRestResponse response = client.Execute(request);

Response samples

Content type
application/json
{
  • "id": "event-1",
  • "internal": {
    },
  • "date": "date",
  • "name": "name",
  • "slug": "slug",
  • "image": [
    ],
  • "price": "price",
  • "address": "address",
  • "excerpt": "excerpt",
  • "gallery": [
    ],
  • "description": "description"
}

listEventVersion

List objects versions of Event type.

path Parameters
id
required
string
Example: event-1

ContentObject identifier

query Parameters
page
number >= 1
Default: 1
Example: page=1

Listing page number, 1-based

limit
number >= 1
Default: 20
Example: limit=20

Page limit

order_by
string
Default: "internal.createdAt"
Example: order_by=internal.updatedAt

Order by field

order_direction
string
Default: "asc"
Example: order_direction=asc

Order direction

Responses

Request samples

var client = new RestClient("https://api.flotiq.com/api/v1/content/event/event-1/version?page=1&limit=20&order_by=internal.createdAt&order_direction=asc");
var request = new RestRequest(Method.GET);
request.AddHeader("X-AUTH-TOKEN", "f42a50abdedb94da5ff573d08cbaee97");
IRestResponse response = client.Execute(request);

Response samples

Content type
application/json
{
  • "total_count": 1,
  • "count": 1,
  • "total_pages": 1,
  • "current_page": 1,
  • "data": [
    ]
}

getEvent

Returns all information about Event object.

path Parameters
id
required
string
Example: event-1

ContentObject identifier

query Parameters
hydrate
number [ 0 .. 1 ]
Default: 0

Should hydrate relations of object, for now only one level of hydration is possible

Responses

Request samples

var client = new RestClient("https://api.flotiq.com/api/v1/content/event/event-1?hydrate=SOME_NUMBER_VALUE");
var request = new RestRequest(Method.GET);
request.AddHeader("X-AUTH-TOKEN", "f42a50abdedb94da5ff573d08cbaee97");
IRestResponse response = client.Execute(request);

Response samples

Content type
application/json
{
  • "id": "event-1",
  • "internal": {
    },
  • "date": "date",
  • "name": "name",
  • "slug": "slug",
  • "image": [
    ],
  • "price": "price",
  • "address": "address",
  • "excerpt": "excerpt",
  • "gallery": [
    ],
  • "description": "description"
}

updateEvent

Allows update of the Event object, it has to have all fields, as this operation overwrites the object. All properties not included in the payload will be lost.

path Parameters
id
required
string
Example: event-1

ContentObject identifier

Request Body schema: application/json
id
required
string^[a-zA-Z0-9-_.,:=!?#$%&(\`\’\{\}" ]*$

Unique ID of the object

date
required
string non-empty ^$|^([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d...
name
required
string non-empty
slug
required
string non-empty
Array of objects (DataSource) >= 0 items
price
string
address
required
string non-empty
excerpt
string
Array of objects (DataSource) >= 0 items
description
string

Responses

Request samples

Content type
application/json
{
  • "id": "event-1",
  • "date": "date",
  • "name": "name",
  • "slug": "slug",
  • "image": [
    ],
  • "price": "price",
  • "address": "address",
  • "excerpt": "excerpt",
  • "gallery": [
    ],
  • "description": "description"
}

Response samples

Content type
application/json
{
  • "id": "event-1",
  • "internal": {
    },
  • "date": "date",
  • "name": "name",
  • "slug": "slug",
  • "image": [
    ],
  • "price": "price",
  • "address": "address",
  • "excerpt": "excerpt",
  • "gallery": [
    ],
  • "description": "description"
}

patchEvent

Allows update of the Event object, but it is unnecessary to specify all the object's properties. Properties not included in the payload will be completed with data from the database.

path Parameters
id
required
string
Example: event-1

ContentObject identifier

Request Body schema: application/json
id
required
string^[a-zA-Z0-9-_.,:=!?#$%&(\`\’\{\}" ]*$

Unique ID of the object

object

Immutable object containing system information, it will be automatically generated on object creation and regenerated on updates.

date
string non-empty ^$|^([12]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d...
name
string non-empty
slug
string non-empty
Array of objects (DataSource) >= 0 items
price
string
address
string non-empty
excerpt
string
Array of objects (DataSource) >= 0 items
description
string

Responses

Request samples

Content type
application/json
{
  • "id": "event-1",
  • "date": "date",
  • "name": "name",
  • "slug": "slug",
  • "image": [
    ],
  • "price": "price",
  • "address": "address",
  • "excerpt": "excerpt",
  • "gallery": [
    ],
  • "description": "description"
}

Response samples

Content type
application/json
{
  • "id": "event-1",
  • "internal": {
    },
  • "date": "date",
  • "name": "name",
  • "slug": "slug",
  • "image": [
    ],
  • "price": "price",
  • "address": "address",
  • "excerpt": "excerpt",
  • "gallery": [
    ],
  • "description": "description"
}

deleteEvent

Removes Event object.

path Parameters
id
required
string
Example: event-1

ContentObject identifier

Responses

Request samples

var client = new RestClient("https://api.flotiq.com/api/v1/content/event/event-1");
var request = new RestRequest(Method.DELETE);
request.AddHeader("X-AUTH-TOKEN", "f42a50abdedb94da5ff573d08cbaee97");
IRestResponse response = client.Execute(request);

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

Content: Media

create_media

Allows you to create object of Media type.

Request Body schema: application/json
id
required
string^[a-zA-Z0-9-_.,:=!?#$%&(\`\’\{\}" ]*$

Unique ID of the object

url
required
string non-empty
size
required
number non-empty
Array of objects (DataSource) >= 0 items
type
required
string non-empty
width
number
height
number
source
required
string non-empty
fileName
required
string non-empty
mimeType
required
string non-empty
extension
required
string non-empty
externalId
string

Responses

Request samples

Content type
application/json
{
  • "id": "_media-698d20aa-193a-47b3-be4d-550c1aab47e7",
  • "extension": "png",
  • "fileName": "example_image.png",
  • "mimeType": "image/png",
  • "size": 87258,
  • "type": "image",
  • "source": "disk",
  • "tags": [
    ],
  • "externalId": "",
  • "url": "/image/0x0/_media-698d20aa-193a-47b3-be4d-550c1aab47e7.png",
  • "height": 517,
  • "width": 925
}

Response samples

Content type
application/json
{
  • "id": "_media-698d20aa-193a-47b3-be4d-550c1aab47e7",
  • "extension": "png",
  • "fileName": "example_image.png",
  • "mimeType": "image/png",
  • "size": 87258,
  • "type": "image",
  • "source": "disk",
  • "tags": [
    ],
  • "externalId": "",
  • "url": "/image/0x0/_media-698d20aa-193a-47b3-be4d-550c1aab47e7.png",
  • "height": 517,
  • "width": 925,
  • "internal": {
    }
}

list_media

List objects of Media type.

query Parameters
page
number >= 1
Default: 1
Example: page=1

Listing page number, 1-based

limit
number >= 1
Default: 20
Example: limit=20

Page limit

order_by
string
Default: "internal.createdAt"
Example: order_by=internal.updatedAt

Order by field

order_direction
string
Default: "asc"
Example: order_direction=asc

Order direction

hydrate
number [ 0 .. 1 ]
Default: 0
Example: hydrate=0

Should hydrate relations of object, for now only one level of hydration is possible

filters
string
Default: "{}"
Example: filters={"slug":{"type":"contains","filter":"test"},"title":{"type":"contains","filter":"test"}}

List filters

ids[]
Array of strings

Ids of objects to return.

Responses

Request samples

var client = new RestClient("https://api.flotiq.com/api/v1/content/_media?page=1&limit=20&order_by=internal.createdAt&order_direction=asc&hydrate=0&filters=%7B%7D&ids%5B%5D=SOME_ARRAY_VALUE");
var request = new RestRequest(Method.GET);
request.AddHeader("X-AUTH-TOKEN", "f42a50abdedb94da5ff573d08cbaee97");
IRestResponse response = client.Execute(request);

Response samples

Content type
application/json
{
  • "total_count": 1,
  • "count": 1,
  • "total_pages": 1,
  • "current_page": 1,
  • "data": [
    ]
}

batchCreate_media

Allows you to create or create and update up to 100 objects of Media type.

query Parameters
updateExisting
boolean
Default: false

Overwrite existing objects

Request Body schema: application/json
Array ()
id
required
string^[a-zA-Z0-9-_.,:=!?#$%&(\`\’\{\}" ]*$

Unique ID of the object

url
required
string non-empty
size
required
number non-empty
Array of objects (DataSource) >= 0 items
type
required
string non-empty
width
number
height
number
source
required
string non-empty
fileName
required
string non-empty
mimeType
required
string non-empty
extension
required
string non-empty
externalId
string

Responses

Request samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Response samples

Content type
application/json
{
  • "batch_total_count": 2,
  • "batch_success_count": 2,
  • "batch_error_count": 0,
  • "errors": [ ]
}

batchPatch_media

Allows you to update up to 100 objects of Media type.

Request Body schema: application/json
Array ()
id
required
string^[a-zA-Z0-9-_.,:=!?#$%&(\`\’\{\}" ]*$

Unique ID of the object

url
required
string non-empty
size
required
number non-empty
Array of objects (DataSource) >= 0 items
type
required
string non-empty
width
number
height
number
source
required
string non-empty
fileName
required
string non-empty
mimeType
required
string non-empty
extension
required
string non-empty
externalId
string

Responses

Request samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Response samples

Content type
application/json
{
  • "batch_total_count": 2,
  • "batch_success_count": 2,
  • "batch_error_count": 0,
  • "errors": [ ]
}

getRemoved_media

Get ids of removed Media objects.

query Parameters
deletedAfter
string
Example: deletedAfter=2020-01-01 12:00:00

Date from which ids of removed objects should be returned

Responses

Request samples

var client = new RestClient("https://api.flotiq.com/api/v1/content/_media/removed?deletedAfter=SOME_STRING_VALUE");
var request = new RestRequest(Method.GET);
request.AddHeader("X-AUTH-TOKEN", "f42a50abdedb94da5ff573d08cbaee97");
IRestResponse response = client.Execute(request);

Response samples

Content type
application/json
[
  • "_media-1"
]

batchDelete_media

Allows you to delete up to 100 objects of Media type.
Request body accepts an array of content object IDs that are to be deleted.

Request Body schema: application/json
Array ()
string

Responses

Request samples

Content type
application/json
[
  • "_media-1",
  • "_media-2"
]

Response samples

Content type
application/json
{
  • "deletedCount": 2
}

get_mediaVersions

Return version of Media object.

path Parameters
id
required
string
Example: _media-1

ContentObject identifier

versionId
required
string
Example: version-1

ContentObject version identifier

Responses

Request samples

var client = new RestClient("https://api.flotiq.com/api/v1/content/_media/_media-1/version/version-1");
var request = new RestRequest(Method.GET);
request.AddHeader("X-AUTH-TOKEN", "f42a50abdedb94da5ff573d08cbaee97");
IRestResponse response = client.Execute(request);

Response samples

Content type
application/json
{
  • "id": "_media-698d20aa-193a-47b3-be4d-550c1aab47e7",
  • "extension": "png",
  • "fileName": "example_image.png",
  • "mimeType": "image/png",
  • "size": 87258,
  • "type": "image",
  • "source": "disk",
  • "tags": [
    ],
  • "externalId": "",
  • "url": "/image/0x0/_media-698d20aa-193a-47b3-be4d-550c1aab47e7.png",
  • "height": 517,
  • "width": 925,
  • "internal": {
    }
}

list_mediaVersion

List objects versions of Media type.

path Parameters
id
required
string
Example: _media-1

ContentObject identifier

query Parameters
page
number >= 1
Default: 1
Example: page=1

Listing page number, 1-based

limit
number >= 1
Default: 20
Example: limit=20

Page limit

order_by
string
Default: "internal.createdAt"
Example: order_by=internal.updatedAt

Order by field

order_direction
string
Default: "asc"
Example: order_direction=asc

Order direction

Responses

Request samples

var client = new RestClient("https://api.flotiq.com/api/v1/content/_media/_media-1/version?page=1&limit=20&order_by=internal.createdAt&order_direction=asc");
var request = new RestRequest(Method.GET);
request.AddHeader("X-AUTH-TOKEN", "f42a50abdedb94da5ff573d08cbaee97");
IRestResponse response = client.Execute(request);

Response samples

Content type
application/json
{
  • "total_count": 1,
  • "count": 1,
  • "total_pages": 1,
  • "current_page": 1,
  • "data": [
    ]
}

get_media

Returns all information about Media object.

path Parameters
id
required
string
Example: _media-1

ContentObject identifier

query Parameters
hydrate
number [ 0 .. 1 ]
Default: 0

Should hydrate relations of object, for now only one level of hydration is possible

Responses

Request samples

var client = new RestClient("https://api.flotiq.com/api/v1/content/_media/_media-1?hydrate=SOME_NUMBER_VALUE");
var request = new RestRequest(Method.GET);
request.AddHeader("X-AUTH-TOKEN", "f42a50abdedb94da5ff573d08cbaee97");
IRestResponse response = client.Execute(request);

Response samples

Content type
application/json
{
  • "id": "_media-698d20aa-193a-47b3-be4d-550c1aab47e7",
  • "extension": "png",
  • "fileName": "example_image.png",
  • "mimeType": "image/png",
  • "size": 87258,
  • "type": "image",
  • "source": "disk",
  • "tags": [
    ],
  • "externalId": "",
  • "url": "/image/0x0/_media-698d20aa-193a-47b3-be4d-550c1aab47e7.png",
  • "height": 517,
  • "width": 925,
  • "internal": {
    }
}

update_media

Allows update of the Media object, it has to have all fields, as this operation overwrites the object. All properties not included in the payload will be lost.

path Parameters
id
required
string
Example: _media-1

ContentObject identifier

Request Body schema: application/json
id
required
string^[a-zA-Z0-9-_.,:=!?#$%&(\`\’\{\}" ]*$

Unique ID of the object

url
required
string non-empty
size
required
number non-empty
Array of objects (DataSource) >= 0 items
type
required
string non-empty
width
number
height
number
source
required
string non-empty
fileName
required
string non-empty
mimeType
required
string non-empty
extension
required
string non-empty
externalId
string

Responses

Request samples

Content type
application/json
{
  • "id": "_media-698d20aa-193a-47b3-be4d-550c1aab47e7",
  • "extension": "png",
  • "fileName": "example_image.png",
  • "mimeType": "image/png",
  • "size": 87258,
  • "type": "image",
  • "source": "disk",
  • "tags": [
    ],
  • "externalId": "",
  • "url": "/image/0x0/_media-698d20aa-193a-47b3-be4d-550c1aab47e7.png",
  • "height": 517,
  • "width": 925
}

Response samples

Content type
application/json
{
  • "id": "_media-698d20aa-193a-47b3-be4d-550c1aab47e7",
  • "extension": "png",
  • "fileName": "example_image.png",
  • "mimeType": "image/png",
  • "size": 87258,
  • "type": "image",
  • "source": "disk",
  • "tags": [
    ],
  • "externalId": "",
  • "url": "/image/0x0/_media-698d20aa-193a-47b3-be4d-550c1aab47e7.png",
  • "height": 517,
  • "width": 925,
  • "internal": {
    }
}

patch_media

Allows update of the Media object, but it is unnecessary to specify all the object's properties. Properties not included in the payload will be completed with data from the database.

path Parameters
id
required
string
Example: _media-1

ContentObject identifier

Request Body schema: application/json
id
required
string^[a-zA-Z0-9-_.,:=!?#$%&(\`\’\{\}" ]*$

Unique ID of the object

object

Immutable object containing system information, it will be automatically generated on object creation and regenerated on updates.

url
string non-empty
size
number non-empty
Array of objects (DataSource) >= 0 items
type
string non-empty
width
number
height
number
source
string non-empty
fileName
string non-empty
mimeType
string non-empty
extension
string non-empty
externalId
string

Responses

Request samples

Content type
application/json
{
  • "id": "_media-698d20aa-193a-47b3-be4d-550c1aab47e7",
  • "extension": "png",
  • "fileName": "example_image.png",
  • "mimeType": "image/png",
  • "size": 87258,
  • "type": "image",
  • "source": "disk",
  • "tags": [
    ],
  • "externalId": "",
  • "url": "/image/0x0/_media-698d20aa-193a-47b3-be4d-550c1aab47e7.png",
  • "height": 517,
  • "width": 925
}

Response samples

Content type
application/json
{
  • "id": "_media-698d20aa-193a-47b3-be4d-550c1aab47e7",
  • "extension": "png",
  • "fileName": "example_image.png",
  • "mimeType": "image/png",
  • "size": 87258,
  • "type": "image",
  • "source": "disk",
  • "tags": [
    ],
  • "externalId": "",
  • "url": "/image/0x0/_media-698d20aa-193a-47b3-be4d-550c1aab47e7.png",
  • "height": 517,
  • "width": 925,
  • "internal": {
    }
}

delete_media

Removes Media object.

path Parameters
id
required
string
Example: _media-1

ContentObject identifier

Responses

Request samples

var client = new RestClient("https://api.flotiq.com/api/v1/content/_media/_media-1");
var request = new RestRequest(Method.DELETE);
request.AddHeader("X-AUTH-TOKEN", "f42a50abdedb94da5ff573d08cbaee97");
IRestResponse response = client.Execute(request);

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

Content: Tag

create_tag

Allows you to create object of Tag type.

Request Body schema: application/json
id
required
string^[a-zA-Z0-9-_.,:=!?#$%&(\`\’\{\}" ]*$

Unique ID of the object

name
required
string non-empty

Responses

Request samples

Content type
application/json
{
  • "id": "_tag-1",
  • "name": "name"
}

Response samples

Content type
application/json
{
  • "id": "_tag-1",
  • "internal": {
    },
  • "name": "name"
}

list_tag

List objects of Tag type.

query Parameters
page
number >= 1
Default: 1
Example: page=1

Listing page number, 1-based

limit
number >= 1
Default: 20
Example: limit=20

Page limit

order_by
string
Default: "internal.createdAt"
Example: order_by=internal.updatedAt

Order by field

order_direction
string
Default: "asc"
Example: order_direction=asc

Order direction

hydrate
number [ 0 .. 1 ]
Default: 0
Example: hydrate=0

Should hydrate relations of object, for now only one level of hydration is possible

filters
string
Default: "{}"
Example: filters={"slug":{"type":"contains","filter":"test"},"title":{"type":"contains","filter":"test"}}

List filters

ids[]
Array of strings

Ids of objects to return.

Responses

Request samples

var client = new RestClient("https://api.flotiq.com/api/v1/content/_tag?page=1&limit=20&order_by=internal.createdAt&order_direction=asc&hydrate=0&filters=%7B%7D&ids%5B%5D=SOME_ARRAY_VALUE");
var request = new RestRequest(Method.GET);
request.AddHeader("X-AUTH-TOKEN", "f42a50abdedb94da5ff573d08cbaee97");
IRestResponse response = client.Execute(request);

Response samples

Content type
application/json
{
  • "total_count": 1,
  • "count": 1,
  • "total_pages": 1,
  • "current_page": 1,
  • "data": [
    ]
}

batchCreate_tag

Allows you to create or create and update up to 100 objects of Tag type.

query Parameters
updateExisting
boolean
Default: false

Overwrite existing objects

Request Body schema: application/json
Array ()
id
required
string^[a-zA-Z0-9-_.,:=!?#$%&(\`\’\{\}" ]*$

Unique ID of the object

name
required
string non-empty

Responses

Request samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Response samples

Content type
application/json
{
  • "batch_total_count": 2,
  • "batch_success_count": 2,
  • "batch_error_count": 0,
  • "errors": [ ]
}

batchPatch_tag

Allows you to update up to 100 objects of Tag type.

Request Body schema: application/json
Array ()
id
required
string^[a-zA-Z0-9-_.,:=!?#$%&(\`\’\{\}" ]*$

Unique ID of the object

name
required
string non-empty

Responses

Request samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Response samples

Content type
application/json
{
  • "batch_total_count": 2,
  • "batch_success_count": 2,
  • "batch_error_count": 0,
  • "errors": [ ]
}

getRemoved_tag

Get ids of removed Tag objects.

query Parameters
deletedAfter
string
Example: deletedAfter=2020-01-01 12:00:00

Date from which ids of removed objects should be returned

Responses

Request samples

var client = new RestClient("https://api.flotiq.com/api/v1/content/_tag/removed?deletedAfter=SOME_STRING_VALUE");
var request = new RestRequest(Method.GET);
request.AddHeader("X-AUTH-TOKEN", "f42a50abdedb94da5ff573d08cbaee97");
IRestResponse response = client.Execute(request);

Response samples

Content type
application/json
[
  • "_tag-1"
]

batchDelete_tag

Allows you to delete up to 100 objects of Tag type.
Request body accepts an array of content object IDs that are to be deleted.

Request Body schema: application/json
Array ()
string

Responses

Request samples

Content type
application/json
[
  • "_tag-1",
  • "_tag-2"
]

Response samples

Content type
application/json
{
  • "deletedCount": 2
}

get_tagVersions

Return version of Tag object.

path Parameters
id
required
string
Example: _tag-1

ContentObject identifier

versionId
required
string
Example: version-1

ContentObject version identifier

Responses

Request samples

var client = new RestClient("https://api.flotiq.com/api/v1/content/_tag/_tag-1/version/version-1");
var request = new RestRequest(Method.GET);
request.AddHeader("X-AUTH-TOKEN", "f42a50abdedb94da5ff573d08cbaee97");
IRestResponse response = client.Execute(request);

Response samples

Content type
application/json
{
  • "id": "_tag-1",
  • "internal": {
    },
  • "name": "name"
}

list_tagVersion

List objects versions of Tag type.

path Parameters
id
required
string
Example: _tag-1

ContentObject identifier

query Parameters
page
number >= 1
Default: 1
Example: page=1

Listing page number, 1-based

limit
number >= 1
Default: 20
Example: limit=20

Page limit

order_by
string
Default: "internal.createdAt"
Example: order_by=internal.updatedAt

Order by field

order_direction
string
Default: "asc"
Example: order_direction=asc

Order direction

Responses

Request samples

var client = new RestClient("https://api.flotiq.com/api/v1/content/_tag/_tag-1/version?page=1&limit=20&order_by=internal.createdAt&order_direction=asc");
var request = new RestRequest(Method.GET);
request.AddHeader("X-AUTH-TOKEN", "f42a50abdedb94da5ff573d08cbaee97");
IRestResponse response = client.Execute(request);

Response samples

Content type
application/json
{
  • "total_count": 1,
  • "count": 1,
  • "total_pages": 1,
  • "current_page": 1,
  • "data": [
    ]
}

get_tag

Returns all information about Tag object.

path Parameters
id
required
string
Example: _tag-1

ContentObject identifier

query Parameters
hydrate
number [ 0 .. 1 ]
Default: 0

Should hydrate relations of object, for now only one level of hydration is possible

Responses

Request samples

var client = new RestClient("https://api.flotiq.com/api/v1/content/_tag/_tag-1?hydrate=SOME_NUMBER_VALUE");
var request = new RestRequest(Method.GET);
request.AddHeader("X-AUTH-TOKEN", "f42a50abdedb94da5ff573d08cbaee97");
IRestResponse response = client.Execute(request);

Response samples

Content type
application/json
{
  • "id": "_tag-1",
  • "internal": {
    },
  • "name": "name"
}

update_tag

Allows update of the Tag object, it has to have all fields, as this operation overwrites the object. All properties not included in the payload will be lost.

path Parameters
id
required
string
Example: _tag-1

ContentObject identifier

Request Body schema: application/json
id
required
string^[a-zA-Z0-9-_.,:=!?#$%&(\`\’\{\}" ]*$

Unique ID of the object

name
required
string non-empty

Responses

Request samples

Content type
application/json
{
  • "id": "_tag-1",
  • "name": "name"
}

Response samples

Content type
application/json
{
  • "id": "_tag-1",
  • "internal": {
    },
  • "name": "name"
}

patch_tag

Allows update of the Tag object, but it is unnecessary to specify all the object's properties. Properties not included in the payload will be completed with data from the database.

path Parameters
id
required
string
Example: _tag-1

ContentObject identifier

Request Body schema: application/json
id
required
string^[a-zA-Z0-9-_.,:=!?#$%&(\`\’\{\}" ]*$

Unique ID of the object

object

Immutable object containing system information, it will be automatically generated on object creation and regenerated on updates.

name
string non-empty

Responses

Request samples

Content type
application/json
{
  • "id": "_tag-1",
  • "name": "name"
}

Response samples

Content type
application/json
{
  • "id": "_tag-1",
  • "internal": {
    },
  • "name": "name"
}

delete_tag

Removes Tag object.

path Parameters
id
required
string
Example: _tag-1

ContentObject identifier

Responses

Request samples

var client = new RestClient("https://api.flotiq.com/api/v1/content/_tag/_tag-1");
var request = new RestRequest(Method.DELETE);
request.AddHeader("X-AUTH-TOKEN", "f42a50abdedb94da5ff573d08cbaee97");
IRestResponse response = client.Execute(request);

Response samples

Content type
application/json
{
  • "errors": [
    ]
}

Search API

search

The Flotiq API provides a powerful search engine, which is a wrapper for ElasticSearch queries. We tried to balance between resembling the ES API (for those, who already know it) and keeping it simple and cohesive with Flotiq API. This endpoint provides means for querying content objects that match a set of criteria, with options for:

  • limiting search to specific Content Types,

  • limit search to specific fields,

  • weighting fields to modify results scoring,

  • aggregating results by fields.

    You can find more information about the Search API in the Search API docs.

Authorizations:
query Parameters
q
string
Default: ""

Query

fields[]
Array of strings

Search only in selected fields.

page
string
Default: "1"

Listing page number, 1-based

limit
string
Default: "20"

Page limit

order_by
string
Default: ""

Order by field

order_direction
string
Default: "asc"

Order direction

content_type[]
Array of strings

Restrict search to content types set

aggregate_by[]
Array of strings

Field to aggregate results direction (string fields only)

aggregate_by_numeric[]
Array of strings

Field to aggregate results direction with numeric type

filters
object
Example: filters[public]=true

Filter by object properties. Expected format: filters[property1]=value1&filters[property2]=value2

post_filters
object
Example: post_filters[public]=true

Filter by object properties. Use it when you want aggregated counts without filters applied. Expected format: post_filters[property1]=value1&post_filters[property2]=value2

geo_filters
object
Example: geo_filters[location]=geo_distance,1.50km,40.1,-19.2

Filter by object geolocation properties. Example value: geo_filters[location]=geo_distance,1.50km,40.1,-19.2 (filter name, distance, latitude, longitude). For more information see ElasticSearch docs. Only geo_distance query is supported.

Responses

Request samples

var client = new RestClient("https://api.flotiq.com/api/v1/search?q=SOME_STRING_VALUE&fields%5B%5D=SOME_ARRAY_VALUE&page=SOME_STRING_VALUE&limit=SOME_STRING_VALUE&order_by=SOME_STRING_VALUE&order_direction=SOME_STRING_VALUE&content_type%5B%5D=SOME_ARRAY_VALUE&aggregate_by%5B%5D=SOME_ARRAY_VALUE&aggregate_by_numeric%5B%5D=SOME_ARRAY_VALUE&filters=SOME_OBJECT_VALUE&post_filters=SOME_OBJECT_VALUE&geo_filters=SOME_OBJECT_VALUE");
var request = new RestRequest(Method.GET);
request.AddHeader("X-AUTH-TOKEN", "f42a50abdedb94da5ff573d08cbaee97");
IRestResponse response = client.Execute(request);

Response samples

Content type
application/json
{
  • "total_count": 1,
  • "count": 1,
  • "total_pages": 1,
  • "current_page": 1,
  • "data": [
    ],
  • "summary": {
    }
}