List of api:
/api/collections/about/records
Body:
Field | Type | Description |
---|---|---|
Optional id | String | 15 characters string to store as record ID.
If not set, it will be auto generated. |
Optional title_en | String | Plain text value. |
Optional vision_en | String | Plain text value. |
Optional mission_en | String | Plain text value. |
Optional title_ar | String | Plain text value. |
Optional vision_ar | String | Plain text value. |
Optional mission_ar | String | Plain text value. |
Response: 200
{
"id": "RECORD_ID",
"collectionId": "7l3df7dfab5pbor",
"collectionName": "about",
"created": "2022-01-01 01:00:00.123Z",
"updated": "2022-01-01 23:59:59.456Z",
"title_en": "test",
"vision_en": "test",
"mission_en": "test",
"title_ar": "test",
"vision_ar": "test",
"mission_ar": "test"
}
/api/collections/about/records/:id
Param | Type | Description |
---|---|---|
id | String | ID of the record to update. |
Body:
Field | Type | Description |
---|---|---|
Optional title_en | String | Plain text value. |
Optional vision_en | String | Plain text value. |
Optional mission_en | String | Plain text value. |
Optional title_ar | String | Plain text value. |
Optional vision_ar | String | Plain text value. |
Optional mission_ar | String | Plain text value. |
Response: 200
{
"id": "RECORD_ID",
"collectionId": "7l3df7dfab5pbor",
"collectionName": "about",
"created": "2022-01-01 01:00:00.123Z",
"updated": "2022-01-01 23:59:59.456Z",
"title_en": "test",
"vision_en": "test",
"mission_en": "test",
"title_ar": "test",
"vision_ar": "test",
"mission_ar": "test"
}
/api/collections/about/records/:id
Param | Type | Description |
---|---|---|
id | String | ID of the record to delete. |
null
/api/collections/specializations/records
Body:
Field | Type | Description |
---|---|---|
Optional id | String | 15 characters string to store as record ID.
If not set, it will be auto generated. |
Optional title_en | String | Plain text value. |
Optional description_en | String | Plain text value. |
Optional title_ar | String | Plain text value. |
Optional description_ar | String | Plain text value. |
Optional images | Array<String> | (*) Relation record ids of Attachments |
Optional attachments | Array<String> | (*) Relation record ids of Attachments |
- (*): the array accepts only id of records of attachments collection so you will need to call POST method of attachments collection to create an attachment record then sets the id returned by POST into the array.
Response: 200
{
"id": "RECORD_ID",
"collectionId": "z9qut6efyilfspl",
"collectionName": "specializations",
"created": "2022-01-01 01:00:00.123Z",
"updated": "2022-01-01 23:59:59.456Z",
"title_en": "test",
"description_en": "test",
"title_ar": "test",
"description_ar": "test",
"images": [
"RELATION_RECORD_ID"
],
"attachments": [
"RELATION_RECORD_ID"
]
}
/api/collections/specializations/records/:id
Field | Type | Description |
---|---|---|
Optional title_en | String | Plain text value. |
Optional description_en | String | Plain text value. |
Optional title_ar | String | Plain text value. |
Optional description_ar | String | Plain text value. |
Optional images | Array<String> | (**) Relation record ids of Attachments |
Optional attachments | Array<String> | (**) Relation record ids of Attachments |
- (**): the array accepts only id of records of attachments collection so int this case you will need to use a combination of POST - PATCH - DELETE from attachments collection in order to achieve the desired result.
Response: 200
{
"id": "RECORD_ID",
"collectionId": "z9qut6efyilfspl",
"collectionName": "specializations",
"created": "2022-01-01 01:00:00.123Z",
"updated": "2022-01-01 23:59:59.456Z",
"title_en": "test",
"description_en": "test",
"title_ar": "test",
"description_ar": "test",
"images": [
"RELATION_RECORD_ID"
],
"attachments": [
"RELATION_RECORD_ID"
]
}
/api/collections/specializations/records/:id
Param | Type | Description |
---|---|---|
id | String | ID of the record to delete. |
null
- Make sure to call for DELETE api of attachment collection to delete records of attachment before deleting this record.
/api/collections/organizational_chart/records
Body:
Field | Type | Description |
---|---|---|
Optional id | String | 15 characters string to store as record ID.
If not set, it will be auto generated. |
Optional images | Array<String> | (*) Relation record ids of Attachments |
Optional title_en | String | Plain text value. |
Optional title_ar | String | Plain text value. |
Optional description_en | String | Plain text value. |
Optional description_ar | String | Plain text value. |
Optional attachments | Array<String> | (*) Relation record ids of Attachments |
- (*): the array accepts only id of records of attachments collection so you will need to call POST method of attachments collection to create an attachment record then sets the id returned by POST into the array.
Response: 200
{
"id": "RECORD_ID",
"collectionId": "87j52gvwuakjv6t",
"collectionName": "organizational_chart",
"created": "2022-01-01 01:00:00.123Z",
"updated": "2022-01-01 23:59:59.456Z",
"images": [
"RELATION_RECORD_ID"
],
"title_en": "test",
"title_ar": "test",
"description_en": "test",
"description_ar": "test",
"attachments": [
"RELATION_RECORD_ID"
]
}
/api/collections/organizational_chart/records/:id
Field | Type | Description |
---|---|---|
Optional images | Array<String> | (**) Relation record ids of Attachments |
Optional title_en | String | Plain text value. |
Optional title_ar | String | Plain text value. |
Optional description_en | String | Plain text value. |
Optional description_ar | String | Plain text value. |
Optional attachments | Array<String> | (**) Relation record ids of Attachments |
- (**): the array accepts only id of records of attachments collection so int this case you will need to use a combination of POST - PATCH - DELETE from attachments collection in order to achieve the desired result.
Response: 200
{
"id": "RECORD_ID",
"collectionId": "87j52gvwuakjv6t",
"collectionName": "organizational_chart",
"created": "2022-01-01 01:00:00.123Z",
"updated": "2022-01-01 23:59:59.456Z",
"images": [
"RELATION_RECORD_ID"
],
"title_en": "test",
"title_ar": "test",
"description_en": "test",
"description_ar": "test",
"attachments": [
"RELATION_RECORD_ID"
]
}
/api/collections/organizational_chart/records/:id
Param | Type | Description |
---|---|---|
id | String | ID of the record to delete. |
null
- Make sure to call for DELETE api of attachment collection to delete records of attachment before deleting this record.
/api/collections/minister_speech/records
Body:
Field | Type | Description |
---|---|---|
Optional id | String | 15 characters string to store as record ID.
If not set, it will be auto generated. |
Optional images | Array<String> | (*) Relation record ids of Attachments |
Optional title_en | String | Plain text value. |
Optional title_ar | String | Plain text value. |
Optional description_en | String | Plain text value. |
Optional description_ar | String | Plain text value. |
Optional attachments | Array<String> | (*) Relation record ids of Attachments |
- (*): the array accepts only id of records of attachments collection so you will need to call POST method of attachments collection to create an attachment record then sets the id returned by POST into the array.
Response: 200
{
"id": "RECORD_ID",
"collectionId": "sctld81dlg1u119",
"collectionName": "minister_speech",
"created": "2022-01-01 01:00:00.123Z",
"updated": "2022-01-01 23:59:59.456Z",
"images": [
"RELATION_RECORD_ID"
],
"title_en": "test",
"title_ar": "test",
"description_en": "test",
"description_ar": "test",
"attachments": [
"RELATION_RECORD_ID"
]
}
/api/collections/minister_speech/records/:id
Field | Type | Description |
---|---|---|
Optional images | Array<String> | (**) Relation record ids of Attachments |
Optional title_en | String | Plain text value. |
Optional title_ar | String | Plain text value. |
Optional description_en | String | Plain text value. |
Optional description_ar | String | Plain text value. |
Optional attachments | Array<String> | (**) Relation record ids of Attachments |
- (**): the array accepts only id of records of attachments collection so int this case you will need to use a combination of POST - PATCH - DELETE from attachments collection in order to achieve the desired result.
{
"id": "RECORD_ID",
"collectionId": "sctld81dlg1u119",
"collectionName": "minister_speech",
"created": "2022-01-01 01:00:00.123Z",
"updated": "2022-01-01 23:59:59.456Z",
"images": [
"RELATION_RECORD_ID"
],
"title_en": "test",
"title_ar": "test",
"description_en": "test",
"description_ar": "test",
"attachments": [
"RELATION_RECORD_ID"
]
}
/api/collections/minister_speech/records/:id
Param | Type | Description |
---|---|---|
id | String | ID of the record to delete. |
null
- Make sure to call for DELETE api of attachment collection to delete records of attachment before deleting this record.
/api/collections/sectors/records
Body:
Field | Type | Description |
---|---|---|
Optional id | String | 15 characters string to store as record ID.
If not set, it will be auto generated. |
Optional image | Array<String> | (*) Relation record ids of Attachments |
Optional title_en | String | Plain text value. |
Optional title_ar | String | Plain text value. |
Optional description_en | String | Plain text value. |
Optional description_ar | String | Plain text value. |
Optional attachments | Array<String> | (*) Relation record ids of Attachments |
Required sector | String | Values: FoodSafetyAndQuality, FoodSecurity, WaterResources, FishWealth, Livestock, Agriculture |
- (*): the array accepts only id of records of attachments collection so you will need to call POST method of attachments collection to create an attachment record then sets the id returned by POST into the array.
Response: 200
{
"id": "RECORD_ID",
"collectionId": "0rwu1rxqbcsixb3",
"collectionName": "sectors",
"created": "2022-01-01 01:00:00.123Z",
"updated": "2022-01-01 23:59:59.456Z",
"image": [
"RELATION_RECORD_ID"
],
"title_en": "test",
"title_ar": "test",
"description_en": "test",
"description_ar": "test",
"attachments": [
"RELATION_RECORD_ID"
],
"sector": "FoodSafetyAndQuality"
}
/api/collections/sectors/records/:id
Field | Type | Description |
---|---|---|
Optional image | Array<String> | (**) Relation record ids of Attachments |
Optional title_en | String | Plain text value. |
Optional title_ar | String | Plain text value. |
Optional description_en | String | Plain text value. |
Optional description_ar | String | Plain text value. |
Optional attachments | Array<String> | (**) Relation record ids of Attachments |
Required sector | String |
- (**): the array accepts only id of records of attachments collection so int this case you will need to use a combination of POST - PATCH - DELETE from attachments collection in order to achieve the desired result.
{
"id": "RECORD_ID",
"collectionId": "0rwu1rxqbcsixb3",
"collectionName": "sectors",
"created": "2022-01-01 01:00:00.123Z",
"updated": "2022-01-01 23:59:59.456Z",
"image": [
"RELATION_RECORD_ID"
],
"title_en": "test",
"title_ar": "test",
"description_en": "test",
"description_ar": "test",
"attachments": [
"RELATION_RECORD_ID"
],
"sector": "FoodSafetyAndQuality"
}
/api/collections/sectors/records/:id
Param | Type | Description |
---|---|---|
id | String | ID of the record to delete. |
null
- Make sure to call for DELETE api of attachment collection to delete records of attachment before deleting this record.
/api/collections/ministry_news/records
Body:
Field | Type | Description |
---|---|---|
Optional id | String | 15 characters string to store as record ID.
If not set, it will be auto generated. |
Optional cover_image | String | (*) Relation record ids of Attachments |
Optional title_en | String | Plain text value. |
Optional title_ar | String | Plain text value. |
Optional caption_en | String | Plain text value. |
Optional caption_ar | String | Plain text value. |
Optional images | Array<String> | (*) Relation record ids of Attachments |
Optional description_en | String | Plain text value. |
Optional description_ar | String | Plain text value. |
Optional attachments | Array<String> | (*) Relation record ids of Attachments |
Optional author | Boolean | |
Optional publish | Boolean | |
Optional publish_date | String | |
Optional author_name | String | Plain text value. |
Optional author_avatar | String | (*) Relation record ids of Attachments |
- (*): the array accepts only id of records of attachments collection so you will need to call POST method of attachments collection to create an attachment record then sets the id returned by POST into the array. Response: 200
{
"id": "RECORD_ID",
"collectionId": "lp30igepz1qhqez",
"collectionName": "ministry_news",
"created": "2022-01-01 01:00:00.123Z",
"updated": "2022-01-01 23:59:59.456Z",
"cover_image": "RELATION_RECORD_ID",
"title_en": "test",
"title_ar": "test",
"caption_en": "test",
"caption_ar": "test",
"images": [
"RELATION_RECORD_ID"
],
"description_en": "test",
"description_ar": "test",
"attachments": [
"RELATION_RECORD_ID"
],
"author": true,
"publish": true,
"publish_date": "2022-01-01 10:00:00.123Z",
"author_name": "test",
"author_avatar": "RELATION_RECORD_ID"
}
/api/collections/ministry_news/records/:id
Field | Type | Description |
---|---|---|
Optional cover_image | String | (**) Relation record ids of Attachments |
Optional title_en | String | Plain text value. |
Optional title_ar | String | Plain text value. |
Optional caption_en | String | Plain text value. |
Optional caption_ar | String | Plain text value. |
Optional images | Array<String> | (**) Relation record ids of Attachments |
Optional description_en | String | Plain text value. |
Optional description_ar | String | Plain text value. |
Optional attachments | Array<String> | (**) Relation record ids of Attachments |
Optional author | Boolean | |
Optional publish | Boolean | |
Optional publish_date | String | |
Optional author_name | String | Plain text value. |
Optional author_avatar | String | (**) Relation record ids of Attachments |
- (**): the array accepts only id of records of attachments collection so int this case you will need to use a combination of POST - PATCH - DELETE from attachments collection in order to achieve the desired result.
{
"id": "RECORD_ID",
"collectionId": "lp30igepz1qhqez",
"collectionName": "ministry_news",
"created": "2022-01-01 01:00:00.123Z",
"updated": "2022-01-01 23:59:59.456Z",
"cover_image": "RELATION_RECORD_ID",
"title_en": "test",
"title_ar": "test",
"caption_en": "test",
"caption_ar": "test",
"images": [
"RELATION_RECORD_ID"
],
"description_en": "test",
"description_ar": "test",
"attachments": [
"RELATION_RECORD_ID"
],
"author": true,
"publish": true,
"publish_date": "2022-01-01 10:00:00.123Z",
"author_name": "test",
"author_avatar": "RELATION_RECORD_ID"
}
/api/collections/ministry_news/records/:id
Param | Type | Description |
---|---|---|
id | String | ID of the record to delete. |
null
- Make sure to call for DELETE api of attachment collection to delete records of attachment before deleting this record.
/api/collections/versions/records
Body:
Field | Type | Description |
---|---|---|
Optional id | String | 15 characters string to store as record ID.
If not set, it will be auto generated. |
Optional title_en | String | Plain text value. |
Optional title_ar | String | Plain text value. |
Optional cover | String | (*) Relation record ids of Attachments |
Optional attachments | Array<String> | (*) Relation record ids of Attachments |
- (*): the array accepts only id of records of attachments collection so you will need to call POST method of attachments collection to create an attachment record then sets the id returned by POST into the array.
Response: 200
{
"id": "RECORD_ID",
"collectionId": "5utlwblt95cvncs",
"collectionName": "versions",
"created": "2022-01-01 01:00:00.123Z",
"updated": "2022-01-01 23:59:59.456Z",
"title_en": "test",
"title_ar": "test",
"cover": "RELATION_RECORD_ID",
"attachments": [
"RELATION_RECORD_ID"
]
}
/api/collections/versions/records/:id
Field | Type | Description |
---|---|---|
Optional title_en | String | Plain text value. |
Optional title_ar | String | Plain text value. |
Optional cover | String | (**) Relation record ids of Attachments |
Optional attachments | Array<String> | (**) Relation record ids of Attachments |
- (**): the array accepts only id of records of attachments collection so int this case you will need to use a combination of POST - PATCH - DELETE from attachments collection in order to achieve the desired result.
{
"id": "RECORD_ID",
"collectionId": "5utlwblt95cvncs",
"collectionName": "versions",
"created": "2022-01-01 01:00:00.123Z",
"updated": "2022-01-01 23:59:59.456Z",
"title_en": "test",
"title_ar": "test",
"cover": "RELATION_RECORD_ID",
"attachments": [
"RELATION_RECORD_ID"
]
}
/api/collections/versions/records/:id
Param | Type | Description |
---|---|---|
id | String | ID of the record to delete. |
null
- Make sure to call for DELETE api of attachment collection to delete records of attachment before deleting this record.
/api/collections/visuals/records
Body:
Field | Type | Description |
---|---|---|
Optional id | String | 15 characters string to store as record ID.
If not set, it will be auto generated. |
Optional title_en | String | Plain text value. |
Optional title_ar | String | Plain text value. |
Optional cover_image | String | (*) Relation record ids of Attachments |
Optional attachments | String | (*) Relation record ids of Attachments |
- (*): the array accepts only id of records of attachments collection so you will need to call POST method of attachments collection to create an attachment record then sets the id returned by POST into the array.
Response: 200
{
"id": "RECORD_ID",
"collectionId": "wjgecyxwverdj6c",
"collectionName": "visuals",
"created": "2022-01-01 01:00:00.123Z",
"updated": "2022-01-01 23:59:59.456Z",
"title_en": "test",
"title_ar": "test",
"cover_image": "RELATION_RECORD_ID",
"attachments": "RELATION_RECORD_ID"
}
/api/collections/visuals/records/:id
Field | Type | Description |
---|---|---|
Optional title_en | String | Plain text value. |
Optional title_ar | String | Plain text value. |
Optional cover_image | String | (**) Relation record ids of Attachments |
Optional attachments | String | (**) Relation record ids of Attachments |
- (**): the array accepts only id of records of attachments collection so int this case you will need to use a combination of POST - PATCH - DELETE from attachments collection in order to achieve the desired result.
{
"id": "RECORD_ID",
"collectionId": "wjgecyxwverdj6c",
"collectionName": "visuals",
"created": "2022-01-01 01:00:00.123Z",
"updated": "2022-01-01 23:59:59.456Z",
"title_en": "test",
"title_ar": "test",
"cover_image": "RELATION_RECORD_ID",
"attachments": "RELATION_RECORD_ID"
}
/api/collections/visuals/records/:id
Param | Type | Description |
---|---|---|
id | String | ID of the record to delete. |
null
- Make sure to call for DELETE api of attachment collection to delete records of attachment before deleting this record.
/api/collections/acoustics/records
Body:
Field | Type | Description |
---|---|---|
Optional id | String | 15 characters string to store as record ID.
If not set, it will be auto generated. |
Optional cover_image | String | (*) Relation record ids of Attachments |
Optional audio | String | (*) Relation record ids of Attachments |
Optional title_en | String | Plain text value. |
Optional title_ar | String | Plain text value. |
Optional link | String | URL address. |
Optional publish | Boolean | |
Optional publish_date | String |
- (*): the array accepts only id of records of attachments collection so you will need to call POST method of attachments collection to create an attachment record then sets the id returned by POST into the array.
Response: 200
{
"id": "RECORD_ID",
"collectionId": "xdnkjvbvv8c5jmk",
"collectionName": "acoustics",
"created": "2022-01-01 01:00:00.123Z",
"updated": "2022-01-01 23:59:59.456Z",
"cover_image": "RELATION_RECORD_ID",
"audio": "RELATION_RECORD_ID",
"title_en": "test",
"title_ar": "test",
"link": "https://example.com",
"publish": true,
"publish_date": "2022-01-01 10:00:00.123Z"
}
/api/collections/acoustics/records/:id
Field | Type | Description |
---|---|---|
Optional cover_image | String | (**) Relation record ids of Attachments |
Optional audio | String | (**) Relation record ids of Attachments |
Optional title_en | String | Plain text value. |
Optional title_ar | String | Plain text value. |
Optional link | String | URL address. |
Optional publish | Boolean | |
Optional publish_date | String |
- (**): the array accepts only id of records of attachments collection so int this case you will need to use a combination of POST - PATCH - DELETE from attachments collection in order to achieve the desired result.
{
"id": "RECORD_ID",
"collectionId": "xdnkjvbvv8c5jmk",
"collectionName": "acoustics",
"created": "2022-01-01 01:00:00.123Z",
"updated": "2022-01-01 23:59:59.456Z",
"cover_image": "RELATION_RECORD_ID",
"audio": "RELATION_RECORD_ID",
"title_en": "test",
"title_ar": "test",
"link": "https://example.com",
"publish": true,
"publish_date": "2022-01-01 10:00:00.123Z"
}
/api/collections/acoustics/records/:id
Param | Type | Description |
---|---|---|
id | String | ID of the record to delete. |
null
- Make sure to call for DELETE api of attachment collection to delete records of attachment before deleting this record.
/api/collections/information_designs/records
Body:
Field | Type | Description |
---|---|---|
Optional id | String | 15 characters string to store as record ID.
If not set, it will be auto generated. |
Optional title_en | String | Plain text value. |
Optional title_ar | String | Plain text value. |
Optional cover_image | String | (*) Relation record ids of Attachments |
- (*): the array accepts only id of records of attachments collection so you will need to call POST method of attachments collection to create an attachment record then sets the id returned by POST into the array.
Response: 200
{
"id": "RECORD_ID",
"collectionId": "2oplca8rjjbl036",
"collectionName": "information_designs",
"created": "2022-01-01 01:00:00.123Z",
"updated": "2022-01-01 23:59:59.456Z",
"title_en": "test",
"title_ar": "test",
"cover_image": "RELATION_RECORD_ID"
}
/api/collections/information_designs/records/:id
Field | Type | Description |
---|---|---|
Optional title_en | String | Plain text value. |
Optional title_ar | String | Plain text value. |
Optional cover_image | String | (**) Relation record ids of Attachments |
- (**): the array accepts only id of records of attachments collection so int this case you will need to use a combination of POST - PATCH - DELETE from attachments collection in order to achieve the desired result.
{
"id": "RECORD_ID",
"collectionId": "2oplca8rjjbl036",
"collectionName": "information_designs",
"created": "2022-01-01 01:00:00.123Z",
"updated": "2022-01-01 23:59:59.456Z",
"title_en": "test",
"title_ar": "test",
"cover_image": "RELATION_RECORD_ID"
}
/api/collections/information_designs/records/:id
Param | Type | Description |
---|---|---|
id | String | ID of the record to delete. |
null
- Make sure to call for DELETE api of attachment collection to delete records of attachment before deleting this record.
/api/collections/rules/records
Body:
Field | Type | Description |
---|---|---|
Optional id | String | 15 characters string to store as record ID.
If not set, it will be auto generated. |
Optional title_en | String | Plain text value. |
Optional title_ar | String | Plain text value. |
Optional law_number | String | Plain text value. |
Optional year | Number | Number value. |
Optional classification_en | String | Plain text value. |
Optional classification_ar | String | Plain text value. |
Optional attachments | Array<String> | (*) Relation record ids of Attachments |
Required type | String |
- (*): the array accepts only id of records of attachments collection so you will need to call POST method of attachments collection to create an attachment record then sets the id returned by POST into the array.
Response: 200
{
"id": "RECORD_ID",
"collectionId": "e6mgymg6p1fbvsd",
"collectionName": "rules",
"created": "2022-01-01 01:00:00.123Z",
"updated": "2022-01-01 23:59:59.456Z",
"title_en": "test",
"title_ar": "test",
"law_number": "test",
"year": 123,
"classification_en": "test",
"classification_ar": "test",
"attachments": [
"RELATION_RECORD_ID"
],
"type": "Law"
}
/api/collections/rules/records/:id
Field | Type | Description |
---|---|---|
Optional title_en | String | Plain text value. |
Optional title_ar | String | Plain text value. |
Optional law_number | String | Plain text value. |
Optional year | Number | Number value. |
Optional classification_en | String | Plain text value. |
Optional classification_ar | String | Plain text value. |
Optional attachments | Array<String> | (**) Relation record ids of Attachments |
Required type | String |
- (**): the array accepts only id of records of attachments collection so int this case you will need to use a combination of POST - PATCH - DELETE from attachments collection in order to achieve the desired result.
{
"id": "RECORD_ID",
"collectionId": "e6mgymg6p1fbvsd",
"collectionName": "rules",
"created": "2022-01-01 01:00:00.123Z",
"updated": "2022-01-01 23:59:59.456Z",
"title_en": "test",
"title_ar": "test",
"law_number": "test",
"year": 123,
"classification_en": "test",
"classification_ar": "test",
"attachments": [
"RELATION_RECORD_ID"
],
"type": "Law"
}
/api/collections/rules/records/:id
Param | Type | Description |
---|---|---|
id | String | ID of the record to delete. |
null
- Make sure to call for DELETE api of attachment collection to delete records of attachment before deleting this record.
/api/collections/marketing/records
Body:
Field | Type | Description |
---|---|---|
Optional id | String | 15 characters string to store as record ID.
If not set, it will be auto generated. |
Optional title_en | String | Plain text value. |
Optional title_ar | String | Plain text value. |
Optional publish | Boolean | |
Optional publish_date | String | Format: "2022-01-01 10:00:00.123Z" |
Optional topic | Array<String> | (*) Relation record ids of Topics |
Required sector | String | Values: Marketing, AgriculturalInvestment, FishInvestment |
- (*): the array accepts only id of records of topics collection so you will need to call POST method of topics collection to create a topic record then sets the id returned by POST into the array.
Response: 200
{
"id": "RECORD_ID",
"collectionId": "56rlyiyuli6zojz",
"collectionName": "marketing",
"created": "2022-01-01 01:00:00.123Z",
"updated": "2022-01-01 23:59:59.456Z",
"title_en": "test",
"title_ar": "test",
"publish": true,
"publish_date": "2022-01-01 10:00:00.123Z",
"topic": [
"RELATION_RECORD_ID"
],
"sector": "Marketing"
}
/api/collections/marketing/records/:id
Field | Type | Description |
---|---|---|
Optional title_en | String | Plain text value. |
Optional title_ar | String | Plain text value. |
Optional publish | Boolean | |
Optional publish_date | String | Format: "2022-01-01 10:00:00.123Z" |
Optional topic | Array<String> | (**) Relation record ids of Topics |
Required sector | String | Values: Marketing, AgriculturalInvestment, FishInvestment |
- (**): the array accepts only id of records of topics collection so int this case you will need to use a combination of POST - PATCH - DELETE from topics collection in order to achieve the desired result.
{
"id": "RECORD_ID",
"collectionId": "56rlyiyuli6zojz",
"collectionName": "marketing",
"created": "2022-01-01 01:00:00.123Z",
"updated": "2022-01-01 23:59:59.456Z",
"title_en": "test",
"title_ar": "test",
"publish": true,
"publish_date": "2022-01-01 10:00:00.123Z",
"topic": [
"RELATION_RECORD_ID"
],
"sector": "Marketing"
}
/api/collections/marketing/records/:id
Param | Type | Description |
---|---|---|
id | String | ID of the record to delete. |
null
- Make sure to call for DELETE api of topics collection to delete records of topics related to current record of marketing collection before it's deletion.
/api/collections/topics/records
Body:
Field | Type | Description |
---|---|---|
Optional id | String | 15 characters string to store as record ID.
If not set, it will be auto generated. |
Optional topic_en | String | Plain text value. |
Optional topic_ar | String | Plain text value. |
Optional images | Array<String> | (*) Relation record ids of Attachments |
Optional description_en | String | |
Optional description_ar | String | |
Optional attachments | Array<String> | (*) Relation record ids of Attachments |
- (*): the array accepts only id of records of attachments collection so you will need to call POST method of attachments collection to create an attachment record then sets the id returned by POST into the array.
Response: 200
{
"id": "RECORD_ID",
"collectionId": "ci8h0c7ixhgn2b9",
"collectionName": "topics",
"created": "2022-01-01 01:00:00.123Z",
"updated": "2022-01-01 23:59:59.456Z",
"topic_en": "test",
"topic_ar": "test",
"images": [
"RELATION_RECORD_ID"
],
"description_en": "test",
"description_ar": "test",
"attachments": [
"RELATION_RECORD_ID"
]
}
/api/collections/topics/records/:id
Field | Type | Description |
---|---|---|
Optional topic_en | String | Plain text value. |
Optional topic_ar | String | Plain text value. |
Optional images | Array<String> | (**) Relation record ids of Attachments |
Optional description_en | String | |
Optional description_ar | String | |
Optional attachments | Array<String> | (**) Relation record ids of Attachments |
- (**): the array accepts only id of records of attachments collection so int this case you will need to use a combination of POST - PATCH - DELETE from attachments collection in order to achieve the desired result.
{
"id": "RECORD_ID",
"collectionId": "ci8h0c7ixhgn2b9",
"collectionName": "topics",
"created": "2022-01-01 01:00:00.123Z",
"updated": "2022-01-01 23:59:59.456Z",
"topic_en": "test",
"topic_ar": "test",
"images": [
"RELATION_RECORD_ID"
],
"description_en": "test",
"description_ar": "test",
"attachments": [
"RELATION_RECORD_ID"
]
}
/api/collections/topics/records/:id
Param | Type | Description |
---|---|---|
id | String | ID of the record to delete. |
null
- Make sure to call for DELETE api of attachment collection to delete records of attachment before deleting this record.
/api/collections/attachments/records
Body:
Field | Type | Description |
---|---|---|
Optional id | String | 15 characters string to store as record ID.
If not set, it will be auto generated. |
Optional url | String | Plain text value. |
Optional bucket | String | Plain text value. |
Optional object | String | Plain text value. |
Optional size | Number | Number value. |
Optional file_name | String | Plain text value. |
Optional subject | String | Plain text value. |
Optional content_type | String | Plain text value. |
Response: 200
{
"id": "RECORD_ID",
"collectionId": "1bp57azl51u4zmw",
"collectionName": "attachments",
"created": "2022-01-01 01:00:00.123Z",
"updated": "2022-01-01 23:59:59.456Z",
"url": "test",
"bucket": "test",
"object": "test",
"size": 123,
"file_name": "test",
"subject": "test",
"content_type": "test"
}
/api/collections/attachments/records/:id
Field | Type | Description |
---|---|---|
Optional url | String | Plain text value. |
Optional bucket | String | Plain text value. |
Optional object | String | Plain text value. |
Optional size | Number | Number value. |
Optional file_name | String | Plain text value. |
Optional subject | String | Plain text value. |
Optional content_type | String | Plain text value. |
{
"id": "RECORD_ID",
"collectionId": "1bp57azl51u4zmw",
"collectionName": "attachments",
"created": "2022-01-01 01:00:00.123Z",
"updated": "2022-01-01 23:59:59.456Z",
"url": "test",
"bucket": "test",
"object": "test",
"size": 123,
"file_name": "test",
"subject": "test",
"content_type": "test"
}
/api/collections/attachments/records/:id
Param | Type | Description |
---|---|---|
id | String | ID of the record to delete. |
null
/api/collections/collection_name/records
Query Parameters:
Param | Type | Description |
---|---|---|
page | Number | The page (aka. offset) of the paginated list (default to 1). |
perPage | Number | Specify the max returned records per page (default to 30). |
sort | String | Specify the records order attribute(s). Add - / + (default) in front of the attribute for DESC / ASC order.
Ex.:
// DESC by created and ASC by id
?sort=-created,id Supported record sort fields: |
filter | String | Filter the returned records. Ex.:
?filter=(id='abc' && created>'2022-01-01') The syntax basically follows the format
To group and combine several expressions you could use brackets
|
expand | String | Auto expand record relations. Ex.:
?expand=relField1,relField2.subRelField The expanded relations will be appended to each individual record under the expand property (eg. "expand": {"relField1": {...}, ...} ).
Only the relations to which the request user has permissions to view will be expanded. |
fields | String | Comma separated string of the fields to return in the JSON response (by default returns all fields). Ex.: ?fields=*,expand.relField.name
In addition, the following field modifiers are also supported:
|
skipTotal | Boolean | If it is set the total counts query will be skipped and the response fields
totalItems and totalPages will have -1 value.
This could drastically speed up the search queries when the total counters are not needed or cursor based pagination is used. For optimization purposes, it is set by default for the getFirstListItem()
and
getFullList() SDKs methods. |
Response: 200
{
"page": 1,
"perPage": 30,
"totalPages": 1,
"totalItems": 2,
"items": [ // example from minister_speech collection
{
"id": "RECORD_ID",
"collectionId": "sctld81dlg1u119",
"collectionName": "minister_speech",
"created": "2022-01-01 01:00:00.123Z",
"updated": "2022-01-01 23:59:59.456Z",
"images": "JSON",
"title_en": "test",
"title_ar": "test",
"description_en": "test",
"description_ar": "test",
"attachments": "JSON"
},
{
"id": "RECORD_ID",
"collectionId": "sctld81dlg1u119",
"collectionName": "minister_speech",
"created": "2022-01-01 01:00:00.123Z",
"updated": "2022-01-01 23:59:59.456Z",
"images": "JSON",
"title_en": "test",
"title_ar": "test",
"description_en": "test",
"description_ar": "test",
"attachments": "JSON"
}
]
}
/api/collections/collection_name/records/:id
Param | Type | Description |
---|---|---|
id | String | ID of the record to view. |
Query Parameters:
Param | Type | Description |
---|---|---|
expand | String | Auto expand record relations. Ex.:
?expand=relField1,relField2.subRelField The expanded relations will be appended to the record under the expand property (eg. "expand": {"relField1": {...}, ...} ).
Only the relations to which the request user has permissions to view will be expanded. |
fields | String | Comma separated string of the fields to return in the JSON response (by default returns all fields). Ex.: ?fields=*,expand.relField.name
In addition, the following field modifiers are also supported:
|
Response: 200
{ // example from minister_speech collection
"id": "RECORD_ID",
"collectionId": "sctld81dlg1u119",
"collectionName": "minister_speech",
"created": "2022-01-01 01:00:00.123Z",
"updated": "2022-01-01 23:59:59.456Z",
"images": "JSON",
"title_en": "test",
"title_ar": "test",
"description_en": "test",
"description_ar": "test",
"attachments": "JSON"
}