Skip to content

JavaScriptResourceList_Load_Query#


Description#

This function loads a list of JS resources for a store. These are JS files and inline JS scripts that are available in Miva In-Admin JS Resource Management Tool.

The files returned and their active/inactive status will be based on the production template branch

Example Request#

{
    "Store_Code": "{{Store_Code}}",
    "Miva_Request_Timestamp": "{{$timestamp}}",
    "Function": "JavaScriptResourceList_Load_Query",
    "Count": 0,
    "Offset": 0,
    "Sort": "id",
    "Filter": [
        {
            "name": "search",
            "value": [
                {
                    "field": "active",
                    "operator": "TRUE"
                }
            ]
        }
    ]
}

Example Response#

{
    "success": 1,
    "data": {
        "total_count": 20,
        "start_offset": 0,
        "data": [
            {
                "id": 1,
                "code": "settings",
                "type": "I",
                "is_global": true,
                "active": true,
                "file": "",
                "templ_id": 465,
                "attributes": []
            },
            {
                "id": 2,
                "code": "core",
                "type": "L",
                "is_global": true,
                "active": true,
                "file": "themes/00000001/shadows/core.js",
                "templ_id": 0,
                "attributes": []
            },
            {
                "id": 3,
                "code": "extensions",
                "type": "L",
                "is_global": true,
                "active": true,
                "file": "themes/00000001/shadows/extensions.js",
                "templ_id": 0,
                "attributes": []
            },
            {
                "id": 4,
                "code": "theme",
                "type": "L",
                "is_global": true,
                "active": true,
                "file": "themes/00000001/shadows/theme.js",
                "templ_id": 0,
                "attributes": []
            },
            {
                "id": 5,
                "code": "contact",
                "type": "L",
                "is_global": false,
                "active": true,
                "file": "themes/00000001/shadows/extensions/contact/contact.js",
                "templ_id": 0,
                "attributes": []
            },
            {
                "id": 7,
                "code": "scripts",
                "type": "C",
                "is_global": true,
                "active": true,
                "file": "",
                "templ_id": 0,
                "attributes": []
            },
            {
                "id": 8,
                "code": "product-json-ld",
                "type": "I",
                "is_global": false,
                "active": true,
                "file": "",
                "templ_id": 467,
                "attributes": [
                    {
                        "name": "type",
                        "value": "application/ld+json"
                    }
                ]
            },
            {
                "id": 9,
                "code": "edit-basket-attributes",
                "type": "I",
                "is_global": false,
                "active": true,
                "file": "",
                "templ_id": 468,
                "attributes": []
            },
            {
                "id": 10,
                "code": "mmx-base",
                "type": "L",
                "is_global": false,
                "active": true,
                "file": "themes/00000001/shadows/mmx/mmx-base/scripts.js",
                "templ_id": 0,
                "attributes": [
                    {
                        "name": "type",
                        "value": "text/javascript"
                    }
                ]
            },
            {
                "id": 11,
                "code": "mmx-text",
                "type": "L",
                "is_global": false,
                "active": true,
                "file": "themes/00000001/shadows/mmx/mmx-text/scripts.js",
                "templ_id": 0,
                "attributes": [
                    {
                        "name": "type",
                        "value": "text/javascript"
                    }
                ]
            }
        ]
    }
}