How to submit a GET request to get order information using UFT - uft-api

I am using sample flight application to practice API testing. I have created an order 93. I am trying to retrieve the details of the order no using GET request thru API layer. Below are the steps I have taken and I getting an error "Incorrect number format. Order number expected."
How to get the order details using GET request?

I don't know what API you're interacting with, but if it follows some traditional REST principles, your request should probably look like this instead:
http://localhost:8000/HPFlights_REST/FlightOrders/93
This is under the assumption that the error returned is because the REST service is expecting the URL to adhere to the following schema:
http://localhost:8000/HPFlights_REST/FlightOrders/{OrderNumber}
Where {OrderNumber} is a purely numeric field (i.e., without OrderNumber=...).
Hope this helps

Related

How ShipStation is generating order shipment tracking URL using tracking_number and carrier?

ShipStation is showing only shipment tracking_number on UI it is not displaying tracking URL and not returning this tracking URL in API response as well.
This could be happening if you're omitting both tracking_carrier and shipping_method. If these are not included, there will be no tracking link.
A tracking link is always generated if either (not mutually exclusively) shipping_provider or tracking_carrier is supplied alongside a tracking number and as long as the value for either carrier code is valid according to our supported list.
It is recommended for you to reach out to Shipstation about this to verify if Shipstation is seeing unexpected results via the API. If that is happening, please let me know so I can provide the next steps to this. Thank you!

ASP.NET Core Web API - Measuring response data

We have an ASP.NET Core Web API project. Today on accident I found an API method that was returning unnecessary amounts of data.
In my example we were returning users along with countries which is what we needed, but we were also returning a list of cities for each country so that was a tremendous amount if data, I was able to reduce it from 7MB to 23KB (per Insomnia client).
I was able to fix this by performing a select and creating a new country object and not passing in the cities property. I am not even sure if that's the right way to fix that problem but I will leave that for another time. My question is...
Is there a tool/nuget package out there that would provide this type of info? I'd like to get an idea on how much data we are sending to the clients when different methods are called. We have app insights but I don't believe it provides that data or at least I don't see it.
Thank you!
I was able to resolve this issue by writing some middleware code that logs the results to azure application insights, here is a copy of the code if anyone needs it:
https://gist.github.com/tekguy/52b245f6582158d7240f80bf46c4cc71
You can then query this info by using app insights log query:
requests
| order by timestamp desc
| project url, customMeasurements.Size

Get cryptocurrency twitter, website, and markets from coinmarketcap.com api

I am trying to get the twitter name, website, and markets for any cryptocurrency listed on coinmarketcap.
For example:
https://coinmarketcap.com/currencies/bitcoin shows all of the data that I need but how would I parse the data listed on that page to get the twitter name and website associated with bitcoin?
Don't try to parse the data on that page if you are trying to use it in an application. If you are doing it for a one time data collection then maybe that is OK. There is absolutely no guarantee that the format will remain consistent or that the information will even be there tomorrow.
You should try to find an API that gives you the information that you are looking for. An API is a contract that is expected to be honored and therefore is reliable. A quick look at CoinMarketCap's API doesn't appear to have the info you are looking for but maybe another one exists that does.
If you were to parse the HTML you could write a regex for the specific thing you are looking for. For example if you want to get the website you could write a regex that would pick up the pattern:
Website
the capture group ([^"]+) is the website in this example. You could do something like that for every element you want to get.

Social Tables data model

I've just started looking at the documentation as we are going to need to integrate Salesforce with Social Tables shortly, so I am really new to Social Tables.
Specifically, we will need to sync data between the CRM and Social Tables Events and Guests, and maybe other objects, so it would be very helpful to have a data model or similar to check the relationships and fields available in Social Tables architecture.
I haven't found anything in the documentation, is there any way to get this, even if it's at a high level?
Thanks
Danny
To make an integration with SocialTables you'll have to do a few manual steps, there is no way to do this completely programmatic from my experience. You'll also have to be prepared to contact SocialTables to get get correct guestlist ids. Also keep in mind that the API documentation isn't always correct, the API logic is also quite difficult to understand from time to time.
The first thing you need to do is figure out which version of the Venue Mapper you use. You'd want to use the 4.0 api and as far as I know this version of the api is only supported by Venue Mapper 3.0. I believe the Venue Mapper 3.0 is the frontend tool SocialTables provides to do the venue planning.
In social tables an event has two ids, one numerical one and one alpha-numerical one, when you use the 4.0/events endpoint you only get the alpha-numerical event id, and your going to need the numerical one. The only way I've been able to get the numerical id is to pull it out from the url when using the Venue Mapper, example of the url follows below:
https://plan.socialtables.com/team/{team_id}/event/{event_id}/space/{space_id}
Now you need to get the guestlist id, you can get that by using the following url, using the numerical event id:
GET https://api.socialtables.com/4.0/diagrams?event={numerical_event_id}
This endpoint return a json structure where one of the parameters is "guestlist_id".
Please be aware that the guestlist id you get from this endpoint might not be the correct one. I struggled quite a bit with this part and ended up with SocialTables sending me the guestlist id by email.
To get the guests in your guestlist use the following api endpoint:
GET https://api.socialtables.com/4.0/guestlists/{guestlist_id}
The {guestlist_id} is an alpha-numerical string similar to: cfdac1c0-yb1d-12e6-84a5-a39e92131645
And by that you should hopefully get access to your guests.
Hey thanks for using our API.
To answer your question, the best way to see the data model at the moment is to access our developer portal and use the API console to see what is returned. For events you will need to know the team id of the team you are working with use the team events endpoint to get access to the event ids.
https://developer.socialtables.com/api-console#!/Events/get_4_0_legacyvm3_teams_team_events
This will return some basic information about each event for that team. You can then request additional details for specific events by using this endpoint:
https://developer.socialtables.com/api-console#!/Events/get_4_0_legacyvm3_events_event

How can I deep link into QuickBooks Online with results from API calls that don't include the txnId

QuickBooks Online (QBO) uses a URL format like qbo.intuit.com/app/timeactivity?txnId=123 to point to, in this example, a TimeActivity.
However, in the API, resources are referenced by entityId (returned as just Id when querying via the TimeActivity API), which is different from txnId.
In my time tracking web app, I have a feature that exports time to QBO as TimeActivities. I'd like to provide users with direct links from the time entered in my app to the corresponding TimeActivity in QBO—is there any way to do so?
The answer to this is that it's not currently possible because there's multiple base URLs (I think they call them "realms") in use for QuickBooks Online (qbo.intuit.com is only one of them). Because you do not receive this information as part of linking to QBO via OAuth, there's unfortunately no way to construct proper links.
Yes, when creating a successful TimeActivity you will receive back an Id, which I assume you are persisting.
That Id can be used to query QBO in a simple GET request.
<baseURL>/company/{companyID}/timeactivity/{timeactivityId}