UCWA - Accepting an incoming onlineMeetingInvitation - ucwa

Summary
I have a UCWA application and I would like it to accept incoming onlineMeetingInvitation events and then monitor all messages. While I have been able to accept the invitation successfully, I do not receive events for any messages. I believe this may be because the messaging modality is not connected by default, so I am attempting to addMessaging. Unfortunately, this request always returns with a 409 error and the message,
There was a conflict that prevented the operation from starting. Please try again later.
Does anyone know,
a. If attempting to addMessaging is correct?
b. Why I am getting the above error?
Details
I set up have two normal Lync Clients in conversation. I then invite my UCWA application's user into the conversation. This results in the following response on my event channel, (including the accept link as expected)
{
"_links": {
"self": {
"href": "/ucwa/oauth/v1/applications/102547331865/events?ack=28"
},
"next": {
"href": "/ucwa/oauth/v1/applications/102547331865/events?ack=29"
}
},
"sender": [
{
"rel": "me",
"href": "/ucwa/oauth/v1/applications/102547331865/me",
"events": [
{
"link": {
"rel": "presence",
"href": "/ucwa/oauth/v1/applications/102547331865/me/presence"
},
"type": "updated"
}
]
},
{
"rel": "communication",
"href": "/ucwa/oauth/v1/applications/102547331865/communication",
"events": [
{
"link": {
"rel": "onlineMeetingInvitation",
"href": "/ucwa/oauth/v1/applications/102547331865/communication/onlineMeetingInvitations/6cb18668cbda428e839652ae1f6cd58f"
},
"_embedded": {
"onlineMeetingInvitation": {
"direction": "Incoming",
"importance": "Normal",
"threadId": "AdIw2sMaOjuEJHfcRJiiK5Czug+5Ug==",
"state": "Connecting",
"subject": "",
"onlineMeetingUri": "sip:test.user2#xxx.xxx.xx;gruu;opaque=app:conf:focus:id:KS77KG4B",
"availableModalities": [
"Messaging"
],
"_links": {
"self": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/onlineMeetingInvitations/6cb18668cbda428e839652ae1f6cd58f"
},
"to": {
"href": "/ucwa/oauth/v1/applications/102547331865/people/test.user1#xxx.xxx.xx"
},
"conversation": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d"
},
"accept": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/onlineMeetingInvitations/6cb18668cbda428e839652ae1f6cd58f/accept"
},
"decline": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/onlineMeetingInvitations/6cb18668cbda428e839652ae1f6cd58f/decline"
}
},
"_embedded": {
"from": { ....
I perform a POST on the 'accept' href which responds succesfully with no content. I then receive 2 event responses, the 2nd of which includes the following
...
{
"rel": "communication",
"href": "/ucwa/oauth/v1/applications/102547331865/communication",
"events": [
{
"link": {
"rel": "conversation",
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d"
},
"_embedded": {
"conversation": {
"state": "Conferenced",
"threadId": "AdIw2sMaOjuEJHfcRJiiK5Czug+5Ug==",
"subject": "",
"activeModalities": [
"Messaging"
],
"importance": "Normal",
"participantCount": 3,
"audienceMute": "Disabled",
"audienceMessaging": "Enabled",
"recording": false,
"_links": {
"self": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d"
},
"applicationSharing": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/applicationSharing"
},
"audioVideo": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/audioVideo"
},
"dataCollaboration": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/dataCollaboration"
},
"messaging": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/messaging"
},
"phoneAudio": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/phoneAudio"
},
"localParticipant": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/participants/test.user1#xxx.xxx.xx",
"title": "Test User1"
},
"addParticipant": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/participantInvitations?conversation=3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d"
},
"leaders": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/participants?filter=leaders"
},
"attendees": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/participants?filter=attendees"
},
"lobby": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/participants?filter=lobby"
},
"onlineMeeting": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/onlineMeeting"
},
"enableAudienceMuteLock": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/enableAudienceMuteLock"
},
"disableAudienceMessaging": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/disableAudienceMessaging"
}
},
"rel": "conversation"
}
},
"type": "updated"
}
]
},
...
{
"link": {
"rel": "messaging",
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/messaging"
},
"_embedded": {
"messaging": {
"state": "Disconnected",
"_links": {
"self": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d/messaging"
},
"conversation": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/conversations/3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d"
},
"addMessaging": {
"href": "/ucwa/oauth/v1/applications/102547331865/communication/messagingInvitations?conversation=3b80d6be-b57c-4cc1-b10d-cd5c89ffa09d"
}
},
"rel": "messaging"
}
},
"type": "updated"
},
...
Again, I believe this is as expected and at this point the original Lync Clients are showing 3 participants as expected.
Next I try to do a POST to the addMessaging href in the above snippet. The POST has no body.
URI : https://xxx.xxx.xx/ucwa/oauth/v1/applications/102547331865/communication/messagingInvitations?conversation=0ae942e4-9133-4888-a0fb-8a7b182fff00
Method : POST
Headers : {Accept=[text/plain, application/json, application/*+json, */*], Content-Length=[0]}
Request body:
The result is a 409 Conflict, and at no point do I receive events for new messages added to the conversation by the two Lync clients.
Header {Cache-Control=[no-cache], Pragma=[no-cache], Via=[1.1 DEVLYNC2.xxx.xxx.xx RtcInt], Content-Length=[120], Content-Type=[application/json], Expires=[-1], Server=[Microsoft-IIS/7.5], X-MS-Server-Fqdn=[DEVLYNC2.xxx.xx.xx], X-AspNet-Version=[4.0.30319], Strict-Transport-Security=[max-age=31536000; includeSubDomains], X-Powered-By=[ASP.NET], Date=[Fri, 28 Oct 2016 07:31:51 GMT]}
Body {"code":"Conflict","message":"There was a conflict that prevented the operation from starting. Please try again later."}

