0

I'm not good at what I'm working on so apologies if some of my terminology is off. Also not sure if this belongs here, or in a more programming oriented area.

I am looking for options to update rows of a mysql database with data only accessible via REST api.

In other words... I will create a row with some of the data needed. Then I have 4-5 columns I'd like to update with data that I need to gather from the output from an API call

AaronJAnderson
  • 535
  • 2
  • 7
  • 13

1 Answers1

0
  • "Columns" look different (dates vs strings vs numbers); the values within a given column all look the same (eg, all are dates)
  • "Rows" look similar, but with different values.
  • A "table" is a collection of any number of rows, but of a fixed number of columns.
  • An API call must go to some application language code (Java, PHP, or ...) which interprets the yucky REST syntax and proceeds to, for example, issue a SELECT (for a GET REST call) or INSERT/UPDATE (for a PUT), etc. You must write this app code; MySQL does not understand REST.
  • I suspect REST is so restrictive that a PUT is not allowed to return what a GET would return. So, perhaps you have to do 2 API calls. This also happens with talking to MySQL -- an INSERT or UPDATE merely says 'ok' or 'err'; you then need to do a SELECT to fetch stuff.

I hope this helps. To continue this Q&A, please provide

  • More details about your application.
  • Whether you have settled on an app language to code REST in.
  • Some hints of what column types your table(s) has.

(Otherwise, it will probably be closed as "too broad".)

Rick James
  • 80,479
  • 5
  • 52
  • 119