--- title: "REST Services Source" slug: "rest-services-source" updated: 2026-08-18T13:40:06Z published: 2026-08-18T13:40:06Z canonical: "docs.plainid.io/rest-services-source" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.plainid.io/llms.txt > Use this file to discover all available pages before exploring further. # REST Services Source Policy Information Point (PIP) Settings allow you to configure Data Sources that provide essential information for Policy decisions. In many cases, the Data Source you need to integrate with provides the data through a REST service that exposes different endpoints serving subsets of the data. In some cases, these services are your internal application’s self-developed services, where you have more control over the integration pattern and the available endpoints. In other cases, there are third-party REST services solutions you are using in your organization that manage some of your data. This guide focuses on setting up REST Service Data Sources, enabling you to integrate external REST APIs into your Policy Authorization process. ## Configuring the REST Service Data Source ### Prerequisites Before configuring a REST Service Data Source, ensure that you have: - Appropriate permissions in your tenant - Basic understanding of REST APIs and JSON - Knowledge of SQL syntax for defining data structures ### General The configuration of a REST data source includes the settings required to make a valid REST request to your service. It also includes a guide on managing the response from your service and transforming it from JSON to a relational data structure. The overall setup includes: - A declaration of a virtual table - A definition of Data Attributes fetched from the REST service response - Optional `OPTIONS` clause for each Data Attribute - The Base URL of the service - Authentication to the service - The service endpoint’s URI - A REST Method - The location of the relevant data in the service response - `OPTIONS` clause with additional configurations influencing the REST request and response - Additional translator properties configuring the translator behavior ### To Configure a Data Source: 1. Open the Tenant or Environment Settings screen and select the PIP Settings tile. 2. In the Policy Authorization Group drop-down menu, select the relevant PAA. A list of Data Sources and Views are displayed. 3. In the Data Source List, click **New Data Source**. 4. In the Data Source Details section: - Enter a Display Name for the new Data Source. - In the Connection Adapter dropdown, select **REST**. - In the Connection Settings section under Policy Authorization Agent, select a PAA. - Input your REST service's base URL in the designated End Point field. For example: `https://domain.com/data`. - You also have the option to specify a mock server's base URL, which can assist in designing and testing an integration when developing a new use case. - In the Models section under the Model Name field, input a unique Model name. - Under the DDL section, write a valid DDL to fetch REST attributes according to the service response. Refer to the section on [Configuring a DDL](/v1/docs/rest-services-source#configuring-a-ddl-for-the-rest-service) for more information. *Note: If using OAuth 2 as a Security Type in the Connection Settings, select None from the dropdown, and see the full [OAuth 2](/docs/oauth2-authentication-support) instructions on setting up this authentication method.* ## Configuring a DDL for the REST Service The structure of a DDL includes the declaration of the table, declaration of all attributes, and an optional `OPTION` property. The DDL defines the data structure that the REST Service creates. It details Attributes and their options, and allows users to configure the REST request options. This configuration determines how a request is generated and executed in addition to how to handle and parse the response. When inputting a DDL property, ensure that you specify the name of the attribute and the type. You can add a `nameinsource` option in the `OPTIONS` clause if indicating a specific location in the response structure using a JSONPath. You can configure the path by utilizing the relative path to the general Data Source path when you have a general path set and you want to specify the property relative to this base path. This is helpful when the base path can change, but the relative path to the property remains consistent. E.g. If the general base path is `$.data.user`, then simply specify the name to get the user’s name. #### Example Usage ``` { "data": { "user": { "id": 123, "name": "John Doe" } } } ``` - **Relative Path** (with general path `$.data.user`): `name` ### DDL Structure The basic structure of a DDL for the REST Service is as follows: #### OPTIONS Clause Structure See available options [here](/v1/docs/rest-services-source#available-options-in-the-ddl). ``` OPTIONS (nameinsource "