your problem seems solved by adding the operationId, even though it was mentioned as optional in the UCWA documentation.
The root cause is probably that there is a reproducable bug in the display of the microsoft documentation about UCWA : for example https://ucwa.skype.com/documentation/resources-startmessaging the dropdown list to select the version of the API is not visible.
This bug happens only with Mozilla Firefox and I see in your logs that it is the version you are using (nb : I tested with version 61).
With Chrome it displays correctly and you can see that the operationID is sometimes mandatory (on some versions of the API only).
The version of the API used by your server can be determined from this link :
https://learn.microsoft.com/en-us/skype-sdk/ucwa/versioning
I hope this can help you to solve further problems with UCWA - without the need to use the trial-and-error method.

Related

GA4 data api - (not set) in custom dimensions

We are currently using GA4 data API and faced the issue when custom dimensions returns value "(not set)".
We were using the following article to set custom dimension for the session count, but we still receiving "(not set)" values.
Example of request:
{
"dateRanges": [
{
"startDate": "2021-09-01",
"endDate": "2021-09-05"
}
],
"offset": 0,
"limit": 100,
"dimensionFilter": {
"filter": {
"fieldName": "eventName",
"stringFilter": {
"matchType": 1,
"value": "screen_view",
"caseSensitive": true
}
}
},
"dimensions": [
{
"name": "customUser:applicationID"
},
{
"name": "customEvent:ga_session_number"
},
{
"name": "dateHour"
},
{
"name": "platform"
},
{
"name": "sessionSource"
},
{
"name": "sessionMedium"
},
{
"name": "sessionCampaignName"
},
{
"name": "deviceCategory"
}
],
"metrics": [
{
"name": "userEngagementDuration"
}
]
}
Does anybody have any idea why it may happen?

Logic App with azure monitor and conditions

