BranchCSSResourceVersionList_Load_Query
#
Description#
This function is used to pull the CSS Resources for a specific branch.
Request Body Parameters#
Parameter |
Type | Description |
---|---|---|
count |
Number | Count is used to tell Miva how many CSS Resources you want returned. |
offset |
Offset | Used in conjunction with the Count parameter for paginating results of large datasets. Default is 0 . |
sort |
String | Field to sort results by. Available sorting fields listed below. Use - prefix for a descending sort. |
filter |
Object | Array of Object containing search filters. See usage here |
branch_name branch_id |
String Number |
Branch Name set as primary Branch ID set as primary |
changeset_id |
Number | Optional Changeset ID. If omitted, the response will include the CSS Resources from the head of the Branch. |
Supported Sort Columns#
One of these values would be passed in the sort request parameter to have the results sorted by that column. Value may be preceded by -
for a descending sort.
Sort | Description |
---|---|
id |
CSS Resource ID |
On Demand Columns#
Column |
Description |
---|---|
source |
Source Code for the template |
settings |
JSON Array of Object defining the settings for each template and component assigned to the page. |
linkedpages |
Will output array of all pages resource is output on, if not a global resource |
linkedresources |
If CSS is a Combined Resource, this ondemandcolumn will output an object of all CSS Resources linked to this Combined Resource. |
Response Parameters#
Parameter |
Type | Description |
---|---|---|
total_count |
Number | total_count is the total number of records that match your search criteria. |
start_offset |
Number | Number of the starting offset number of branches to return. |
id |
Number | Template Version ID |
res_id |
Number | Resource ID |
user_id |
Number | Admin User ID of the user who created the template version. |
code |
String | Resource Code |
type |
String | One of: L = local file, C = Combined Resource, E = External File, I = Inline |
is_global |
Boolean | Is Global Resource - Output on all pages |
active |
Boolean | Active Flag |
file |
String | Relative path to file |
templ_id |
Number | Set for Inline resources which have a linked page template. All other resources will have a 0 |
attributes |
Array | Array of Name/Value Pairs |
settings |
Array | JSON Array of Object defining the settings for each template and component assigned to the page. |
linkedpages |
Array | Array of linked pages if the resource is not output globally |
source |
String | CSS Resource Source |
linkedresources |
Array | Array of any linked resources if CSS resource is a Combined Resource |
Example Request#
{
"Store_Code": "{{Store_Code}}",
"Miva_Request_Timestamp": "{{$timestamp}}",
"Function": "BranchCSSResourceVersionList_Load_Query",
"Branch_Name": "Dev Branch",
"Count": 0,
"Offset": 0,
"Sort": "",
"Filter": [
{
"name": "ondemandcolumns",
"value": [
"source",
"settings",
"linkedpages",
"linkedresources"
]
}
]
}
Example Response#
{
"success": 1,
"data": {
"total_count": 13,
"start_offset": 0,
"data": [
{
"id": 44,
"res_id": 9,
"user_id": 0,
"code": "combofacets",
"type": "L",
"is_global": true,
"active": true,
"file": "css/00000001/b05/combofacets.css",
"templ_id": 0,
"attributes": [
{
"name": "type",
"value": "text/css"
},
{
"name": "media",
"value": "all"
},
{
"name": "rel",
"value": "stylesheet"
}
],
"linkedpages": [],
"source": ".mm_combination_facet_container{\n\tposition:relative;\n\tdisplay:block;\n\tpadding:15px;\n\tborder:1px solid #ddd;\n}\n\n",
"source_user_id": 0
}
]
}
}