Questions tagged [api]

Please refrain from using this phrase. Instead, utilize specific tags such as [google-cloud-platform], [facebook], or [amazon-web-services]. When appropriate, include the tag [api-design]. Queries seeking recommendations or assistance in locating an API are considered inappropriate for discussion on this platform.

Importing JSON data from a URL to display in an HTML table

Looking to utilize the Untappd API for a beer menu project, I've encountered an issue. The goal is to showcase the JSON data received from the server and organize it into an HTML table. Despite successfully importing data from a local list.json file in m ...

Utilizing RapidAPI in VBA Excel: Discovering Domain Name Ownership

I've come across some other discussions on the same topic, but I haven't been able to find a clear answer. I would really appreciate it if someone could assist me with this problem. I'm trying to integrate RapidAPI into my VBA code in Excel to retrieve Wh ...

What is the best way to properly handle closing database connections when executing Flask API calls within a cron job?

When the cronjob runs, it connects to various databases through different API calls using an admin session. I want to make sure that after each call, the connection is closed properly. While for a normal API call I can use before_request to open and after_ ...

The Alphavantage was acting strangely when I ran a Google script

After following a tutorial video on YouTube, I was confident that my Google script for Google Sheets was working perfectly. However, I encountered two strange issues that I just can't seem to figure out. The code below is exactly what I need - it displ ...

The REST API in Python encountered an error when attempting to cast a JSONArray to a JSONObject

I'm working on a python script that has two main tasks: Parse a CSV file Send the parsed data to a remote server using its REST API So far, my code successfully parses the CSV file and converts it into a JSON object. However, when I try to send th ...

I am seeking guidance on creating a dynamic search feature using node.js and mongoDb. Any input regarding

