Get script names

To retrieve the script names of all available scripts for a specified database, use an HTTP GET method with the scripts API endpoint.

HTTP method

GET

URL

Format: /fmi/data/version/databases/database-name/scripts

version – the FileMaker Data API version requested can use v1, v2, or vLatest

database-name – the name of the hosted database

HTTP header

Authorization: Bearer session-token, where session-token is the unique X-FM-Data-Access-Token value for the database session

Parameters None
Response

A scripts array listing the script names and script folders, and a messages array showing an error code of 0.

For example:

Copy
{
    "response": {
        "scripts": [
            {
                "name": "GotoFirst",
                "isFolder": false
            },
            {
                "name": "A Folder",
                "isFolder": true,
                "folderScriptNames": [
                    {
                        "name": "script1",
                        "isFolder": false
                    },
                    {
                        "name": "-",
                        "isFolder": false
                    },
                    {
                        "name": "script2",
                        "isFolder": false
                    },
                    {
                        "name": "Another Folder",
                        "isFolder": true,
                        "folderScriptNames": [
                            {
                                "name": "script3",
                                "isFolder": false
                            }
                        ]
                    },
                    {
                        "name": "script4",
                        "isFolder": false
                    }
                ]
            }
        ]
    },
    "messages": [
        {
            "message": "OK"
            "code": "0"
        }
    ]
}

See Error responses.