You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: product_docs/docs/edbcloud/beta/reference/index.mdx
+95-22Lines changed: 95 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -8,15 +8,21 @@ The API reference documentation is available from the [EDB Cloud portal](https:/
8
8
9
9
To access the API, you need a token. The high-level steps to obtain a token are:
10
10
1.[Query the authentication endpoint](#query-the-authentication-endpoint).
11
-
2.[Request the device code](#request-the-device-code).
11
+
2.[Request the device code](#request-the-device-code-using-curl).
12
12
3.[Authorize as a user](#authorize-as-a-user).
13
-
4.[Request the token](#request-the-token).
13
+
4.[Request the token](#request-the-token-using-curl).
14
14
15
15
16
+
EDB provides an optional script to simplify getting your device code and getting and refreshing your tokens. See [Using the `get-token` Script](#using-the-get-token-script) for details.
17
+
16
18
17
19
## Query the Authentication Endpoint
18
20
19
-
Use the following command to get the information returned by the authentication endpoint that you need later:
21
+
This call returns the information that either:
22
+
23
+
- you need later if you are using `curl` to request the device code and tokens, or
24
+
- the `get-token` script uses to generate the tokens for you
@@ -32,19 +38,21 @@ The response returns the `clientId`, `issuerUri`, `scope`, and `audience`. For e
32
38
}
33
39
```
34
40
35
-
EDB recommends you store the output in environment variables to make including them in the following calls easier. For example,
41
+
EDB recommends you store the output in environment variables to make including them in the following calls easier. For example:
36
42
37
43
```
38
44
CLIENT_ID=pM8PRguGtW9yVnrsvrvpaPyyeS9fVvFh
39
45
ISSUER_URL=https://auth.edbcloud.com
40
46
SCOPE="openid profile email offline_access"
41
47
AUDIENCE="https://portal.edbcloud.com/api"
42
48
```
43
-
The following example calls show use these environment variables.
44
-
45
-
## Request the Device code
49
+
The following example calls use these environment variables.
46
50
47
-
Use the following call to get a device code:
51
+
## Request the Device Code Using `curl`
52
+
!!!note
53
+
The `get-token` script executes this step. You don't need to make this call if you are using the script.
54
+
!!!
55
+
This call gets a device code:
48
56
```
49
57
curl --request POST \
50
58
--url "$ISSUER_URL/oauth/device/code" \
@@ -56,7 +64,7 @@ curl --request POST \
56
64
57
65
The response returns:
58
66
59
-
-`device_code` - the unique code for the device. When you go to the `verification_uri` in your browser-based device, this code is bound to your session. You use this code in your [request for a token](#request-the-token).
67
+
-`device_code` - the unique code for the device. When you go to the `verification_uri` in your browser-based device, this code is bound to your session. You use this code in your [request for a token](#request-the-token-using-curl).
60
68
-`user_code` - the code you input at the `verification_uri` to authorize the device. You use this code when you [authorize yourself as a user](#authorize-as-a-user).
61
69
-`verification_uri` - the URL you use to authorize your device.
62
70
-`verification_uri_complete` - the complete URL you use to authorize the device. You can use this URL to embed the user code in your app's URL.
@@ -75,26 +83,31 @@ For example:
75
83
}
76
84
```
77
85
78
-
Store the device_code in an environment variable for future use. For example;
86
+
Store the device code in an environment variable for future use. For example:
79
87
80
88
```
81
89
DEVICE_CODE=KEOY2_5YjuVsRuIrrR-aq5gs
82
90
```
83
91
84
92
## Authorize as a User
85
93
94
+
To authorize as a user:
95
+
86
96
1. Go to the `verification_uri` in your web browser, enter your `user_code`, and select **Continue**.
87
97
88
-
4. Select **Confirm** on the Device Confirmation dialog.
98
+
2. Select **Confirm** on the Device Confirmation dialog.
89
99
90
-
5. Select **Continue with Microsoft Azure AD** on the EDB Cloud Welcome screen.
100
+
3. Select **Continue with Microsoft Azure AD** on the EDB Cloud Welcome screen.
91
101
92
-
6. Log in with your Azure AD credentials.
102
+
4. Log in with your Azure AD credentials.
93
103
94
104
95
-
## Request the Token
105
+
## Request the Token Using `curl`
106
+
!!!note
107
+
The `get-token` script executes this step. You don't need to make this call if you are using the script. See [Request Your Token Using `get-token`](#request-your-token-using-get-token).
108
+
!!!
96
109
97
-
Use the `curl --request POST`command to request a token. For example,
110
+
The `curl --request POST`call requests a token. For example:
98
111
```
99
112
curl --request POST \
100
113
--url "$ISSUER_URL/oauth/token" \
@@ -121,17 +134,17 @@ For example:
121
134
"token_type": "Bearer"
122
135
}
123
136
```
124
-
Store the access_token and refresh_token in environment variables for future use. For example,
137
+
Store the access token and refresh token in environment variables for future use. For example:
125
138
126
139
```
127
140
ACCESS_TOKEN="eyJhbGc.......1Qtkaw2fyho"
128
141
REFRESH_TOKEN="v1.MTvuZpu.......sbiionEhtTw"
129
142
```
130
143
131
144
If not successful, you receive one of the following errors:
132
-
-`authorization_pending` - continue polling using the suggested interval retrieved when you [requested the device code](#request-the-device-code).
145
+
-`authorization_pending` - continue polling using the suggested interval retrieved when you [requested the device code](#request-the-device-code-using-curl).
133
146
134
-
-`slow_down` - slow down and use the suggested interval retrieved when you [requested the device code](#request-the-device-code). To avoid receiving this error due to network latency, you should start counting each interval after receipt of the last polling request's response.
147
+
-`slow_down` - slow down and use the suggested interval retrieved when you [requested the device code](#request-the-device-code-using-curl). To avoid receiving this error due to network latency, you should start counting each interval after receipt of the last polling request's response.
135
148
-`expired_token` - you have not authorized the device quickly enough, so the `device_code` has expired. Your application should notify you that it has expired and to restore it.
136
149
-`access_denied`
137
150
@@ -171,11 +184,16 @@ Example response:
171
184
```
172
185
173
186
174
-
## Refreshing your Token
187
+
## Refresh your Token
188
+
189
+
You use the refresh token to get a new access token. Usually you need a new access token only after the previous one expires or when gaining access to a new resource for the first time. You shouldn't call the endpoint to get a new access token every time you call an API. There are rate limits that throttle the amount of requests to the endpoint that can be executed using the same token from the same IP.
175
190
176
-
You can use the refresh token to get a new access token. Usually you need a new access token only after the previous one expires or when gaining access to a new resource for the first time. You shouldn't call the endpoint to get a new access token every time you call an API. There are rate limits that throttle the amount of requests to the endpoint that can be executed using the same token from the same IP.
191
+
### Refresh your Token Using `curl`
192
+
!!!note
193
+
The `get-token` script has an option to execute this step. See [Refresh the Token Using `get-token`](#refresh-the-token-using-get-token).
194
+
!!!
177
195
178
-
To refresh your token, make a POST request to the `/oauth/token` endpoint in the Authentication API, using `grant_type=refresh_token`. For example:
196
+
If you are not using the `get-token` script to refresh your token, make a POST request to the `/oauth/token` endpoint in the Authentication API, using `grant_type=refresh_token`. For example:
179
197
```
180
198
curl --request POST \
181
199
--url "$ISSUER_URL/oauth/token" \
@@ -201,14 +219,69 @@ The response of this API call includes the `access_token`. For example:
201
219
```
202
220
203
221
!!! Note
204
-
You need to save the `refresh_token`retrieved from this response for the next refresh call. The `refresh_token` in the response when you originally [requested the token](#request-the-token) is obsoleted once it has been used.
222
+
You need to save the refresh token retrieved from this response for the next refresh call. The refresh token in the response when you originally [requested the token](#request-the-token) is obsoleted once it has been used.
205
223
206
224
207
225
226
+
## Using the `get-token` Script
208
227
209
228
229
+
To simplify the process of getting tokens, EDB provides the `get-token` script. You can download it [here](https://github.com/EnterpriseDB/cloud-utilities/tree/main/api).
210
230
231
+
To use the script, install the [jq command-line JSON processor](https://stedolan.github.io/jq/) specific to your OS.
211
232
233
+
Before running the script, [query the authentication endpoint](#query-the-authentication-endpoint).
212
234
235
+
### get-token Usage
213
236
237
+
```
238
+
Usage:
239
+
./get-token.sh [flags] [options]
240
+
241
+
flags:
242
+
--format (-o) json | plain output format
243
+
--refresh <refresh_token> [optional] query for tokens
244
+
again using given <refresh_token>
245
+
this revokes and rotates the refresh
246
+
token. Please remember the newly
247
+
returned refresh_token for the next use.
248
+
249
+
```
250
+
251
+
### Request Your Token Using `get-token`
252
+
To use the `get-token` script to get your tokens, use the script without the `--refresh` option. For example:
Copy file name to clipboardExpand all lines: product_docs/docs/pgbouncer/1.16/01_installation/01_installing_pgbouncer_on_a_linux_or_centos_host.mdx
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -77,10 +77,10 @@ Follow the steps given below to install PgBouncer:
77
77
78
78
Where <xx> is the PgBouncer version you want to install.
79
79
80
-
To install PgBouncer 1.15 on CentOS 8, the command is:
80
+
To install PgBouncer 1.16 on CentOS 8, the command is:
81
81
82
82
```text
83
-
dnf -y install edb-pgbouncer115
83
+
dnf -y install edb-pgbouncer116
84
84
```
85
85
86
86
When you install an RPM package that is signed by a source that is not recognized by your system, yum may ask for your permission to import the key to your local server. If prompted, and you are satisfied that the packages come from a trustworthy source, enter `y`, and press `Return` to continue.
@@ -169,10 +169,10 @@ Follow the steps given below to install PgBouncer:
169
169
170
170
Where <xx> is the PgBouncer version you want to install.
171
171
172
-
To install PgBouncer 1.15 on RHEL 8, the command is:
172
+
To install PgBouncer 1.16 on RHEL 8, the command is:
173
173
174
174
```text
175
-
dnf -y install edb-pgbouncer115
175
+
dnf -y install edb-pgbouncer116
176
176
```
177
177
178
178
When you install an RPM package that is signed by a source that is not recognized by your system, yum may ask for your permission to import the key to your local server. If prompted, and you are satisfied that the packages come from a trustworthy source, enter `y`, and press `Return` to continue.
Copy file name to clipboardExpand all lines: product_docs/docs/pgbouncer/1.16/01_installation/04_installing_pgbouncer_on_a_windows_host.mdx
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -10,15 +10,15 @@ legacyRedirectsGenerated:
10
10
11
11
Graphical installers for PgBouncer are available via StackBuilder Plus (for Advanced Server hosts) or Stack Builder (for PostgreSQL hosts).
12
12
13
-
The following steps walk you through installing PgBouncer 1.15 by accessing StackBuilder Plus through Windows start menu
13
+
The following steps walk you through installing PgBouncer 1.16 by accessing StackBuilder Plus through Windows start menu
14
14
15
15
1. Access StackBuilder Plus through the Windows start menu; on the `Welcome` window, select your Advanced Server installation from the drop-down list. Click `Next` to continue to the application selection page.
16
16
17
17

18
18
19
19
Fig. 1: The StackBuilder Plus Welcome window
20
20
21
-
2. Expand the `Add-ons, tools and utilities` node, and check the box next to the `PgBouncer v1.15.0.1-1`. Click `Next` to continue.
21
+
2. Expand the `Add-ons, tools and utilities` node, and check the box next to the `PgBouncer v1.16.0.1-1`. Click `Next` to continue.
22
22
23
23

|`PgBouncer 1.16`| PostgreSQL and Advanced Server 13 | RHEL/CentOS 7 - x86_64 and RHEL/CentOS 8 - x86_64 <br />RHEL/CentOS 7 - ppc64le <br />Debian 9x Stretch and Debian 10x Buster <br />Ubuntu 18.04 Bionic Beaver and Ubuntu 20.04 LTS Focal Fossa <br /> Windows 86 x64 Interactive Installer|
21
+
|`PgBouncer 1.16`| PostgreSQL and Advanced Server 12 | RHEL/CentOS 7 - x86_64 and RHEL/CentOS 8 - x86_64 <br />RHEL/CentOS 7 - ppc64le <br />Debian 9x Stretch and Debian 10x Buster <br />Ubuntu 18.04 Bionic Beaver <br /> Windows 86 x64 Interactive Installer <br />SUSE Linux Enterprise Server 12 SP5|
22
+
|`PgBouncer 1.16`| PostgreSQL and Advanced Server 11 | RHEL/CentOS 7 - x86_64 and RHEL/CentOS 8 - x86_64 <br />RHEL/CentOS 7 - ppc64le <br />Debian 9x Stretch <br />Ubuntu 18.04 Bionic Beaver <br /> Windows 86 x64 Interactive Installer <br />SUSE Linux Enterprise Server 12 SP5|
23
+
|`PgBouncer 1.16`| PostgreSQL and Advanced Server 10 and 9.6 | RHEL/CentOS 7 - x86_64 <br />RHEL/CentOS 7 - ppc64le <br /> Windows 86 x64 Interactive Installer|
20
24
|`PgBouncer 1.15`| PostgreSQL and Advanced Server 13 | RHEL/CentOS 7 - x86_64 and RHEL/CentOS 8 - x86_64 <br />RHEL/CentOS 7 - ppc64le <br />Debian 9x Stretch and Debian 10x Buster <br />Ubuntu 18.04 Bionic Beaver and Ubuntu 20.04 LTS Focal Fossa <br /> Windows 86 x64 Interactive Installer|
21
25
|`PgBouncer 1.15`| PostgreSQL and Advanced Server 12 | RHEL/CentOS 7 - x86_64 and RHEL/CentOS 8 - x86_64 <br />RHEL/CentOS 7 - ppc64le <br />Debian 9x Stretch and Debian 10x Buster <br />Ubuntu 18.04 Bionic Beaver <br /> Windows 86 x64 Interactive Installer <br />SUSE Linux Enterprise Server 12 SP4|
22
26
|`PgBouncer 1.15`| PostgreSQL and Advanced Server 11 | RHEL/CentOS 7 - x86_64 and RHEL/CentOS 8 - x86_64 <br />RHEL/CentOS 7 - ppc64le <br />Debian 9x Stretch <br />Ubuntu 18.04 Bionic Beaver <br /> Windows 86 x64 Interactive Installer <br />SUSE Linux Enterprise Server 12 SP4|
@@ -29,10 +33,6 @@ The PgBouncer version is version-specific, but the documented and supported func
29
33
|`PgBouncer 1.9`| Advanced Server 11 | RHEL/CentOS 7 - x86_64 <br />RHEL/CentOS 7 - ppc64le <br />Debian 9x Stretch <br />Ubuntu 18.04 Bionic Beaver <br /> Windows 86 x64 Interactive Installer and Linux 86_64 Interactive Installer|
30
34
|`PgBouncer 1.7`| Advanced Server 10 and 9.6 | RHEL/CentOS 7 - x86_64 <br />RHEL/CentOS 7 - ppc64le <br /> Windows 86 x64 Interactive Installer and Linux 86_64 Interactive Installer|
31
35
32
-
!!! Note
33
-
34
-
PgBouncer 1.15 is no longer supported on CentOS/RHEL/OL 6.x platforms. It is strongly recommended that EDB products running on these platforms be migrated to a supported platform.
0 commit comments