Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
SharePoint REST script library for obtaining common paths in client-side SharePoint 2013 development.
(function() {
var module = {
getAppAbsoluteUrl: getAppAbsoluteUrl,
getAppRelativeUrl: getAppRelativeUrl,
getAppODataApiUrl: getAppODataApiUrl
return module;
function getAppAbsoluteUrl() {
return _spPageContextInfo.webAbsoluteUrl;
function getAppRelativeUrl() {
return _spPageContextInfo.webServerRelativeUrl;
function getAppODataApiUrl() {
return getAppAbsoluteUrl() + "/_api";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.