MS Graph create onlineMeeting: "onlinemeeting cannot be null." - javascript

I'm currently trying to create online meetings using the Graph Explorer and facing a similiar problem like in this question: onlinemeeting-cannot-be-null-error-when-creating-new-meeting-with-beta-api.
Whenever I'm sending a Post request to https://graph.microsoft.com/v1.0/me/onlineMeetings the answer is a 400 Bad Request error with message: onlinemeeting cannot be null. The body looks like the example from the official documentation:
{
startDateTime:"2020-09-09T14:33:30.8546353-07:00",
endDateTime:"2020-009-09T15:03:30.8566356-07:00",
subject:"test"
}
No matter what, I can't get this to work. Other endpoints work well and the API permissions fit the requirements. Any thoughts on this?

The participants should be provided in the onlineMeeting resource, participants is one of properties in onlineMeeting object, you can also add other properties of onlineMeeting.
So you need to add it to your request body, here is a sample for your reference:
{
"startDateTime":"2019-09-09T14:33:30.8546353-07:00",
"endDateTime":"2019-09-09T15:03:30.8566356-07:00",
"subject":"Application Token Meeting",
"participants": {
"organizer": {
"identity": {
"user": {
"id": "550fae72-d251-43ec-868c-373732c2704f"
}
}
}
}
}

Related

Kintone Add Record API call always returns 'required field' error

Please help me!
It takes two days for me. So I would like to ask for your help.
In my app on Kintone, I have only required field as below.
enter image description here
In postman
Header
Content-Type application/json
X-Cybozu-API-Token b7EMUSEfcDCbb0xxxxxxxxxxxxxxxxxx
Request body with json format
{
"app":xxx,
"record": {
"名": {
"value": "三宅"
}
}
}
I got error as below.
{
"code": "CB_VA01",
"id": "1RY4iPgdkvHACFShdidq",
"message": "入力内容が正しくありません。",
"errors": {
"record.名.value": {
"messages": [
"必須です。"
]
}
}
}
What is the problem and how can I solve it. Please help me!
#Kintone
#Add Record api call error
First of all, I built a test app and used the script you provided, but it worked fine.
And then I tried to mess with the settings and code to recreate the same error, but the only way I was able to recreate it was by making the value empty as follows:
{
"app":XXX,
"record": {
"名": {
"value": ""
}
}
}
The error is basically saying the field is a required field, so I'm assuming the value isn't properly set.
Could you check your settings (such as headers) and see if you are doing it correctly?
Thank you

aws personalize putevents does not update recommendations

I'm trying to use AWS Personalize. After creating dataset and batch inference, I am updating the user-item-interactions with personalize.putEvents (using Javascript SDK, docs)
Snippet:
const awsOpts = { apiVersion, accessKeyId, secretAccessKey, region }
const pEvents = new AWS.PersonalizeEvents(awsOpts)
// ...
const params = {
trackingId, userId, sessionId,
eventList: [{
eventId: (+sentAt) + "",
sentAt,
eventType,
properties: { itemId }
}]
}
pEvents.putEvents(params, (err, data) => err ? reject(err) : resolve(data))
The events seem to be registered. No errors. After that when I create another batch-inference, I would expect that the new user-items would not appear in the recommendations anymore. But the recommendations in the next batch-inference are unchanged. Am I doing something wrong or am I misunderstanding the putEvents-API-call?
Schema for reference:
{
"type": "record",
"name": "Interactions",
"namespace": "com.amazonaws.personalize.schema",
"fields": [
{
"name": "USER_ID",
"type": "string"
},
{
"name": "ITEM_ID",
"type": "string"
},
{
"name": "EVENT_TYPE",
"type": "string"
},
{
"name": "TIMESTAMP",
"type": "long"
}
],
"version": "1.0"
}
One thing seems a bit strange: Cloud watch reports that the lambda was executed twice despite no errors nor timeout exceeded (timeout is set to 10s, and the lambda takes less than 2s). Also Retry attempts is set to 2.
#D.J.Duff (sadly I can't comment)
Are you sure the events added using PutEvent API are considered without retraining ? I have been through the AWS Personalize Doc looking for exactly that and it looked to me that you need to retrain to get those events included and for the runtime api to be able to consider them. Could you point to me where you saw that they are considered without having to retrain ? Thanks
User-item recommendations, at least from the runtime API should change without retraining after some events (that is what it is for and that is how we use it), though perhaps (it is something to check) you need to use the runtime API to see the new recommendations.
(edited to clarify that that the API is called the "runtime" API - thanks to PatrykMilewski for seeking the clarification - and that I am by no means certain that the particular API used is the important thing - I do know that when using the runtime API, the events do have an effect though).
I have tried out the very same usecase with personalize using boto3 sdk. Yes!! Put events can be used to update user-item-interactions. No need to retrain the model after put events. Looks like aws personalize solutions are made compatible to handle the data updated with put events. When I run the next batch inference, after updating interactions with put events API, I could see the change in the recommendations. I verified this with personalized ranking recipe. I could see the recent interacted items getting re-ranked according users recent interactions.

Azure Graph api user creation - property values specified are invalid