I create a workflow with logicAPP. The goal is to notify a team when patch is missing for VM. I use azure monitor in the logic app to set the query. I decided to put after the Azure Monitor , a condition to know if the query table is empty or have data. if the table is empty, the logix is true , so it does'nt send notification, and when its false , it sends notification.
When I run , I got a logic errors. Normally , the table has not data but after condition , the function empty([my_table]) returns false and sends me notification with the result ("The query yielded no data")
what is the problem ??
Thanks
Based on the above shared requirement we have created the logic app & tested it our local environment , it is working fine.
Below is the complete logic code :
{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"Condition_2": {
"actions": {
"Terminate_2": {
"inputs": {
"runStatus": "Cancelled"
},
"runAfter": {},
"type": "Terminate"
}
},
"else": {
"actions": {
"Send_an_email_(V2)_2": {
"inputs": {
"body": {
"Body": "<p>#{base64ToString(body('Run_query_and_visualize_results')?['body'])}</p>",
"Subject": "list of vm from update management ",
"To": "<UserEmailId>"
},
"host": {
"connection": {
"name": "#parameters('$connections')['office365']['connectionId']"
}
},
"method": "post",
"path": "/v2/Mail"
},
"runAfter": {},
"type": "ApiConnection"
}
}
},
"expression": {
"and": [
{
"equals": [
"#length(body('Run_query_and_visualize_results')?['body'])",
0
]
}
]
},
"runAfter": {
"Run_query_and_visualize_results": [
"Succeeded"
]
},
"type": "If"
},
"Run_query_and_visualize_results": {
"inputs": {
"body": "Update\n| where Classification == 'Security Updates' or Classification == 'Critical Updates'\n| where UpdateState == 'Needed'\n| summarize by Computer,ResourceGroup,Classification,UpdateState\n|sort by Computer",
"host": {
"connection": {
"name": "#parameters('$connections')['azuremonitorlogs']['connectionId']"
}
},
"method": "post",
"path": "/visualizeQuery",
"queries": {
"resourcegroups": "<Resource_group_Name",
"resourcename": "<log analytics workspacename",
"resourcetype": "Log Analytics Workspace",
"subscriptions": "<subcription_id>",
"timerange": "Last 12 hours",
"visType": "Html Table"
}
},
"runAfter": {},
"type": "ApiConnection"
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"parameters": {
"$connections": {
"defaultValue": {},
"type": "Object"
}
},
"triggers": {
"Recurrence": {
"evaluatedRecurrence": {
"frequency": "Hour",
"interval": 3
},
"recurrence": {
"frequency": "Hour",
"interval": 3
},
"type": "Recurrence"
}
}
},
"parameters": {
"$connections": {
"value": {
"azuremonitorlogs": {
"connectionId": "/subscriptions/<subcription-id>/resourceGroups/<resource-group>/providers/Microsoft.Web/connections/azuremonitorlogs",
"connectionName": "azuremonitorlogs",
"id": "/subscriptions/<subcription-id>/providers/Microsoft.Web/locations/northcentralus/managedApis/azuremonitorlogs"
},
"office365": {
"connectionId": "/subscriptions/<subcription-id>/resourceGroups/<resource-group>/providers/Microsoft.Web/connections/office365",
"connectionName": "office365",
"id": "/subscriptions/<subcription-id>/providers/Microsoft.Web/locations/northcentralus/managedApis/office365"
}
}
}
}
}
please find the reference output of the above logic sample run :

How can I get inventory item quantity by calling NETSUITE REST API on postman

