When requesting calendars, the ID returned from the calendar sometimes changes.
We saw that the name of calendar differs sometimes (agenda or Calendar) - this is also reflected in the changeKey field, but would that mean that the calendar ID also changes?
It does not happen to all of our clients, just a few. What can cause this? What are we missing?
We already use the Immutable Id headers, but these don't apply to the calendars according to the docs.
{
"id": "AAMkADgyMzdkNzAyLTVhZGEtNDg1Yi***AAAAEGAAAqQIxwV34sQLN18DH-lwsGAAAAAYeRAAA=",
"name": "Agenda",
"color": "auto",
"changeKey": "qr2mXiE5k0+ASL9waSq4XAADFAI=",
"canShare": true,
"canViewPrivateItems": true,
"canEdit": true,
"owner": {
"name": "***",
"address": "***#***.com"
}
},
Any help is appreciated!
IIRC, calendars are actually folders under the covers and therefore are not affected by the ImmutableId prefer header. The reason for this is that folder ids are supposed to stay the same within a given mailbox regardless of where they are moved. As such, a calendar only has one id (PR_ENTRYID) and no immutableId (PR_IMMUTABLE_ENTRYID).
That doesn't of course explain what is happening here. I am curious if it is possible that the calendar folder is getting recreated somehow which would explain why the calendar id would be changing. Can you look at the creation time of the folder to see if it is more recent than you expect it to be?
There is a known issue with calendar folder immutable ids where they do change that is being investigated by our engineering team. Apologies for the inconvenience here.
Related
I am using the Eve Python API Framework for MongoDB. I am writing a feature that allows my users to edit metadata sections for the documents that they are writing.
Example JSON:
{
"metadata": {
"document_type": ["story"],
"keywords": ["fantasy", "thriller"]
}
}
We have a CMS for the document editor that admins can use to allow them to do things like add new metadata fields for the authors (normal users) to add more information about their posts. For example, the site admin may want to add a field called "additional_authors" which is a list of strings. If they add this section to the frontend we would like some way to add it to the Eve Schema on the backend in real time without restarting the server. It is very important that it be real time and not part of a coding change in Eve or requiring Eve to restart.
Our current hard-coded metadata schema looks like this for the document collection:
{
"metadata": {
"type": "dict",
"schema": {
"document_type": {"type": "list", "required": True},
"keywords": {"type": "list", "required": True}
}
}
}
I understand that we can go with a non-strict approach when writing the "metadata" type dict so that it does not care what is inside but from my understanding this means we would not be able to use "projection" properly meaning that if I only wanted to return "metadata.additional_authors" of all documents through my API call, I would not be able to do so. Also, this would mean that we would have to deal with the required check ourselves using hooks instead of the built-in Eve schema check.
Is there anyway around this issue by essentially having a dynamic schema based on a MongoDB document that we can store the entire collection configuration dict in and retrieve it without restarting the server for it to take effect? Even if this means adding a hook to the new schema_dict collection and calling some internal Eve function I am all ears.
Thank you ahead of time for your help.
I have an IoT device that needs to support various operations, one of which is next from the Alexa.PlaybackController. My device is a multimedia device and requires many of the other Controllers as well. I'm including the Alexa.PlaybackController in the discovery response for my devices like so:
{
"type": "AlexaInterface",
"interface": "Alexa.PlaybackController",
"version": "3",
"supportedOperations": ["Next"],
}
I've also tried:
{
"type": "AlexaInterface",
"interface": "Alexa.PlaybackController",
"version": "3",
"properties": {
"supported": [
{"name": "next"}
]
},
}
but neither work. I get a schema error on CloudWatch:
is not valid under any of the given schemas
Looking below at the schema, I see that PlaybackController indeed is not included inside the schema. However, all of the documentation makes it seem like this should be trivial. I'm wondering if I need to include something else to indicate that playback is something that I need.
Is PlaybackController special in some way and unable to be included in combination with other Controllers? I've tried googling about this schema error but it's too vague and nothing's coming up.
Any help would be much appreciated!
__
EDIT:
I see now that video devices seem to get a different set of available Controllers, but there is still reference to using PlaybackController in a lot of places around the regular Smart Home Skill for entertainment devices. Really hope that it's possible!
So should have probably figure this out sooner. I'm using the python validation class provided by Amazon. Turns out that the schema from the same repo simply doesn't include any reference to Alexa.PlaybackController. Therefore, the validation fails every time with the error about mismatching schemas. Maybe they've added some controllers recently and forgot to update the schema.
I submitted an issue to the Smart Home repo here: https://github.com/alexa/alexa-smarthome/issues/62
I want to get the total hours that every user has logged in, in a specific project every week.
In order to achieve this, I'm trying to get the whole worklog in the project, and then filter it by the worklog Author. This is the query I'm using:
https://jira.example.com/rest/api/2/search?startIndex=0&maxResults=100&jql=project=%27Test%20Project%27+and+worklogAuthor=testUser+and+updated%3E=-7d&fields=worklog
This brings back every issue that has been updated in the last 7 days, and the user is related to it. However, it also brings back the worklog of another user that has added time in the same issue for example.
My question is the following, is there a way to filter the query by name, and bring back the worklog of a particular user, without the worklogs of other users that are simply related to the same issue?
The query returns the results in a json format that look like this for every worklog of a user:
"worklogs": [
{
"author": {...}, // 8 items, where there's a 'name' field for the particular user
"updateAuthor": {...}, // 8 items
"comment": "",
"created": "2018-01-03T13:42:15.000+0200",
"updated": "2018-01-03T13:42:15.000+0200",
"started": "2018-01-03T13:42:00.000+0200",
"timeSpent": "1h",
"timeSpentSeconds": 3600,
"id": "10540",
"issueId": "10674"
},
Thanks
I don't think this is possible with jira out of the box. The jira rest api only supports retrieving work logs for issues, not users.
However, there are add-ons like Script Runner that provide additional JQL functions that allow you to query for issues where a specific user has logged work. You can easily execute such a JQL using the search REST API. This will give you a smaller list of issues/work logs to filter on.
Example JQL:
issueFunction in workLogged(on "2015/07/28" by admin)
More info about custom jql functions is available in the Script Runner documentation.
worklogAuthor = currentUser()
or
worklogAuthor = marc
might help you
I'm asking this question to fill a hole in my knowledge, myself having historically been primarily a front-end developer with little concern for server-side code for the longest time. I basically need some way to structure my data so that all relevant information from multiple tables in my database all exist in one place. So, let's say I have a user profile page for a Rails-based site that will use Angular.js on the client. My Angular code might expect a data model like this:
var user = {
"first_name": "Arkady",
"last_name": "Dracul",
"courses": [
{
"name": "Intro to Chemistry",
"id": "CH101",
},
{
"name": "Intro to Computer Science",
"id": "CS101",
},
{
"name": "Intro to Whatever",
"id": "W101",
}
],
"clubs": [
{
"name": "Salsa",
"id": "SDA"
},
{
"name": "Tango",
"id": "TDA"
}
]
}
How on earth do I actually get the data from the various tables in my database to come out structured like this? Mind you, I'm guessing (!) that I may need to have different data models for different views but am uncertain as to whether that would be a good practice if two views are mostly similar. Really, I'm not sure how to go about structuring data for consumption by the front end. Apart from any answers you provide here, are there any books that provide useful beginner-/intermediate-level information for someone like myself?
I'm not sure what you are asking, but if you are on rails, you can use a someUser.to_json to convert your database object to json.
Beside this, if you are trying to implement an API with rails, I strongly recommend grape https://github.com/intridea/grape. It is in active development, and I love it!
You also can build JSON views along with grape using Rabl https://github.com/nesquena/rabl or json_builder https://github.com/dewski/json_builder
I a newbie trying to write a [Ruby ON Rails] spec to make sure user insert is Facebook ID and I can't find anywhere for validate user FB id and direct link to it once clicked. Found https://graph.facebook.com/ but still unsure how to use it.
{
"id": "40796308305",
"name": "Coca-Cola",
"picture": "http://profile.ak.fbcdn.net/hprofile-ak-snc4/hs236.ash2/50516_40796308305_7651_s.jpg",
"link": "http://www.facebook.com/coca-cola",
"category": "Consumer_products",
"website": "http://www.coca-cola.com",
"username": "coca-cola",
"products": "Coca-Cola is the most popular and biggest-selling soft drink in history, as well as the best-known product in the world.\n\nCreated in Atlanta, Georgia, by Dr. John S. Pemberton, Coca-Cola was first offered as a fountain beverage by mixing Coca-Cola syrup with carbonated water. Coca-Cola was introduced in 1886, patented in 1887, registered as a trademark in 1893 and by 1895 it was being sold in every state and territory in the United States. In 1899, The Coca-Cola Company began franchised bottling operations in the United States.\n\nCoca-Cola might owe its origins to the United States, but its popularity has made it truly universal. Today, you can find Coca-Cola in virtually every part of the world.",
"fan_count": 17367199
}
You may use introspection in Graph API by adding metadata field while requesting object information from Graph API to discover the type of object:
http://graph.facebook.com/40796308305?metadata=1
This will return additional object metadata including type property which will be according to Object Type one of: user, page, group, status, photo, etc...