I have a problem with Azure AD Graph API integration where we try to create user to existing Active directory. Used azure documentation to work on this (https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/users-operations#UpdateUser)
For some reason the example dataset is not working, but I'm receiving:
{
"odata.error": {
"code": "Request_BadRequest",
"message": {
"lang": "en",
"value": "One or more property values specified are invalid."
},
"values": null
}
}
The dataset I'm passing is
{
"accountEnabled": true,
"displayName": "Test User",
"mailNickname": "TestUser",
"passwordProfile": {
"password": "Test1234",
"forceChangePasswordNextLogin": false
},
"userPrincipalName": "Test#_MY_DOMAIN_.onmicrosoft.com"
}
_MY_DOMAIN_ is one of the domains defined in the Active directory's domains.
If I try e.g. removing any of the required fields, I'm receiving error which defines the missing property.
Listing and updating users is working just fine, there is some weird issue with adding.
Usually, we will get this issue when we haven't set the Url in the correct format. I tested your dataset on my side, it worked fine. Please double check the url.
Here is the capture of my test request:
Any further concern, please feel free to let me know.
Most probably problem was related to Azure AD permissions. Somehow started suddenly working.
One thing figured out is that the error message above will also come e.g. if you have property key mistyped. Sometimes response describes the missing property, but not always.
Thanks everyone for your time..

How to add new google spreadsheet and update using javascript

Im able to get the spreadsheet data from the below reference
https://developers.google.com/sheets/quickstart/js#step_3_run_the_sample
but I didn't found any sample for creating or updating spreadsheet from javascript.
How can I create a new spreadsheet and update it using javascript v4 google API.
Create a spreadsheet using Spreadsheet API:
Make an HTTP requests like:
POST https://sheets.googleapis.com/v4/spreadsheets
This POST request comes with a request body. The request body looks something like:
{
"spreadsheetId": string,
"properties": {
object(SpreadsheetProperties)
},
"sheets": [
{
object(Sheet)
}
],
"namedRanges": [
{
object(NamedRange)
}
],
}
Don't forget to enable the following scopes:
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/spreadsheets
Try it in the oauth playground.
Updating Spreadsheets:
You'll be making use of batchUpdate. This method lets you update any of the spreadsheet details. Changes are grouped together in a batch so that if one request fails, none of the other (potentially dependent) changes is written. The batchUpdate method works by taking one or more Request objects, each one specifying a single kind of request to perform. There are many different kinds of requests. Here's a breakdown on the types of requests, grouped into different categories.
More of that in Updating Spreadsheets docs.
Format looks like:
POST .../v4/spreadsheets/spreadsheetId:batchUpdate
Request body:
{
"requests": [{
"updateSpreadsheetProperties": {
"properties": {"title": "My New Title"},
"fields": "title"
}
}]
}
Full sample here.

Detect when no previous posts available in Facebook Graph posts edge?

I'm accessing the Facebook Graph API for posts and am trying to figure out the pagination handling. I understand the use of paging.next and paging.previous properties of the results but I'd like to know when there are actually previous results. Particularly, when I make the first 'posts' call, I get back a paging.previous url even though there are no previous values. Upon calling that url I get a response with no results.
For example, calling "168073773388372/posts?limit=2" returns the following:
{
"data": [
{
"story": "Verticalmotion test added a new photo.",
"created_time": "2015-12-02T17:04:56+0000",
"id": "168073773388372_442952469233833"
},
{
"message": "http://www.youtube.com/watch?v=QD2Rdeo8vuE",
"created_time": "2013-12-16T23:19:30+0000",
"id": "168073773388372_184840215045061"
}
],
"paging": {
"previous": "https://graph.facebook.com/v2.6/168073773388372/posts?limit=2&format=json&since=1449075896&access_token=****&__paging_token=enc_AdA69SApv4VoBZB0PPZA7W5EivCYQal8KMFmRNkyhr8ZBk4w0YmFEQUJWV3JZBS70ihyMpbqieQaERhY50enqNCMBuIZATadeopYj8xPvQL7Y8KueaQZDZD&__previous=1",
"next": "https://graph.facebook.com/v2.6/168073773388372/posts?limit=2&format=json&access_token=****&until=1387235970&__paging_token=enc_AdAVMaUlPmpxjBmq5ZClVdNpFp7f9MyMFWjE7ygqsMLW7zvSx3eGHLkfwDxdCx0uO3ooAZCKDmCwMWHZA9RNyxkYUPJyjMtO3kynKm5uF2PhoPZB2gZDZD"
}
}
How can I tell if it's the first set of results?
From tidbits scattered around the documentation and web, it seems like the previous url shouldn't be there.
I don't think it matters because I get the same results in the Graph Explorer but I'm using OpenFB to access the API.
You can set the order to be reverse then get the 1st result
https://developers.facebook.com/docs/graph-api/using-graph-api
Ordering
You can order certain data sets chronologically. For example you may sort a photo's comments in reverse chronological order using the key reverse_chronological:
GET graph.facebook.com
/{photo-id}?
fields=comments.order(reverse_chronological)
order must be one of the following values:
*chronological*
*reverse_chronological*

Categories

Resources