API Equivalent for Sabre host command WPNCS - sabre

Could you please help me to find API Equivalent for Sabre host command WPNCS (Search for lowest fare even if not
available)
but can't find correct request in API docs
Please Help!

Check OTA_AirPriceLLSRQ
https://developer.sabre.com/docs/read/soap_apis/air/book/price_air_itinerary
The request design document shows a reference to WPNCS:
http://webservices.sabre.com/drc/servicedoc/OTA_AirPriceLLSRQ_v2.12.0_Design.xml
Note that you can do the same from the orchestrated booking service (EnhancedAirBook):
http://files.developer.sabre.com/doc/providerdoc/ServicesPlatform/EnhancedAirBookRQ_v3.6.0_Design.xml

Related

Showing Volume Details using python openstacksdk, python novaclient, python cinderclient

Hello guys and I hope you're having a great day. I have a question about using Openstack API in Python.
I'm using python-novaclient for getting server details and flavor details. And I want to get the volume details too but I don't know how to do it, I've tried to collect volume details but it failed somehow and I need to ask you guys if you have any idea.
This information is what I want to get:
volume_id, attached to (w/c volume), name, status and volume_type (CEPH or LVM)
I used python-cinderclient, but I only got the volume_id.
Here's the code:
volumes = cinder.volumes.list()
Can someone help me to get the other data? Other than running Openstack command-line in the server, I just need some Python module to get these data.
Thanks in advance.
I've finally figured it out, and I'm going to answer this for anyone who is interested in Openstack SDK or other Python API for Openstack.
First, for authentication you need to use Keystone API, the documentation is all over the internet so no need to worry, you could just oversee in your Openstack for credentials needed. And for my question, I use the function get_volume from Connection class. Please see the documentation
for this. You can read other documentation as well on the internet.
So, here is the example of how to get volumes details:
vol = conn.get_volume(volume_id)
print(vol)

R- Following Error: API returned: Request had insufficient authentication scopes

I've verified my API in RStudio after hours of trying and now I've reached another error while trying to translate a sentence. Would be grateful for any help!
I'm just trying to translate "hello" to french using googleLanguageR package -
> gl_translate("Hello", "fr")
The result I get is this -
2021-01-21 17:15:36 -- Translating text: 5 characters -
i 2021-01-21 17:15:36 > Request Status Code: 403
Error: API returned: Request had insufficient authentication scopes.
I'm a literal beginner in the field of computing and do not understand what scopes mean here.
Thanks for the help!
Scopes are permissions that you give to apps you use to access an API. For example, one App might have permission to read the private messages of a users, whereas another doesn't. It's similar to when an app on your phone asks for permission to use the camera, or access your contacts.
Your app is trying to do something that it doesn't have permission to do. You'll need to add the relevant scopes in whatever setting that it is where you're generating keys etc. Presumably Google Data Studio?
Okay, I found an answer.
I needed to download a json version of my key and authorize it using the code -
gl_auth("filename.json")
After doing this, I needed to make sure my API is enabled. Now, it is working perfectly!

Work around in RGoogleDocs with two-step verification?

I try to use RGoogleDocs and get
Error: Forbidden
I have two-step verification on: is there a work-around?
sheets.con = getGoogleDocsConnection(getGoogleAuth(user, ps, service = "wise"))
Error: Forbidden
Relevant question
The getGoogleAuth of RGoogleDocs package is based on an officially deprecated ClientLogin to connect google server, see https://developers.google.com/identity/protocols/AuthForInstalledApps?csw=1
You may use the application password of google as a try.
Another way is just use the url of you google docs to visit certain contents, see http://www.r-bloggers.com/access-google-spreadsheet-directly-in-bash-and-in-r/
Update:
In the source code of getGoogleAuth, the author used an application called 'R-GoogleDocs-0.1', you may apply an new application and get the token. Then I think you could use the token and the api from google to access google docs directly in R. However, such hacks almost mean update/rewrite RGoogleDocs package.

Fi-Ware cygnus configuration

I'm trying to configure the file cygnus.conf, but, I don't know the FQDM/IP of the Namenodes, hive sever and CKAN API endpoint.
I was search in the catalogue and forge, and I can't see anything about that.
thank you, and the best reggarts.
For the Namenode and the Hive server just use the same endpoint you used to setup your Cosmos account: http://cosmos.lab.fi-ware.org. Regarding CKAN, I'm not sure there is a public CKAN instance running in FI-LAB. Let me check it.

REQUEST_DENIED when using Google Maps AutoComplete

I am unable to use Google Maps AutoComplete. I have read all the articles about this problem, and I still get REQUEST_DENIED:
The following services are turned ON:
Google Maps API v3
Places API
Prediction API
Simple API Access:
API key: **
Referers: Any referer allowed
Activated on: (A few days ago)
Activated by: ** – you
I have even activated my credit card (don't know if that makes a difference for traffic under the quota):
The following happens (tested both from a browser and command line cURL):
https://maps.googleapis.com/maps/api/place/autocomplete/json?input=New&types=(cities)&key=$apikey
{
"predictions" : [],
"status" : "REQUEST_DENIED"
}
How do I make this work?
From the documentation
Required parameters
input — The text string on which to search. The Place service will return candidate matches based on this string and order results based on their perceived relevance.
sensor — Indicates whether or not the Place request came from a device using a location sensor (e.g. a GPS) to determine the location sent in this request. This value must be either true or false.
key — Your application's API key. This key identifies your application for purposes of quota management. Visit the APIs Console to select an API Project and obtain your key. Maps API for Business customers must use the API project created for them as part of their Places for Business purchase.
I don't see "sensor" in your example request.

Resources