How to use twilio rest api with loadrunner? - twilio

I am currently doing POC(proof of concept) on IVR loadtesting where I just want to call a IVR and have no interest in sound quality and all. So I come across twilio rest api which can make a outbound call.
It is working perfectly with python but I want to use it with loadrunner as it support rest api. I searched for twilio api urls and key value combinations. but hard luck for this. can anyone provide me the required URL and key value arrangement. or can guide me how to get those.
thanks in advance.

The documentation, Making Calls, has some code examples and example responses. You can make an API call using Postman (POST via x-www-form-urlencoded) and see the key:value pairs in the returned JSON, as shown below. API Explorer in Twilio Console is also useful for that.
{
"date_updated": null,
"price_unit": "USD",
"parent_call_sid": null,
"caller_name": null,
"duration": null,
"from": "+15095550100",
"to": "+14075550100",
"annotation": null,
"answered_by": null,
"sid": "CAaacc78574ae1b9d2bf483f0123456789",
"queue_time": "0",
"price": null,
"api_version": "2010-04-01",
"status": "queued",
"direction": "outbound-api",
"start_time": null,
"date_created": null,
"from_formatted": "(509) 555-0100",
"group_sid": null,
"trunk_sid": null,
"forwarded_from": null,
"uri": "/2010-04-01/Accounts/ACdeca5d479509eeb8beaba0123456789/Calls/CAaacc78574ae1b9d2bf483f0123456789.json",
"account_sid": "ACdeca5d479509eeb8beaba0123456789",
"end_time": null,
"to_formatted": "(407) 555-0100",
"phone_number_sid": "PN0b9c2733e2a9ad0c98352b0123456789",
"subresource_uris": {
"notifications": "/2010-04-01/Accounts/ACdeca5d479509eeb8beaba0123456789/Calls/CAaacc78574ae1b9d2bf483f0123456789/Notifications.json",
"recordings": "/2010-04-01/Accounts/ACdeca5d479509eeb8beaba0123456789/Calls/CAaacc78574ae1b9d2bf483f0123456789/Recordings.json",
"feedback": "/2010-04-01/Accounts/ACdeca5d479509eeb8beaba0123456789/Calls/CAaacc78574ae1b9d2bf483f0123456789/Feedback.json",
"payments": "/2010-04-01/Accounts/ACdeca5d479509eeb8beaba0123456789/Calls/CAaacc78574ae1b9d2bf483f0123456789/Payments.json",
"feedback_summaries": "/2010-04-01/Accounts/ACdeca5d479509eeb8beaba0123456789/Calls/FeedbackSummary.json"
}}

Related

Inconsistency in MS Teams graph api - GET channels

In the response of GET - https://graph.microsoft.com/v1.0/teams/{team_id}/channels?$filter=membershipType eq 'private'.
I am getting channels which are not visible in the Teams app interface.
e.g.
{"id": "",
"createdDateTime": "",
"displayName": "testingteam",
"description": null,
"isFavoriteByDefault": null,
"email": null,
"webUrl": null,
"membershipType": "private"
},
Is there any key using which i can differentiate these forbidden channels from the valid ones?
We are not able to repro this issue. The graph api returned correct response. Can you check if all webURL part for all such teams you are getting is null. If yes you can add filter ($filter=webUrl ne null).

Exact change GLAccount for BankEntryLine

Currently we import our bank transactions. Through the REST API I read all these transactions and try to match them to our internal invoices.
If I find a match I need to change the GLAccountCode from for example 1000 to 2000 for this particular BankEntryLine. All I see on the BankEntryLine is that I can do a GET or POST but no PUT method.
Is there something wrong with my approach? Like do I have to create something else that reconciles this transaction or is there a different way of updating this transaction line?
Example BankEntryLine:
{
"d": {
"__metadata": {
"uri": "https://start.exactonline.nl/api/v1/000000/financialtransaction/BankEntryLines(guid'123000000-0000-0000-0000-000000000000')",
"type": "Exact.Web.Api.Models.Financial.BankEntryLine"
},
"Document": "00000000-0000-0000-0000-000000000000",
"DocumentNumber": 00000,
"EntryID": "00000000-0000-0000-0000-000000000000",
"EntryNumber": 00000000,
"ExchangeRate": 1,
"GLAccount": "100000000-0000-0000-0000-000000000000",
"GLAccountCode": "1000",
"ID": "123000000-0000-0000-0000-000000000000",
"LineNumber": 1,
"OffsetID": "000000000-0000-0000-0000-000000000000",
"OurRef": null,
"Project": null,
"ProjectCode": null,
"ProjectDescription": null,
"Quantity": null,
"VATCode": "4 "
}
}
API documentation: https://start.exactonline.nl/docs/HlpRestAPIResources.aspx?SourceAction=10
BankEntryLine: https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=FinancialTransactionBankEntryLines
There is no PUT or DELETE available for this API. I don't directly see another way to update/delete those lines.
Only possible workaround is to make a general journal entry to balance the amount of that suspense GL account to the one you need/want. But that will give you more entries and more lines to match.

Microsoft Graph API Get callRecord method: version of callRecord