I am using Postman to testing NETSUITE API.
I have given
Consumer key
Consumer Secret
Access Token
Token Secret
in Authorization OAuth1.0 type.
I called the API "inventoryitem" with item id
**https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/inventoryitem/155**
and got inventory item details in response..
{
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/inventoryitem/155"
}
],
"assetAccount": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/account/216"
}
],
"id": "216",
"refName": "1420 Inventory Asset"
},
"atpmethod": "CUMULATIVE_ATP_WITH_LOOK_AHEAD",
"autoLeadTime": false,
"autoPreferredStockLevel": false,
"autoReorderPoint": false,
"averageCost": 25.5,
"billExchRateVarianceAcct": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/account/324"
}
],
"id": "324",
"refName": "5017 Bill exchange variance"
},
"billPriceVarianceAcct": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/account/323"
}
],
"id": "323",
"refName": "5016 Bill Price Variance"
},
"billQtyVarianceAcct": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/account/322"
}
],
"id": "322",
"refName": "5015 Bill Quantity Variance"
},
"binNumber": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/inventoryitem/155/binNumber"
}
]
},
"class": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/classification/22"
}
],
"id": "22",
"refName": "Healthcare & Nutrition"
},
"cogsAccount": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/account/217"
}
],
"id": "217",
"refName": "5005 COGS : Cost of Goods Sold"
},
"copyDescription": false,
"cost": 13.4,
"costEstimateType": "AVGCOST",
"costingMethod": "FIFO",
"costingMethodDisplay": "Lot Numbered",
"costUnits": "per Box 12",
"createdDate": "2018-11-20T13:48:00Z",
"currency": {
"links": [],
"id": "British pound",
"refName": "British pound"
},
"custitem1": "511265",
"custitem3": 12,
"custitem_atlas_approved": false,
"custitem_nsts_ep_item_category": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/inventoryitem/155/custitem_nsts_ep_item_category"
}
]
},
"custitem_wmsse_itemfamily": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/customrecord_wmsse_item_family/4"
}
],
"id": "4",
"refName": "Non-Refrigerated Item Family"
},
"custitem_wmsse_itemgroup": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/customrecord_wmsse_itemgroup/2"
}
],
"id": "2",
"refName": "Non-Refrigerated Item Group"
},
"custitem_wmsse_mix_item": true,
"custitem_wmsse_mix_lot": true,
"custitemcustcol4": "250ML",
"customForm": "139",
"custReturnVarianceAccount": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/account/326"
}
],
"id": "326",
"refName": "4045 CUSTOMER RETURN VARIANCE"
},
"displayName": "DETTOL 12X250ML",
"dontshowprice": false,
"enforceminqtyinternally": true,
"excludefromsitemap": false,
"froogleproductfeed": false,
"handlingCostUnits": "per Box 12",
"id": "155",
"includeChildren": true,
"incomeAccount": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/account/251"
}
],
"id": "251",
"refName": "4040 Sales : Income"
},
"internalid": 155,
"isdonationitem": false,
"isDropShipItem": false,
"isgcocompliant": false,
"isInactive": false,
"isonline": false,
"isSpecialOrderItem": false,
"itemId": "DETTOL 250ML",
"itemType": "InvtPart",
"itemVendor": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/inventoryitem/155/itemVendor"
}
]
},
"lastModifiedDate": "2020-01-21T18:07:00Z",
"lastPurchasePrice": 24.53,
"locations": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/inventoryitem/155/locations"
}
]
},
"matchBillToReceipt": true,
"minimumquantityUnits": "Box 12",
"nextagproductfeed": false,
"offerSupport": true,
"preferredLocation": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/location/20"
}
],
"id": "20",
"refName": "8905 Highway 50"
},
"productfeed": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/inventoryitem/155/productfeed"
}
]
},
"purchaseDescription": "DETTOL 12X250ML",
"purchaseOrderAmount": 0.1,
"purchaseOrderQuantity": 0.1,
"purchaseUnit": "9",
"quantityReorderUnits": "Quantity On Hand, Reorder Point, Quantity On Order, and Quantity Committed are in Box 12",
"receiptAmount": 0.1,
"receiptQuantity": 0.1,
"salesDescription": "DETTOL 250ML",
"saleUnit": "9",
"seasonalDemand": false,
"shipIndividually": false,
"shippingCostUnits": "per Box 12",
"shoppingproductfeed": false,
"shopzillaproductfeed": false,
"showdefaultdonationamount": false,
"sitecategory": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/inventoryitem/155/sitecategory"
}
]
},
"stockUnit": "9",
"Subsidiary": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/inventoryitem/155/Subsidiary"
}
]
},
"supplyReplenishmentMethod": "TIME_PHASED",
"taxSchedule": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/"
}
],
"id": "2",
"refName": "Taxable"
},
"totalValue": 3522.66,
"trackLandedCost": true,
"transferPriceUnits": "per Box 12",
"unitsType": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/unitstype/1"
}
],
"id": "1",
"refName": "Each"
},
"upcCode": "50158072",
"useBins": true,
"useMarginalRates": false,
"vendReturnVarianceAccount": {
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/account/325"
}
],
"id": "325",
"refName": "5020 VENDOR RETURN VARIANCE"
},
"weight": 3.0,
"weightUnit": "3",
"weightUnits": "per Box 12",
"yahooproductfeed": false
}
but the item quantity is missing in this detail. I just want to get item quantity and its availability status.
I have also called API "inventorystatus"
https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/inventorystatus/
and got this detail..
{
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/inventorystatus?limit=1000&offset=0"
}
],
"count": 2,
"hasMore": false,
"items": [
{
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/inventorystatus/2"
}
],
"id": "2"
},
{
"links": [
{
"rel": "self",
"href": "https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/inventorystatus/1"
}
],
"id": "1"
}
],
"offset": 0,
"totalResults": 2
}
I called API "inventorystatus" with specific item id
**https://1234567.suitetalk.api.netsuite.com/rest/platform/v1/record/inventorystatus/134**
and got this
{
"type": "https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5",
"title": "Record does not exist.",
"status": 404,
"o:errorCode": "NONEXISTENT_ID"
}
but record is available.
Please anyone tell me which API I should have to use to get item availability status and its available quantity(base units).
NetSuite REST WS are using HATEOAS links to navigate through the resources.
These can be sublists and subrecords. (See NetSuite Help Center: REST Web Services Key Concepts and NetSuite Record Structure).
By default, these resources are not displayed in the request, but you can access them via HATEOAS links or with a query parameter expandSubResources=true.
To answer first part of your question:
If you want to see, for example, quantity in different locations on your Inventory Item, so can send this request:
GET .../v1/record/inventoryitem/155/locations/1
In your second request, so can see that there are two instances of Inventory Status record with IDs 1 and 2. Following request should display you all body fields on that record:
GET .../v1/record/inventorystatus/1

