@@ ИДЕНТИФИКАЦИОННЫЕ ДАННЫЕ, SCOPE_IDENTITY и IDENT_CURRENT являются подобными функциями в этом, они возвращают последнее значение, вставленное в столбец IDENTITY таблицы.
@@ ИДЕНТИФИКАЦИОННЫЕ ДАННЫЕ и SCOPE_IDENTITY возвратят последнее значение идентификационных данных, сгенерированное в любой таблице на текущей сессии. Однако SCOPE_IDENTITY возвращает значение только в текущей области; @@ ИДЕНТИФИКАЦИОННЫЕ ДАННЫЕ не ограничены определенным объемом.
IDENT_CURRENT не ограничен объемом и сессией; это ограничено указанной таблицей. IDENT_CURRENT возвращает значение идентификационных данных, сгенерированное для определенной таблицы на любой сессии и любом объеме. Для получения дополнительной информации см. IDENT_CURRENT.
You just need a couple things in place to do this. First, the service client will need to authenticate against your service (over HTTPS) to make a request. Once the client is authenticated, you can return a private token which the client has to include with this token. As long as the token expires after a reasonable amount of time, and a secure algorithm is used to generate it, this should do what you want.
If you have more strict security requirements, you can follow Jakob's suggestion, or have the client start a VPN session prior to making requests.
The fact that it's RESTful or uses JSON isn't a relevant factor when it comes to securing a web service. Any web service would need to be secured in the same manner. There are a few things you should do: