Domino 9.x calendar service create meeting - rest

I have been following this guide to work on Domino 9.0.1
Domino Calendar services
I am using JSON and the POST command works but creates an appointment, what I want to do is create a meeting. I have tried setting other fields like event['x-lotus-appttype'].data or event.AppointmentType = 3 but I still get an appointment.
JSON I am sending
{
"events": [
{
"summary":"Meeting 1",
"location":"Location 1",
"start": {
"date":"2013-12-01",
"time":"13:00:00",
"utc":true
},
"end": {
"date":"2013-12-01",
"time":"14:00:00",
"utc":true
}
}
]
}
What is the correct JSON format to create a meeting ?

Take a look at the following documentation: Event with attendees represented in JSON format
EXAMPLE 4. Event with attendees and time zone array:
{
"x-lotus-charset": {
"data": "UTF-8"
},
"timezones": [
{
"tzid": "Eastern",
"standard": {
"start": {
"date": "1950-11-05",
"time": "02:00:00"
},
"offsetFrom": "-0400",
"offsetTo": "-0500",
"recurrenceRule": "FREQ=YEARLY;BYMONTH=11;BYDAY=1SU;BYHOUR=2;BYMINUTE=0"
},
"daylight": {
"start": {
"date": "1950-03-12",
"time": "02:00:00"
},
"offsetFrom": "-0500",
"offsetTo": "-0400",
"recurrenceRule": "FREQ=YEARLY;BYMONTH=3;BYDAY=2SU;BYHOUR=2;BYMINUTE=0"
}
}
],
"events": [
{
"href": "/mail/dlawson.nsf/api/calendar/events/DB7E0BAC21EC322A85257BD200756E26-Lotus_Notes_Generated",
"id": "DB7E0BAC21EC322A85257BD200756E26-Lotus_Notes_Generated",
"summary": "Staff meeting",
"location": "Ray's office",
"description": "Please email your status update 24 hours before the meeting.",
"start": {
"date": "2013-09-12",
"time": "09:00:00",
"tzid": "Eastern"
},
"end": {
"date": "2013-09-12",
"time": "10:00:00",
"tzid": "Eastern"
},
"class": "public",
"transparency": "opaque",
"sequence": 0,
"last-modified": "20130825T212457Z",
"attendees": [
{
"role": "chair",
"status": "accepted",
"rsvp": false,
"displayName": "Duke Lawson/Peaks",
"email": "DukeLawson#swg.usma.ibm.com"
},
{
"role": "req-participant",
"status": "needs-action",
"rsvp": true,
"displayName": "Dean Melnyk/Peaks",
"email": "DeanMelnyk#swg.usma.ibm.com"
},
{
"role": "req-participant",
"status": "needs-action",
"rsvp": true,
"displayName": "Raymond Chan/Peaks",
"email": "RaymondChan#swg.usma.ibm.com"
}
],
"organizer": {
"displayName": "Duke Lawson/Peaks",
"email": "DukeLawson#swg.usma.ibm.com"
},
"x-lotus-broadcast": {
"data": "FALSE"
},
"x-lotus-notesversion": {
"data": "2"
},
"x-lotus-appttype": {
"data": "3"
}
}
]
}
I hope this can help :)

Related

Query nested object in mongodb without key

I have multiple documents saved which look like the one shown below, how would I query against a nested object without the ID to receive the right document?
Here is what I current, but this doesnt work, as I dont have the ID at the start.
db.collection.find({
"details.hardware.id": 5,
})
This is what ive tested and know works but I dont know the ID -
db.collection.find({
"100201.details.hardware.id": 5,
})
Document example -
[
{
"_id": {
"$oid": "6338b69062433c04642d26ca"
},
"100201": {
"broken": true,
"details": {
"build": {
"id": 1018458,
},
"hardware": {
"id": 5,
"model": {
"id": 131,
},
},
"id": 2811302,
"view": {
"id": 781,
}
},
"id": "100201",
"links": [
{
"details": {
"id": 7832,
},
"id": 15012,
},
{
"description": null,
"details": {
"id": 6528,
"model": {
"id": 530
}
},
"id": 15076,
}
],
"ref": false,
}
}
]
any help would be appreciated

