Drupal Connector v1.0
1. Setup Drupal Site

Provide site name and continue:

Select Drupal(Composer Managed) Deploy:

It will deploy new Drupal instance:


Goto site admin:

Configure Drupal setup:

2. JSON API & Authentication
JSON: API
Drupal comes with a built-in extension named JSON: API to enable its restful endpoints accessible. To make use of its APIs we need to install this extension to our Drupal application.
HTTP Basic Authentication
Drupal supports Basic Auth to authenticate requests. For this, we need to install its extension named HTTP Basic Authentication.
To enable Basic auth and enable JSON APIs for the Drupal website, go to Extend in the user menu, and at the end of the list in the Web Services mark and enable all four options and install them like below.
HTTP Basic Authentication
JSON: API
RESTful Web Services
Serialization

Enable JSON API rights:
Go to Manage > Configuration > JSON:API

Enable API access to create, update and delete.

3. Connector Action & Tests
Action Name / METHOD | Upload: Upload File (POST) | ||
---|---|---|---|
Action Description | Create a File (POST) into Drupal (https://www.drupal.org/docs/core-modules-and-themes/core-modules/jsonapi-module/file-uploads ) | ||
Request Body Name | Parameter | Type | Description |
| Accept | String | Accept parameter is used within file upload fields to specify the types of files that are allowed for upload e.g application/vnd.api+json |
- | Content-disposition | String | Content-Disposition is most commonly used to indicate an attachment, which includes metadata such as the filename e.g “file; filename="file_name.jpg" |
- | Content Type | String | application/octet-stream (default) |
| Field Name | String | "Field Name" parameter is used to specify the name of the field that will store the uploaded file data. It helps the system identify which field in the content type or entity will be used to hold the file information. e.g field_edocs_form (See section 4. Content Type below) |
| Node Type | String | Specify the content type here e.g Article (See section 4. Content Type below) |
Options | File | String |


Action Name / METHOD | Get Nodes (GET) | ||
---|---|---|---|
Action Description | Retrieve nodes from Drupal | ||
Request Body Name | Parameter | Type | Description |
| Node Type
| String | Filter node by type e.g fo, article (See section 4. Content Type below) |

Action Name / METHOD | Get Nodes (GET) | ||
---|---|---|---|
Action Description | Retrieve nodes from Drupal | ||
Request Body Name | Parameter | Type | Description |
| Node Type
| String | Filter node by type e.g fo, article (See section 4. Content Type below) |
| Node Type | String | Filter node by id |

Action Name / METHOD | Create File for Node (POST) | ||
---|---|---|---|
Action Description | Create a File for Node type (https://www.drupal.org/docs/core-modules-and-themes/core-modules/jsonapi-module/file-uploads ) | ||
Request Body Name | Parameter | Type | Description |
| Node Type | String | Node type can be Article, Product, fo(Form) (See section 4. Content Type below) |
| Accept | String | Accept parameter is used within file upload fields to specify the types of files that are allowed for upload e.g application/vnd.api+json |
- | Content-disposition | String | Content-Disposition is most commonly used to indicate an attachment, which includes metadata such as the filename e.g “file; filename="file_name.jpg" |
- | Content Type | String | application/octet-stream (default) |
| Field Name | String | "Field Name" parameter is used to specify the name of the field that will store the uploaded file data. It helps the system identify which field in the content type or entity will be used to hold the file information. e.g field_edocs_form |
Options | File | String |


Action Name / METHOD | Get File (GET) | ||
---|---|---|---|
Action Description | Retrieve file and download from Drupal. This action downloads the file on OneTeg and provides file path in output. | ||
Request Body Name | Parameter | Type | Description |
| Url
| String | Path of the file to retrieve and download |

4. Content Type Configurations
Content type section allows you to define and manage different types of content that can be created, displayed, and managed on your Drupal site. Each content type can have its own set of fields, display settings, and behavior, making it possible to customize the way content is handled. In OneTeg Drupal connector, we are getting Node Type and Field Name from this section.


5. Connection Settings and Configuration
Settings Parameters | Value | Description | Required (Y/N) | Default Value |
---|---|---|---|---|
Connector | Drupal | Connector Name | Y | Drupal |
Host Name |
| Endpoint required for performing CRUD | Y |
|
Authentication | Basic Auth | Type of authentication | Y |
|
Username | oneteg | User name | Y | oneteg |
Password | <password> | User password | Y | <password> |

