Project
-
Search Projects
GET /projects[.$format]?conditions.$field=$val&offset=$offset&limit=$limit&order=$order
var url = '/projects'; var params = {}; var field = $('select#project\\.search\\.condition-field').val(); var value = $('input#project\\.search\\.condition-value').val(); if (value) params['condition.' + field] = value; params.offset = $('input#project\\.search\\.offset').val(); params.limit = $('input#project\\.search\\.limit').val(); url += '.' + output_format; $.get(url, params, function(response) { if (output_format == 'json') { $('#project_search_status').text(response.status); if (response.status == 200 && response.projects) { $('#project_search_result').text(JSON.stringify(response.projects)); } else { $('#project_search_result').text(response.message); } } else { $('#project_search_status').text('(use JSON as your output format to see a status)'); $('#project_search_result').text(response); } }, (output_format == 'json') && 'json' || 'text');Click here to run the code.
Response
Projectsback to top
Status: (run the code to get a response status)
Value: (run the code to get a response value) -
Find a Project
GET /projects/$primary_key[.$format]
var url = '/projects'; var primary_key = prompt('Enter a primary key to find', ''); url += '/' + encodeURIComponent(primary_key); var params = {}; url += '.' + output_format; $.get(url, params, function(response) { if (output_format == 'json') { $('#project_find_status').text(response.status); if (response.status == 200 && response.project) { $('#project_find_result').text(JSON.stringify(response.project)); } else { $('#project_find_result').text(response.message); } } else { $('#project_find_status').text('(use JSON as your output format to see a status)'); $('#project_find_result').text(response); } }, (output_format == 'json') && 'json' || 'text');Click here to run the code.
Response
Projectback to top
Status: (run the code to get a response status)
Value: (run the code to get a response value) -
Edit a Project
PUT /projects/$primary_key[.$format]
var url = '/projects'; var primary_key = prompt('Enter a primary key to edit', ''); url += '/' + encodeURIComponent(primary_key); var form = $('form#project\\.edit\\.form'); $.get(url, function(response) { if (response.status != 200) { alert('Error: Project not found.'); return false; } $('input#project\\.edit\\.user_id').val(response.project.user_id); $('input#project\\.edit\\.date_deadline').val(response.project.date_deadline); $('input#project\\.edit\\.name').val(response.project.name); alert('When you are done editing the Project, submit the form.'); form.find('input[type=text]').removeAttr('disabled'); form.unbind().submit(function() { form.find('input[type=text]').attr('disabled', 'disabled'); $(this).find('input[type=submit], input[type=button]').remove(); process_edit(); return false; }); $('<' + 'input type="submit" value="Save" />').appendTo(form); $('<' + 'input type="button" value="Cancel" />').appendTo(form).click(function() { form.find('input[type=text]').attr('disabled', 'disabled'); form.find('input[type=submit], input[type=button]').remove(); return false; }); }, 'json'); var process_edit = function() { var params = {}; params.method = 'PUT'; params.user_id = $('input#project\\.edit\\.user_id').val(); params.date_deadline = $('input#project\\.edit\\.date_deadline').val(); params.name = $('input#project\\.edit\\.name').val(); url += '.' + output_format; $.post(url, params, function(response) { if (output_format == 'json') { $('#project_edit_status').text(response.status); if (response.status == 200 && response.project) { $('#project_edit_result').text(JSON.stringify(response.project)); } else { $('#project_edit_result').text(response.message); } } else { $('#project_edit_status').text('(use JSON as your output format to see a status)'); $('#project_edit_result').text(response); } }, (output_format == 'json') && 'json' || 'text'); };Click here to run the code.
Response
Projectback to top
Status: (run the code to get a response status)
Value: (run the code to get a response value) -
Create a Project
POST /projects/$primary_key[.$format]
var url = '/projects'; var params = {}; params.user_id = $('input#project\\.create\\.user_id').val(); params.date_deadline = $('input#project\\.create\\.date_deadline').val(); params.name = $('input#project\\.create\\.name').val(); url += '.' + output_format; $.post(url, params, function(response) { if (output_format == 'json') { $('#project_create_status').text(response.status); if (response.status == 200 && response.project) { $('#project_create_result').text(JSON.stringify(response.project)); } else { $('#project_create_result').text(response.message); } } else { $('#project_create_status').text('(use JSON as your output format to see a status)'); $('#project_create_result').text(response); } }, (output_format == 'json') && 'json' || 'text');Click here to run the code.
Response
Projectback to top
Status: (run the code to get a response status)
Value: (run the code to get a response value) -
Delete a Project
DELETE /projects/$primary_key[.$format]
var url = '/projects'; var primary_key = prompt('Enter a primary key to delete', ''); url += '/' + encodeURIComponent(primary_key); var params = {}; params.method = 'DELETE'; url += '.' + output_format; $.post(url, params, function(response) { if (output_format == 'json') { $('#project_delete_status').text(response.status); if (response.status == 200 && response.project) { $('#project_delete_result').text(JSON.stringify(response.project)); } else { $('#project_delete_result').text(response.message); } } else { $('#project_delete_status').text('(use JSON as your output format to see a status)'); $('#project_delete_result').text(response); } }, (output_format == 'json') && 'json' || 'text');Click here to run the code.
Response
Projectback to top
Status: (run the code to get a response status)
Value: (run the code to get a response value)
Task
-
Search Tasks
GET /tasks[.$format]?conditions.$field=$val&offset=$offset&limit=$limit&order=$order
var url = '/tasks'; var params = {}; var field = $('select#task\\.search\\.condition-field').val(); var value = $('input#task\\.search\\.condition-value').val(); if (value) params['condition.' + field] = value; params.offset = $('input#task\\.search\\.offset').val(); params.limit = $('input#task\\.search\\.limit').val(); url += '.' + output_format; $.get(url, params, function(response) { if (output_format == 'json') { $('#task_search_status').text(response.status); if (response.status == 200 && response.tasks) { $('#task_search_result').text(JSON.stringify(response.tasks)); } else { $('#task_search_result').text(response.message); } } else { $('#task_search_status').text('(use JSON as your output format to see a status)'); $('#task_search_result').text(response); } }, (output_format == 'json') && 'json' || 'text');Click here to run the code.
Response
Tasksback to top
Status: (run the code to get a response status)
Value: (run the code to get a response value) -
Find a Task
GET /tasks/$primary_key[.$format]
var url = '/tasks'; var primary_key = prompt('Enter a primary key to find', ''); url += '/' + encodeURIComponent(primary_key); var params = {}; url += '.' + output_format; $.get(url, params, function(response) { if (output_format == 'json') { $('#task_find_status').text(response.status); if (response.status == 200 && response.task) { $('#task_find_result').text(JSON.stringify(response.task)); } else { $('#task_find_result').text(response.message); } } else { $('#task_find_status').text('(use JSON as your output format to see a status)'); $('#task_find_result').text(response); } }, (output_format == 'json') && 'json' || 'text');Click here to run the code.
Response
Taskback to top
Status: (run the code to get a response status)
Value: (run the code to get a response value) -
Edit a Task
PUT /tasks/$primary_key[.$format]
var url = '/tasks'; var primary_key = prompt('Enter a primary key to edit', ''); url += '/' + encodeURIComponent(primary_key); var form = $('form#task\\.edit\\.form'); $.get(url, function(response) { if (response.status != 200) { alert('Error: Task not found.'); return false; } $('input#task\\.edit\\.project_id').val(response.task.project_id); $('input#task\\.edit\\.date_deadline').val(response.task.date_deadline); $('input#task\\.edit\\.name').val(response.task.name); $('input#task\\.edit\\.notes').val(response.task.notes); alert('When you are done editing the Task, submit the form.'); form.find('input[type=text]').removeAttr('disabled'); form.unbind().submit(function() { form.find('input[type=text]').attr('disabled', 'disabled'); $(this).find('input[type=submit], input[type=button]').remove(); process_edit(); return false; }); $('<' + 'input type="submit" value="Save" />').appendTo(form); $('<' + 'input type="button" value="Cancel" />').appendTo(form).click(function() { form.find('input[type=text]').attr('disabled', 'disabled'); form.find('input[type=submit], input[type=button]').remove(); return false; }); }, 'json'); var process_edit = function() { var params = {}; params.method = 'PUT'; params.project_id = $('input#task\\.edit\\.project_id').val(); params.date_deadline = $('input#task\\.edit\\.date_deadline').val(); params.name = $('input#task\\.edit\\.name').val(); params.notes = $('input#task\\.edit\\.notes').val(); url += '.' + output_format; $.post(url, params, function(response) { if (output_format == 'json') { $('#task_edit_status').text(response.status); if (response.status == 200 && response.task) { $('#task_edit_result').text(JSON.stringify(response.task)); } else { $('#task_edit_result').text(response.message); } } else { $('#task_edit_status').text('(use JSON as your output format to see a status)'); $('#task_edit_result').text(response); } }, (output_format == 'json') && 'json' || 'text'); };Click here to run the code.
Response
Taskback to top
Status: (run the code to get a response status)
Value: (run the code to get a response value) -
Create a Task
POST /tasks/$primary_key[.$format]
var url = '/tasks'; var params = {}; params.project_id = $('input#task\\.create\\.project_id').val(); params.date_deadline = $('input#task\\.create\\.date_deadline').val(); params.name = $('input#task\\.create\\.name').val(); params.notes = $('input#task\\.create\\.notes').val(); url += '.' + output_format; $.post(url, params, function(response) { if (output_format == 'json') { $('#task_create_status').text(response.status); if (response.status == 200 && response.task) { $('#task_create_result').text(JSON.stringify(response.task)); } else { $('#task_create_result').text(response.message); } } else { $('#task_create_status').text('(use JSON as your output format to see a status)'); $('#task_create_result').text(response); } }, (output_format == 'json') && 'json' || 'text');Click here to run the code.
Response
Taskback to top
Status: (run the code to get a response status)
Value: (run the code to get a response value) -
Delete a Task
DELETE /tasks/$primary_key[.$format]
var url = '/tasks'; var primary_key = prompt('Enter a primary key to delete', ''); url += '/' + encodeURIComponent(primary_key); var params = {}; params.method = 'DELETE'; url += '.' + output_format; $.post(url, params, function(response) { if (output_format == 'json') { $('#task_delete_status').text(response.status); if (response.status == 200 && response.task) { $('#task_delete_result').text(JSON.stringify(response.task)); } else { $('#task_delete_result').text(response.message); } } else { $('#task_delete_status').text('(use JSON as your output format to see a status)'); $('#task_delete_result').text(response); } }, (output_format == 'json') && 'json' || 'text');Click here to run the code.
Response
Taskback to top
Status: (run the code to get a response status)
Value: (run the code to get a response value)
User
-
Search Users
GET /users[.$format]?conditions.$field=$val&offset=$offset&limit=$limit&order=$order
var url = '/users'; var params = {}; var field = $('select#user\\.search\\.condition-field').val(); var value = $('input#user\\.search\\.condition-value').val(); if (value) params['condition.' + field] = value; params.offset = $('input#user\\.search\\.offset').val(); params.limit = $('input#user\\.search\\.limit').val(); url += '.' + output_format; $.get(url, params, function(response) { if (output_format == 'json') { $('#user_search_status').text(response.status); if (response.status == 200 && response.users) { $('#user_search_result').text(JSON.stringify(response.users)); } else { $('#user_search_result').text(response.message); } } else { $('#user_search_status').text('(use JSON as your output format to see a status)'); $('#user_search_result').text(response); } }, (output_format == 'json') && 'json' || 'text');Click here to run the code.
Response
Usersback to top
Status: (run the code to get a response status)
Value: (run the code to get a response value) -
Find a User
GET /users/$primary_key[.$format]
var url = '/users'; var primary_key = prompt('Enter a primary key to find', ''); url += '/' + encodeURIComponent(primary_key); var params = {}; url += '.' + output_format; $.get(url, params, function(response) { if (output_format == 'json') { $('#user_find_status').text(response.status); if (response.status == 200 && response.user) { $('#user_find_result').text(JSON.stringify(response.user)); } else { $('#user_find_result').text(response.message); } } else { $('#user_find_status').text('(use JSON as your output format to see a status)'); $('#user_find_result').text(response); } }, (output_format == 'json') && 'json' || 'text');Click here to run the code.
Response
Userback to top
Status: (run the code to get a response status)
Value: (run the code to get a response value) -
Edit a User
PUT /users/$primary_key[.$format]
var url = '/users'; var primary_key = prompt('Enter a primary key to edit', ''); url += '/' + encodeURIComponent(primary_key); var form = $('form#user\\.edit\\.form'); $.get(url, function(response) { if (response.status != 200) { alert('Error: User not found.'); return false; } $('input#user\\.edit\\.device_id').val(response.user.device_id); $('input#user\\.edit\\.date_logged_in').val(response.user.date_logged_in); alert('When you are done editing the User, submit the form.'); form.find('input[type=text]').removeAttr('disabled'); form.unbind().submit(function() { form.find('input[type=text]').attr('disabled', 'disabled'); $(this).find('input[type=submit], input[type=button]').remove(); process_edit(); return false; }); $('<' + 'input type="submit" value="Save" />').appendTo(form); $('<' + 'input type="button" value="Cancel" />').appendTo(form).click(function() { form.find('input[type=text]').attr('disabled', 'disabled'); form.find('input[type=submit], input[type=button]').remove(); return false; }); }, 'json'); var process_edit = function() { var params = {}; params.method = 'PUT'; params.device_id = $('input#user\\.edit\\.device_id').val(); params.date_logged_in = $('input#user\\.edit\\.date_logged_in').val(); url += '.' + output_format; $.post(url, params, function(response) { if (output_format == 'json') { $('#user_edit_status').text(response.status); if (response.status == 200 && response.user) { $('#user_edit_result').text(JSON.stringify(response.user)); } else { $('#user_edit_result').text(response.message); } } else { $('#user_edit_status').text('(use JSON as your output format to see a status)'); $('#user_edit_result').text(response); } }, (output_format == 'json') && 'json' || 'text'); };Click here to run the code.
Response
Userback to top
Status: (run the code to get a response status)
Value: (run the code to get a response value) -
Create a User
POST /users/$primary_key[.$format]
var url = '/users'; var params = {}; params.device_id = $('input#user\\.create\\.device_id').val(); params.date_logged_in = $('input#user\\.create\\.date_logged_in').val(); url += '.' + output_format; $.post(url, params, function(response) { if (output_format == 'json') { $('#user_create_status').text(response.status); if (response.status == 200 && response.user) { $('#user_create_result').text(JSON.stringify(response.user)); } else { $('#user_create_result').text(response.message); } } else { $('#user_create_status').text('(use JSON as your output format to see a status)'); $('#user_create_result').text(response); } }, (output_format == 'json') && 'json' || 'text');Click here to run the code.
Response
Userback to top
Status: (run the code to get a response status)
Value: (run the code to get a response value) -
Delete a User
DELETE /users/$primary_key[.$format]
var url = '/users'; var primary_key = prompt('Enter a primary key to delete', ''); url += '/' + encodeURIComponent(primary_key); var params = {}; params.method = 'DELETE'; url += '.' + output_format; $.post(url, params, function(response) { if (output_format == 'json') { $('#user_delete_status').text(response.status); if (response.status == 200 && response.user) { $('#user_delete_result').text(JSON.stringify(response.user)); } else { $('#user_delete_result').text(response.message); } } else { $('#user_delete_status').text('(use JSON as your output format to see a status)'); $('#user_delete_result').text(response); } }, (output_format == 'json') && 'json' || 'text');Click here to run the code.
Response
Userback to top
Status: (run the code to get a response status)
Value: (run the code to get a response value)