question

Sreenivas Angara avatar image
Sreenivas Angara asked Phong Vu commented

Please help me understand '~' in API calls

Call1: { {baseUrl}}/restapi/v1.0/account/~/extension/~

Call2: { {baseUrl}}/restapi/v1.0/account/~/extension/


Please help me understand the significance of ~ in the API call.


Thank you

rest apiextension
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Phong Vu avatar image
Phong Vu answered

The tilde sign after the account (account/~) means the account id of the RingCentral account which the currently authenticated user belongs to.

The tilde sign after the extension (extension/~) means the extension id of the currently authenticated user.

So presumed that your account id is 610000011 and your extension id is 612002824, then

/restapi/v1.0/account/~/extension/~/call-log

will be translated in RingCentral server as

/restapi/v1.0/account/610000011/extension/612002824/call-log

1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Sreenivas Angara avatar image
Sreenivas Angara answered Phong Vu commented

Thank you for response.

There is an issue here and let's keep the focus on these two calls.

Call1: { {baseUrl}}/restapi/v1.0/account/~/extension/~

This call returns one entry business_address information with an id

Call2: { {baseUrl}}/restapi/v1.0/account/~/extension/

This call returns all the extensions for an account with an id


I am trying to build a fact_table that has all extensions, with business_address information. What is the best the way to build it. Please note, I cannot use id to join data between these two calls. The only way to do it, seems to parse the URI.

I think account_id is needed as part of the response. Please help


Thank you

Sreenivas





1 comment
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Phong Vu avatar image Phong Vu ♦♦ commented ·

The "Call1" is for reading a particular extension info. This API gives you more detailed info of an extension.

The "Call2" is for listing all extensions under an account. This API gives you less detailed (basic) info of each extension under an account. The list API can be filtered by extension types as well.

Remember that in RingCentral, the "Account" term means "a company" and the "Extension" term (user extension) means "an employee".

So it's up to what info of an extension you want to read, then you can decide which API you should use. You can check the response from each API and decide which one to use. If you end up in using the read extension API (Call 1), then you have to call the list extensions API (Call 2) to grab all the extension ids (or part of them filtered by type) then use the extension id to read detailed info of that extension.

0 Likes 0 ·

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys