Error: Error in Rangy WrappedRange module: createRange(): Parameter must be a Window object or DOM node - node.js

I have these two functions:
function menuItemListener( link ) {
var side = link.getAttribute("data-action");
if (side == 'Mark as A' || side == 'Mark as B') {
highlighter(side);
$.ajax({
method: "POST",
url: "http://localhost:3000/",
dataType: "json",
data: JSON.stringify({"rangyobject" : rangy.saveSelection()}),
contentType: "application/json; charset=utf-8",
success: function(result) {
console.log('yei');
}
});
}
toggleMenuOff();
}
function loadHighlights () {
window.addEventListener("load", function load(event){
$.ajax({
method: "GET",
url: "http://localhost:3000/ranges",
dataType: "json",
contentType: "application/json; charset=utf-8",
success: function(result) {
console.log('loadHighlights results: ', result[0].rangyObject);
rangy.restoreSelection(result[0].rangyObject);
}
});
},false);
};
So it's simply storing the rangy.saveSelection() in the DB and then getting it back and trying to rangy.restoreSelection on the its first element.
the console.log looks good but I'm getting an error in the console:
Error: Error in Rangy WrappedRange module: createRange(): Parameter must be a Window object or DOM node

rangy.saveSelection() looks like this in the console:
{win: undefined, rangeInfos: Array, restored: false}
Note the "win: undefined"
When I send it to the DB, I use
data: JSON.stringify({"rangyObject" : rangy.saveSelection()})
When retrieving it back from the DB it looks like:
{rangeInfos: Array, restored: false}
Notice that the 'win' was omitted by the save to the db
I was able to use the serialize and deserialize functions to circumvent this issue, but these don't create the id's with the span's they create, so I ran into another problem.

Related

Updating metadata file in sharepoint online via REST API

I upload a file to sharepoint and trying to update its metadata, but I always get error 400 in last step.
As far as I understand, sharepoint only handles lists and items. A "folder" is a list and both metadata and files inside are items. And a "file" is a list and its metadata are items.
Documentation about updating metadata say about to make a POST request to:
https: // {site_url} / _api / web / lists / GetByTitle ('{list_title}') / items ({item_id})
Updating files must be done by PUT method (not MERGE allowed), but updating metadata must be done specifically by MERGE method. I have tried both, and both failed.
This is my current updating metadata request, but I'm continuing getting an error 400.
var data = {
"__metadata": {
"type":type
},
"Description":"lorem ipsum"
};
var headerToken = {
headers: {
'Authorization':'Bearer ' + token
, 'X-HTTP-Method':'MERGE'
, 'Accept':'application/json;odata=verbose'
, 'Content-Type':'application/json;odata=verbose'
, 'Content-Length':JSON.stringify(data).length
, 'If-Match': etag
, 'X-RequestDigest': digest
}
};
try {
var response = await axios.post(
'https://{site_url}/_api/web/lists/GetByTitle("'+MY_FOLDER+'")/items('+id+')'
, JSON.stringify(data)
, headerToken
);
return response;
}
type, etag and id are get from uploading file response and digest is get from a request to contextinfo endpoint. MY_FOLDER is a test library and at this moment is a constant.
You need to use single quotes in getbytitle.
"https://{site_url}/_api/web/lists/GetByTitle('"+MY_FOLDER+"')/items("+id+")"
Updated:
<script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.9.1.min.js" type="text/javascript"></script>
<script>
$(document).ready(function () {
UpdateFolder()
function UpdateFolder(){
$.ajax({
url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/GetByTitle('Doc')/items(30)",
type: "POST",
headers: {
"accept": "application/json;odata=verbose",
"X-RequestDigest": $("#__REQUESTDIGEST").val(),
"content-Type": "application/json;odata=verbose",
"IF-MATCH": "*",
"X-HTTP-Method": "MERGE"
},
data: "{__metadata:{'type':'SP.Data.DocItem'},test:'test'}",
/*where Title is column name and add your desired new data*/
success: function(data) {
console.log(data);
},
error: function(error) {
alert(JSON.stringify(error));
}
});
}
})
</script>

select value does not display