After running my logic app, it shows some error message as" "We couldn't convert to Number.\r\n "

I am collecting data from sensors and upload to AZURE cosmo. My logic app on AZURE keep failing and show the following message
{
"status": 400,
"message": "We couldn't convert to Number.\r\n inner exception: We
couldn't convert to Number.\r\nclientRequestId:xxxxxxx",
"source": "sql-ea.azconn-ea.p.azurewebsites.net"
}
Below are the input data from cosmo. I saw that the input data has shown "ovf" and "inf". I have tried convert the data type of that column to other data type like bigiant and numeric and resubmitted. Still did not fixed that.
{
"Device": "DL084",
"Device_Group": "DLL",
"Time": "2019-09-04T11:45:20.0000000",
"acc_x_avg": "ovf",
"acc_x_stdev": "inf",
"acc_y_avg": "3832.88",
"acc_y_stdev": "2850.45",
"acc_z_avg": "13304.38",
"acc_z_stdev": "2289.86",
"cc_volt": "3.900293",
"cp_volt": "1.940371",
"fp_volt": "0.718475",
"id": "xxxxxxxxxxxxxxxxxxxx",
"ls_volt": "4.882698",
"millis": "1073760.00",
"rs_rpm": "0.00",
"smp_volt": "1.070381"
}
I have also tried to convert the data to string. And it will show
"Failed to execute query. Error: Operand type clash: numeric is
incompatible with ntext"
The question is how can I eliminate this error? How can I know the error is definitely due to the "inf" and "ovf" error?
The logic app code is as below
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"For_each": {
"actions": {
"Delete_a_document": {
"inputs": {
"host": {
"connection": {
"name": "#parameters('$connections')['documentdb']['connectionId']"
}
},
"method": "delete",
"path": "/dbs/#{encodeURIComponent('iot')}/colls/#{encodeURIComponent('messages')}/docs/#{encodeURIComponent(items('For_each')['id'])}"
},
"runAfter": {
"Insert_row": [
"Succeeded"
]
},
"type": "ApiConnection"
},
"Insert_row": {
"inputs": {
"body": {
"Device": "#{item()['device']}",
"Device_Group": "#{items('For_each')['devicegroup']}",
"Time": "#{addHours(addSeconds('1970-01-01 00:00:00', int(items('For_each')['time'])), 8)}",
"acc_x_avg": "#items('For_each')['acc_x_avg']",
"acc_x_stdev": "#items('For_each')['acc_x_stdev']",
"acc_y_avg": "#items('For_each')['acc_y_avg']",
"acc_y_stdev": "#items('For_each')['acc_y_stdev']",
"acc_z_avg": "#items('For_each')['acc_z_avg']",
"acc_z_stdev": "#items('For_each')['acc_z_stdev']",
"cc_volt": "#items('For_each')['cc_volt']",
"cp_volt": "#items('For_each')['cp_volt']",
"fp_volt": "#items('For_each')['fp_volt']",
"id": "#{guid()}",
"ls_volt": "#items('For_each')['ls_volt']",
"millis": "#items('For_each')['millis']",
"rs_rpm": "#items('For_each')['rs_rpm']",
"smp_volt": "#items('For_each')['smp_volt']"
},
"host": {
"connection": {
"name": "#parameters('$connections')['sql']['connectionId']"
}
},
"method": "post",
"path": "/datasets/default/tables/#{encodeURIComponent(encodeURIComponent('[dbo].[RCD]'))}/items"
},
"runAfter": {},
"type": "ApiConnection"
}
},
"foreach": "#body('Query_documents')?['Documents']",
"runAfter": {
"Query_documents": [
"Succeeded"
]
},
"type": "Foreach"
},
"Query_documents": {
"inputs": {
"body": {
"query": "SELECT \t\t * \nFROM \t\t\tc \nWHERE \t\t\tc.devicegroup = 'DLL' ORDER BY c._ts"
},
"headers": {
"x-ms-max-item-count": 1000
},
"host": {
"connection": {
"name": "#parameters('$connections')['documentdb']['connectionId']"
}
},
"method": "post",
"path": "/dbs/#{encodeURIComponent('iot')}/colls/#{encodeURIComponent('messages')}/query"
},
"runAfter": {},
"type": "ApiConnection"
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"parameters": {
"$connections": {
"defaultValue": {},
"type": "Object"
}
},
"triggers": {
"Recurrence": {
"recurrence": {
"frequency": "Minute",
"interval": 30
},
"type": "Recurrence"
}
}
}
}

