Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ angular.module('dfApplication', ['dfUtility', 'dfUserManagement', 'ngResource'])
getSystemApisFromServer: function (api) {

return $http({
url: DSP_URL + '/rest/system/' + api.api_name,
url: DSP_URL + '/api/v1//system/' + api.api_name,
method: 'GET',
params: api.params
});
Expand All @@ -842,7 +842,7 @@ angular.module('dfApplication', ['dfUtility', 'dfUserManagement', 'ngResource'])

delete: function() {
return $http({
url: DSP_URL + '/rest/system/' + api,
url: DSP_URL + '/api/v1/system/' + api,
method: 'DELETE',
data: options.data
})
Expand All @@ -861,7 +861,7 @@ angular.module('dfApplication', ['dfUtility', 'dfUserManagement', 'ngResource'])
options = dfObjectService.mergeObjects(options, defaults);

// Return a resource for our service so we can just call the operation we want.
return $resource(DSP_URL + '/rest/system/:api/:id', {api: '@api', id: '@id'}, {
return $resource(DSP_URL + '/api/v1/system/:api/:id', {api: '@api', id: '@id'}, {

get: {
method: 'GET',
Expand Down
4 changes: 2 additions & 2 deletions app/admin_components/adf-data/dreamfactory-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ angular.module('dfData', ['ngRoute', 'dfUtility', 'dfTable'])
$scope.options = {
service: $scope.selected.service,
table: $scope.selected.resource,
url: DSP_URL + '/rest/' + $scope.selected.service + '/' + $scope.selected.resource,
url: DSP_URL + '/api/v1/' + $scope.selected.service + '/' + $scope.selected.resource,
allowChildTable: true,
childTableAttachPoint: '#child-table-attach'
};
Expand All @@ -115,7 +115,7 @@ angular.module('dfData', ['ngRoute', 'dfUtility', 'dfTable'])
var options = {
service: newValue.service,
table: newValue.resource,
url: DSP_URL + '/rest/' + newValue.service + '/' + newValue.resource,
url: DSP_URL + '/api/v1/' + newValue.service + '/' + newValue.resource,
allowChildTable: true,
childTableAttachPoint: '#child-table-attach'
};
Expand Down
2 changes: 1 addition & 1 deletion app/admin_components/adf-home/dreamfactory-home.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ angular.module('dfHome', ['ngRoute', 'dfUtility', 'dfApplication', 'dfHelp'])

scope.downloadSDK = function() {

window.top.location = location.protocol + '//' + location.host + '/rest/system/app/' + scope.app.record.id + '?sdk=true&app_name=admin';
window.top.location = location.protocol + '//' + location.host + '/api/v1/system/app/' + scope.app.record.id + '?sdk=true&app_name=admin';
};


Expand Down
4 changes: 2 additions & 2 deletions app/admin_components/adf-launchpad/dreamfactory-launchpad.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ angular.module('dfLaunchPad', ['ngRoute', 'dfUtility', 'dfTable'])
if (SystemConfigDataService.getSystemConfig().allow_guest_user && !UserDataService.getCurrentUser()) {

// We make a call to user session to get guest user apps
$http.get(DSP_URL + '/rest/user/session').then(
$http.get(DSP_URL + '/api/v1/user/session').then(
function (result) {

// we set the current user to the guest user
Expand Down Expand Up @@ -61,7 +61,7 @@ angular.module('dfLaunchPad', ['ngRoute', 'dfUtility', 'dfTable'])
if (UserDataService.getCurrentUser()) {

// We make a call to user session to get user apps
$http.get(DSP_URL + '/rest/user/session').then(
$http.get(DSP_URL + '/api/v1/user/session').then(
function (result) {

// we set the current user
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ angular.module('dfPackageManager', ['ngRoute', 'dfUtility'])

$http({
method: 'GET',
url: DSP_URL + '/rest/system/app/' + newValue.id,
url: DSP_URL + '/api/v1/system/app/' + newValue.id,
params: {
fields: '*',
related: 'app_service_relations'
Expand Down Expand Up @@ -433,7 +433,7 @@ angular.module('dfPackageManager', ['ngRoute', 'dfUtility'])

return $http({
method: "PUT",
url: DSP_URL + '/rest/system/app/' + scope.selectedApp.id,
url: DSP_URL + '/api/v1/system/app/' + scope.selectedApp.id,
params: requestDataObj.params,
data: requestDataObj.data
})
Expand Down Expand Up @@ -473,7 +473,7 @@ angular.module('dfPackageManager', ['ngRoute', 'dfUtility'])
scope._updateAppsToService(requestDataObj).then(
function(result) {

var exportUrl = DSP_URL + '/rest/system/app/' + scope.selectedApp.id + '?app_name=admin&pkg=true';
var exportUrl = DSP_URL + '/api/v1/system/app/' + scope.selectedApp.id + '?app_name=admin&pkg=true';


if (scope.includeAppFiles) {
Expand Down
6 changes: 3 additions & 3 deletions app/admin_components/adf-profile/dreamfactory-profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,15 @@ angular.module('dfProfile', ['ngRoute', 'dfUtility', 'dfUserManagement', 'dfAppl

return $http({
method: 'GET',
url: DSP_URL + '/rest/user/profile'
url: DSP_URL + '/api/v1/user/profile'
})
};

scope._updateUserToServer = function (requestDataObj) {

return $http({
method: 'POST',
url: DSP_URL + '/rest/user/profile',
url: DSP_URL + '/api/v1/user/profile',
data: requestDataObj.data
})
};
Expand All @@ -159,7 +159,7 @@ angular.module('dfProfile', ['ngRoute', 'dfUtility', 'dfUserManagement', 'dfAppl

return $http({
method: 'POST',
url: DSP_URL + '/rest/user/password',
url: DSP_URL + '/api/v1/user/password',
params: requestDataObj.params,
data: requestDataObj.data
})
Expand Down
22 changes: 11 additions & 11 deletions app/admin_components/adf-schema/dreamfactory-schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ angular.module('dfSchema', ['ngRoute', 'dfUtility'])

return $http({
method: 'GET',
url: DSP_URL + '/rest/'+ $scope.currentService.api_name + '/' + requestDataObj.componentPath,
url: DSP_URL + '/api/v1/'+ $scope.currentService.api_name + '/' + requestDataObj.componentPath,
params: {
refresh: true
}
Expand All @@ -277,22 +277,22 @@ angular.module('dfSchema', ['ngRoute', 'dfUtility'])

return $http({
method: 'DELETE',
url: DSP_URL + '/rest/' + $scope.currentService.api_name + '/' + requestDataObj.tablePath
url: DSP_URL + '/api/v1/' + $scope.currentService.api_name + '/' + requestDataObj.tablePath
})
};

$scope._saveSchemaToServer = function (requestDataObj) {

return $http({
method: 'POST',
url: DSP_URL + '/rest/' + $scope.currentService.api_name + '/_schema',
url: DSP_URL + '/api/v1/' + $scope.currentService.api_name + '/_schema',
data: requestDataObj.data
})
};

$scope._refreshServiceFromServer = function () {

return $http.get(DSP_URL + '/rest/' + $scope.currentService.api_name + '/_schema', {params: {refresh: true, fields: 'name'}});
return $http.get(DSP_URL + '/api/v1/' + $scope.currentService.api_name + '/_schema', {params: {refresh: true, fields: 'name'}});
};


Expand Down Expand Up @@ -690,7 +690,7 @@ angular.module('dfSchema', ['ngRoute', 'dfUtility'])

return $http({
method: 'POST',
url: DSP_URL + '/rest/' + requestDataObj.path,
url: DSP_URL + '/api/v1/' + requestDataObj.path,
data: requestDataObj.data
})
};
Expand All @@ -699,7 +699,7 @@ angular.module('dfSchema', ['ngRoute', 'dfUtility'])

return $http({
method: 'PUT',
url: DSP_URL + '/rest/' + requestDataObj.path,
url: DSP_URL + '/api/v1/' + requestDataObj.path,
data: requestDataObj.data
})
};
Expand All @@ -708,7 +708,7 @@ angular.module('dfSchema', ['ngRoute', 'dfUtility'])

return $http({
method: 'DELETE',
url: DSP_URL + '/rest/' + requestDataObj.path
url: DSP_URL + '/api/v1/' + requestDataObj.path
})

}
Expand Down Expand Up @@ -1107,7 +1107,7 @@ angular.module('dfSchema', ['ngRoute', 'dfUtility'])
// PRIVATE API
scope._loadReferenceTables = function () {

$http.get(DSP_URL + '/rest/' + scope.fieldData.currentService.api_name + '/_schema/').then(
$http.get(DSP_URL + '/api/v1/' + scope.fieldData.currentService.api_name + '/_schema/').then(

function (result) {
scope.field.record.ref_tables = result.data.resource;
Expand Down Expand Up @@ -1138,7 +1138,7 @@ angular.module('dfSchema', ['ngRoute', 'dfUtility'])
return;
}

$http.get(DSP_URL + '/rest/' + scope.fieldData.currentService.api_name + '/_schema/' + scope.field.record.ref_table).then(
$http.get(DSP_URL + '/api/v1/' + scope.fieldData.currentService.api_name + '/_schema/' + scope.field.record.ref_table).then(
function (result) {

scope.refFields = result.data.field;
Expand Down Expand Up @@ -1169,7 +1169,7 @@ angular.module('dfSchema', ['ngRoute', 'dfUtility'])
delete recordObj.ref_tables;

return $http({
url: DSP_URL + '/rest/' + scope.fieldData.currentService.api_name + '/_schema/' + scope.currentTable + '/' + recordObj.name,
url: DSP_URL + '/api/v1/' + scope.fieldData.currentService.api_name + '/_schema/' + scope.currentTable + '/' + recordObj.name,
method: 'PATCH',
data: recordObj
})
Expand Down Expand Up @@ -1237,7 +1237,7 @@ angular.module('dfSchema', ['ngRoute', 'dfUtility'])
}


$http.get(DSP_URL + '/rest/' + scope.fieldData.currentService.api_name + '/_schema/' + scope.field.record.ref_table).then(
$http.get(DSP_URL + '/api/v1/' + scope.fieldData.currentService.api_name + '/_schema/' + scope.field.record.ref_table).then(
function (result) {

scope.refFields = result.data.field
Expand Down
10 changes: 5 additions & 5 deletions app/admin_components/adf-scripts/dreamfactory-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ angular.module('dfScripts', ['ngRoute', 'dfUtility'])
// PRIVATE API

// Dynamically create event names on the client because no one thought it
// would be a good idea to build that list on the server and send it on a GET /rest/script
// would be a good idea to build that list on the server and send it on a GET /api/v1/script
$scope._createEvents = function(event, associatedData) {

// returns an empty Path Object
Expand Down Expand Up @@ -444,7 +444,7 @@ angular.module('dfScripts', ['ngRoute', 'dfUtility'])

return $http({
method: 'GET',
url: DSP_URL + '/rest/' + requestDataObj.eventName,
url: DSP_URL + '/api/v1/' + requestDataObj.eventName,
params: requestDataObj.params
})

Expand All @@ -455,7 +455,7 @@ angular.module('dfScripts', ['ngRoute', 'dfUtility'])

return $http({
method: 'GET',
url: DSP_URL + '/rest/system/script/' + requestDataObj.script_id,
url: DSP_URL + '/api/v1/system/script/' + requestDataObj.script_id,
params: requestDataObj.params
})
};
Expand All @@ -465,7 +465,7 @@ angular.module('dfScripts', ['ngRoute', 'dfUtility'])

return $http({
method: 'PUT',
url: DSP_URL + '/rest/system/script/' + requestDataObj.script_id,
url: DSP_URL + '/api/v1/system/script/' + requestDataObj.script_id,
headers: {
'Content-Type': 'text/plain'
},
Expand All @@ -479,7 +479,7 @@ angular.module('dfScripts', ['ngRoute', 'dfUtility'])

return $http({
method: 'DELETE',
url: DSP_URL + '/rest/system/script/' + requestDataObj.script_id,
url: DSP_URL + '/api/v1/system/script/' + requestDataObj.script_id,
params: requestDataObj.params
})
};
Expand Down
8 changes: 4 additions & 4 deletions app/admin_components/adf-scripts/examples/example.scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//****************** Working with System Events ******************

// system.users.list.js
// A script to be run when the event 'system.users.list' is triggered by a GET on /rest/system/user
// A script to be run when the event 'system.users.list' is triggered by a GET on /api/v1/system/user

var ENABLE_ADD_PROPERTY = true;

Expand All @@ -18,7 +18,7 @@ if (event.request.body.record) {
}

// system.apps.create.js
// A script to be run when the event 'system.apps.create' is triggered by a POST to /rest/system/app
// A script to be run when the event 'system.apps.create' is triggered by a POST to /api/v1/system/app

// Inspect the inbound request
if (event.request.body.record) {
Expand All @@ -31,7 +31,7 @@ if (event.request.body.record) {
//****************** Local Database Events ******************

// db.todo.select.js
// A script to be run when the event 'db.todo.select' is triggered by a GET to /rest/db/todo
// A script to be run when the event 'db.todo.select' is triggered by a GET to /api/v1/db/todo

// Rename all outbound to-do items to be the same string
if (event.request.body.record) {
Expand All @@ -41,7 +41,7 @@ if (event.request.body.record) {
}

// db.todo.insert.js
// A script to be run when the event 'db.todo.select' is triggered by a POST to /rest/db/todo
// A script to be run when the event 'db.todo.select' is triggered by a POST to /api/v1/db/todo

if (event.request.body.record) {
// Loop through the record array and add a complete indicator
Expand Down
4 changes: 2 additions & 2 deletions app/admin_components/adf-services/dreamfactory-services.js
Original file line number Diff line number Diff line change
Expand Up @@ -1244,7 +1244,7 @@ angular.module('dfServices', ['ngRoute', 'dfUtility', 'dfServiceTemplates', 'dfS
},
apiName: {
title: 'Api Name ',
text: 'Select a name for making API requests, such as \'db\' in /rest/db.'
text: 'Select a name for making API requests, such as \'db\' in /api/v1/db.'
},
name: {
title: 'Name ',
Expand All @@ -1257,7 +1257,7 @@ angular.module('dfServices', ['ngRoute', 'dfUtility', 'dfServiceTemplates', 'dfS
baseUrl: {
title: 'Base Url ',
text: 'Specify the base URL for the remote web service. For example, if you named the API \'mydb\'' +
' and the base URL is http://api.myservice.com/v1/api/, then a REST call to /rest/mydb/mytable' +
' and the base URL is http://api.myservice.com/v1/api/, then a REST call to /api/v1/mydb/mytable' +
' would tell DreamFactory to call http://api.myservice.com/v1/api/mydb/mytable.'
},
userName: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1171,7 +1171,7 @@ angular.module('dfSystemConfig', ['ngRoute', 'dfUtility', 'dfApplication'])
xhr = new ActiveXObject("Microsoft.XMLHTTP");
}

xhr.open("GET", DSP_URL + '/rest/system/config', false);
xhr.open("GET", DSP_URL + '/api/v1/system/config', false);
xhr.setRequestHeader("X-DreamFactory-Application-Name", "admin");
xhr.setRequestHeader("Content-Type", "application/json");

Expand Down
4 changes: 2 additions & 2 deletions app/admin_components/adf-table/dreamfactory-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -2954,7 +2954,7 @@ angular.module('dfTable', ['dfUtility'])

scope._buildURL = function (serviceNameStr, tableNameStr) {

return DSP_URL + '/rest/' + serviceNameStr + '/' + tableNameStr
return DSP_URL + '/api/v1/' + serviceNameStr + '/' + tableNameStr
};

scope.relatedOptions = {
Expand Down Expand Up @@ -3164,7 +3164,7 @@ angular.module('dfTable', ['dfUtility'])
var options = {
service: scope._setSystemService(newValue.ref_table),
table: newValue.ref_table,
url: DSP_URL + '/rest/' + scope._setSystemService(newValue.ref_table) + '/' + scope._parseSystemTableName(newValue.ref_table),
url: DSP_URL + '/api/v1/' + scope._setSystemService(newValue.ref_table) + '/' + scope._parseSystemTableName(newValue.ref_table),
params: {
filter: newValue.ref_field + ' = ' + scope.childTableParentRecord[newValue.field]
}
Expand Down
Loading