WordPress has the HTTP API that you could perhaps use to send POST (wp_remote_post
) or GET (wp_remote_get
) requests to an API, https://developer.wordpress.org/plugins/http-api/. But you could also use cURL to send the requests, I think.
If the API is developed by you, then it’s up to you to decide what kind of arguments the API accepts/expects and what kind of authentication it requires. If it’s some 3rd party API, then you need to consult the API documentation to see what is needed to get a response from it and in which form you’ll get the response – e.g. is it a JSON response.
Or if you can skip the API and connect directly to the database, then you could perhaps use $wpdb
to do it as described here, Using wpdb to connect to a separate database
Related Posts:
- Get all tags not just first 10 with wp api 2.0
- Sending posts from Python to WordPress
- What is the proper way to validate and sanitize JSON response from REST API?
- Data storage for JS app using WP REST API
- Building a REST API for your web app exposes primary keys of DB records?
- How to access a table in a wordpress database using REST API?
- How to rerieve comments and their replies from DB
- Options of accessing wordpress data from mobile app
- MySQL SELECT increment counter
- Exclude Statement in SQL
- Using the Rewrite API to Construct a RESTful URL
- Custom form that store input in database
- Can a post ID be 0?
- Issue with wp_insert_post and post_content field error Could not update post in the database
- wp_posts – guid update
- what is the wp_5_posts table in the database?
- Migrating data between local and development server
- WordPress Database Charset/Collate
- Why is per_page not working with categories in WP API?
- What is the database table for pages?
- Using Dynamic Data Pulled from a MySQL Table in a WordPress Page
- WordPress database becoming huge. How to analyze and optimize it? fear of running out of memory
- Migrating non-WordPress CMS to WordPress, lots of data to move — possible solutions?
- AJAX request from Chrome Extension to WordPress Website
- Is database safe after merging a branch of a more recent version over an older one?
- Hook to be used when creating a database table
- Delete all post meta except featured image
- Where is custom template file chosen for a post stored in the DB?
- Implementing the wp json-rest api
- Safe way to find last inserted id in a table?
- How get Themes list via REST api?
- WordPress DATABASE Update Manually?
- Is it possible to store visitors IPs in wp_postmeta table?
- I don’t see site_url and home_url fields in wp_options table (phpMyAdmin)?
- Multiple postmeta with same name for one post in wp_postmeta table
- Which is more efficient? Using usermeta, or creating a new MySQL table?
- Adding rest api endpoints to an old theme
- A field with dashes in the slug [closed]
- Creating a Video Content Page (how to use query strings in wordpress)- Help!
- Best way to tell if a user account is active, using the database only
- WordPress REST API not returning all posts
- Structure of postmeta meta_value for woocommerce product download
- Handling large N data in WordPress
- How to replicate a user plugin made table value, to this user’s custom meta table value?
- Catalina an MAMP Database Conenction Error
- “No Access-Control-Allow-Origin header is present” even though it is in the entry file
- A MySQL DB within a MySQL DB
- Is there a way to recover the table wp_term_relationships?
- Trouble Migrating all data blog from WordPress.com to WordPress.org
- How Can I Put Meta_Compare in the Database-Query?
- Historic WordPress database connection
- $wpdb error (Call to a member function insert() on a non-object)
- How To Run A Temporary Instance Of a WordPress Backup Without a Database?
- Share users across multiple sites on same database, but with different domains
- Creating a WordPress Post via REST API – HTML or Markdown?
- Global__r connection timed out
- Moving WordPress site to new domain – database import [duplicate]
- Location of WP default mySQL tables creation file?
- Directly editing WP database issues
- Installation question
- Disable Database Update Required ? break my website
- add_post_meta — not working
- Select From wpdb – Author/User Directory page
- How can I query the db to access current post information?
- $wpdb->insert not inserting all rows
- Best Practice? – Saving multiple Values as Serialized Data / Saving each Value per Row / Dedicated Table
- trigger WordPress rest any API call
- WordPress REST API in Integromat: How to overcome “Sorry, you are not allowed to list users / edit this…”
- Insert NULL value using prepare()
- How can I find user role in Mysql?
- Insert variables into wpdb in custom post template
- $wpdb->insert duplicating rows
- Troubles when I want to connect to another DB
- Intermittent Yet Problematic Error – “Error Establishing A Database Connection”
- Free version of Relevanssi doesn’t show ACF fields
- Communication in between WordPress database and another (not WordPress) database
- Is it possible to separate databases in WordPress site – one for orders and the other for all non-orders related
- Featured image from custom to WordPress database
- Periodically Query an external API on wordpress site
- Extending the API I created to return category names
- wp rest api (v2) filter not working (404 error – rest_no_route)
- Delete all users meta that named: user_avatar
- How to save dropdown slection by a user in the DB
- Using $wpdb to insert data into a table
- Bypass wp_safe_remote_get()?
- Accessing Information From Vendor Database On The Basis Of Customer Query
- spambot registering without providing email or password, bypassing registration process
- Issue “Error establishing a database connection” problem.
- Media library images “missing” after migrating them using SQL
- Widgets with *internal* links do not display after database migration
- WordPress ERD mistake?
- Copy site on same server?
- Tool to check the database in Production [closed]
- How to solve notorious ‘Error Establishing a Database Connection’ [closed]
- wp_usermeta key problem
- How to properly configure SSL connection to remote azure database for running queries within a WordPress environment
- Database Queries are crashing the server
- Uploading to WordPress Database
- Login and register by API
- Woocommerce API for calling products by Category ID