I have subscription to new callRecords in Teams and it works fine, but sometimes when I call "Get callRecord" Graph API method to get details of Teams call and there is no organizer's session info. I looked later and there is organizer's session info. I also see "version" property in callRecord.
Is there a way to surely new that it is last version of callRecord and it will not be changed later? I need to know if user was in the meeting or not, but this thing with version give me uncertainty.
Code is just for example:
{
"#odata.context": "https://graph.microsoft.com/v1.0/$metadata#communications/callRecords(sessions())/$entity",
"id": "5da1894e-5af4-47f9-a304-e26208c5469f",
//I talk about this attribute
"version": 3,
"type": "groupCall",
"modalities": [
"audio",
"videoBasedScreenSharing",
"screenSharing"
],
"lastModifiedDateTime": "2020-12-09T14:01:42.0108662Z",
"startDateTime": "2020-12-09T10:48:24.8299343Z",
"endDateTime": "2020-12-09T13:22:10.515688Z",
"joinWebUrl": "...",
"organizer": {
"acsUser": null,
"spoolUser": null,
"phone": null,
"guest": null,
"encrypted": null,
"onPremises": null,
"acsApplicationInstance": null,
"spoolApplicationInstance": null,
"applicationInstance": null,
"application": null,
"device": null,
"user": {
"id": "c2408055-2c55-489f-b8f5-5f404dbab627",
"displayName": "...",
"tenantId": "..."
}
},
"participants": [...],
"sessions#odata.context": "https://graph.microsoft.com/v1.0/$metadata#communications/callRecords('5da1894e-5af4-47f9-a304-e26208c5469f')/sessions",
"sessions": [...]
}
As the comment by Trinetra-MSFT says:
Version changes based on the number of call records available, once a
version of existing call increased you can distinguish between both
call records using version number, to retain the same version is not
what call records API provides, it automatically increases the
version.
It is not possible to get the last version of the call record.

MSgraph, takes up to 48 hours before changes are visible

We use MSgraph and EWS API for our products.
When we do changes in our test Microsoft 365 environment (Add/change/delete - roomlists and rooms) we see the changes immediately when testing with EWS Editor.
But it takes up to 48 hours before we se the changes by using MSgraph Explorer.
I would guess that this is not expected behavior?
We understand it might take some time (Up to 30 minutes) but up to 48 hours?
Our test environment is a pure Microsoft 365 tenant (No hybrid)
The MSgraph API calls we test is:
GET /places/microsoft.graph.room and GET /places/microsoft.graph.roomlist
It seems that this issue might have been introduced after our environment was moved to the Norwegian datacenter.
No error messages from MSgraph, all seems normal..
Here is the results from MSgraph when i ask for roomlist:
"#odata.context": "https://graph.microsoft.com/v1.0/$metadata#places/microsoft.graph.roomList",
"value": [
{
"id": "32d75744-113e-4bec-91c4-811623d11521",
"displayName": "Test2",
"address": null,
"geoCoordinates": null,
"phone": "",
"emailAddress": "Test2#loop24.no"
},
{
"id": "1d535e8b-c44d-498a-9046-dbbe1ae3be75",
"displayName": "TestList",
"address": null,
"geoCoordinates": null,
"phone": "",
"emailAddress": "testlist#loop24.no"
},
{
"id": "b9ea8bd6-32da-4d6d-b38e-db6c03f4fa54",
"displayName": "RoomList",
"address": null,
"geoCoordinates": null,
"phone": "",
"emailAddress": "roomlist#loop24.no"
Here is the results from EWSEditor (This is correct)
Call Get Roomlist roomlist#loop24.no Roomlist

Limiting Twitter API results to tweets sent to all users (no #replies)?

I'm trying to find a way to just get tweets to all users. The JSON code indicates these as "to_user" null. For example the tweet below edent tweets to everyone, thus the to_user=null.
I tried a few alternatives without success:
http://search.twitter.com/search.json?q=to:null%20from:edent&result_type=mixed
http://search.twitter.com/search.json?q=to:0%20from:edent&result_type=mixed
http://search.twitter.com/search.json?q=to:%20from:edent&result_type=mixed
{
"created_at": "Thu, 28 Jun 2012 06:55:58 +0000",
"from_user": "edent",
"from_user_id": 14054507,
"from_user_id_str": "14054507",
"from_user_name": "Terence Eden",
"geo": null,
"id": 218236278402068480,
"id_str": "218236278402068480",
"iso_language_code": "en",
"metadata": {
"result_type": "recent"
},
"profile_image_url": "http://a0.twimg.com/profile_images/2318692719/7182974111_ec8e1fb46f_s_normal.jpg",
"profile_image_url_https": "https://si0.twimg.com/profile_images/2318692719/7182974111_ec8e1fb46f_s_normal.jpg",
"source": "<a href="http://twitter.com/">web</a>",
"text": "RT #straczynski: #edent Clearly the man was ahead of his time.",
"to_user": null,
"to_user_id": 0,
"to_user_id_str": "0",
"to_user_name": null,
"in_reply_to_status_id": 218075066452287500,
"in_reply_to_status_id_str": "218075066452287488"
},
If you're just looking to get tweets from a particular user that aren't to anyone, use the /get/statuses/user_timeline REST API endpoint instead of the Search API. /get/statuses/user_timeline has an exclude_replies parameter that should do what you're looking for.
The Search API doesn't have any way to exclude replies. Your only option is to get tweets matching whatever other parameters you pass, and process them on your end to remove any whose text starts with "#".

Resources