Getting Data

Getting Data from a Bloc

Gets all data from a bloc (without search filters)

GET https://example.mydomain.com/api/get-data

Request Body

Name
Type
Description

blocId*

integer

The ID of the bloc you want to get data from. This is the last number in the URL of the bloc, in this example it is 1234: https://example.mydomain.com/module/module-name/bloc/1234

resultLimit

integer

A limit on the number of results to receive back, This defaults to 10 if not provided.

currentPage

integer

If you have a 100 records with a result limit of 10, then currentPage 1 will get you records from 1 to 10, currentPage 2, will get you 11 to 20 and so on.

reverse

string

true or false - allows to determine whether you see oldest data first or newest data first, a true value gives you oldest data first.

fromDate

string

Date in the format of YYYY-MM-DD HH:MM:SS, e.g. 2022-05-22 22:04:23, only gets data after this date.

toDate

string

Date in the format of YYYY-MM-DD HH:MM:SS, e.g. 2022-05-22 22:10:23, only gets data before this date.

{
	"data": {
		"0": {
			"created_at": "2022-05-22 22:05:01",
			"submitted_status": 1,
			"user_id": "johndoe",
			"field_1": "data",
			"field_2": "more data",
			"cartolytics_entry_row_id": 123456
		},
		"1": {
			"created_at": "2022-05-22 22:06:03",
			"submitted_status": 1,
			"user_id": "johndoe",
			"field_1": "another record",
			"field_2": "more data",
			"cartolytics_entry_row_id": 123457
		},
		"2": {
			"created_at": "2022-05-22 22:07:53",
			"submitted_status": 1,
			"user_id": "johndoe",
			"field_1": "another record",
			"field_2": "more data",
			"cartolytics_entry_row_id": 123458
		},
		"3": {
			"created_at": "2022-05-22 22:08:41",
			"submitted_status": 1,
			"user_id": "johndoe",
			"field_1": "another record",
			"field_2": "more data",
			"cartolytics_entry_row_id": 123458
		}
		"count": 4,
		"fieldCounts": {
			"field_1": {
				"another record": 2,
				"data": 1
			},
			"field_2": {
				"more data": 4
			},
		},
		"countLimitInfo": {
			"scan_limit": null,
			"scan_limit_time_logged": null,
			"scans_counted": 5,
			"limit_reached": 0
		},
		"fieldNames": {
			"field_1": "Field 1",
			"field_2": "Field 2"
		}
	}
}

Last updated