i have a webpage that gets data from a local database. i can retrieve the data to be displayed but for some reason a certain value (value of '#item_name') does not display. it's supposed to be the text inside a select dropdown with an id of item_name. am i missing something? here is my code:
$.ajax({
url: '/get_items',
method: 'POST',
data: { item_id: item_id },
success: function (response) {
alert(JSON.stringify(response.result[0].name));
$('#hidden_item_item_id').val(response.result[0].id);
$('#item_name').val(response.result[0].name);
$('#item_remarks').val(response.result[0].remarks);
$('#updateItemsModal').modal('show');
}
});
Try this,
$('#item_name').append($("<option />").val(response.result[0].name).text(response.result[0].name));
Hope this helps!
You don't need to do JSON.stringify, just add dataType : 'json' in ajax request.
$.ajax({
url: '/get_items',
method: 'POST',
data: { item_id: item_id },
dataType: 'json',
success: function (response) {
alert(response.result[0].name);
$('#hidden_item_item_id').val(response.result[0].id);
$('#item_name').val(response.result[0].name);
$('#item_remarks').val(response.result[0].remarks);
$('#updateItemsModal').modal('show');
}
});
Please try

Error while fetching json from database

I am able to send data to db using the following:
$("#set").click(function ()
{
var cells = graph.getCell();
var StateObject = graph.toJSON();
var SavedState = JSON.stringify(StateObject);
console.log("Here is the state object " + StateObject);
console.log("Here is the saved state: " + SavedState);
$.ajax({
url: 'JsonProcessor.do',
type: 'post',
dataType: 'json',
data: {
test: StateObject
}
});
});
But while fetching I get error in chrome console like this:
Uncaught Error: Graph JSON must contain cells array
Code to fetch data:
$("#get").click(function ()
{
$.ajax({
url: 'JsonProcessor.do',
type: 'get',
dataType: 'json',
success: function (data) {
var result = data;
console.log("Result from Database: " + result);
graph.fromJSON(result);
}
});
});
I can see the object fetched in chrome console like this: [object Object] and when I expand it
`0: Object
JSON_Diagram: "test=%5B%7B%22empID%22%3A%22%22%7D%2C%7B%22cells%22%3A%5B%7B%22type%22%3A%22basic.Rect%22%2C%22position%22%3A%7B%22x%22%3A-2%2C%22y%22%3A33%7D%2C%22size%22%3A%7B%22width%22%3A71%2C%22height%22%3A625%7D%2C%22angle%22%3A0%2C%22isInteractive%22%3Afalse%2C%22id%22%3A%22ca4cc8a8-7e95-43cb-a8d3-8cf24c82d43f%22%2C%22z%22%3A1%2C%22embeds%22%3A%5B%22b6aee295-16fa-41e7-b25e-d20610cbd631%22%2C%2288de9a15-cbc8-4c02-a358-30491d50cb37%22%5D%2C%22attrs%22%3A%7B%22rect%22%3A%7B%22fill%22%3A%22%23EEEEEE%22%2C%22stroke%22%3A%22%23008B8B%22%2C%22stroke-width%22%3A2%7D%2C%22.%22%3A%7B%22magnet%22%3Afalse%7D%7D%7D%2C%7B%22type%22%3A%22basic.Circle%22%2C%22size%22%3A%7B%22width%22%3A53%2C%22height%22%3A53%7D%2C%22position%22%3A%7B%22x%22%3A8%2C%22y%22%3A130%7D%2C%22angle%22%3A0%2C%22isInteractive%22%3Afalse%2C%22id%22%3A%22b145b765-a60b-4742-82a6-712da89e4dd0%22%2C%22z%22%3A3%2C%22attrs%22%3A%7B%22.%22%3A%7B%22magnet%22%3Afalse%7D%2C%22circle1%22%3A%7B%22fill%22%3A%22white%22%2C%22stroke-width%22%3A2%2C%22stroke%22%3A%22green%22%7D%7D%7D%2C%7B%22type%22%3A%22basic.Circle%22%2C%22size%22%3A%7B%22width%22%3A53%2C%22height%22%3A53%7D%2C%22position%22%3A%7B%22x%22%3A8%2C%22y%22%3A225%7D%2C%22angle%22%3A0%2C%22isInteractive%22%3Afalse%2C%22id%22%3A%221b99b595-57cd-4127-9ec0-d5842beb183a%22%2C%22z%22%3A4%2C%22attrs%22%3A%7B%22.%22%3A%7B%22magnet%22%3Afalse%7D%2C%22circle2%22%3A%7B%22fill%22%3A%22white%22%2C%22stroke%22%3A%22green%22%7D%7D%7D%2C%7B%22type%22%3A%22basic.Circle%22%2C%22size%22%3A%7B%22width%22%3A53%2C%22height%22%3A53%7D%2C%22position%22%3A%7B%22x%22%3A8%2C%22y%22%3A320%7D%2C%22angle%22%3A0%2C%22isInteractive%22%3Afalse%2C%22id%22%3A%227e953c11-d361-44d0-bf29-3d3fa146519c%22%2C%22z%22%3A5%2C%22attrs%22%3A%7B%22.%22%3A%7B%22magnet%22%3Afalse%7D%2C%22circle3%22%3A%7B%22fill%22%3A%22white%22%2C%22stroke%22%3A%22green%22%7D%7D%7D%2C%7B%22type%22%3A%22basic.Rect%22%2C%22position%22%3A%7B%22x%22%3A35%2C%22y%22%3A505%7D%2C%22size%22%3A%7B%22width%22%3A55%2C%22height%22%3A55%7D%2C%22angle%22%3A0%2C%22isInteractive%22%3Afalse%2C%22id%22%3A%22186a6dd7-2b5e-48d6-8e35-ee821ebbb4dc%22%2C%22z%22%3A7%2C%22attrs%22%3A%7B%22rect%22%3A%7B%22fill%22%3A%22%23FFED6B%22%2C%22stroke%22%3A%22%23DBCB62%22%2C%22width%22%3A55%2C%22height%22%3A55%2C%22stroke-width%22%3A1%2C%22transform%22%3A%22rotate(45)%22%7D%2C%22.%22%3A%7B%22magnet%22%3Afalse%7D%7D%7D%2C%7B%22type%22%3A%22basic.Rect%22%2C%22position%22%3A%7B%22x%22%3A10%2C%22y%22%3A50%7D%2C%22size%22%3A%7B%22width%22%3A51%2C%22height%22%3A41%7D%2C%22angle%22%3A0%2C%22isInteractive%22%3Afalse%2C%22id%22%3A%22b6aee295-16fa-41e7-b25e-d20610cbd631%22%2C%22z%22%3A9%2C%22parent%22%3A%22ca4cc8a8-7e95-43cb-a8d3-8cf24c82d43f%22%2C%22attrs%22%3A%7B%22rect%22%3A%7B%22fill%22%3A%22%23D6F2FC%22%2C%22stroke%22%3A%22%237E7E7E%22%7D%2C%22.%22%3A%7B%22magnet%22%3Afalse%7D%7D%7D%2C%7B%22type%22%3A%22basic.Rect%22%2C%22position%22%3A%7B%22x%22%3A10%2C%22y%22%3A420%7D%2C%22size%22%3A%7B%22width%22%3A51%2C%22height%22%3A41%7D%2C%22angle%22%3A0%2C%22isInteractive%22%3Afalse%2C%22id%22%3A%2288de9a15-cbc8-4c02-a358-30491d50cb37%22%2C%22z%22%3A12%2C%22parent%22%3A%22ca4cc8a8-7e95-43cb-a8d3-8cf24c82d43f%22%2C%22attrs%22%3A%7B%22.%22%3A%7B%22magnet%22%3Afalse%7D%2C%22rectGroup0%22%3A%7B%22fill%22%3A%22white%22%2C%22stroke%22%3A%22%237E7E7E%22%7D%7D%7D%2C%7B%22type%22%3A%22devs.Model%22%2C%22size%22%3A%7B%22width%22%3A751%2C%22height%22%3A170%7D%2C%22inPorts%22%3A%5B%5D%2C%22outPorts%22%3A%5B%5D%2C%22position%22%3A%7B%22x%22%3A160%2C%22y%22%3A123%7D%2C%22angle%22%3A0%2C%22id%22%3A%2237a88170-4da8-464d-99f9-32b72097c495%22%2C%22z%22%3A14%2C%22embeds%22%3A%5B%22e70977f4-52b0-4fdb-a852-8b3b63a5273e%22%5D%2C%22attrs%22%3A%7B%22.label%22%3A%7B%22text%22%3A%22CONTAINER%22%2C%22ref-y%22%3A0.1%2C%22y-alignment%22%3A%22middle%22%7D%2C%22rect%22%3A%7B%22fill%22%3A%22%22%2C%22opacity%22%3A%220.60%22%7D%7D%7D%2C%7B%22type%22%3A%22devs.Model%22%2C%22size%22%3A%7B%22width%22%3A51%2C%22height%22%3A41%7D%2C%22inPorts%22%3A%5B%22%22%5D%2C%22outPorts%22%3A%5B%22%22%5D%2C%22position%22%3A%7B%22x%22%3A234%2C%22y%22%3A187%7D%2C%22angle%22%3A0%2C%22id%22%3A%22e70977f4-52b0-4fdb-a852-8b3b63a5273e%22%2C%22z%22%3A15%2C%22parent%22%3A%2237a88170-4da8-464d-99f9-32b72097c495%22%2C%22attrs%22%3A%7B%22.%22%3A%7B%22magnet%22%3Atrue%7D%2C%22.port-body%22%3A%7B%22r%22%3A3%7D%2C%22.label%22%3A%7B%22text%22%3A%22%22%2C%22ref-x%22%3A0.4%2C%22ref-y%22%3A0.2%7D%2C%22rect%22%3A%7B%22fill%22%3A%22%23D6F2FC%22%2C%22stroke%22%3A%22%237E7E7E%22%7D%2C%22.inPorts+circle%22%3A%7B%22type%22%3A%22input%22%7D%2C%22.outPorts+circle%22%3A%7B%22type%22%3A%22output%22%7D%2C%22.inPorts%3E.port0%3E.port-label%22%3A%7B%22text%22%3A%22%22%7D%2C%22.inPorts%3E.port0%3E.port-body%22%3A%7B%22port%22%3A%7B%22id%22%3A%22in29%22%2C%22type%22%3A%22in%22%7D%7D%2C%22.inPorts%3E.port0%22%3A%7B%22ref%22%3A%22.body%22%2C%22ref-y%22%3A0.5%7D%2C%22.outPorts%3E.port0%3E.port-label%22%3A%7B%22text%22%3A%22%22%7D%2C%22.outPorts%3E.port0%3E.port-body%22%3A%7B%22port%22%3A%7B%22id%22%3A%22out30%22%2C%22type%22%3A%22out%22%7D%7D%2C%22.outPorts%3E.port0%22%3A%7B%22ref%22%3A%22.body%22%2C%22ref-y%22%3A0.5%2C%22ref-dx%22%3A0%7D%7D%7D%5D%7D%5D"
__proto__: Object
1: Object
2: Object
3: Object
length: 1
__proto__: Array[0]`
but problem is rendering the data on to view in jointjs
Please help if any body have already worked it out.
A key called JSON_Diagram is appended to json array when retrieving it. Json sent via ajax call must return exact json for the graph to render the diagram. You need to fix your JsonProcessor.do servlet to return same json. Hope this helps.
JointJS' fromJSON expects an input of the format { cells: [...] }. So I suspect that if you're saving your JSON using { test: JSON.stringify } you will need to JSON.parse(result.data) and then pass it to graph.fromJSON.
Final solution
graph.fromJSON(JSON.parse(result.data))

