---
id: show-preview-data-source
sidebar_label: Preview form definition data source.
hide_title: true
hide_table_of_contents: true
api: {"tags":["Custom Forms"],"operationId":"showPreviewDataSource","parameters":[{"name":"formDefinitionID","in":"path","description":"Form definition ID","required":true,"schema":{"type":"string","x-go-name":"FormDefinitionID"},"example":"00000000-0000-0000-0000-000000000000","x-go-name":"FormDefinitionID"},{"name":"limit","in":"query","description":"Limit\n\nInteger specifying the maximum number of records to return in a single API call. The standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#paginating-results).\nIf it is not specified, a default limit is used.","schema":{"type":"integer","format":"int64","maxLength":250,"minLength":0,"default":10,"x-go-name":"Limit"},"example":10,"required":false,"x-go-name":"Limit"},{"name":"filters","in":"query","description":"Filters\n\nFilter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results)\nFiltering is supported for the following fields and operators:\nvalue: eq, gt, sw, in\nlabel: eq, gt, sw, in\nsubLabel: eq, gt, sw, in","schema":{"type":"string","x-go-name":"Filters"},"example":"label sw \"my label\"","required":false,"x-go-name":"Filters"},{"name":"query","in":"query","description":"Query\n\nString specifying to query against","schema":{"type":"string","x-go-name":"Query"},"example":"support","required":false,"x-go-name":"Query"}],"requestBody":{"description":"Body is the request payload to create a form definition dynamic schema","content":{"application/json":{"schema":{"properties":{"dataSource":{"properties":{"config":{"properties":{"aggregationBucketField":{"description":"AggregationBucketField is the aggregation bucket field name","example":"attributes.cloudStatus.exact","type":"string","x-go-name":"AggregationBucketField"},"indices":{"description":"Indices is a list of indices to use","example":["identities"],"items":{"enum":["accessprofiles","accountactivities","entitlements","identities","events","roles","*"],"type":"string","x-go-enum-desc":"accessprofiles SearchIndexAccessProfiles\naccountactivities SearchIndexAccountActivities\nentitlements SearchIndexEntitlements\nidentities SearchIndexIdentities\nevents SearchIndexEvents\nroles SearchIndexRoles\n* SearchIndexWildcard"},"type":"array","x-go-name":"Indices"},"objectType":{"description":"ObjectType is a PreDefinedSelectOption value\nIDENTITY PreDefinedSelectOptionIdentity\nACCESS_PROFILE PreDefinedSelectOptionAccessProfile\nSOURCES PreDefinedSelectOptionSources\nROLE PreDefinedSelectOptionRole\nENTITLEMENT PreDefinedSelectOptionEntitlement","enum":["IDENTITY","ACCESS_PROFILE","SOURCES","ROLE","ENTITLEMENT"],"example":"IDENTITY","type":"string","x-go-enum-desc":"IDENTITY PreDefinedSelectOptionIdentity\nACCESS_PROFILE PreDefinedSelectOptionAccessProfile\nSOURCES PreDefinedSelectOptionSources\nROLE PreDefinedSelectOptionRole\nENTITLEMENT PreDefinedSelectOptionEntitlement","x-go-name":"ObjectType"},"query":{"description":"Query is a text","example":"*","type":"string","x-go-name":"Query"}},"type":"object","x-go-package":"github.com/sailpoint/sp-forms/domain"},"dataSourceType":{"description":"DataSourceType is a FormElementDataSourceType value\nSTATIC FormElementDataSourceTypeStatic\nINTERNAL FormElementDataSourceTypeInternal\nSEARCH FormElementDataSourceTypeSearch","enum":["STATIC","INTERNAL","SEARCH"],"example":"STATIC","type":"string","x-go-enum-desc":"STATIC FormElementDataSourceTypeStatic\nINTERNAL FormElementDataSourceTypeInternal\nSEARCH FormElementDataSourceTypeSearch","x-go-name":"DataSourceType"}},"type":"object","x-go-package":"github.com/sailpoint/sp-forms/domain"}},"type":"object","x-go-package":"github.com/sailpoint/sp-forms/domain"}}},"required":false},"responses":{"200":{"description":"Returns a preview of a form definition data source","content":{"application/json":{"schema":{"description":"PreviewDataSourceResponse is the response sent by /form-definitions/{formDefinitionID}/data-source endpoint","properties":{"results":{"description":"Results holds a list of FormElementDataSourceConfigOptions items","example":"{\"results\":[{\"label\":\"Alfred 255e71dfc6e\",\"subLabel\":\"Alfred.255e71dfc6e@testmail.identitysoon.com\",\"value\":\"2c918084821847c5018227ced2e16676\"},{\"label\":\"Alize eba9d4cd27da\",\"subLabel\":\"Alize.eba9d4cd27da@testmail.identitysoon.com\",\"value\":\"2c918084821847c5018227ced2f1667c\"},{\"label\":\"Antonina 01f69c3ea\",\"subLabel\":\"Antonina.01f69c3ea@testmail.identitysoon.com\",\"value\":\"2c918084821847c5018227ced2f9667e\"},{\"label\":\"Ardella 21e78ce155\",\"subLabel\":\"Ardella.21e78ce155@testmail.identitysoon.com\",\"value\":\"2c918084821847c5018227ced2e6667a\"},{\"label\":\"Arnaldo d8582b6e17\",\"subLabel\":\"Arnaldo.d8582b6e17@testmail.identitysoon.com\",\"value\":\"2c918084821847c5018227ced3426686\"},{\"label\":\"Aurelia admin24828\",\"subLabel\":\"Aurelia.admin24828@testmail.identitysoon.com\",\"value\":\"2c918084821847c5018227ced2e16674\"},{\"label\":\"Barbara 72ca418fdd\",\"subLabel\":\"Barbara.72ca418fdd@testmail.identitysoon.com\",\"value\":\"2c918084821847c5018227ced2fb6680\"},{\"label\":\"Barbara ee1a2436ee\",\"subLabel\":\"Barbara.ee1a2436ee@testmail.identitysoon.com\",\"value\":\"2c918084821847c5018227ced2e56678\"},{\"label\":\"Baylee 652d72432f3\",\"subLabel\":\"Baylee.652d72432f3@testmail.identitysoon.com\",\"value\":\"2c91808582184782018227ced28b6aee\"},{\"label\":\"Brock e76b56ae4d49\",\"subLabel\":\"Brock.e76b56ae4d49@testmail.identitysoon.com\",\"value\":\"2c91808582184782018227ced28b6aef\"}]}","items":{"type":"object","properties":{"label":{"description":"Label is the main label to display to the user when selecting this option","type":"string","example":"regression-test-access-request-07c55dd6-3056-430a-86b5-fccc395bb6c5","x-go-name":"Label"},"subLabel":{"description":"SubLabel is the sub label to display below the label in diminutive styling to help describe or identify this option","type":"string","example":"","x-go-name":"SubLabel"},"value":{"description":"Value is the value to save as an entry when the user selects this option","type":"string","example":"e96674448eba4ca1ba04eee999a8f3cd","x-go-name":"Value"}},"x-go-package":"github.com/sailpoint/sp-forms/domain"},"type":"array","x-go-name":"Results"}},"type":"object","x-go-package":"github.com/sailpoint/sp-forms/domain"}}}},"400":{"description":"An error with the request occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detailCode":{"type":"string","x-go-name":"DetailCode"},"messages":{"type":"array","items":{"title":"ErrorMessage is the standard API error response message type.","type":"object","properties":{"locale":{"description":"Locale is the current Locale","example":"en-US","type":"string","x-go-name":"Locale"},"localeOrigin":{"description":"LocaleOrigin holds possible values of how the locale was selected","example":"DEFAULT","type":"string","x-go-name":"LocaleOrigin"},"text":{"description":"Text is the actual text of the error message","example":"This is an error","type":"string","x-go-name":"Text"}},"x-go-package":"github.com/sailpoint/atlas-go/atlas/web"},"x-go-name":"Messages"},"statusCode":{"type":"integer","format":"int64","x-go-name":"StatusCode"},"trackingId":{"type":"string","x-go-name":"TrackingID"}}}}}},"401":{"description":"An error with the authorization occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detailCode":{"type":"string","x-go-name":"DetailCode"},"messages":{"type":"array","items":{"title":"ErrorMessage is the standard API error response message type.","type":"object","properties":{"locale":{"description":"Locale is the current Locale","example":"en-US","type":"string","x-go-name":"Locale"},"localeOrigin":{"description":"LocaleOrigin holds possible values of how the locale was selected","example":"DEFAULT","type":"string","x-go-name":"LocaleOrigin"},"text":{"description":"Text is the actual text of the error message","example":"This is an error","type":"string","x-go-name":"Text"}},"x-go-package":"github.com/sailpoint/atlas-go/atlas/web"},"x-go-name":"Messages"},"statusCode":{"type":"integer","format":"int64","x-go-name":"StatusCode"},"trackingId":{"type":"string","x-go-name":"TrackingID"}}}}}},"403":{"description":"An error with the user permissions occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detailCode":{"type":"string","x-go-name":"DetailCode"},"messages":{"type":"array","items":{"title":"ErrorMessage is the standard API error response message type.","type":"object","properties":{"locale":{"description":"Locale is the current Locale","example":"en-US","type":"string","x-go-name":"Locale"},"localeOrigin":{"description":"LocaleOrigin holds possible values of how the locale was selected","example":"DEFAULT","type":"string","x-go-name":"LocaleOrigin"},"text":{"description":"Text is the actual text of the error message","example":"This is an error","type":"string","x-go-name":"Text"}},"x-go-package":"github.com/sailpoint/atlas-go/atlas/web"},"x-go-name":"Messages"},"statusCode":{"type":"integer","format":"int64","x-go-name":"StatusCode"},"trackingId":{"type":"string","x-go-name":"TrackingID"}}}}}},"404":{"description":"An error with the item not found","content":{"application/json":{"schema":{"type":"object","properties":{"detailCode":{"type":"string","x-go-name":"DetailCode"},"messages":{"type":"array","items":{"title":"ErrorMessage is the standard API error response message type.","type":"object","properties":{"locale":{"description":"Locale is the current Locale","example":"en-US","type":"string","x-go-name":"Locale"},"localeOrigin":{"description":"LocaleOrigin holds possible values of how the locale was selected","example":"DEFAULT","type":"string","x-go-name":"LocaleOrigin"},"text":{"description":"Text is the actual text of the error message","example":"This is an error","type":"string","x-go-name":"Text"}},"x-go-package":"github.com/sailpoint/atlas-go/atlas/web"},"x-go-name":"Messages"},"statusCode":{"type":"integer","format":"int64","x-go-name":"StatusCode"},"trackingId":{"type":"string","x-go-name":"TrackingID"}}}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"title":"Error is the standard API error response type.","type":"object","properties":{"detailCode":{"description":"DetailCode is the text of the status code returned","example":"Internal Server Error","type":"string","x-go-name":"DetailCode"},"messages":{"type":"array","items":{"title":"ErrorMessage is the standard API error response message type.","type":"object","properties":{"locale":{"description":"Locale is the current Locale","example":"en-US","type":"string","x-go-name":"Locale"},"localeOrigin":{"description":"LocaleOrigin holds possible values of how the locale was selected","example":"DEFAULT","type":"string","x-go-name":"LocaleOrigin"},"text":{"description":"Text is the actual text of the error message","example":"This is an error","type":"string","x-go-name":"Text"}},"x-go-package":"github.com/sailpoint/atlas-go/atlas/web"},"x-go-name":"Messages"},"trackingId":{"description":"TrackingID is the request tracking unique identifier","example":"9cd03ef80e6a425eb6b11bdbb057cdb4","type":"string","x-go-name":"TrackingID"}},"x-go-package":"github.com/sailpoint/atlas-go/atlas/web"}}}},"500":{"description":"An internal server error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"detailCode":{"type":"string","x-go-name":"DetailCode"},"messages":{"type":"array","items":{"title":"ErrorMessage is the standard API error response message type.","type":"object","properties":{"locale":{"description":"Locale is the current Locale","example":"en-US","type":"string","x-go-name":"Locale"},"localeOrigin":{"description":"LocaleOrigin holds possible values of how the locale was selected","example":"DEFAULT","type":"string","x-go-name":"LocaleOrigin"},"text":{"description":"Text is the actual text of the error message","example":"This is an error","type":"string","x-go-name":"Text"}},"x-go-package":"github.com/sailpoint/atlas-go/atlas/web"},"x-go-name":"Messages"},"statusCode":{"type":"integer","format":"int64","x-go-name":"StatusCode"},"trackingId":{"type":"string","x-go-name":"TrackingID"}}}}}}},"security":[{"oauth2":["sp:forms:manage"]}],"description":"Preview form definition data source.","method":"post","path":"/form-definitions/{formDefinitionID}/data-source","servers":[{"url":"https://{tenant}.api.identitynow.com/beta","description":"This is the beta API server.","variables":{"tenant":{"default":"sailpoint","description":"This is the name of your tenant, typically your company's name."}}}],"securitySchemes":{"oauth2":{"type":"oauth2","description":"OAuth2 Bearer token (JWT). See [IdentityNow REST API Authentication](https://developer.sailpoint.com/idn/api/authentication) for more information.\n- Directions for generating a [personal access token](https://developer.sailpoint.com/idn/api/authentication#personal-access-tokens)\n- Directions using [client credentials flow](https://developer.sailpoint.com/idn/api/authentication#client-credentials-grant-flow)\n- Directions for using [authorization code flow](https://developer.sailpoint.com/idn/api/authentication#authorization-code-grant-flow)\n\nWhich authentication method should I choose? See our [guide](https://developer.sailpoint.com/idn/api/authentication#which-oauth-20-grant-flow-should-i-use)\n\nLearn more about how to find your `tokenUrl` and `authorizationUrl` [in our docs](https://developer.sailpoint.com/idn/api/authentication#find-your-tenants-oauth-details)\n","flows":{"clientCredentials":{"tokenUrl":"https://tenant.api.identitynow.com/oauth/token","scopes":{"sp:scopes:default":"default scope","sp:scopes:all":"access to all scopes"}},"authorizationCode":{"authorizationUrl":"https://tenant.identitynow.com/oauth/authorize","tokenUrl":"https://tenant.api.identitynow.com/oauth/token","scopes":{"sp:scopes:default":"default scope","sp:scopes:all":"access to all scopes"}}}}},"jsonRequestBodyExample":{"dataSource":{"config":{"aggregationBucketField":"attributes.cloudStatus.exact","indices":["identities"],"objectType":"IDENTITY","query":"*"},"dataSourceType":"STATIC"}},"info":{"title":"IdentityNow Beta API","description":"Use these APIs to interact with the IdentityNow platform to achieve repeatable, automated processes with greater scalability. These APIs are in beta and are subject to change. We encourage you to join the SailPoint Developer Community forum at https://developer.sailpoint.com/discuss to connect with other developers using our APIs.","termsOfService":"https://developer.sailpoint.com/discuss/tos","contact":{"name":"Developer Relations","url":"https://developer.sailpoint.com/discuss/api-help"},"license":{"name":"MIT","url":"https://opensource.org/licenses/MIT"},"version":"3.1.0-beta"},"postman":{"name":"Preview form definition data source.","description":{"type":"text/plain"},"url":{"path":["form-definitions",":formDefinitionID","data-source"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"Limit\n\nInteger specifying the maximum number of records to return in a single API call. The standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#paginating-results).\nIf it is not specified, a default limit is used.","type":"text/plain"},"key":"limit","value":""},{"disabled":false,"description":{"content":"Filters\n\nFilter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results)\nFiltering is supported for the following fields and operators:\nvalue: eq, gt, sw, in\nlabel: eq, gt, sw, in\nsubLabel: eq, gt, sw, in","type":"text/plain"},"key":"filters","value":""},{"disabled":false,"description":{"content":"Query\n\nString specifying to query against","type":"text/plain"},"key":"query","value":""}],"variable":[{"disabled":false,"description":{"content":"(Required) Form definition ID","type":"text/plain"},"type":"any","value":"","key":"formDefinitionID"}]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}},"auth":{"type":"oauth2","oauth2":[]}}}
sidebar_class_name: "post api-method"
info_path: idn/api/beta/identitynow-beta-api
custom_edit_url: "https://github.com/sailpoint-oss/developer.sailpoint.com/issues/new?assignees=&labels=&template=bug-report.md&title=%5BBug%5D+Your+Bug+Report+Here Requesting changes to 'Preview form definition data source.' (show-preview-data-source)"
---
import ApiTabs from "@theme/ApiTabs";
import MimeTabs from "@theme/MimeTabs";
import ParamsItem from "@theme/ParamsItem";
import ResponseSamples from "@theme/ResponseSamples";
import SchemaItem from "@theme/SchemaItem";
import SchemaTabs from "@theme/SchemaTabs";
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
import TabItem from "@theme/TabItem";
## Preview form definition data source.
Preview form definition data source.
Path Parameters
Query Parameters
Request Body
dataSource object
config object