Extracting Field Names of a Layout

In Adeptia Connect, you can extract the names of the fields in a Layout using an API Endpoint. The extracted list of fields' names is in JSON format.

To achieve this, hit the API Endpoint URL in the format given below using a REST client. 

Important

Ensure that you use GET method, and provide Adeptia Connect access token in headers for authorization.

<Gateway Url>/schemas/<SchemaType>/<schemaID>
Where,

  • Gateway Url: URL for accessing Adeptia Connect UI.
  • SchemaType:  The type of Layout, for example, text, whose field names you want to extract. The following table lists all the types of layouts and their respective values that you can use.
  • SchemaId:  Id of the Layout, for example, 1094877832922.
Schema TypeValue
Advanced Databaseadvancedb
Advanced Positionaladvancepositional
Advanced Textadvancetext
Databasedb
Excelexcel
IDocidoc
JSONjson
Positionalpositional
Texttext
XMLxml

Below is a sample URL for extracting the field names of an Advanced Database layout:

https://xyz.com/schemas/advancedb/1064770161933119413


The response of the API contains the field names of the requested Layout in the JSON format as shown in the sample response JSON below.

Sample_Schema_Fields_JSON_Format
{
    "text": "root",
    "entityName": "BooksDetails_CSV_Layout",
    "children": [
        {
            "fieldName": "Root",
            "XSDVersion": "1",
            "fieldSeparator": ",",
            "recordSeparator": "\\n",
            "allowLessFields": "false",
            "removeInvalidChar": "false",
            "enclosedChar": "",
            "MinOccurs": "1",
            "MaxOccurs": "1",
            "leaf": false,
            "children": [
                {
                    "fieldName": "Record",
                    "MinOccurs": "1",
                    "MaxOccurs": "unbounded",
                    "leaf": false,
                    "children": [
                        {
                            "fieldName": "Author",
                            "format": "AAAAAAA",
                            "parent": " ",
                            "Documentation": "",
                            "BaseType": "string",
                            "MinOccurs": "0",
                            "MaxOccurs": "1",
                            "leaf": true
                        },
                        {
                            "fieldName": "Title",
                            "format": "AAAAAAA",
                            "parent": " ",
                            "Documentation": "",
                            "BaseType": "string",
                            "MinOccurs": "0",
                            "MaxOccurs": "1",
                            "leaf": true
                        },
                        {
                            "fieldName": "Price",
                            "format": "AAAAAAA",
                            "parent": " ",
                            "Documentation": "",
                            "BaseType": "string",
                            "MinOccurs": "0",
                            "MaxOccurs": "1",
                            "leaf": true
                        },
                        {
                            "fieldName": "Genre",
                            "format": "AAAAAAA",
                            "parent": " ",
                            "Documentation": "",
                            "BaseType": "string",
                            "MinOccurs": "0",
                            "MaxOccurs": "1",
                            "leaf": true
                        },
                        {
                            "fieldName": "recordNumber",
                            "Documentation": "",
                            "isAttribute": "true",
                            "leaf": true,
                            "BaseType": "string"
                        }
                    ]
                }
            ]
        }
    ]
}