Integrating with SharePOint Online REST API in Chrome browser

Hi Support
Can you provide me sample code implementing gantt for Sharepoint ONline REST API? I have a table of Projects with ProjectName, Start & Funish Dates, Duration & %Complete as follows

REST for Projects -$select=ProjectName,ProjectDuration,ProjectPercentCompleted,ProjectStartDate,ProjectFinishDate,ProjectOwnerName

ProjectDuration m:type=" Edm.Decimal “>6048.160000</d:ProjectDuration>
ProjectFinishDate m:type=” Edm.DateTime “>2019-11-26T08:09:36</d:ProjectFinishDate>
ProjectOwnerName>Administrator Admin</d:ProjectOwnerName>
ProjectPercentCompleted m:type=” Edm.Int16 “>75</d:ProjectPercentCompleted>
ProjectStartDate m:type=” Edm.DateTime ">2017-01-01T08:00:00</d:ProjectStartDate>

The above requires credentials which I will supply by private email.


Hello Greg,
Unfortunately, we don’t have a demo for SharePoint and SharePoint Online.

You can check the following articles, maybe it will help you to create the project in SharePoint:

There is a bad piece of code, but you can optimize it. This is my experiment on local sharepoint with dates. I use Moment JS for converting times

function getTodayDate() {
today = moment().format('YYYY-MM-DD');
minDate = moment().subtract(90, 'days').format('YYYY-MM-DD');
maxDate = moment().add(90, 'days').format('YYYY-MM-DD');
fromDate = moment(today, 'YYYY-MM-DD').subtract(2,'days').format('YYYY-MM-DDT00:00:00')+"Z";
toDate = moment(today, 'YYYY-MM-DD').add(1,'days').format('YYYY-MM-DDT23:59:59')+"Z";
filterDate = 'and (PlannedTimeStart ge datetime\''+fromDate+'\') and (PlannedTimeStart le datetime\''+toDate+'\')'