rest-api tagged requests and articles

Categorized request examples and articles tagged with [rest-api] keyword
How do I post JSON to a REST API endpoint?
To post JSON to a REST API endpoint {{using LANG}}, you must send an HTTP POST request to the REST API server and provide JSON data in the body of the {{LANG}} POST message. You must also specify the data type using the Content-Type: application/json request header. In this {{LANG}} REST API POST example, we also send the Accept: application/json request header to tell the REST API server that the {{LANG}} API client expects JSON in response.

How do I get JSON from a REST API endpoint?
To get JSON from a REST API endpoint{{ using LANG}}, you must send an HTTP GET request to the REST API server and provide an Accept: application/json request header. The Accept: application/json header tells the REST API server that the API client expects to receive data in JSON format. The Content-Type: application/json response header indicates that the REST API server returned data in JSON format. In this {{LANG}} REST API GET JSON example, we make a GET request to the ReqBin REST API endpoint. Click Send to execute the {{LANG}} REST API GET JSON request online and see the results.

How do I test a REST API online?
To test a REST API service online, enter your REST API endpoint in the URL field and your REST data in the Content tab and click Send. The ReqBin REST API testing tool works in your browser and does not require a desktop app or browser plugin. You can test your REST API with GET, POST, PUT, PATCH, and DELETE request methods, send JSON data, and custom HTTP headers. The REST API Test Tool allows you to validate API status codes, response times, and sizes and validate returned JSON and XML strings using automated code beautifiers and validators. Click Send to execute the Test Rest API example online and see the results.

Convert Latitude and Longitude to Address via REST API
Convert latitude and longitude to a location (reverse geocode) by sending a POST request to the Mapquest.com REST API. Replace {mapquest_apikey} with your own Mapquest API key.

NASA Image and Video Library via REST API
Access the NASA Image and Video Library by sending a GET request to the Nasa.gov REST API. Replace {nasa_apikey} with your own Nasa API key.

Astronomy Picture of the Day via REST API
Get the astronomy picture of the day (APOD) by sending a GET request to the Nasa.gov REST API. Replace {nasa_apikey} with your own Nasa API key.

Photo Details and Download Links via REST API
Get complete information of a photo, including size, author name, location, and download links by sending a GET request to the Unsplash.com REST API. Replace {unsplash_apikey} with your own Unsplash Access key.

Search Photos via REST API
Get a page of search results for photos sorted by relevance by sending a GET request to the Unsplash.com REST API. Replace {unsplash_apikey} with your own Unsplash Access key.

Mars Rover Photos via REST API
Get Mars photos gathered by NASA's Curiosity, Opportunity, and Spirit rovers on Mars by sending a GET request to the Nasa.gov REST API. Replace {nasa_apikey} with your own Nasa API key.

List of Popular Photos via REST API
Get a page with a list of photos sorted by popularity by sending a GET request to the Unsplash.com REST API. Replace {unsplash_apikey} with your own Unsplash Access key.

Search Map Objects by Address via REST API
Search the objects on the map next to the address by sending a POST request to the Mapquest.com REST API. Replace {mapquest_apikey} with your own Mapquest API key.

REST API Testing Tool
Online REST API testing tool for API developers and testers. Test your RESTful API by making API calls directly from your browser.

Search Map Objects by Latitude and Longitude via REST API
Search the objects on the map using a latitude/longitude pair by sending a POST request to the Mapquest.com REST API. Replace {mapquest_apikey} with your own Mapquest API key.

What's the difference between SOAP and REST?
The key difference between SOAP and REST is how they interact with the server. REST mainly uses HTTP and JSON to transfer payload, whereas SOAP relies on XML. The SOAP client requires complete knowledge of the application and has a strict connection to the server. REST facilitates client-server communication; the request is based on the way it is formulated.

What is CRUD?


SOAP API
SOAP is an XML-based messaging protocol specification that strictly defines an entire method of communication between the client and the server.

REST API
REST API provides an interface for applications to interact with sites by sending and receiving data as JSON (JavaScript Object Notation) objects to the endpoints (URLs) to query, modify and create content on the site.