Syntax
REST API Endpoint:
https://SharePointSiteURL/_api/web?$select=AlternateCssUrl
https://SharePointSiteURL/_api/web?$select=AlternateCssUrl
REST API endpoint to use in Add-ins:
<appweburl>/_api/SP.AppContextSite(@target)/web?$select=AlternateCssUrl&@target=<hostweburl>
Embed Code Snippet
The following code snippet can be added to SharePoint page or in content editor web part as a script. This example is used to get the alternate css URL of a SharePoint site.
- <script type="text/javascript" src="/SiteAssets/Scripts/jquery.min.js"></script>
- <script type="text/javascript">
- $.ajax(
- {
- url: _spPageContextInfo.webAbsoluteUrl + "/_api/web?$select=alternatecssurl", //THE ENDPOINT
- method: "GET",
- headers:
- {
- "Accept": "application/json; odata=verbose"
- },
- success: function(data)
- {
- //RESULTS HERE!!
- console.log('Alternate Css URL: ' + data.d.AlternateCssUrl)
- alert('Alternate Css URL: ' + data.d.AlternateCssUrl);
- }
- });
- </script>
Add-in Code Snippet

Ketak BhalsingPosted May 26, 2016, 2:07 AM
Nice Info...
Gowtham RajamanickamPosted May 25, 2016, 1:18 AM
Good one..
Debasis SahaPosted May 24, 2016, 3:00 PM
Nice Sharing..