google meet link not getting added while creating events using google calendar API

I am using google calendar API to add events in google calendar,but there is no google meet URL getting attached to the newly created events .what is I am doing wrong here?
this is the POST API I am using to create events https://www.googleapis.com/calendar/v3/calendars/primary/events
request body that I am using
{
"calendarId": "primary",
"conferenceDataVersion":1,
"end": {
"dateTime": "2022-08-12T06:00:00Z",
"timeZone": "Asia/Kolkata"
},
"start": {
"dateTime": "2022-08-12T06:00:00Z",
"timeZone": "Asia/Kolkata"
},
"conferenceData": {
"createRequest": {
"conferenceSolutionKey": {
"type": "hangoutsMeet"
},
"requestId": "fgchvng5"
},
"entryPoints": [
{
"entryPointType": "video"
}
]
},
"summary": "titles are cool"
}
response I am getting
{
"kind": "calendar#event",
"etag": "\"3320574101004000\"",
"id": "d9f87ncse47u7ea7uam1n70bhc",
"status": "confirmed",
"htmlLink": "https://www.google.com/calendar/event?eid=ZDlmODduY3NlNDd1N2VhN3VhbTFuNzBiaGMgYWtoaWxlbTIwMTdAbQ",
"created": "2022-08-12T06:50:50.000Z",
"updated": "2022-08-12T06:50:50.502Z",
"summary": "titles are cool",
"creator": {
"email": "testmail#gmail.com",
"self": true
},
"organizer": {
"email": "testmail#gmail.com",
"self": true
},
"start": {
"dateTime": "2022-08-12T06:00:00Z",
"timeZone": "Asia/Kolkata"
},
"end": {
"dateTime": "2022-08-12T06:00:00Z",
"timeZone": "Asia/Kolkata"
},
"iCalUID": "d9f87ncse47u7ea7uam1n70bhc#google.com",
"sequence": 0,
"reminders": {
"useDefault": true
},
"eventType": "default"
}
After trying for hours i found out that need to pass conferenceDataVersion=1 As a query string in event creation API as follows
https://www.googleapis.com/calendar/v3/calendars/primary/events?conferenceDataVersion=1

Transaction API doesn't work with the payment

