Page XML API¶
The Page XML API is a REST API for the development and distribution of Skuid pages. You can access your Skuid page’s XML programmatically through the Page XML API without going through the Page Composer.
Some use cases include:
- Integrating your Skuid development process into an existing development workflow
- Pushing Skuid pages to target orgs as part of a Continuous Integration/deployment process
- Deploying individual pages into a target org. This method allows you to avoid using Page Packs and copying/pasting XML into new pages in the target org.
You can interact with the Page XML API by using your preferred development tool or by using skuid-sfdx, a tool designed specifically for extending your development processes to Skuid pages.
Prerequisites¶
- You must have Skuid version 7.31(Banzai) or later installed.
- You must use Salesforce® Connected App Client ID/Secret for authentication.
API Reference¶
Page Definition Schema¶
1 2 3 4 5 6 7 8 9 10 | {
"uniqueId": "Module1_PageName",
"type": "Desktop",
"name": "PageName",
"maxAutoSaves": 25,
"masterPageUniqueId": null,
"isMasterPage": false,
"composerSettings": null,
"body": "<skuidpage></skuidpage>"
}
|
POST /skuid/api/v1/pages¶
Create, update or delete Skuid pages from your org. POSTing to this route will allow you to handle most deployment scenarios. Sending “page” objects in the changes parameter will upsert pages on Unique ID, updating existing pages and creating new ones, if necessary.
Request Parameters
‘changes’
- Type: string or array
- Required: false
- Default: array
- Array of page definitions to be created/updated
‘deleted’
- Type: string (CSV) or array
- Required: false
- Default: array
- Array of page unique IDs to be deleted
1 | ["Module1_DeletedPage1", "Module2_DeletedPage1"]
|
GET /skuid/api/v1/pages¶
Get a list or Page Pack of your Skuid pages including metadata about your pages (See Page Definition Schema). IMPORTANT: Examples use nforce node module.
Request Parameters
‘as’
- Type: string
- Required: false
- Default: ‘json’
Output format requested. Supports json or pagePack. If json, the output will be a list of page definitions. If set to pagePack, the output will be stringified JSON, similar to web UI export. If you are integrating this into your Source Control workflow, it is recommended to use json and store the metadata separate from the XML to make it easier to distinguish diffs.
1 2 3 4 5 6 7 8 9 10 | //nforce authentication left out
var request = {
'uri': 'skuid/api/v1/pages',
'method': 'GET',
'urlParams': {'as': 'pagePack'}
};
org.apexRest(request)
.then(function(){
//do something with your Skuid Page Data!
});
|
‘module’
- Type: string or array
- Required: true
- List of modules to get. Currently, you have to specify non-module pages as ‘’to retrieve them”.
1 2 3 4 5 6 7 8 9 10 | //nforce authentication left out
var request = {
'uri': 'skuid/api/v1/pages',
'method': 'GET',
'urlParams': {'module': ['Module1']}
};
org.apexRest(request)
.then(function(){
//do something with your Skuid Page Data!
});
|