Introduction
API Endpoint https://service.ibent95.my.id/svc-dynamic-form-symfony/public
This server-side project is an implementation of Dynamic Forms service using Symfony and was generated with Symfony CLI version 5 and now it is upgraded to version 6.
This project was created to implement what I found and learned in my previous work at a university in Indonesia. It is something about a database for all lecturer to save their work like publications, research, teaching, and more. The purpose is to make a form that can fill all needed and can rapidly change when necessary, whenever the developer or administrator wants, just make changes in the database and the form can be used immediately. So no more deployment stage is run with this configuration.
Also, this is my project to learn and implement more features, libraries, codes, or logic in PHP/Symfony.
Please get in touch with me at ibent95tuny@gmail for further help or discussion.
General APIs
There is bunch of API to use in this section. They are used in general puposes.
1. [GET] Main
# Here is a curl example
curl \
-X GET https://service.ibent95.my.id/svc-dynamic-form-symfony/public/api/v1
To get messages and date from server, mostly it can be used to check healthz of the service. The API route :
https://service.ibent95.my.id/svc-dynamic-form-symfony/public/api/v1
Result example :
{
"info": "success",
"message": "Welcome to Dynamic Form service with Symfony 6.",
"data": {
"message": "Welcome to Dynamic Form service with Symfony 6.",
"date": "2023-10-01"
}
}
QUERY PARAMETERS
No query parameter needed.
2. [GET] Uploaded File
# Here is a curl example
curl \
-X GET https://service.ibent95.my.id/svc-dynamic-form-symfony/public/api/v1/files/:serviceName/:fileNameExtension
To get temporary uploaded file from temporary table data. It is used to reduce server load when submit dynamic form data, especially with file and image field types in form metadata. The API route :
https://service.ibent95.my.id/svc-dynamic-form-symfony/public/api/v1/files/:serviceName/:fileNameExtension
Result example :
Usually it return binary file.
QUERY PARAMETERS
No query parameter needed.
PATH PARAMETERS
Field | Type | Description |
---|---|---|
:serviceName | String | The service name ('publication', 'reaserch', or others). |
:fileNameExtension | String | The file name and extension (Exp: example.pdf). |
3. [POST] Upload File
# Here is a curl example
curl \
-X POST https://service.ibent95.my.id/svc-dynamic-form-symfony/public/api/v1/files/upload/:serviceName
This is upload file API with POST method, it is used to upload file to temporary table data. It return UUID of uploaded file. The API route :
https://service.ibent95.my.id/svc-dynamic-form-symfony/public/api/v1/files/upload/:serviceName
Result example :
{
"info": "success",
"message": "Success on upload file data!",
"data": "73b29692-9758-445d-902f-ab663d72fae2"
}
QUERY PARAMETERS
No query parameter needed.
PATH PARAMETERS
Field | Type | Description |
---|---|---|
:serviceName | String | The destination service name ('publication', 'reaserch', or others). |
Publication`s APIs
This section is a list of API to Publication menu (service). This menu is used to implement Dynamic Forms.
1. [GET] Publication Main
# Here is a curl example
curl \
-X GET https://service.ibent95.my.id/svc-dynamic-form-symfony/public/api/v1/publication
To get messages and date from server, mostly it can be used to check healthz of the publication service :
https://service.ibent95.my.id/svc-dynamic-form-symfony/public/api/v1/publication
Result example :
{
"info": "success",
"message": "Success to access the publication`s API!",
"data": {
"message": "Welcome to publication`s API!",
"date": "2023-10-01"
}
}
QUERY PARAMETERS
No query parameter needed.
2. [GET] All Publication`s
# Here is a curl example
curl \
-X GET https://service.ibent95.my.id/svc-dynamic-form-symfony/public/api/v1/publications
This API is used to get all submited publication`s data. The API route :
https://service.ibent95.my.id/svc-dynamic-form-symfony/public/api/v1/publications
Result example :
{
"info": "success",
"message": "Success to get publications data!",
"data": [
{
"title": "Power Ranger",
"publication_date": "2023-10-02 00:58:40",
"uuid": "58b1cf1d-673f-4115-891d-0c1532efc5a6",
"publication_general_type": {
"uuid": "fed02ab7-1f41-472b-b451-a893f0485e33",
"publication_general_type_name": "Book",
"publication_general_type_code": "BOK"
},
"publication_type": {
"uuid": "a23892cd-6811-44bd-a671-c85b87829887",
"publication_type_name": "Book 1",
"publication_type_code": "BOK-1",
"publication_general_type": {
"uuid": "fed02ab7-1f41-472b-b451-a893f0485e33",
"publication_general_type_name": "Book",
"publication_general_type_code": "BOK"
}
},
"publication_form_version": {
"publication_form_version_name": "Book 1 v1",
"publication_form_version_code": "BOK1-V1",
"grid_system": {
"type": "tailwind",
"cols": 12,
"config": {
"text_1": {
"colspan": 3
},
"select_1": {
"colspan": 3
},
...
}
},
"uuid": "d152c092-1141-4640-846d-24a6ef91b646",
"flag_active": true
},
"publication_status": {
"publication_status_name": "Draft",
"publication_status_code": "DRF",
"uuid": "4bc22d41-4386-4f57-bf4d-dd51e993aa1e"
}
},
{
"title": "More power beybeh",
"publication_date": null,
"uuid": "759a8e05-2ddf-4420-b757-2e08c907be00",
"publication_general_type": {
"uuid": "fed02ab7-1f41-472b-b451-a893f0485e33",
"publication_general_type_name": "Book",
"publication_general_type_code": "BOK"
},
"publication_type": {
"uuid": "4376fe79-b2bd-4178-bfd4-1ed1664a8f61",
"publication_type_name": "Book 2",
"publication_type_code": "BOK-2",
"publication_general_type": {
"uuid": "fed02ab7-1f41-472b-b451-a893f0485e33",
"publication_general_type_name": "Book",
"publication_general_type_code": "BOK"
}
},
"publication_form_version": {
"publication_form_version_name": "Book 2 v1",
"publication_form_version_code": "BOK1-V2",
"grid_system": {
"type": "tailwind",
"cols": 12,
"config": {
"text_1": {
"colspan": 9
},
"select_1": {
"colspan": 3
}
}
},
"uuid": "4798da8b-c6a3-4619-b1f1-1770799918c3",
"flag_active": true
},
"publication_status": {
"publication_status_name": "Rejected",
"publication_status_code": "RJT",
"uuid": "c2cb0ee7-a02e-43a6-8fbe-3a5d17254e47"
}
},
{
"title": "Public Relations",
"publication_date": null,
"uuid": "fa9eaece-6a7b-49db-ac2a-f20adbec0890",
"publication_general_type": {
"uuid": "fed02ab7-1f41-472b-b451-a893f0485e33",
"publication_general_type_name": "Book",
"publication_general_type_code": "BOK"
},
"publication_type": {
"uuid": "4376fe79-b2bd-4178-bfd4-1ed1664a8f61",
"publication_type_name": "Book 2",
"publication_type_code": "BOK-2",
"publication_general_type": {
"uuid": "fed02ab7-1f41-472b-b451-a893f0485e33",
"publication_general_type_name": "Book",
"publication_general_type_code": "BOK"
}
},
"publication_form_version": {
"publication_form_version_name": "Book 2 v1",
"publication_form_version_code": "BOK1-V2",
"grid_system": {
"type": "tailwind",
"cols": 12,
"config": {
"text_1": {
"colspan": 9
},
"select_1": {
"colspan": 3
}
}
},
"uuid": "4798da8b-c6a3-4619-b1f1-1770799918c3",
"flag_active": true
},
"publication_status": {
"publication_status_name": "Processing",
"publication_status_code": "PRO",
"uuid": "2c5f13d8-cfbd-4d53-9311-356ca2f33ffd"
}
}
],
"count": 12
}
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
limit | String/Integer | The size or length of retrieved data (Exp: 3). |
offset | String/Integer | (Optional) The offset or index start of retrieved data (Exp: 0). |
page_index | String/Integer | The index of page, it will replace offset variable with (limit * page_index) so the data will start from the offset (Exp: 0). |
3. [GET] Publication Details by PUBLICATION_UUID
# Here is a curl example
curl \
-X GET https://service.ibent95.my.id/svc-dynamic-form-symfony/public/api/v1/publications/04ca1413-3961-40ad-b288-d742405d1654
This is API to get publication details. The API route :
https://service.ibent95.my.id/svc-dynamic-form-symfony/public/api/v1/publications/:publicationUUID
Result example :
{
"info": "success",
"message": "Success to get publication data!",
"data": {
"title": "Try 01",
"publication_date": null,
"uuid": "04ca1413-3961-40ad-b288-d742405d1654",
"publication_general_type": {
"uuid": "fed02ab7-1f41-472b-b451-a893f0485e33",
"publication_general_type_name": "Book",
"publication_general_type_code": "BOK"
},
"publication_type": {
"uuid": "4376fe79-b2bd-4178-bfd4-1ed1664a8f61",
"publication_type_name": "Book 2",
"publication_type_code": "BOK-2",
"publication_general_type": {
"uuid": "fed02ab7-1f41-472b-b451-a893f0485e33",
"publication_general_type_name": "Book",
"publication_general_type_code": "BOK"
}
},
"publication_form_version": {
"publication_form_version_name": "Book 2 v1",
"publication_form_version_code": "BOK1-V2",
"grid_system": {
"type": "tailwind",
"cols": 12,
"config": {
"text_1": {
"colspan": 9
},
"select_1": {
"colspan": 3
}
}
},
"uuid": "4798da8b-c6a3-4619-b1f1-1770799918c3",
"flag_active": true
},
"publication_status": {
"publication_status_name": "Processing",
"publication_status_code": "PRO",
"uuid": "2c5f13d8-cfbd-4d53-9311-356ca2f33ffd"
},
"meta_data": [
{
"field_label": "Try text",
"field_type": "text",
"field_name": "text_1",
"field_id": "text_1",
"field_class": "text_1",
"field_placeholder": "Try text placeholder",
"field_configs": null,
"description": "Try text description",
"order_position": 1,
"validation_configs": null,
"error_message": null,
"dependency_child": null,
"dependency_parent": null,
"flag_required": false,
"flag_field_form_type": false,
"flag_field_title": true,
"flag_field_publish_date": false,
"value": "Try 01",
"other_value": null,
"uuid": "8d20d314-6b7f-4400-a888-49a0017a57d1",
"field_options": null
},
{
"field_label": "Try select",
"field_type": "select",
"field_name": "select_1",
"field_id": "select_1",
"field_class": "select_1",
"field_placeholder": "Try select placeholder",
"field_configs": null,
"description": "Try select description",
"order_position": 2,
"validation_configs": null,
"error_message": null,
"dependency_child": null,
"dependency_parent": null,
"flag_required": false,
"flag_field_form_type": true,
"flag_field_title": false,
"flag_field_publish_date": false,
"value": "d3192561-8703-4801-8f34-06283b61fd1c",
"other_value": {
"uuid": "d3192561-8703-4801-8f34-06283b61fd1c",
"value": "d3192561-8703-4801-8f34-06283b61fd1c",
"text": "Verified"
},
"uuid": "52171ab4-a672-4e85-a248-00cd6a9da7e3",
"field_options": "master-publication_status"
}
]
}
}
QUERY PARAMETERS
No query parameter needed.
PATH PARAMETERS
Field | Type | Description |
---|---|---|
:publicationUUID | String | The UUID of publication (Exp: 04ca1413-3961-40ad-b288-d742405d1654). |
4. [GET] Publication Form Metadata by PUBLICATION_TYPE_CODE
# Here is a curl example
curl \
-X GET https://service.ibent95.my.id/svc-dynamic-form-symfony/public/api/v1/publications/form-meta-data/BOK-2
This API is used to get Form Metadata by Publication Type Code. The API route :
https://service.ibent95.my.id/svc-dynamic-form-symfony/public/api/v1/publications/form-meta-data/:publicationTypeCode
Result example :
{
"info": "success",
"message": "Success to get publication form metadata!",
"data": {
"publication_form_version_name": "Book 2 v1",
"publication_form_version_code": "BOK1-V2",
"grid_system": {
"type": "tailwind",
"cols": 12,
"config": {
"text_1": {
"colspan": 9
},
"select_1": {
"colspan": 3
}
}
},
"uuid": "4798da8b-c6a3-4619-b1f1-1770799918c3",
"flag_active": true,
"forms": [
{
"field_label": "Try text",
"field_type": "text",
"field_name": "text_1",
"field_id": "text_1",
"field_class": "text_1",
"field_placeholder": "Try text placeholder",
"field_configs": {
"colspan": 9
},
"description": "Try text description",
"order_position": 1,
"validation_configs": null,
"error_message": null,
"dependency_child": null,
"dependency_parent": null,
"flag_required": false,
"flag_field_form_type": false,
"flag_field_title": true,
"flag_field_publish_date": false,
"uuid": "37a006a3-2077-4370-9fe1-3a4b12c1074b",
"field_options": null,
"options": [],
"children": [],
"flag_multiple_field": false
},
{
"field_label": "Try select",
"field_type": "select",
"field_name": "select_1",
"field_id": "select_1",
"field_class": "select_1",
"field_placeholder": "Try select placeholder",
"field_configs": {
"colspan": 3
},
"description": "Try select description",
"order_position": 2,
"validation_configs": null,
"error_message": null,
"dependency_child": null,
"dependency_parent": null,
"flag_required": false,
"flag_field_form_type": true,
"flag_field_title": false,
"flag_field_publish_date": false,
"uuid": "90256187-caba-436f-bade-0dfd8b4b32b4",
"field_options": "master-publication_status",
"options": [
{
"publication_status_name": "Draft",
"value": "Draft",
"uuid": "4bc22d41-4386-4f57-bf4d-dd51e993aa1e"
},
{
"publication_status_name": "Processing",
"value": "Processing",
"uuid": "2c5f13d8-cfbd-4d53-9311-356ca2f33ffd"
},
{
"publication_status_name": "Rejected",
"value": "Rejected",
"uuid": "c2cb0ee7-a02e-43a6-8fbe-3a5d17254e47"
},
{
"publication_status_name": "Revision",
"value": "Revision",
"uuid": "e2605a42-63fc-492f-8db8-955a6c7c3944"
},
{
"publication_status_name": "Verified",
"value": "Verified",
"uuid": "d3192561-8703-4801-8f34-06283b61fd1c"
}
],
"children": [],
"flag_multiple_field": false
},
{
"field_label": "Try file",
"field_type": "file",
"field_name": "file_1",
"field_id": "file_1",
"field_class": "file_1",
"field_placeholder": "Try file placeholder",
"field_configs": null,
"description": "Try file description",
"order_position": 3,
"validation_configs": null,
"error_message": "",
"dependency_child": null,
"dependency_parent": null,
"flag_required": true,
"flag_field_form_type": false,
"flag_field_title": false,
"flag_field_publish_date": false,
"uuid": "9c1f3601-5f28-4459-a4dd-236dfc540614",
"field_options": "",
"options": [],
"children": [],
"flag_multiple_field": false
},
{
"field_label": "Try image",
"field_type": "image",
"field_name": "image_1",
"field_id": "image_1",
"field_class": "image_1",
"field_placeholder": "Try image placeholder",
"field_configs": null,
"description": "Try image description",
"order_position": 4,
"validation_configs": null,
"error_message": "",
"dependency_child": null,
"dependency_parent": null,
"flag_required": true,
"flag_field_form_type": false,
"flag_field_title": false,
"flag_field_publish_date": false,
"uuid": "ac452185-b05a-428b-84fc-e3479e47612d",
"field_options": "",
"options": [],
"children": [],
"flag_multiple_field": false
}
]
}
}
QUERY PARAMETERS
No query parameter needed.
PATH PARAMETERS
Field | Type | Description |
---|---|---|
:publicationTypeCode | String | The CODE of Publication Type (Exp: BOK-2). |
5. [GET] Publication FORM Metadata By PUBLICATION_UUID
# Here is a curl example
curl \
-X GET https://service.ibent95.my.id/svc-dynamic-form-symfony/public/api/v1/publications/58b1cf1d-673f-4115-891d-0c1532efc5a6/form-meta-data
This API is used to get Form Metadata by Publication UUID, usually is used when submited publication is in update form. The API route:
https://service.ibent95.my.id/svc-dynamic-form-symfony/public/api/v1/publications/:publicationUUID/form-meta-data
Result example :
{
"info": "success",
"message": "Success to get publication form metadata!",
"data": {
"publication_form_version_name": "Book 1 v1",
"publication_form_version_code": "BOK1-V1",
"uuid": "d152c092-1141-4640-846d-24a6ef91b646",
"grid_system": {
"type": "tailwind",
"cols": 12,
"config": {
"text_1": {
"colspan": 3
},
"select_1": {
"colspan": 3
},
...
}
},
"flag_active": true,
"forms": [
{
"field_label": "Try text",
"field_type": "text",
"field_name": "text_1",
"field_id": "text_1",
"field_class": "text_1",
"field_placeholder": "Try text placeholder",
"field_configs": {
"colspan": 3
},
"description": "Try text description",
"order_position": 1,
"validation_configs": null,
"error_message": null,
"dependency_child": null,
"dependency_parent": null,
"flag_required": true,
"flag_field_form_type": false,
"flag_field_title": true,
"flag_field_publish_date": false,
"value": "Power Ranger",
"other_value": null,
"uuid": "a77fd158-2933-431c-ba96-deff625fa8e5",
"field_options": null,
"options": [],
"children": [],
"flag_multiple_field": false
},
{
"field_label": "Try select",
"field_type": "select",
"field_name": "select_1",
"field_id": "select_1",
"field_class": "select_1",
"field_placeholder": "Try select placeholder",
"field_configs": {
"colspan": 3
},
"description": "Try select description",
"order_position": 2,
"validation_configs": null,
"error_message": null,
"dependency_child": null,
"dependency_parent": null,
"flag_required": false,
"flag_field_form_type": false,
"flag_field_title": false,
"flag_field_publish_date": false,
"value": "",
"other_value": {
"uuid": "",
"value": "",
"text": ""
},
"uuid": "5e128344-30b5-4226-bca7-8b31336c1274",
"field_options": "master-publication_status",
"options": [
{
"publication_status_name": "Draft",
"value": "Draft",
"uuid": "4bc22d41-4386-4f57-bf4d-dd51e993aa1e"
},
{
"publication_status_name": "Processing",
"value": "Processing",
"uuid": "2c5f13d8-cfbd-4d53-9311-356ca2f33ffd"
},
{
"publication_status_name": "Rejected",
"value": "Rejected",
"uuid": "c2cb0ee7-a02e-43a6-8fbe-3a5d17254e47"
},
{
"publication_status_name": "Revision",
"value": "Revision",
"uuid": "e2605a42-63fc-492f-8db8-955a6c7c3944"
},
{
"publication_status_name": "Verified",
"value": "Verified",
"uuid": "d3192561-8703-4801-8f34-06283b61fd1c"
}
],
"children": [],
"flag_multiple_field": false
},
{
"field_label": "Try stepper",
"field_type": "stepper",
"field_name": null,
"field_id": "try_stepper_1",
"field_class": "try_stepper_1",
"field_placeholder": null,
"field_configs": {
"orientation": "horizontal",
"linear": true,
"colspan": 6,
"rowspan": 6
},
"description": null,
"order_position": 3,
"validation_configs": null,
"error_message": null,
"dependency_child": null,
"dependency_parent": null,
"flag_required": false,
"flag_field_form_type": false,
"flag_field_title": false,
"flag_field_publish_date": false,
"value": null,
"other_value": null,
"uuid": "020a8605-a0ec-4a8a-83bf-38332a1b71b9",
"field_options": null,
"options": [],
"children": [
{
"field_label": "Try step 1",
"field_type": "step",
"field_name": null,
"field_id": "try_stepper_1_step_1",
"field_class": "try_stepper_1_step_1",
"field_placeholder": null,
"field_configs": {
"colspan": 12
},
"description": null,
"order_position": 4,
"validation_configs": null,
"error_message": null,
"dependency_child": null,
"dependency_parent": null,
"flag_required": false,
"flag_field_form_type": false,
"flag_field_title": false,
"flag_field_publish_date": false,
"value": null,
"other_value": null,
"uuid": "da092fbd-1657-4650-8554-cd9b880d8729",
"field_options": null,
"options": [],
"children": [
{
"field_label": "Try owl date in stepper",
"field_type": "owl-date",
"field_name": "date_2",
"field_id": "date_2",
"field_class": "date_2",
"field_placeholder": "Try owl date in stepper placeholder",
"field_configs": {
"colspan": 6
},
"description": "Try owl date in stepper description",
"order_position": 31,
"validation_configs": null,
"error_message": null,
"dependency_child": null,
"dependency_parent": null,
"flag_required": true,
"flag_field_form_type": false,
"flag_field_title": false,
"flag_field_publish_date": false,
"value": "2023-10-07 00:00:00",
"other_value": {
"value": null,
"text": null
},
"uuid": "1fc175b5-bf28-44c5-b8ac-af46ce0f478a",
"field_options": null,
"options": [],
"children": [],
"flag_multiple_field": false
},
...
],
"flag_multiple_field": false
},
...
],
"flag_multiple_field": false
},
{
"field_label": "URL of dynamic-form blog",
"field_type": "url",
"field_name": "url_2",
"field_id": "url_2",
"field_class": "url_2",
"field_placeholder": "Try url placeholder",
"field_configs": {
"colspan": 6
},
"description": "Try url description",
"order_position": 14,
"validation_configs": {
"pattern": "^(https?:\\/\\/(?:www\\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\\.[^\\s]{2,}|www\\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\\.[^\\s]{2,}|https?:\\/\\/(?:www\\.|(?!www))[a-zA-Z0-9]+\\.[^\\s]{2,}|www\\.[a-zA-Z0-9]+\\.[^\\s]{2,})"
},
"error_message": "Fill in the field with valid url (Example: https://www.dynamic-form.local)",
"dependency_child": null,
"dependency_parent": null,
"flag_required": true,
"flag_field_form_type": false,
"flag_field_title": false,
"flag_field_publish_date": false,
"value": "",
"other_value": null,
"uuid": "fad1676c-a462-4b68-b489-09a976e69ec8",
"field_options": null,
"options": [],
"children": [],
"flag_multiple_field": false
},
...,
{
"field_label": "Try accordion",
"field_type": "accordion",
"field_name": null,
"field_id": "try_accordion_1",
"field_class": "try_accordion_1",
"field_placeholder": null,
"field_configs": {
"orientation": "horizontal",
"linear": true,
"colspan": 6,
"rowspan": 5
},
"description": "",
"order_position": 16,
"validation_configs": null,
"error_message": null,
"dependency_child": null,
"dependency_parent": null,
"flag_required": false,
"flag_field_form_type": false,
"flag_field_title": false,
"flag_field_publish_date": false,
"value": null,
"other_value": null,
"uuid": "adffccbf-97d5-40d7-98fb-aeec4544a940",
"field_options": null,
"options": [],
"children": [
{
"field_label": "Try panel 1",
"field_type": "panel",
"field_name": null,
"field_id": "try_accordion_1_panel_1",
"field_class": "try_accordion_1_panel_1",
"field_placeholder": null,
"field_configs": {
"panel_description": {
"mat_icon": "signal_cellular_alt"
},
"colspan": 12
},
"description": "Panel 1 description",
"order_position": 18,
"validation_configs": null,
"error_message": null,
"dependency_child": null,
"dependency_parent": null,
"flag_required": false,
"flag_field_form_type": false,
"flag_field_title": false,
"flag_field_publish_date": false,
"value": null,
"other_value": null,
"uuid": "79508500-87bb-43a7-a53f-56d0ffc4482c",
"field_options": null,
"options": [],
"children": [
{
"field_label": "Try text in accordion",
"field_type": "text",
"field_name": "text_3",
"field_id": "text_3",
"field_class": "text_3",
"field_placeholder": "Try text in stepper placeholder",
"field_configs": {
"colspan": 4
},
"description": "Try text in stepper description",
"order_position": 21,
"validation_configs": null,
"error_message": null,
"dependency_child": null,
"dependency_parent": null,
"flag_required": true,
"flag_field_form_type": false,
"flag_field_title": false,
"flag_field_publish_date": false,
"value": "",
"other_value": null,
"uuid": "da11fca0-b9e7-4c32-8618-ea29799bcc85",
"field_options": null,
"options": [],
"children": [],
"flag_multiple_field": false
},
...
],
"flag_multiple_field": false
},
...
],
"flag_multiple_field": false
},
{
"field_label": "Try file",
"field_type": "file-upload",
"field_name": "file_1",
"field_id": "file_1",
"field_class": "file_1",
"field_placeholder": "Try file placeholder",
"field_configs": {
"colspan": 6
},
"description": "Try file description",
"order_position": 39,
"validation_configs": null,
"error_message": null,
"dependency_child": null,
"dependency_parent": null,
"flag_required": true,
"flag_field_form_type": false,
"flag_field_title": false,
"flag_field_publish_date": false,
"value": "lwin2020.pdf",
"other_value": {
"original_name": "lwin2020.pdf",
"slug": "lwin2020",
"name": "lwin2020-6519b38599aff.pdf",
"path": "files/publications/lwin2020-6519b38599aff.pdf",
"url": "https://svc-dynamic-form-symfony.loc/api/v1/files/publications/lwin2020-6519b38599aff.pdf",
"extension": ".pdf"
},
"uuid": "5429c7bd-2b31-4bf2-ad21-caa4ede82d24",
"field_options": null,
"options": [],
"children": [],
"flag_multiple_field": false
},
{
"field_label": "Try image",
"field_type": "image-upload",
"field_name": "image_1",
"field_id": "image_1",
"field_class": "image_1",
"field_placeholder": "Try image placeholder",
"field_configs": {
"colspan": 6
},
"description": "Try image description",
"order_position": 40,
"validation_configs": null,
"error_message": null,
"dependency_child": null,
"dependency_parent": null,
"flag_required": true,
"flag_field_form_type": false,
"flag_field_title": false,
"flag_field_publish_date": false,
"value": "1.1.png",
"other_value": {
"original_name": "1.1.png",
"slug": "1-1",
"name": "1-1-6519b395ea8e1.png",
"path": "files/publications/1-1-6519b395ea8e1.png",
"url": "https://svc-dynamic-form-symfony.loc/api/v1/files/publications/1-1-6519b395ea8e1.png",
"extension": ".png"
},
"uuid": "0ca55c2d-7e62-4a77-92d4-5d6e288cefb9",
"field_options": null,
"options": [],
"children": [],
"flag_multiple_field": false
},
...
]
}
}
QUERY PARAMETERS
No query parameter needed.
PATH PARAMETERS
Field | Type | Description |
---|---|---|
:publicationUUID | String | The UUID of publication (Exp: 58b1cf1d-673f-4115-891d-0c1532efc5a6). |
6. [POST] Create Publication
# Here is a curl example
curl \
-X POST https://service.ibent95.my.id/svc-dynamic-form-symfony/public/api/v1/publications
This API is used to get Form Metadata by Publication UUID, usually is used when submited publication is in update form. The API route:
https://service.ibent95.my.id/svc-dynamic-form-symfony/public/api/v1/publications
Result example :
{
"info": "success",
"message": "Success on save publication data!",
"data": []
}
QUERY PARAMETERS
No query parameter needed.
BODY - form-data
Field | Type | Example Value | Description |
---|---|---|---|
publication_type_code | String | BOK-2 | The CODE of publication type. |
publication_status_code | String | DRF | The CODE of publication status. |
meta_data | Array | The array of inputs, all fields with available of name in it. There is an index number in it to wrap the group of data (value, other_value, field_name, uuid, etc). | |
meta_data[0][value] | String | ABC | The value of first input. |
meta_data[0][field_name] | String | text_1 | The name of first input. |
meta_data[0][uuid] | String | 37a006a3-2077-4370-9fe1-3a4b12c1074b | The UUID of first field metadata in Forms. |
meta_data[1][value] | String | 4bc22d41-4386-4f57-bf4d-dd51e993aa1e | The value of second input. If it is select, the value is the ID/UUID of selected options. |
meta_data[1][other_value][uuid] | String | 4bc22d41-4386-4f57-bf4d-dd51e993aa1e | The other value of second input. If it is select, the property uuid is the ID/UUID of selected options. |
meta_data[1][other_value][value] | String | 4bc22d41-4386-4f57-bf4d-dd51e993aa1e | The other value of second input. If it is select, the property uuid is the ID/UUID of selected options. |
meta_data[1][other_value][text] | String | Draft | The other value of second input. If it is select, the property text is the shown text of selected options. |
meta_data[1][field_name] | String | select_1 | The name of second input. |
meta_data[1][uuid] | String | 9c1f3601-5f28-4459-a4dd-236dfc540614 | The UUID of second field metadata in Forms. |
7. [POST] UPDATE Publication by PUBLICATION_UUID
# Here is a curl example
curl \
-X POST https://service.ibent95.my.id/svc-dynamic-form-symfony/public/api/v1/publications/e4c856a0-7351-4868-a92a-adfe94040f56
This API is used to get Form Metadata by Publication UUID, usually is used when submited publication is in update form. The API route:
https://service.ibent95.my.id/svc-dynamic-form-symfony/public/api/v1/publications/:publicationUUID
Result example :
{
"info": "success",
"message": "Success on save publication data!",
"data": []
}
QUERY PARAMETERS
No query parameter needed.
PATH PARAMETERS
Field | Type | Description |
---|---|---|
:publicationUUID | String | The UUID of publication (Exp: e4c856a0-7351-4868-a92a-adfe94040f56). |
BODY - form-data
Field | Type | Example Value | Description |
---|---|---|---|
publication_type_code | String | BOK-2 | The CODE of publication type. |
publication_status_code | String | PRO | The CODE of publication status. |
meta_data | Array | The array of inputs, all fields with available of name in it. There is an index number in it to wrap the group of data (value, other_value, field_name, uuid, etc). | |
meta_data[0][value] | String | ABC | The value of first input. |
meta_data[0][field_name] | String | text_1 | The name of first input. |
meta_data[0][uuid] | String | 37a006a3-2077-4370-9fe1-3a4b12c1074b | The UUID of first field metadata in Forms. |
meta_data[1][value] | String | 4bc22d41-4386-4f57-bf4d-dd51e993aa1e | The value of second input. If it is select, the value is the ID/UUID of selected options. |
meta_data[1][other_value][uuid] | String | 4bc22d41-4386-4f57-bf4d-dd51e993aa1e | The other value of second input. If it is select, the property uuid is the ID/UUID of selected options. |
meta_data[1][other_value][value] | String | 4bc22d41-4386-4f57-bf4d-dd51e993aa1e | The other value of second input. If it is select, the property uuid is the ID/UUID of selected options. |
meta_data[1][other_value][text] | String | Draft | The other value of second input. If it is select, the property text is the shown text of selected options. |
meta_data[1][field_name] | String | select_1 | The name of second input. |
meta_data[1][uuid] | String | 9c1f3601-5f28-4459-a4dd-236dfc540614 | The UUID of second field metadata in Forms. |
8. [DELETE] Remove Publication by PUBLICATION_UUID
# Here is a curl example
curl \
-X DELETE https://service.ibent95.my.id/svc-dynamic-form-symfony/public/api/v1/publications/368d2e69-52db-4761-a434-350940f63aea
This API is used to remove publication by Publication UUID. The API route:
https://service.ibent95.my.id/svc-dynamic-form-symfony/public/api/v1/publications/:publicationUUID
Result example :
{
"info": "success",
"message": "Success on delete publication data!",
"data": []
}
QUERY PARAMETERS
No query parameter needed.
PATH PARAMETERS
Field | Type | Description |
---|---|---|
:publicationUUID | String | The UUID of publication (Exp: e4c856a0-7351-4868-a92a-adfe94040f56). |
Master Data APIs
The Westeros API uses the following error codes:
Error Code | Meaning |
---|---|
X000 | Some parameters are missing. This error appears when you don't pass every mandatory parameters. |
X001 |
Unknown or unvalid secret_key . This error appears if you use an unknow API key or if your API key exp:red.
|
X002 |
Unvalid secret_key for this domain. This error appears if you use an API key non specified for your domain. Developper or Universal API keys doesn't have domain checker.
|
X003 |
Unknown or unvalid user token . This error appears if you use an unknow user token or if the user token exp:red.
|
1. [GET] Publication General Types
# Here is a curl example
curl \
-X GET https://service.ibent95.my.id/svc-dynamic-form-symfony/public/api/v1/master/publication-general-types
To get master data of Publication General Types. The API route :
https://service.ibent95.my.id/svc-dynamic-form-symfony/public/api/v1/master/publication-general-types
Result example :
{
"info": "success",
"message": "Success to get master data of publication general types!",
"data": [
{
"uuid": "fed02ab7-1f41-472b-b451-a893f0485e33",
"publication_general_type_name": "Book",
"publication_general_type_code": "BOK"
},
{
"uuid": "91aa58b3-46fa-4ae2-bac8-b2eda520fd09",
"publication_general_type_name": "Journal",
"publication_general_type_code": "JUR"
},
{
"uuid": "5bb3a2b0-d603-4bec-bc53-0e35d0034ae2",
"publication_general_type_name": "Proceedings",
"publication_general_type_code": "PRO"
}
]
}
QUERY PARAMETERS
No query parameter needed.
2. [GET] Publication Types
# Here is a curl example
curl \
-X GET https://service.ibent95.my.id/svc-dynamic-form-symfony/public/api/v1/master/publication-types
To get master data of Publication Types. The API route :
https://service.ibent95.my.id/svc-dynamic-form-symfony/public/api/v1/master/publication-types
Result example :
{
"info": "success",
"message": "Success to get master data of publication types!",
"data": [
{
"uuid": "a23892cd-6811-44bd-a671-c85b87829887",
"publication_type_name": "Book 1",
"publication_type_code": "BOK-1",
"publication_general_type": {
"uuid": "fed02ab7-1f41-472b-b451-a893f0485e33",
"publication_general_type_name": "Book",
"publication_general_type_code": "BOK"
}
},
{
"uuid": "4376fe79-b2bd-4178-bfd4-1ed1664a8f61",
"publication_type_name": "Book 2",
"publication_type_code": "BOK-2",
"publication_general_type": {
"uuid": "fed02ab7-1f41-472b-b451-a893f0485e33",
"publication_general_type_name": "Book",
"publication_general_type_code": "BOK"
}
},
{
"uuid": "4a12ddec-3183-4e12-ba34-7cd8c9771933",
"publication_type_name": "Journal 1",
"publication_type_code": "JUR-1",
"publication_general_type": {
"uuid": "91aa58b3-46fa-4ae2-bac8-b2eda520fd09",
"publication_general_type_name": "Journal",
"publication_general_type_code": "JUR"
}
}
]
}
QUERY PARAMETERS
No query parameter needed.
3. [GET] Publication Statuses
# Here is a curl example
curl \
-X GET https://service.ibent95.my.id/svc-dynamic-form-symfony/public/api/v1/master/publication-statuses
To get master data of Publication Statuses. The API route :
https://service.ibent95.my.id/svc-dynamic-form-symfony/public/api/v1/master/publication-statuses
Result example :
{
"info": "success",
"message": "Success to get master data of publication statuses!",
"data": [
{
"publication_status_name": "Draft",
"publication_status_code": "DRF",
"uuid": "4bc22d41-4386-4f57-bf4d-dd51e993aa1e"
},
{
"publication_status_name": "Processing",
"publication_status_code": "PRO",
"uuid": "2c5f13d8-cfbd-4d53-9311-356ca2f33ffd"
},
{
"publication_status_name": "Verified",
"publication_status_code": "VRF",
"uuid": "d3192561-8703-4801-8f34-06283b61fd1c"
},
{
"publication_status_name": "Rejected",
"publication_status_code": "RJT",
"uuid": "c2cb0ee7-a02e-43a6-8fbe-3a5d17254e47"
},
{
"publication_status_name": "Revision",
"publication_status_code": "RVS",
"uuid": "e2605a42-63fc-492f-8db8-955a6c7c3944"
}
]
}
QUERY PARAMETERS
No query parameter needed.