I am currently working on implementing a unique feature that involves having an input field on this specific page. This input allows users to perform a live search of employees stored in the database. app.get('/delete' , isLoggedIn , (req , res) => { ...

Analyzing information with Python's request module

I am currently facing an issue while attempting to run a query using an API to retrieve specific information. The problem I encounter is that the data retrieved is excessive. My goal is to extract only a particular value, specifically the number following ...

Guide to extracting the JSON array from a JSON object with Angular

In my angular application, I have made a call to the API and retrieved a JSON object in the console. However, within this JSON object, there are both strings and arrays. My task now is to extract and parse the array from the object in the console. The JSO ...

The REST API request returns a response code of 0

I have been attempting to make an API call to the Insightly API using this code: var x = new XMLHttpRequest(); x.open("GET", "https://api.insight.ly/v2.2/Projects/Search?status=in%20progress&brief=false&count_total=false", true); x.setRequestHeade ...

Utilizing numerous Rails API POST requests has become a common practice

Currently, my ReactJS application is connected to a Rails 5 API. The React application sends a single JSON POST request to api/v1/job in order to create a new job record. This request contains information for two HABTM relationships with Tools and Technol ...

Is this session/token authentication mechanism suitable for my web API?

Today, I successfully implemented a session and token authentication system for my web api using http get/post rpc style. Here is the plan I followed: Key: action (param1, param2) : returnvalue1, returnvalue2 login (username, password) : sessionkey, tok ...

What is the best way to validate the body object when working with Actions2 in sails.js?

Just starting out with sails.js I understand that the inputs object allows actions2 to validate the request parameters. However, how can I access and validate the request body? For example, req.body. I know I can access this from this.req.body, but I was ...

Symfony/AngularJS Blocked Cross-Origin Request

I am currently encountering an issue while attempting to retrieve data using Angular from my Symfony API, which returns JSON: "Cross-Origin Request Blocked: The Same Origin Policy prohibits reading the remote resource at http://localhost:8000/custom ...

Unable to utilize Vuex for storing the method function

I need to integrate Vuex into my methods function in the home.js file to fetch weather data from an API and display it on the browser. I attempted to use getters and computed properties but encountered some issues. Here is a snippet from my home.js file: ...

Retrieve the first two elements from an array and iterate through each of them using a foreach

Currently, I have JSON data formatted like this: https://i.stack.imgur.com/PqOQ0.png I am attempting to create URLs using a foreach loop for an API that requires start and finish dates as parameters. For example, here is a sample URL -> My question is, ...

Develop a client-side API utilizing various libraries

After completing the server side of an API that delivers HTML via JSON using REST through CodeIgniter, I am now exploring how to create a client-side API with JavaScript. The goal is to retrieve data from the server through the API, display it in the DOM, ...

Building a RESTful API using Python and Flask with MongoDB Integration

Currently, I am working on developing a MongoDB backed RESTFUL API using Flask. I have successfully implemented a zone search query with find_one(). However, when attempting to scale it up for multiple results using find(), I encountered the following erro ...

Tips for transferring information obtained from an API to my custom HTML page

As a novice in web development, I recently created a simple weather report website using the OpenWeather API. While I successfully fetched data from the API, I encountered an issue trying to display this data on my HTML page. Despite utilizing DOM manipu ...

Utilize API or alternative methods for analyzing Instagram data

My master's thesis requires me to dissect multiple Instagram profiles, each containing over 1000 posts. I am in need of a comprehensive list including the following details: Type of Post (Image, Multi Image, Video) Description Likes Comments (total c ...

Retrieve filled out form fields in ServiceM8

Is there a way to retrieve completed form field data in ServiceM8, including uploaded images? I've looked through the API reference but couldn't find any information on how to access them. Can someone share an example or provide documentation on ...

Combining the Express.js API with React to create an interactive data visualization using CanvasJS

After developing an api in node.js that provides data in json format, I am looking to utilize this data for visualization purposes. To demonstrate this, I have prepared a sample of data visualization using canvasjs within React. class BarChart extends Com ...

Is it possible to receive a unique value error even when providing the correct key value in a map?

I encountered an issue while using a map function with an array in my application. Even though I have provided a unique key, Google Chrome console is still showing an error related to the unique key. Error Each child in a list should have a unique "ke ...

I'm looking for the best way to send POST data to an API with Meteor's HTTP package

Here's my current code snippet: HTTP.post("http://httpbin.org/post", {}, function(error, results) { if (results) { console.log(results); } else { console.log(error) } } ...

Swift was unable to interpret the data

I am a beginner in using Swift and I am attempting to retrieve data from an API. The data is in JSON format, and here is a snippet of the data: { "photos": [ { "id": 424926, " ...

When attempting to filter a Django Rest Framework view by its primary key in the urls.py file, the API view

Seeking assistance with filtering my APIListView by a specific PK value provided in the URL. Despite having data at the specified PKs, the API output is empty. Any suggestions? Models.py class Item(models.Model): Description = models.CharField(max_le ...

Is it possible to accept a file as a form-field input in Django without the need to declare it as a Model?

I recently developed a straightforward API for Tax Analysis by processing a ZIP file received from our supplier using the FastAPI framework. However, due to some technical constraints, I have now decided to migrate my APIs to Django. I have been exploring ...

Transforming Poloniex API Callback JSON into a compatible format for Highcharts.Stockchart

I am currently working on a project that involves retrieving JSON data from Poloniex's public API method (specifically the returnChartData method) to generate a graph using Highchart Stockchart. The graph would display the historical performance of various ...

Utilizing DynamoDB attribute names to transmit JSON data through REST APIs

One issue I have encountered is with a field in my Car POJO class, which appears as follows: @DynamoDBAttribute(attributeName = "release_year") private int year; As I attempt to add a Car object to the database using a POST request through Postman, I ini ...

Provide the option to assign values on select options in order to choose specific JSON data

When working with JSON data from an API, I am creating a dynamic select element. The goal is to change some content (text and image src) based on the option selected from this select element. I have successfully populated the select options with names usi ...

Implementing HTTPS Signed Certificates with IIS on Express for Production Environments

When it comes to managing API (HTTPS) certs in a development environment compared to production in an Express application running on a Node.js/Angular setup deployed to Windows IIS, the process can be a bit confusing. While proxy rewrites have been suggest ...

Error occurred while trying to call android.app.Service() without any arguments provided

In my experience with using Retrofit to fetch data from an API, I encountered a peculiar issue. The response would fail only when the service Array contained data; if it was null, the response would be successful and all other data would be present. Howeve ...

Reat is having trouble sending a POST request to a Spring Boot application

Encountering an issue: I have a Spring Boot API set up with various endpoints and a filter to determine access with or without a JSON Web Token. Postman works as expected, returning the correct data, but React seems to struggle with it. The root cause of t ...

"Unlocking the power of Symfony bundles: Exploring the versatility of REST API

Seeking opinions here. I am working on a Symfony4 bundle that connects to an SMS service's REST API. The service allows authentication in two ways: Session Id, which expires in 5 minutes of inactivity Token that is always valid Both modes require u ...

What is the best way to transfer the API Response Time from one Fetch function to a separate asynchronous function?

After successfully obtaining the API Response Time (duration) using the 'makeAPICall' function, I am now faced with the task of passing this duration variable value to another asynchronous function. Can anyone assist me in finding a solution to a ...

Tips for instructing SharePoint 2010 listdata.svc to provide JSON through the URL

I require the JSON response from the following unique URL: After referring to a reputable online source, I attempted to modify the URL with additional parameters but unfortunately, it did not yield the desired outcome. The altered URL looked like this: D ...

What is the most efficient way to retrieve API data in Laravel without using Models or resources?

Is there an API available to validate email uniqueness without the need to create a model or resource middleman? Here is my approach: customer.vue fetch(`api/validateEmail/${email}`) .then(res => res.json) .then(res => this.isEmailDuplicated = res.da ...

Read and manipulate website content using PHP

I recently encountered a challenging situation as a newcomer. Despite searching on Google, I couldn't find any information about it. There is a website that allows users to search for doctors in their area or state. It's possible that the number ...

Tips for modifying the JSON array output into an object using PHP

I am encountering an issue with the API JSON output. I am experiencing some difficulties with the JSON output when it comes to looping through, as it seems to create its own indexes despite my attempts to force the array format into an indexed array. Here ...

Is there a way to store a JSON object retrieved from a promise object into a global variable?

var mongoose = require('mongoose'); var Schema = mongoose.Schema; const NewsAPI = require('newsapi'); const { response } = require('express'); const newsapi = new NewsAPI('87ca7d4d4f92458a8d8e1a5dcee3f590'); var cu ...

Error message: "The toJSON method is not found for the item in the nested array of

Encountering an issue with NSwag in my Angular project where it throws an error when attempting to send data if the object contains a nested array of objects like this: export interface IJobAdDto { mainJobAd: JobAddDetailsDto; differentLanguageJobA ...

One of the three identical paths in Node.JS is experiencing issues

I'm brand new to Node.js and currently working on creating a backend api for a project. I have 3 routes in my application: societies, users, and emails. //module for email functionality emailsModule = require('./api/routes/emails')(connection); c ...

What do I need to add to my code in order to receive a JSON response from the URL I am

I developed a custom Python client REST API wrap for an authenticated Okta pricing API. Although my code is functional, I am not receiving any response. My goal is to retrieve a JSON response, and I have considered using a print statement, but I am unsur ...

Tips for resolving the "Unverified App" error message when working with the Google OAuth API

Currently, I am working on integrating Google authentication using the passport-google-oauth package in my node.js application. When attempting to sign up with a Gmail account, I encounter the message "This App isn't verified." Please refer to the scr ...

Is there a way to utilize Java and the Rest API to upload PDF documents in Egnyte?

In order to transfer the PDF files stored on the local drive (D:), I am looking to utilize Rest API in Java to upload them to Egnyte. ...

Exploring the capabilities of Express.JS for integrating with an external API

const express = require('express'); const app = express(); const path = require('path'); const api = require('./api'); app.get('/', function(req, res){ res.sendFile(path.join(__dirname + '/index.html')); }) app.listen(8080) console.log('Server Running' ...

"Put Jest to the test by running it with the Express

Currently, I am in the process of learning how to build an API with TypeScript and experimenting with testing it using the Jest framework. When utilizing a basic Express application like app = express() supertest(app) everything works smoothly. However, ...

Tips for utilizing YQL within a Python (Django) environment

Hi there, I'm in need of a straightforward example for this task: Requesting data from YQL and receiving a response I am retrieving public data using the Python backend of my Django application. Whenever I attempt to simply paste an example from YQL, ...

Having trouble with ASP.NET Core MVC Ajax call not sending parameters to the API controller method?

I'm having trouble calling an API controller method using ajax and passing parameters. The api method gets called, but the values come through as null in the controller method. Interestingly, using the same ajax call, another controller (not the api ...

Encountering an Unexpected Token Error While Parsing JSON with jQuery

Utilizing the Envato API with jQuery to collect user stats is my current project. An example JSON response that I will display is as follows: { "new-files-from-user":[ { "thumbnail":"http://3.s3.envato.com/files/60560.jpg", "tags":"", "use ...

How can I best fill the HTML using React?

After attempting to follow various React tutorials, I utilized an API to fetch my data. Unfortunately, the method I used doesn't seem to be very efficient and the code examples I found didn't work for me. I am feeling quite lost on how to properly integra ...

NodeJS produces identical outcomes for distinct requests

RESOLVED THANKS TO @Patrick Evans I am currently working on a personal web project and could use some assistance. In my website, users are prompted to upload a photo of their face. When the user clicks the "upload" button, the photo is sent with a request ...

Retrieve targeted information from the Coin Market Cap API by extracting specific data values using an array

I am looking to retrieve the symbol and other details using the "name" from my array. $.getJSON("//api.coinmarketcap.com/v1/ticker/?limit=0", function(data) { var crypto = [ "Ethereum", "Ripple", "Tron", ]; // used for arr ...

Error encountered when accessing Spotify API. The requested action requires proper permissions which are currently missing. Issue arises when attempting to

I am attempting to use the spotify-web-api-node library to play a track on my application const playSong = async () => { // Verify access token with console.log(spotifyApi.getAccessToken()) setCurrentTrackId(track.track.id); setIsPlay ...

Utilizing variables in Angular service to make API calls

Currently, I am working on accessing the Google Books API. Initially, I was able to directly access it in my controller but now I want to follow best practices by moving the business logic into a directive. HTML <form ng-submit="search(data)"> < ...

Implementing b-tooltip from Bootstrap-vue on a b-table

Utilizing bootstrap-vue to display data on a b-table, I have truncated long text and display the original when hovering over it using the title prop. It works well with custom CSS, but I would like to implement b-tooltip. <b-table hover sticky-hea ...

Node Express app intercepts a POST request, increments a counter, and triggers an error after a certain threshold

In my project involving Node Express/Angular Civic, I am faced with the challenge of integrating it with a 3rd party API where each call incurs a cost of $1.00. While I am willing to cover some of the expenses, I want to implement a mechanism to halt the P ...

Incorporating CSS animations into Vue.js while an API call is being made

When a specific icon is clicked, an API call is triggered: <i class="fas fa-sync" @click.prevent="updateCart(item.id, item.amount)"></i> I am looking to add an animation to rotate the icon until the API call is complete or ...

Error message received when making an API call in React Native for Android and saving the response to a local database: 'Error: Network

Despite using axios and promises to make a call to a local database API, I am facing difficulties reaching the endpoint as I constantly receive a 'Error: Network Error' feedback in the console without any further explanation on the root cause of ...

Interacting with MongoDB through Node.js via REST API

Just diving into the world of node.js and I'm currently working on a GET request: router.get('/EPODS/Product/:id?', function(req, res) { if(req.params.id){ var inputIdObj={'ProductEBM.DataArea.Product.ProductGroupID': req.p ...

Connecting a specific URL of an API to a single mobile app: A step-by-step guide

Currently, my API includes a user registration system that is utilized by a mobile application. Most of the URLs are restricted for anonymous users and require a token key for authorization, except for the register URL. The register URL needs to remain op ...

Decoding JSON data from the Twitch API

I am currently working on retrieving a user's Twitch name using json_decode and their Steam ID, but I keep encountering an error that I can't seem to resolve. Despite researching similar issues faced by other users, I haven't made any progress in fixing it ...

What is the best way to add additional buttons to my React App after the initial button has been clicked?

Currently, I am in the process of developing a CSV file loader that converts data into JSON format. The loader will consist of three buttons: 1. The first button allows me to select a file from my computer and load the CSV data for conversion to JSON. 2. ...

The node sends a request to the API to retrieve data, which is then stored in an array. Subsequently, another request is

var UfcAPI = require('ufc-api'); var ufc = new UfcAPI({ version: '3' }); const fighterIdList = []; function fetchFighterIds() { ufc.fighters(function(err, res) { for (let i = 0; i < res.body.length; i++) { ...

php - Can you identify the issue?

File Name: sms1.php Located at: Here is the PHP code for sms1.php: <?php //Variables to POST $user = "hidden"; $password = "hidden"; $mobiles = "$_POST[phone]"; $message = "$_POST[msg]"; $sender = "$_POST[sender]"; //Setting up CURL to send data via ...

Having trouble connecting to the Brewery API, could use some guidance from the experts (Novice)

I'm currently facing some difficulties connecting to a brewery API (). I am developing a webpage where users can input the city they are visiting and receive a list of breweries in that city. As someone unfamiliar with APIs, I am unsure about the nece ...

Function for checking API status

I'm currently working on an IF statement that will check for results from two API call functions and terminate when it receives results. function fetchYelp() { let token = '<token>'; axios.get('https://api.yelp.com/v3/businesses ...

Importing Firebase outside of modules is not possible

I'm frustrated trying to follow the documentation precisely but ending up with unexpected results. My goal is to integrate Firebase into my express.js API so that the app can fetch data directly from the database. // Initialize Firebase const functio ...

Having trouble parsing a JSON Array containing sub arrays and objects

I am facing an issue with parsing the JSON data. I have tried accessing the JSON array in my MainActivity code, but unfortunately, I am unable to retrieve the details from the first element. Even after logging the arrayList returned from postExecute, it st ...

Tips for viewing the content of an authentication-required API in a browser

Currently, I am in the process of developing an Android project that requires accessing a specific github API. This particular API contains vital information regarding user repositories. Before diving into Android programming, I am eager to explore the c ...

The React application encounters errors when the API URL provided is incorrect

Embarking on my first React application journey, I am faced with a challenge. A form with two input fields prompts the user to enter the name of a country and a city before submitting the form. The city and country variables are then passed to the subseque ...

An issue with MVC Ajax calls to an API resulting in a null model retrieval

I've been scratching my head for hours because I'm facing a strange issue with my API in one project, while everything is working fine in another project! The Problem: Here's the JavaScript code snippet: var data = new FormData(), firstName ...

What is the best way to transform api.Response into a data frame or json format using Python?

Looking at the data I have, my goal is to transform it into a data frame. t = cmc.globalmetrics_quotes_latest() (Cmc refers to the coinmarketcap api) type(t)= coinmarketcapapi.response """ RESPONSE: 820ms OK: {'active_cryptocurrencies': 73 ...

Retrieve data from an API and store it in a JSON array

My website is having an issue where it's fetching data from an API and displaying it in a table, but all the cells are returning undefined values. The data in the API is structured as an array with multiple datasets inside curly braces that I am unsu ...

Retrieving information via RESTful API using jQuery

Seeking assistance with integrating a JSON feed into an HTML document using jQuery. For instance, I am trying to extract the "base_title" and display it in an h2 tag. Any insights on how to achieve this would be greatly appreciated. Your help will be high ...

The POST method in Node JS request-promises does not properly handle string inputs

When I am trying to establish a connection between my node.js module and another server, I utilize the 'request-promise' library. My implementation for posting data looks like this: rp.({ method: 'POST', headers:{ 'Conte ...