A node of type 'EndOfInput' was read from the JSON reader when trying to read the start of an entry. A 'StartObject' node was expected

I am trying to add a user to sharepoint group with following code
serviceUrl= Appweb + "/_api/SP.AppContextSite(#target)/web/sitegroups("+GroupId+")/users?#target='host web'";
$.ajax({
url: serviceUrl,
type: "POST",
contentType: "application/json; charset=utf-8",
dataType: 'json',
body: "{'__metadata': { 'type': 'SP.User' },'LoginName':'i:0#.f|membership|'+email }",
headers: {"accept":"application/json;odata=verbose",
"content-type": "application/json;odata=verbose",
"X-RequestDigest":$("#__REQUESTDIGEST").val()
},
async: false,
success: function (data) {
alert('success');
},
error: function (data) {
alert('fail');
}
});
The request goes to error function. Response of the request is Microsoft.SharePoint.Client.InvalidClientQueryException and the message is
A node of type 'EndOfInput' was read from the JSON reader when trying to read the start of an entry. A 'StartObject' node was expected

SharePoint 2010 REST API JQUery Insert, Update, Delete

Can anyone explain or point me to a link with samples of doing Update, Delete using Jquery with the SharePoint 2010 Rest API?
I have the insert working and of course queries since the MSDN documentation explains and every tutorial on the net explains queries but just wondering if anyone ever inserts, updates, deletes data instead of only samples and tutorials on querying? Yes I know I can use the CSOM but I want to learn how this is done via jquery and sharepoint rest?
Also I want to use Merge for updating.
Here's the working insert code:
function insertMilestone() {
var mileStonesListUrl = "/_vti_bin/listdata.svc/Milestones";
var milestone = {};
milestone.Title = "Testing from REST";
var entry = JSON.stringify(milestone);
$.ajax({
type: "POST",
url: mileStonesListUrl,
data: entry,
contentType: "application/json; charset=utf-8",
error: function (xhr) {
alert(xhr.status + ": " + xhr.statusText);
},
success: function () {
getAll();
}
});
}
How to perform CRUD operations using SharePoint 2010 REST Interface
Create
In order to perform a Create operation via REST, you must perform the following actions:
Create an HTTP request using the POST verb.
Use the service URL of the list to which you want to add an entity as
the target for the POST.
Set the content type to application/json.
Serialize the JSON objects that represent your new list items as a
string, and add this value to the request body
JavaScript example:
function createListItem(webUrl,listName, itemProperties, success, failure) {
$.ajax({
url: webUrl + "/_vti_bin/listdata.svc/" + listName,
type: "POST",
processData: false,
contentType: "application/json;odata=verbose",
data: JSON.stringify(itemProperties),
headers: {
"Accept": "application/json;odata=verbose"
},
success: function (data) {
success(data.d);
},
error: function (data) {
failure(data.responseJSON.error);
}
});
}
Usage
var taskProperties = {
'TaskName': 'Order Approval',
'AssignedToId': 12
};
createListItem('https://contoso.sharepoint.com/project/','Tasks',taskProperties,function(task){
console.log('Task' + task.TaskName + ' has been created');
},
function(error){
console.log(JSON.stringify(error));
}
);
Read
In order to perform a Read operation via REST, you must perform the following actions:
Create an HTTP request using the GET verb.
Use the service URL of the list item to which you want to add an
entity as the target for the GET.
Set the content type to application/json.
JavaScript example:
function getListItemById(webUrl,listName, itemId, success, failure) {
var url = webUrl + "/_vti_bin/listdata.svc/" + listName + "(" + itemId + ")";
$.ajax({
url: url,
method: "GET",
headers: { "Accept": "application/json; odata=verbose" },
success: function (data) {
success(data.d);
},
error: function (data) {
failure(data.responseJSON.error);
}
});
}
Usage
getListItemById('https://contoso.sharepoint.com/project/','Tasks',2,function(taskItem){
console.log(taskItem.TaskName);
},
function(error){
console.log(JSON.stringify(error));
}
);
Update
To update an existing entity, you must perform the following actions:
Create an HTTP request using the POST verb.
Add an X-HTTP-Method header with a value of MERGE.
Use the service URL of the list item you want to update as the target
for the POST
Add an If-Match header with a value of the entity’s original ETag.
JavaScript example:
function updateListItem(webUrl,listName,itemId,itemProperties,success, failure)
{
getListItemById(webUrl,listName,itemId,function(item){
$.ajax({
type: 'POST',
url: item.__metadata.uri,
contentType: 'application/json',
processData: false,
headers: {
"Accept": "application/json;odata=verbose",
"X-HTTP-Method": "MERGE",
"If-Match": item.__metadata.etag
},
data: Sys.Serialization.JavaScriptSerializer.serialize(itemProperties),
success: function (data) {
success(data);
},
error: function (data) {
failure(data);
}
});
},
function(error){
failure(error);
});
}
Usage
var taskProperties = {
'TaskName': 'Approval',
'AssignedToId': 12
};
updateListItem('https://contoso.sharepoint.com/project/','Tasks',2,taskProperties,function(item){
console.log('Task has been updated');
},
function(error){
console.log(JSON.stringify(error));
}
);
Delete
To delete an entity, you must perform the following actions:
Create an HTTP request using the POST verb.
Add an X-HTTP-Method header with a value of DELETE.
Use the service URL of the list item you want to update as the target
for the POST
Add an If-Match header with a value of the entity’s original ETag.
JavaScript example:
function deleteListItem(webUrl, listName, itemId, success, failure) {
getListItemById(webUrl,listName,itemId,function(item){
$.ajax({
url: item.__metadata.uri,
type: "POST",
headers: {
"Accept": "application/json;odata=verbose",
"X-Http-Method": "DELETE",
"If-Match": item.__metadata.etag
},
success: function (data) {
success();
},
error: function (data) {
failure(data.responseJSON.error);
}
});
},
function (error) {
failure(error);
});
}
Usage
deleteListItem('https://contoso.sharepoint.com/project/','Tasks',3,function(){
console.log('Task has been deleted');
},
function(error){
console.log(JSON.stringify(error));
}
);
Please follow List Items manipulation via REST API in SharePoint 2010 article for a more details.
Here is the update and delete, it wasn't as hard as I thought it was going to be and it works.
Hopefully this will help someone out because there is so much bogus information on using the REST API and I see a zillion posts on querying but none on Insert, Update, Delete.
//update
function updateMilestone(id) {
var mileStonesUrl = "/_vti_bin/listdata.svc/Milestones";
mileStonesUrl = mileStonesUrl + "(" + id+ ")";
var beforeSendFunction;
var milestoneModifications = {};
milestoneModifications.Title = "Updated from REST";
var updatedMilestoneData = JSON.stringify(milestoneModifications);
//update exsiting milestone
beforeSendFunction = function (xhr) {
xhr.setRequestHeader("If-Match", "*");
// Using MERGE so that the entire entity doesn't need to be sent over the wire.
xhr.setRequestHeader("X-HTTP-Method", 'MERGE');
}
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
processData: false,
beforeSend: beforeSendFunction,
url: mileStonesUrl,
data: updatedMilestoneData,
dataType: "json",
error: function (xhr) {
alert(xhr.status + ": " + xhr.statusText);
},
success: function () {
alert("Updated");
getAll();
}
});
function deleteMilestone(id) {
var mileStonesUrl = "/_vti_bin/listdata.svc/Milestones";
mileStonesUrl = mileStonesUrl + "(" + id+ ")";
$.ajax({
type: "DELETE",
contentType: "application/json; charset=utf-8",
processData: false,
url: mileStonesUrl,
error: function (xhr) {
alert(xhr.status + ": " + xhr.statusText);
},
success: function () {
alert("deleted");
getAll();
}
});
}
}
I recently worked with the REST API for SP 2013, as a Example POC that can be used for any call implementation i.e. JQuery, C# etc.
Using POSTMAN
First get your digest token:
A method was found on this site : http://tech.bool.se/basic-rest-request-sharepoint-using-postman/​
[Credit where credit is due]
POST
http://<SharePoint Domain Url>/sites/<Site name>/_api/contextinfo
Header:
Accept : application/json;odata=verbose
Body:
Clear the body ​
From the payload use "FormDigestValue" value and put it into your headers with the key : X-RequestDigest when making actions that alter items in SharePoint.
Reading data:
GET
http://<SharePoint Domain Url>/sites/<Site name>/_api/web/getfolderbyserverrelativeurl('/Sites/<Site Name>/Shared Documents/My Folder')/files?$select=Name
Headers:
Accept : application/json;odata=verbose​
When it comes to create, update , delete you need the digest token or an authorization token to perform these actions, this token is highlighted at the begining to to retrieve.
​Creating Data
POST
http://<SharePoint Domain Url>/sites/<Site Name>/_api/web/folders​
Headers:
Accept : application/json;odata=verbose
X-RequestDigest : 'GUID looking toking'
Content-Type : application/json;odata=verbose
Body:
{ '__metadata': { 'type': 'SP.Folder' }, 'ServerRelativeUrl': '/Sites/<Site Name>/Shared Documents/Some Folder/POC3'}​
Note:
'ServerRelativeUrl' the folder on the end POC3 is the folder that I want to create
Related resources:
http://msdn.microsoft.com/en-us/library/office/fp142380(v=office.15).aspx
Note: PostMan was used for this example and other application may need you to url encode the endpoint.
The above Request Structure can be used for all requests, the related resource highlights some of the standard methods that can be used with the REST Api

Resources