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.

Filtering JSON API response based on the name parameter

I've searched through numerous similar questions and discussions, but none have provided a solution to my problem. I am working with an API response that contains a list of jobs executed on a virtual machine. Specifically, I am interested in summarizing th ...

JSON Data Type Mismatch in Swift

I followed the structure correctly, but it keeps throwing an error. typeMismatch(Swift.Array, Swift.DecodingError.Context(codingPath: [], debugDescription: "Expected to decode Array but found a dictionary instead.", underlyingError: nil)) Data Model: str ...

Retrieve the values by accessing an element upon clicking the "Submit" button

Here is an interesting example that I found on this website I am currently working on a simple webpage to display both the current forecast and extended forecast. This is my Index.html: <!DOCTYPE html> <!-- To change this license header, choose ...

The integration of AsyncStorage with the web application is facing challenges

We are in the process of developing an app using react-native, where we retrieve data such as login/signup through our custom X-sdk. The X-sdk acts as a middleware/api fetcher that interacts with the backend api to obtain necessary information. In order to ...

Combining API JSON data with XML in PHP

I have a complex inquiry at hand and I need some guidance to achieve the desired outcome. Currently, I am utilizing an API for a hotel booking system. Although the API works fine, it lacks certain details provided by the client in a separate static XML fi ...

The data from the Flickr API is consistently unchanging

I created a simple weather app that retrieves weather data using a "POST" request and displays it successfully. Users have the ability to search for weather by city, and I wanted to enhance the app by loading an image of that city through a separate jQuer ...

Angular fails to retrieve the data from an Object

I have both backend and frontend applications. When I attempt to retrieve information about the 'Probe' object, I can see its fields: https://i.stack.imgur.com/TJQqI.png However, when I try to access this information in Angular, I receive an undefined val ...

Transfer the layout from one HTML file to multiple others without the need to retype the code

I am working on developing an e-commerce website with HTML/CSS. My goal is to have a consistent template for all product pages that are accessed when clicking on a product. However, I do not want to manually code each page using HTML and CSS. Is there a mo ...

What is the best way to send a JSON object array result to my API endpoint in React?

I am currently working on fetching data from 2 different APIs from the backend. The challenge I am facing is that the JSON result I receive from the first API is in the form of an object array in JSON format. My goal is to pass the ID from the first API ...

The POST request is functioning properly in Node.js, however, I am experiencing difficulties when trying to

I've been working on a registration app using Node.js and MySQL for the database. Everything works smoothly when I run the script locally at 'localhost:3000/register' - it displays the message 'registration successful' and adds the ...

Decoding JSON data retrieved from the Pokeapi

Looking for help on how to effectively call an API known as Pokeapi and then parse the received data into an object using an external library called PokeApi.NET in C#. I am able to get a response from the API in my C# code, but struggle with parsing it int ...

What is the best method for securing my API key within the script.js file while utilizing dotenv?

My goal is to conceal my API key using dotenv. Interestingly, when I replace require('dotenv').config(); with my actual API key in the code as apiKey: process.env.API_KEY, it works fine despite not using process.env.API_KEY. I made sure to inst ...

Utilizing the foreach loop in PHP to display JSON data from the CoinMarket API

I am having trouble printing JSON data in a PHP foreach loop. I have tried multiple methods but nothing seems to work. The data is coming from the CoinMarket API and I am currently using the following code to print it, however, I am unable to access each v ...

Retrieving information from a JSON object that includes arrays

I've been researching how to extract data from the response body of a server, but I haven't had much luck finding a solution that works for my https request returning a JSON object. //Initiate the request: request({ //Specify the request method: met ...

Share your thoughts on Facebook using the curl command

