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. 

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

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

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.


{
    "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"
                        }
                    ]
                }
            ]
        }
    ]
}