Posts

Showing posts with the label api

Five9 API python wrapper - runReport

Five9 API python wrapper - runReport Has anyone used the python wrapper for the Five9 API ? I'm trying to run one of our custom reports through the API but am unsure how to pass the time criteria. If the report is already built: Is there a way to run it without passing criteria? It seems like this should be enough (since the report is already built): client.configuration.runReport(folderName='Shared Reports', reportName='Test report') But it didn't work as expected. What can I do to solve this? By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

How to represent a table structure in jsonapi

Image
How to represent a table structure in jsonapi Have the following problem. We are implementing a REST API very much based on JsonApi specification. We are importing table structured files. Where: - part of the row is the metadata of Object1 - column header is the link to an external Object2 - cell value is the 'expression' of the relationship between Object1 and Object2. For example: You have biological sample (Object2) and run experiment to see if a specific mutation (Object 1) is available to that sample. The cell value can have different values which specifically state that a mutation for that sample is present, partially present or non present. How using JSONAPI we would be able to represent such relationship. In which object the cell value should be saved? Object1? The relationship object? UPD: Forgot to mention. If we use only the "green" part of the row (metadata), we would be able to create unique objects. Which could be reused across files and linked to new ob...

Node request external API within local get request

Node request external API within local get request I'm trying provide the response of an external API call when I perform a local GET request but struggling with how to get this to work. My code at the moment is: app.get('/', function(req, res){ request.post('http://data.fixer.io/api/latest?access_key=' + apikey + '&symbols=gbp', function(err, res, body) { console.log(body) }) res.render('index') }) My knowledge and experience with callbacks and async programming is limited, but how do I pass the response of the request POST into the GET request to then pass it to the index? Thanks! 2 Answers 2 Callbacks can be difficult to understand, and the problem you describe isn't uncommon (it even has a name - Callback Hell). Partly the reason why Node introduced the async / await syntax - here's the equivalent of your code in that style async await ...

PHP Fatal error: Uncaught UnirestException: Bad URL

PHP Fatal error: Uncaught UnirestException: Bad URL I'm trying to request a REST API using PHP Unirest. The printed error is the following: Bad URL, colon is first character And my code: <?php require __DIR__ . '/../vendor/autoload.php'; use UnirestRequest as UniRequest; use CurlFile; if (isset($_POST['primeiro'])) { $where = $_POST["where"]; $equal = $_POST["equal"]; $resultado = new pedidos; $valores = $resultado->LogIgualA($where, $equal); } class pedidos { function LogIgualA($where, $equal) { $wsURL = "localhost:8080/public"; try { $valores = UniRequest::get($wsURL."/visual/json_log/where=".$where."/equal=".$equal, $headers, null); } catch (Exception $e) { echo $e->getMessage(); } $valoresAux = $valores->body; $valores = ; foreach($valoresAux as $z){ $ID = $z->ID; $DateConnect...

Geocoding api google

Geocoding api google I am sending the same query (url) of geocoding API and it returns me different answers. Thanks for you help. https://maps.googleapis.com/maps/api/geocode/json?key={mykey}&address=Bristol%209431,%20La%20Florida,%20Chile This happens from different servers. When I send the query from one of the servers, the answer is: results :La Florida, Santiago Metropolitan Region, Chile location_type : APPROXIMATE when I send from my laptop, the answer is: results : Bristol 9431, La Florida, Región Metropolitana, Chile location_type" : ROOFTOP This likely means that data is not synchronized between different data centers at Google. – xomena 12 hours ago By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, ...