I am hoping to have my website post a message on the fan page of the site. After finding this code, I decided to use it: <?php require_once("assets/facebook.php"); $facebook = new Facebook(array( 'appId' => '471898006354908', // Placeholder 'secr ...

Unable to fetch data from node API in React application

When making an API call from my React app on port 3000 to a Node API running on port 8080, I encountered an error message: XMLHttpRequest cannot load http://localhost:8080/register. Response to preflight request doesn't pass access control check: No ...

creating flask restful api with flexible endpoints and access control

Having recently started learning Flask, I have challenged myself to build my own API in order to become more proficient with the platform. Purpose of the API: Authenticated users should be able to access the endpoint www.mydomain.com/api/ and perform ...

Tips for displaying and sorting two requests within one console

I am currently working on a project to display both folders and subfolders, but only the folders are visible at the moment. function getParserTypes (types, subject) { return types.map((type) => { return { id: type.entry.id, name: type. ...

Getting access to UBER's authorize API is a straightforward process that involves following a few steps to retrieve

I have been attempting to retrieve the code from JSON using a specific URL in Postman, unfortunately, I have not been successful in obtaining the code in JSON format. Click here for Uber login Furthermore, when I access this URL in my browser, I am redir ...

Guide on invoking personalized server-side functions (such as object parsing) utilizing Typescript and Angular tools

I've been grappling for weeks to make custom service calls function with Typescript / Angular / C#. It's been a challenge to find a workable solution online, and the more I search, the more bewildered I become. My current approach has largely been influen ...

Error: Unable to access the 'temperature' property of a null object

Just starting out with React and I've encountered an issue with binding the temperature variable to the component in return(). It keeps giving me a TypeError: Cannot read property 'temperature' of null, even though I can see the data in cons ...

C# backend and React frontend struggling with MVC routing implementation

Exploring MVC with .Net for the first time. Here is my C# controller implementation: namespace TFL.Controllers { [Route("api/[controller]")] public class TubeApiController : Controller { [HttpGet("[action]")] public async Task ...

Retrieve data from Last.fm API by utilizing both Node.js and Angular framework

I am currently working on implementing the node-lastfmapi track.search method into my project. I have successfully retrieved the results, but I am facing challenges in integrating them into the front end using Angular. My backend is powered by mongoDB and ...

Tips for unraveling intricate JSON data structures in Dart/Flutter

Following my server request, I received the following JSON data: [ { "id": 56012, "name": "The name", "description": "<p>description</p>\n", "regula ...

Excluding Fields from Wagtail API Responses: A Quick Guide

When referring to the Wagtail documentation, there is a specific section dedicated to the exclusion of certain fields from the API (). The focus is on how to remove these fields from the perspective of the API consumer by using the URL query parameter ?f ...

I am experiencing difficulty selecting a precise geolocation using a Postgres query

I'm currently working on an API and encountering a frustrating issue. Whenever I execute the following query: SELECT * FROM u.loc It retrieves all user locations along with additional data, including a parameter called "geocode": ex. "geocode":"(48 ...

Utilize nested object models as parameters in TypeScript requests

Trying to pass request parameters using model structure in typescript. It works fine for non-nested objects, but encountering issues with nested arrays as shown below: export class exampleModel{ products: [ { name: string, ...

Guide on transferring information from a node server connected to Google Sheets to Angular 9

Encountered an issue when trying to pass data from a Node server to the front-end using Angular 9. The server side was built with Node and data was fetched from the Google Sheet API. Despite searching extensively on Google, I couldn't find a solution for t ...

Analyze the HTML data received from the API

When accessing the api, I use the following code: $.ajax({ contentType: "text/html; charset=utf-8", dataType: "jsonp", type: "get", crossDomain: true, url: "http://data.nba.com/data/10s/html/nbacom/2013/gameinfo/20140501/0041300106_ ...

I would like to know the best way to compare two JSON data sets, filter out any matching data, and then store the remaining results

To efficiently extract all Post Titles from a JSON API, I am utilizing another JSON API of users to further retrieve the count of comments for each Post. Here are the APIs being used: API for USERS: http://jsonplaceholder.typicode.com/users API for POSTS ...

Developing a NodeJS API for seamless integration with mobile applications and third-party services

Currently, I am in the process of creating a Restful API using NodeJS to serve a specific mobile application and potentially other third-party applications in the future. After doing some research, I made the decision to utilize ExpressJS for middleware, ...

What causes the state to change during the first rendering of the component?

In my application, I have implemented a feature that enables users to search for data from an API call and display the results. Additionally, users can choose to save specific exercises to a database for later viewing. However, I've encountered an is ...

Images from the API are not displaying properly on my front-end application

Currently, I am developing an application using React on the front-end and Express on the back-end to prevent any issues with Cross-Origin Resource Sharing (CORS). The JSON data for my API is coming from "Zoho Creator." Here is an illustration: https://i.s ...

Guide to adding a new table with JSON information to an Azure SQL Database using an API

I am currently facing an issue in our data processing using Azure SQL Database. We are looking to automate the process of loading data from our accounting platforms through API, instead of manually importing it every time. (API Documentation Links: , ) M ...

The third page of Reddit's JSON data on display

When utilizing the Reddit api, I have found a way to retrieve the json of a page. I have successfully done this for the front page, but now I am wondering how to obtain the json for the third page without navigating through the second page. Is there a met ...

Stop or abort any pending API requests in Restangular

I am currently working with an API service: var SearchSuggestionApi = function (Restangular) { return { getSuggestion: function (keyword) { return Restangular.one('search').customGET(null, {keyword:keyword}); } }; }; SearchS ...

Struggling to implement the proper authentication method with API in Ionic

Having an API for the login, but being new to Ionic is causing difficulty in creating the correct method for the login process. The service file is located here: providers/restapi/restapi.ts import { HttpClient } from '@angular/common/http'; import { Inj ...

Obtaining information from an API using Angular

I am currently working on extracting data from various API's and I am encountering some difficulties. The initial part is functioning correctly, with the code provided below : ngOnInit(): void { this.http.get('http://.../api/getData?table=ge ...

What is the best approach for managing and obtaining accurate JSON responses when working with PHP API and AngularJS 2 services?

Encountering a backend issue with MySQL, wherein one query is producing a specific dataset: {"candidat":[{"ID":1,"nom":"Danny","prenom":"Hariot","parti":"Quamba","departement":"Ukraine","commune":"Chapayeve"},{"ID":2,"nom":"Shari","prenom":"Adamkiewicz"," ...

Tips for concealing API endpoints in a React Native Android application

I've developed a nodejs, express, and mongodb API that is currently hosted on Heroku. My next step is to utilize this API URL within my React Native Android app. Unfortunately, I'm facing an issue where the API URL could potentially be exposed to ...

Tips for changing the first letter to uppercase in a p5.js variable

I'm currently working on developing a weather forecasting website using the p5.js framework in JavaScript. One issue I am facing is that the API I am utilizing only provides weather descriptions in lowercase format, whereas I want them to be displayed in ...

Encountering an error when attempting to connect a nodejs REST API to an HTTPS URL using port 844

Attempting to initiate an API call from Node.js to a Tomcat server using the http/https module. There are two options for the API URL: - Functioning correctly and receiving a response var options = { host: 'samleapiurl.com', port: ...

Access specific data within a JSON array in PHP without the need for a foreach loop

Lately, I've been facing some challenges when it comes to decoding and interpreting the prices for specific items in the bitskins api. For instance, the OPSKINS API provides a straightforward output: {"status":1,"time":1477116462,"response":{"AK-47 ...

Steps to resolve the error message "throw new Error(`If callbackSuccess is provided, callbackError must also be supplied`);"

My script to access the GeoTab API for retrieving vehicle data is encountering an issue. async function getFuelTypeDevices(){ fuelTypeDevices = await api.call("Get",{ "typeName":"Device", " ...

Not all API results are being displayed by the Nextjs API function

I am facing an issue with rendering all the returns from the API in my Next.js application. The API, which is created in Strapi, is only displaying 1 out of the 3 possible returns. I am a beginner when it comes to using APIs and I suspect that the issue li ...

Creating an object in AngularJS by merging data from three separate API calls

I am looking to develop a Jenkins dashboard using AngularJS. I am considering combining data from three different API calls to create an object that can be used in the HTML file with ng-repeat, but I'm not sure if this is the best approach. The desir ...

`Finding the nodejs API route for displaying images from a database`

How can I successfully display an image from the database without getting a string of question marks instead? Click here to see the issue >>> When attempting to directly call the API using the provided link, the following result is returned: {&qu ...

Verify the identity of all REST API requests without the need for a username or password in order to obtain a

I have a unique setup where I am selling products. The API fetches product data from a centralized node back-end and displays it on an angular front-end that is hosted on multiple domains. The challenge I'm facing is the need to authenticate all reque ...

Tips on converting a JSON array into a strongly-typed C# class instance via deserialization

This question seems quite similar to another one posted here. Despite my efforts to convert the provided solution into C#, I am not a JSON expert and find myself confused. The challenge lies in deserializing the JSON response from the Kraken OHLC endpoin ...

Retrieve JSON information from a database using an API to showcase additional outcomes

I am currently developing an iOS application that needs to fetch and display data from a MYSQL database. I have set up an API to establish communication between the app and the database. The database is sending valid JSON, as shown below: [{"name":"Mauric ...

Angular2: Retrieve and process a JSON array from an API

I'm currently facing an issue with my service while attempting to fetch a json array from an api and showcase it on the page. I believe there might be an error in my code, but I can't pinpoint exactly where. getAuctions(): Promise<Auction[]> { ...

Python: Exploring JSON Data

Is there a way to extract data specific to a district (such as Nicobars, North and Middle Andaman...) from ? I am trying to extract the Active cases by simply searching for the district name without having to specify the state every time. Currently, I'm us ...

Stop /Terminate the Angular 2 HTTP API request

Occasionally, the loading time for an http API call can be quite lengthy. However, even if we navigate to another component, the call still continues execution (which is visible in the browser console). Is there a method or approach that allows us to can ...

Constant price updates through an API loop

I am transferring data from a spreadsheet to a dataframe that includes product details, which I need to update prices in an e-commerce via a put request through an API. However, I am facing the challenge of creating a loop to properly iterate through the e ...

Can we verify if this API response is accurate?

I am currently delving into the world of API's and developing a basic response for users when they hit an endpoint on my express app. One question that has been lingering in my mind is what constitutes a proper API response – must it always be an object ...

The JSONObject contains a value, however it may sometimes return a null value

[ { "valve": "4679", "selling": "5516", "bal": "9075.4", "o id": "37", "invested": "11122", //<<<<<<<- this value returns null "aProfit": "1012", //<<<<<<<- this value returns null ...

unable to store user input in a REST API using the store functionality

Welcome to my main page! Here, I have a form that I am looking to connect with an API in order to store the entered data: <div> <span>User ID</span> <input type="text" v-model="info.userId"> </div> <br> <div> ...

Locate an image on Wikimedia Commons using its Filename

Whenever I make a call to the API at https://en.wikipedia.org/w/api.php using these parameters: "action": "query", "format": "json", "titles": "Albert Einstein", "prop": "images" The response only provides me with the titles of the corresponding images. ...

Acquiring the API through the callback function within a React application

I wrote a function that connects to an API and fetches data: import {API_KEY, API_URL} from "./constants"; export const getOperations = async (id, successCallback) => { try { const response = await fetch(`${API_URL}/tasks/${ ...

Tips for automatically filling in user-entered form values in AngularJS in the event of a failed REST API call

I have created an AngularJS form that includes dropdowns and text boxes. Once the user submits the form, I intend to call a REST API to save the entered values. However, I am unsure how to handle the scenario where the insertion fails. How can I repopula ...

Steps for deleting an image from a component in Angular before getting a new one from API

In my application, there is a child component responsible for fetching and displaying images from an API on the template. The parent component consists of a list of items, and when a user selects an item from the list, a request is made to the API to retri ...

Variability in Swagger parameter declaration

Is it possible to specify input parameters in Swagger with multiple types? For example: Consider an API that addresses resources using the URL http://localhost/tasks/{taskId}. However, each task contains both an integer ID and a string UUID. I would like ...

Learn the process of retrieving JSON objects through AJAX using jQuery

When making a jQuery call to an API website, I receive the results in JSON format: { "results":[ { "user":{ "gender":"female", "name":{ "title":"mrs", "first":"linda", "last":"diaz" }, ...

What causes the HTTP 405 error in my requests and what is the proper way to utilize an API?

Greetings, I am a novice programmer facing difficulties with sending data to a site using an API. Unfortunately, things did not go as planned and now I find myself in trouble. Here is the code snippet I have been working on: data = { "‫‪indus ...

Is it possible to store a JWT token in local storage when working with Next.js?

We are considering using Next.js for our application, with a focus on client-side rendering for data fetching. The API we will be interacting with is external and requires authentication to access specific user dashboard content. While the homepage will ...

Can you provide guidance on accessing the response API from Twitter?

Currently, I am in the process of creating a toy project using React and Express.js, similar to a basic SNS website. Usually, the server responds to a client request by sending back JSON data containing all the necessary information for rendering articles ...

Is it possible to manipulate an Object within Object typescript?

My recent project involved working with React and Typescript to fetch data from an API. Once the data is fetched, it is saved as an object called coin. However, I encountered a situation where the data may not be fully loaded, resulting in coin being null. ...

Struggling to access a remote URL through jQuery's getJSON function with jsonp, but encountering difficulties

Currently, I am attempting to utilize the NPPES API. All I need to do is send it a link like this and retrieve the results using jQuery. After my research, it seems that because it is cross-domain, I should use jsonp. However, I am facing difficulties m ...

Most effective methods for validating API data

Currently, I am working on developing an api using nestjs. However, I am facing some confusion when it comes to data validation due to the plethora of options available. For instance, should I validate data at the route level using schema validation (like ...

Is Laravel sanctum token persisting even after being removed in certain routes on a live server?

I've encountered an issue with Laravel Sanctum while creating an API. It works perfectly fine on localhost, but when I deploy it to a live server, the following problem arises: When accessing routes under middleware like this: Route::group(['middlewar ...

Utilizing Nuxt 3 server as a passthrough API along with FormData for concealing external endpoints

I'm currently grappling with understanding the Nuxt/server API and am struggling to figure out how to properly send a POST request with form-data (specifically files) to the Nuxt server in order to forward it to an external service: Within my pages.vue fi ...

Is there a way to fetch API data selectively rather than all at once?

Hello everyone, I successfully managed to retrieve data from the Star Wars API in JSON format and display it on my application. Initially, I set the state as 'people.name' to obtain the name object. However, this also rendered unwanted data when I set it a ...

What could be the reason for REQ.BODY being consistently devoid of any

I understand that there are already several solutions marked as working, but I am struggling to get it to work in my specific case. Please refrain from marking it as answered. Here is the scenario I'm facing: AJAX CLIENT-SIDE var data ={}; data.test="cia ...

Retrieve data from a MySQL database and input it into a PHP URL

I am having trouble retrieving a username from the database to fetch the corresponding JSON data for that user. The current code I have implemented is generating a 500 error, possibly due to some issue with $json variable... Could someone offer assistance ...

Are Prisma schema objects secure for sending as requests to REST APIs?

I have developed a simple custom API using Next.js and I wanted to give more flexibility to the frontend in terms of calling the API. Essentially, I want the frontend to have control over what data is included or selected in the server response. With the u ...