ID on Wave site vs. what is returned through GraphQL
twestrick
Member Posts: 9
I am wondering how to correlate IDs being used in Wave's GraphQL API vs. what I am seeing in Wave itself (either in my account or in data exports). It would appear that the API uses/returns a hashed or encrypted IDs.
My question is if there is way to convert IDs that the API returns to the actual ID.
An example is with creating a transaction through the API (MoneyTransactionCreateInput).
The API returns:
QnVzaW5lc3M6NDZlODQwYzYtMWMwOS00ZjAwLTlmYTYtNWY2ZmU5ZDM3ZmFmO1RyYW5zYWN0aW9uOjEwNTQ2NDMwOTgzMjU0NTAyMTg=
Where as the actual ID is:
1054643098325450218
Also, the business ID and chart of account IDs are different.
0
Comments
Hi @twestrick we base64 encode the id to allow us to easily represent multiple pieces of information in the id. If you base64 decode that id you will see that we have encoded both a business id and a transaction id within that text.
Hope this helps
Linda
Linda's answer is correct in this case, however, we cannot guarantee that it works for all resources (we can use different resource ids in waveapps.com URLs and in GraphQL IDs.
Awesome! base64 was one encoding I didn't try. Thank you for the help!