Jira REST API: create issue linked to another one

I'd like to link an issue to an existing one at creation using the REST API. The idea is not to CREATE then UPDATE, but just CREATE.
Here is my JSON:
{
"issueUpdates": [
{
"fields": {
"project": {
"key": "CMDB"
},
"issuetype": {
"id": "10500"
},
"summary": "VMP-MYSQL-01",
"issuelinks": [
{
"type": {
"name": "Relates",
"inward": "relates to",
"outward": "relates to"
},
"inwardIssue": {
"key": "CMDB-825"
},
"outwardIssue": "CMDB-825"
}
],
"customfield_10600": "VMP-MYSQL-01"
}
}
]
}
The error I get is:
{
"issues": [],
"errors": [
{
"status": 400,
"elementErrors": {
"errorMessages": [],
"errors": {
"issuelinks": "Field does not support update 'issuelinks'"
}
},
"failedElementNumber": 0
}
]
}
Does the API support the creation of Linked Issue at creation? Using the GUI works.
Jira is running v6.2.
Since this question is a bit older, I've been experiencing same issue as you. After some searching I found that instead of fields you can use update in the json you send to server.
Alternatively, you can use issueLink method to add links after creating the issue.
Complete code to create an issue with a link to a different issue:
{
"fields": {
"summary": "Sample Issue",
"project": {
"id": 14505
},
"issuetype": {
"id": 11002
}
},
"update": {
"issuelinks": [
{
"add": {
"type": {
"name": "Relates"
},
"inwardIssue": {
"key": "PRJ-1"
}
}
}
]
}
}
This will solve your problem. This will create an issue with one jira issue linked to it.
key is a project key,
Blocks or related to whichever you want.
put below json into http://jsonlint.com/. It will do proper formatting.
{
"fields": {
"summary": "Test Adapter",
"project": {
"key": "WFM"
},
"description": "Testing of Jira from Adapter",
"issuetype": {
"name": "Bug"
},
"update": {
"issuelinks": [{
"add": {
"type": {
"name": "Blocks",
"inward": "is blocked by",
"outward": "blocks"
},
"outwardIssue": {
"key": "WFM-28",
"fields": {
"summary": "Test Adapter"
}
}
}
}]
}
}
}