Since two weeks we are trying to implement transaction api v3. with Google
payment option. Once we did a transaction the receipt has been displayed.
When we pressed "order" button we got confirmation that the transaction is
being confirmed but in developer Dotpay panel there were no visible
payments.
After a few transactions action stopped displaying the receipt and it
informed that "something went wrong. Try again later". When we removed googlePaymentOption from
TransactionDecision the receipt has been displayed but we were still not
able to make any transactions.
It lasted for a few days and after that we were able to make transactions again but there were
still no payments visible.
Can you please have a look?
Hereby you can find our transaction logs:
{
"conversationToken": "[\"_actions_on_google\",\"podsumowanie\",\"rezerwuj_dostawe\",\"zmien_zamowienie_lista\",\"start_index\",\"modyfikuj_koszyk\",\"dodaj_produkt\"]",
"expectUserResponse": true,
"expectedInputs": [{
"inputPrompt": {
"richInitialPrompt": {
"items": [{
"simpleResponse": {
"textToSpeech": "Transaction Decision Placeholder."
}
}]
}
},
"possibleIntents": [{
"intent": "actions.intent.TRANSACTION_DECISION",
"inputValueData": {
"#type": "type.googleapis.com/google.actions.transactions.v3.TransactionDecisionValueSpec",
"order": {
"merchantOrderId": "9g1blj8rmvo",
"userVisibleOrderId": "9g1blj8rmvo",
"buyerInfo": {
"email": "janedoe#gmail.com",
"firstName": "Jane",
"lastName": "Doe",
"displayName": "Jane Doe"
},
"createTime": "2020-06-09T14:02:08.812Z",
"lastUpdateTime": "2020-06-09T14:02:08.812Z",
"transactionMerchant": {
"id": "book_store_1",
"name": "Book Store"
},
"contents": {
"lineItems": [{
"id": "memoirs_4",
"name": "Our memoirs",
"priceAttributes": [{
"type": "REGULAR",
"name": "Item Price",
"state": "ACTUAL",
"amount": {
"currencyCode": "PLN",
"amountInMicros": "1000000"
},
"taxIncluded": true
}, {
"type": "TOTAL",
"name": "Total Price",
"state": "ACTUAL",
"amount": {
"currencyCode": "PLN",
"amountInMicros": "1000000"
},
"taxIncluded": true
}],
"notes": ["Special introduction by author."],
"purchase": {
"quantity": 1
}
}]
},
"priceAttributes": [{
"type": "SUBTOTAL",
"name": "Subtotal",
"state": "ESTIMATE",
"amount": {
"currencyCode": "PLN",
"amountInMicros": "1000000"
},
"taxIncluded": true
}, {
"type": "DELIVERY",
"name": "Delivery",
"state": "ACTUAL",
"amount": {
"currencyCode": "PLN"
},
"taxIncluded": true
}, {
"type": "TAX",
"name": "Tax",
"state": "ESTIMATE",
"amount": {
"currencyCode": "PLN"
},
"taxIncluded": true
}, {
"type": "TOTAL",
"name": "Total Price",
"state": "ESTIMATE",
"amount": {
"currencyCode": "PLN",
"amountInMicros": "1000000"
},
"taxIncluded": true
}],
"followUpActions": [{
"type": "VIEW_DETAILS",
"title": "View details",
"openUrlAction": {
"url": "http://example.com"
}
}, {
"type": "CALL",
"title": "Call us",
"openUrlAction": {
"url": "tel:+16501112222"
}
}, {
"type": "EMAIL",
"title": "Email us",
"openUrlAction": {
"url": "mailto:person#example.com"
}
}],
"termsOfServiceUrl": "http://www.example.com",
"note": "The Memoir collection",
"purchase": {
"status": "CREATED",
"type": "RETAIL",
"returnsInfo": {
"daysToReturn": 1,
"policyUrl": "http://www.example.com"
},
"fulfillmentInfo": {
"id": "FULFILLMENT_SERVICE_ID",
"fulfillmentType": "DELIVERY",
"expectedFulfillmentTime": {
"timeIso8601": "2025-09-25T18:00:00.877Z"
},
"price": {
"type": "REGULAR",
"name": "Delivery Price",
"state": "ACTUAL",
"amount": {
"currencyCode": "PLN"
},
"taxIncluded": true
},
"fulfillmentContact": {
"email": "janedoe#gmail.com",
"firstName": "Jane",
"lastName": "Doe",
"displayName": "Jane Doe"
}
},
"purchaseLocationType": "ONLINE_PURCHASE",
"userVisibleStatusLabel": "CREATED"
}
},
"orderOptions": {
"userInfoOptions": {
"userInfoProperties": ["EMAIL"]
}
},
"paymentParameters": {
"googlePaymentOption": {
"facilitationSpec": "{\"apiVersion\":2,\"apiVersionMinor\":0,\"merchantInfo\":{\"merchantName\":\"Frisco\"},\"allowedPaymentMethods\":[{\"type\":\"CARD\",\"parameters\":{\"allowedAuthMethods\":[\"PAN_ONLY\"],\"allowedCardNetworks\":[\"MASTERCARD\",\"VISA\"]},\"tokenizationSpecification\":{\"type\":\"PAYMENT_GATEWAY\",\"parameters\":{\"gateway\":\"dotpay\",\"gatewayMerchantId\":\"705777\"}}}],\"transactionInfo\":{\"totalPriceStatus\":\"FINAL\",\"totalPrice\":\"1.00\",\"currencyCode\":\"PLN\"}}"
}
},
"presentationOptions": {
"actionDisplayName": "PLACE_ORDER"
}
}
}],
"speechBiasingHints": ["$usun", "$dalej", "$events", "$wroc", "$product", "$deleteProduct", "$sztuka", "$dodaj", "$ilosc", "$produkty", "$deleteOrder"]
}],
"responseMetadata": {
"status": {
"message": "Success (200)"
},
"queryMatchInfo": {
"queryMatched": true,
"intent": "777d19a8-c59a-46d2-ae22-212827b5726e"
}
}
} ```
Currently, Google is working with a limited number of partners that can get access to the production Google Pay API. If you're not one of those partners, you're welcome to read the documentation and test the integration using the sandbox environment.
https://developers.google.com/assistant/transactions/physical/dev-guide-physical-gpay
If you are indeed one of these partners, please reach out to your Google contact.

Mongodb query inside array with single ObjectID

Here is the json data i am trying to process. I am trying to get messages between two dates. The data is already imported to mongodb.
{
"items": [
{
"date": "2017-04-06T09:46:20.387420+00:00",
"from": {
"id": 4624534,
"links": {
"self": "https://api.hipchat.com/v2/user/4624534"
},
"mention_name": "holy",
"name": "holy god",
"version": "Y1ML0DRJ"
},
"id": "38f90558-2a23-458b-b87b-88dbdf997f7a",
"mentions": [],
"message": "ping",
"type": "message"
},
{
"date": "2017-04-08T04:30:44.240163+00:00",
"from": {
"id": 4624534,
"links": {
"self": "https://api.hipchat.com/v2/user/4624534"
},
"mention_name": "holy",
"name": "holy god",
"version": "Y1ML0DRJ"
},
"id": "822b81e0-8077-41d7-bc50-fc9e4eba7d9e",
"mentions": [],
"message": "https://twitter.com/",
"type": "message"
},
{
"attach_to": "822b81e0-8077-41d7-bc50-fc9e4eba7d9e",
"card": "{\"style\": \"link\", \"description\": \"From breaking news and entertainment to sports and politics, get the full story with all the live commentary.\", \"format\": \"medium\", \"url\": \"https://twitter.com/i/hello\", \"title\": \"Twitter. It's what's happening.\", \"id\": \"https://twitter.com/i/hello\", \"validation\": {\"safehtmls\": [\"activity.html\"], \"safeurls\": [\"url\", \"images.image\", \"images.image-small\", \"images.image-big\", \"icon.url\", \"icon.url#2x\", \"icon\", \"thumbnail.url#2x\", \"thumbnail.url\"]}, \"type\": \"link\", \"thumbnail\": {\"url\": \"https://pbs.twimg.com/ext_tw_video_thumb/850335753108324353/pu/img/T8cV-7bGbbguiRGV.jpg\", \"width\": 599, \"type\": \"image/jpeg\", \"height\": 337}, \"icon\": {\"url\": \"https://abs.twimg.com/a/1491551685/img/t1/favicon.svg\", \"type\": \"image\"}}",
"color": "gray",
"date": "2017-04-08T04:30:44.825185+00:00",
"from": "Link",
"id": "7ccaf2b9-09bb-45ac-a025-c93f1f7df745",
"mentions": [],
"message": "\n\n\n<p><b>Twitter. It's what's happening.</b></p>\n\n\n<p>From breaking news and entertainment to sports and politics, get the full story with all the live commentary.</p>\n\n",
"message_format": "html",
"notification_sender": {
"client_id": "888aec94-afee-45d8-89f7-ae077fcc4a7c",
"id": "hipchat-clinky",
"type": "addon"
},
"type": "notification"
},
{
"date": "2017-04-08T09:39:00.468858+00:00",
"from": {
"id": 4624534,
"links": {
"self": "https://api.hipchat.com/v2/user/4624534"
},
"mention_name": "abcholy",
"name": "holy god",
"version": "Y1ML0DRJ"
},
"id": "8a0de0e0-c312-490e-afcc-b0b16404cd67",
"mentions": [],
"message": "second message",
"type": "message"
},
{
"date": "2017-04-11T15:32:39.367744+00:00",
"from": {
"id": 4624534,
"links": {
"self": "https://api.hipchat.com/v2/user/4624534"
},
"mention_name": "abcholy",
"name": "holy god",
"version": "Y1ML0DRJ"
},
"id": "4c1a090c-cb71-4548-8f96-a03ec2f3fb3b",
"mentions": [],
"message": "https://gist.github.com/abcholy/6d86352e73eab21cdd4fe78b37bd5aa0",
"type": "message"
},
{
"date": "2017-04-11T15:33:42.730696+00:00",
"from": {
"id": 4624534,
"links": {
"self": "https://api.hipchat.com/v2/user/4624534"
},
"mention_name": "abcholy",
"name": "holy god",
"version": "Y1ML0DRJ"
},
"id": "a42b5267-937b-4de5-8c51-de4625742a4a",
"mentions": [],
"message": "hello",
"type": "message"
}
],
"links": {
"self": "https://api.hipchat.com/v2/room/3452990/history"
},
"maxResults": 100,
"startIndex": 0
}
Now, I entered this mongo query:
db.data.find( {"_id" : ObjectId("58ee59f7f35120aaba26cff0")},{ items: { $elemMatch: { "date": {$gte:"2017-04-08T04:30:44.240163+00:00"} } } } )
But it returns just a single item which is the first one. If I try $lte, it also returns single item but I want all the items which fall under the specification of date. How to achieve that?
Your date field is a string, it has no concept of what's greater than that string. You'll need to convert it to a ISODate or another date format for you to use the $gte or $lte operation.

what is the date format from stash api?

In the below json response, what is the date format for createdDate and updatedDate? I am not sure how to work in reverse to find what format the api is using for date. I couldn't find this any where in the documentation.
{
"size": 1,
"limit": 25,
"isLastPage": true,
"values": [
{
"id": 101,
"version": 1,
"title": "Talking Nerdy",
"description": "It’s a kludge, but put the tuple from the database in the cache.",
"state": "OPEN",
"open": true,
"closed": false,
"createdDate": 1359075920,
"updatedDate": 1359085920,
"fromRef": {
"id": "refs/heads/feature-ABC-123",
"repository": {
"slug": "my-repo",
"name": null,
"project": {
"key": "PRJ"
}
}
},
"toRef": {
"id": "refs/heads/master",
"repository": {
"slug": "my-repo",
"name": null,
"project": {
"key": "PRJ"
}
}
},
"locked": false,
"author": {
"user": {
"name": "tom",
"emailAddress": "tom#example.com",
"id": 115026,
"displayName": "Tom",
"active": true,
"slug": "tom",
"type": "NORMAL"
},
"role": "AUTHOR",
"approved": true
},
"reviewers": [
{
"user": {
"name": "jcitizen",
"emailAddress": "jane#example.com",
"id": 101,
"displayName": "Jane Citizen",
"active": true,
"slug": "jcitizen",
"type": "NORMAL"
},
"role": "REVIEWER",
"approved": true
}
],
"participants": [
{
"user": {
"name": "dick",
"emailAddress": "dick#example.com",
"id": 3083181,
"displayName": "Dick",
"active": true,
"slug": "dick",
"type": "NORMAL"
},
"role": "PARTICIPANT",
"approved": false
},
{
"user": {
"name": "harry",
"emailAddress": "harry#example.com",
"id": 99049120,
"displayName": "Harry",
"active": true,
"slug": "harry",
"type": "NORMAL"
},
"role": "PARTICIPANT",
"approved": true
}
],
"link": {
"url": "http://link/to/pullrequest",
"rel": "self"
},
"links": {
"self": [
{
"href": "http://link/to/pullrequest"
}
]
}
}
],
"start": 0
}
Just making a note that in my case, it is a UNIX timestamp, but I have to remove three trailing zeroes. E.g. the data looks like this:
"createdDate":1555621993000
If interpreted as a UNIX timestamp, that would be 09/12/51265 # 4:16am (UTC).
By removing the three trailing zeroes I get 1555621993, which is the correct time 04/18/2019 # 9:13pm (UTC)
Your mileage may vary but that was a key discovery for me :)
It looks like a UNIX timestamp.
https://en.wikipedia.org/wiki/Unix_time