Is it a good idea to use the database table identifier as an external API identifier?

We are developing an HTTP service with an external API, which will have to store some elements that may later be needed by external users of the API. Everything is stored in a table foos, and the current plan is to simply use the key of the main table identifier as an external unique identifier. My gut tells me that this is a bad design, but I could not effectively argue my case, in part because I could not formulate the reasons.

Here are the only flaws I can think of so far:

  • What if we want to change the circuit? We will need to re-fill everything to make sure their identifiers remain intact or to embed another unique identifier column during the move.
  • A slight (?) Security risk (I know, security through the unknown is not protected, etc.).

Are there other significant flaws, or am I just paranoid? Also appreciate some links to published articles that mention this!

+5
source share
3 answers

I am going to continue and say that if your database is locked, it does not matter if:

  • API key exchange means the loss of user information in the CIA.
  • API .

, , SQL - , , - , 1 , API.


:

API URL- , .
http://mysite.com?APIkey=145
, 145, 144 146, , .

GUID- - , :
ID (): 145
ID (GUID): C87FC84A-EE47-47EE-842C-29E969AC5131


, , , API, :
ID (): da39a3ee5e6b4b0d3255bfef95601890afd80709

+5

. , . . - .

IIRC API eBay PayPal , .

+1

- :

If you end up changing the circuit for any reason, your service should abstract away the physical changes. Keeping old keys makes it very difficult ....

0
source

All Articles