Getting Calendar items on Office 365 using REST API

I am having trouble with a REST call using jQuery on Office 365 and was wondering if you guys have ever experienced something similar and could give me some hints?

What I am trying to achieve is to get “My Today’s Events” from my calendar on Office 365 using REST API and jQuery, however, I haven’t had any success so far.

Here is my code:

function rest_call(){    try {     var calendarUrl = "";     var calendarItems_html = "<div class='title'> Today's Schedule </div>";      $  .ajax({         url: calendarUrl,         method: "GET",         headers: { "Accept": "application/json; odata=verbose" },             success: function (data) {                 $  .each(data.value, function (i, item) {                       if(item.IsAllDay)                                                calendarItems_html += "<div class='item'><img src='/sites/mytheme/Style%20Library/mytheme/images/schedule-arrow.png' alt=''/><span class='time'> " + getDate(item.Start) + " </span><span class='content'>" + item.Subject + "</span></div>";                                else {                                               calendarItems_html += "<div class='item'><img src='/sites/mytheme/Style%20Library/mytheme/images/schedule-arrow.png' alt=''/><span class='time'> " + getTime(item.Start) + "&nbsp;-&nbsp;" + getTime(item.End) + " </span><span class='content'>" + item.Subject + "</span></div>";                         }                     });                   $  (".schedule").append(calendarItems_html);             },             error: function (err) {                 $  (".schedule").append(err);             }         }); } catch(err) {     $  (".schedule").append(err);     } 


function getDate(ddate){   var dDateHours= ddate.substring(0,10);   return dDateHours; }  function getTime(ddate){   var dDateHours= ddate.substring(16,11);   return dDateHours; } 

This code only returns data if the site and are added into one security zone (in IE) and the security settings are set to Low!

Could you please let me know what my mistake is and what’s the right way of achieving this goal?

How do the activity limitations for a long rest work in the Gritty Realism variant?

In my current campaign (in which I am a player) we are considering switching over to the Gritty Realism rest variant in the DMG so that the party would have to expend more resources between resting. The variant says:

This variant uses a short rest of 8 hours and a long rest of 7 days.

But we are confused at how this variant interacts with the normal rules for resting.

A normal long rest has this description:

A long rest is a period of extended downtime, at least 8 hours long, during which a character sleeps for at least 6 hours and performs no more than 2 hours of light activity, such as reading, talking, eating, or standing watch. If the rest is interrupted by a period of strenuous activity – at least 1 hour of walking, fighting, casting spells, or similar adventuring activity – the characters must begin the rest again to gain any benefit from it.

How do these rules transfer over to the variant? Is it true that you must spend 7 full days only in a single long rest and that you may not perform more than 2 hours of light activities over the entire 7 day (168 hour) period? It seems like over 7 days you could easily spend at least 2 hours eating and talking.

Would the long rest be invalidated if they take are interrupted by a single hour of strenuous activity over the entire 7 days? Even for a “gritty” variant that seems really extreme.

How are the activity limitations supposed to work in this variant?

How to call the SharePoint rest API using Java web application?

I have developed one of the web based Java Application in which one of the page containing the form for uploading a files, as of now uploaded file stored on the Application server, but instead of this I want storing file in the SHAREPOINT ONLINE 2013

I am not an expert in the SharePoint, so please explain in the step by step manner with proper flow and code

For token generation I am doing whatever mention here( and I was getting the token successfully and now not having a clue for what is the next step for the development?

How is the interruption clause in the long rest rule to be interpreted? [duplicate]

This question already has an answer here:

  • Does a short combat or casting one spell interrupt a Long Rest? 1 answer

The long rest rule says, in part:

If the rest is interrupted by a period of strenuous activity—at least 1 hour of walking, fighting, casting spells, or similar adventuring activity—the characters must begin the rest again to gain any benefit from it.

I have always seen this interpreted as:

If the rest is interrupted by a period of strenuous activity—at least 1 hour of walking, fighting, casting spells, or similar adventuring activity—the characters must begin the rest again to gain any benefit from it.

But recently I saw someone interpret it as:

If the rest is interrupted by a period of strenuous activity—at least 1 hour of walking, fighting, casting spells, or similar adventuring activity—the characters must begin the rest again to gain any benefit from it.

At which point research reveals this latter interpretation has a significant but not dominant amount of support in internet-argument-land.

I thought I recalled a tweet clarifying that the interpretation not ignoring the ‘a period of’ part is the correct one, but I have been unable to locate it thus far. Which interpretation is correct?

Preventing a long rest (player -> player)

Is there a potion or <= level 3 spell (or something else), or an in-game drug/root/plant/etc. that can be used to essentially prevent a player from sleeping for a certain amount of time, or otherwise disrupt and prevent a single long rest of an individual player?

From what I can tell, while there’s loads of ways to force somebody to sleep, there doesn’t seem to be any lower level means to force somebody to stay awake.

There’s the Dream and Nightmare spells, but they’re level 5.

Basically, I’m looking for some way for a player to intentionally prevent a specific other players’ long rest for a night.

Updating link on page via REST api

I have a page that I need to periodically update the file location for a link to point at a new file. Trying to do this via a Python script using requests.

I’ve got authentication set up via ‘Application Passwords’ plugin, and I’m able to download a json from the api for the page in question. I have a pre-built string that contains the new file location, ready to go. I extract the page content, specifically the ‘rendered’ version, as a string. I do a quick replace() on that string between two known tags (<h4>) and then reload the modified ‘rendered’ page content back into the json, and upload it back to the endpoint, again using requests().

When it’s all said and done, I’m getting no errors from the script, a status code of 200… but nothing changes on the page.

Furthermore, I’m finding the following in the error log:

[21-Aug-2019 00:12:51 UTC] PHP Warning:  Invalid argument supplied for foreach() in /home1/example/public_html/wp-includes/rest-api/class-wp-rest-request.php on line 778 

Not exactly sure what that means, but I’m assuming it’s not good.

Any ideas/suggestions for updating a page via the REST api? Or am I going about this completely wrong?

SharePoint 2010 Workflows – Is it possible to call rest api

So here is my situation, I am working in a SharePoint 2013 Environment, but they only have SHarePoint 2010 Workflows enabled. I see lots of questions and blogs that describe making rest api calls in workflows. Yet, when I attempt to do the same things I do not see the same options. So I am hopeful, maybe there is a 2010 way of getting around that.

Direct Question: Is it possible to make rest api calls in SharePoint 2010 Workflows? if so, please show me your secret sauce.

End Goal: I want to setup reports that pull from several lists and email those to Management. I currently do this with a Powershell script that calls rest api , then emails the report. I want to automate this process. But I am a user, I dont have access to servers and can’t setup timer jobs. So I am trying to figure out some other way to accomplish the same thing to run on a monthly basis, without me having to push the button or manually run it.

What is the best custom C# Library for REST API

I’m going to write a lot of code that works with SharePoint lists and libraries over REST and C# (HttpClient)

I want to create or find helper classes that help me do the following tasks over REST:

  • Get all list items (preferably in nice C# objects with all SP properties)
  • Get item/file by list ID
  • Get items using CAML
  • Delete item/file by ID
  • Update item/file
  • Create folder
  • Upload a file
  • Add List item

Is there a project/library you can recommend I can reuse so that I don’t write all these things myself?

Additional info:

  • CSOM (ClientContext) is not an option
  • There are a lot of samples with REST online, but they are too messy
  • I did some googling, but could not find one good Library/Project online that does all these things in a way I want
  • Preferably, I want this library/project to use HttpClient class

SharePoint Online workflow create folder using rest in custom list

I want to create folder in custom list using SharePoint 2013 workflow platform. I am able to create folder in document library using below URL


but same REST API not working for custom list for creation of folder.

Can anyone help me with this?