Skip to content

Commit 05b78bb

Browse files
committed
Removes old test API
1 parent cab40a2 commit 05b78bb

File tree

3 files changed

+31
-37
lines changed

3 files changed

+31
-37
lines changed

README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ A RESTful API for managing your Postgres. Fetch tables, add roles, and run queri
66

77
Full documentation: https://supabase.github.io/pg-api/
88

9-
A trial API is set up here: https://pg-api.fly.dev/. To try this with your own Postgres database, read the [usage](https://supabase.github.io/pg-api/#usage) section in the docs.
10-
119
## Quickstart
1210

1311
Set the following ENV VARS:
@@ -30,15 +28,11 @@ Then run any of the bin files in the `bin` directory
3028
./bin/start-windows.exe
3129
```
3230

33-
## Self-hosting
34-
35-
[![Run on Google Cloud](https://deploy.cloud.run/button.svg)](https://deploy.cloud.run)
36-
3731
## FAQs
3832

3933
**What security does this use?**
4034

41-
None. We are assuming you are using this behind a proxy which brings it's own security, or using this internally with no access to the outside world. We may add security in the future, but only something very basic.
35+
None. Please don't use this as a standalone server. We are assuming you are using this behind a proxy which brings it's own security, on your local machine, or using this internally with no access to the outside world. This is designed to be used as a part of a larger system.
4236

4337
## Developers
4438

docs/index.html

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ <h2 id="usage">Usage</h2>
227227
<blockquote>
228228
<p>Basic usage</p>
229229
</blockquote>
230-
<pre class="highlight tab tab-sh"><code>curl -X GET https://pg-api.fly.dev/ \
230+
<pre class="highlight tab tab-sh"><code>curl -X GET http://localhost:1337/ \
231231
-H <span class="hljs-string">'Content-Type: application/json'</span> \
232232
-H <span class="hljs-string">'pg: {}'</span> <span class="hljs-comment"># see Postgres connection header below</span>
233233
</code></pre>
@@ -265,12 +265,12 @@ <h2 id="query">query</h2>
265265
<blockquote>
266266
<p>POST /query</p>
267267
</blockquote>
268-
<pre class="highlight tab tab-sh"><code>curl -X POST https://pg-api.fly.dev/query \
268+
<pre class="highlight tab tab-sh"><code>curl -X POST http://localhost:1337/query \
269269
-H <span class="hljs-string">'Content-Type: application/json'</span> \
270270
-d <span class="hljs-string">'{}'</span> <span class="hljs-comment"># see example body below</span>
271271
</code></pre>
272272
<pre class="highlight tab tab-js"><code>
273-
<span class="hljs-keyword">const</span> data = <span class="hljs-keyword">await</span> fetch(<span class="hljs-string">'https://pg-api.fly.dev/query'</span>, {
273+
<span class="hljs-keyword">const</span> data = <span class="hljs-keyword">await</span> fetch(<span class="hljs-string">'http://localhost:1337/query'</span>, {
274274
<span class="hljs-attr">method</span>: <span class="hljs-string">'POST'</span>,
275275
<span class="hljs-attr">headers</span>: { <span class="hljs-string">'Content-Type'</span>: <span class="hljs-string">'application/json'</span> },
276276
<span class="hljs-attr">body</span>: {} <span class="hljs-comment">// see example body below</span>
@@ -311,11 +311,11 @@ <h2 id="getschemas">getSchemas</h2>
311311
<blockquote>
312312
<p>GET /schemas</p>
313313
</blockquote>
314-
<pre class="highlight tab tab-sh"><code>curl -X GET https://pg-api.fly.dev/schemas \
314+
<pre class="highlight tab tab-sh"><code>curl -X GET http://localhost:1337/schemas \
315315
-H <span class="hljs-string">'Content-Type: application/json'</span> \
316316
-H <span class="hljs-string">'pg: { "host": "DB_HOST", "password": "DB_PASSWORD" }'</span>
317317
</code></pre>
318-
<pre class="highlight tab tab-js"><code><span class="hljs-keyword">const</span> data = <span class="hljs-keyword">await</span> fetch(<span class="hljs-string">'https://pg-api.fly.dev/schemas'</span>, {
318+
<pre class="highlight tab tab-js"><code><span class="hljs-keyword">const</span> data = <span class="hljs-keyword">await</span> fetch(<span class="hljs-string">'http://localhost:1337/schemas'</span>, {
319319
<span class="hljs-attr">method</span>: <span class="hljs-string">'GET'</span>,
320320
<span class="hljs-attr">headers</span>: {
321321
<span class="hljs-string">'pg'</span>: { <span class="hljs-string">"host"</span>: <span class="hljs-string">"DB_HOST"</span>, <span class="hljs-string">"password"</span>: <span class="hljs-string">"DB_PASSWORD"</span> }
@@ -351,11 +351,11 @@ <h2 id="gettables">getTables</h2>
351351
<blockquote>
352352
<p>GET /tables</p>
353353
</blockquote>
354-
<pre class="highlight tab tab-sh"><code>curl -X GET https://pg-api.fly.dev/tables \
354+
<pre class="highlight tab tab-sh"><code>curl -X GET http://localhost:1337/tables \
355355
-H <span class="hljs-string">'Content-Type: application/json'</span> \
356356
-H <span class="hljs-string">'pg: { "host": "DB_HOST", "password": "DB_PASSWORD" }'</span>
357357
</code></pre>
358-
<pre class="highlight tab tab-js"><code><span class="hljs-keyword">const</span> data = <span class="hljs-keyword">await</span> fetch(<span class="hljs-string">'https://pg-api.fly.dev/tables'</span>, {
358+
<pre class="highlight tab tab-js"><code><span class="hljs-keyword">const</span> data = <span class="hljs-keyword">await</span> fetch(<span class="hljs-string">'http://localhost:1337/tables'</span>, {
359359
<span class="hljs-attr">method</span>: <span class="hljs-string">'GET'</span>,
360360
<span class="hljs-attr">headers</span>: {
361361
<span class="hljs-string">'pg'</span>: { <span class="hljs-string">"host"</span>: <span class="hljs-string">"DB_HOST"</span>, <span class="hljs-string">"password"</span>: <span class="hljs-string">"DB_PASSWORD"</span> }
@@ -371,11 +371,11 @@ <h2 id="gettypes">getTypes</h2>
371371
<blockquote>
372372
<p>GET /types</p>
373373
</blockquote>
374-
<pre class="highlight tab tab-sh"><code>curl -X GET https://pg-api.fly.dev/types \
374+
<pre class="highlight tab tab-sh"><code>curl -X GET http://localhost:1337/types \
375375
-H <span class="hljs-string">'Content-Type: application/json'</span> \
376376
-H <span class="hljs-string">'pg: { "host": "DB_HOST", "password": "DB_PASSWORD" }'</span>
377377
</code></pre>
378-
<pre class="highlight tab tab-js"><code><span class="hljs-keyword">const</span> data = <span class="hljs-keyword">await</span> fetch(<span class="hljs-string">'https://pg-api.fly.dev/types'</span>, {
378+
<pre class="highlight tab tab-js"><code><span class="hljs-keyword">const</span> data = <span class="hljs-keyword">await</span> fetch(<span class="hljs-string">'http://localhost:1337/types'</span>, {
379379
<span class="hljs-attr">method</span>: <span class="hljs-string">'GET'</span>,
380380
<span class="hljs-attr">headers</span>: {
381381
<span class="hljs-string">'pg'</span>: { <span class="hljs-string">"host"</span>: <span class="hljs-string">"DB_HOST"</span>, <span class="hljs-string">"password"</span>: <span class="hljs-string">"DB_PASSWORD"</span> }
@@ -410,11 +410,11 @@ <h2 id="getplugins">getPlugins</h2>
410410
<blockquote>
411411
<p>GET /plugins</p>
412412
</blockquote>
413-
<pre class="highlight tab tab-sh"><code>curl -X GET https://pg-api.fly.dev/plugins \
413+
<pre class="highlight tab tab-sh"><code>curl -X GET http://localhost:1337/plugins \
414414
-H <span class="hljs-string">'Content-Type: application/json'</span> \
415415
-H <span class="hljs-string">'pg: { "host": "DB_HOST", "password": "DB_PASSWORD" }'</span>
416416
</code></pre>
417-
<pre class="highlight tab tab-js"><code><span class="hljs-keyword">const</span> data = <span class="hljs-keyword">await</span> fetch(<span class="hljs-string">'https://pg-api.fly.dev/plugins'</span>, {
417+
<pre class="highlight tab tab-js"><code><span class="hljs-keyword">const</span> data = <span class="hljs-keyword">await</span> fetch(<span class="hljs-string">'http://localhost:1337/plugins'</span>, {
418418
<span class="hljs-attr">method</span>: <span class="hljs-string">'GET'</span>,
419419
<span class="hljs-attr">headers</span>: {
420420
<span class="hljs-string">'pg'</span>: { <span class="hljs-string">"host"</span>: <span class="hljs-string">"DB_HOST"</span>, <span class="hljs-string">"password"</span>: <span class="hljs-string">"DB_PASSWORD"</span> }
@@ -430,11 +430,11 @@ <h2 id="getconfig">getConfig</h2>
430430
<blockquote>
431431
<p>GET /config</p>
432432
</blockquote>
433-
<pre class="highlight tab tab-sh"><code>curl -X GET https://pg-api.fly.dev/config \
433+
<pre class="highlight tab tab-sh"><code>curl -X GET http://localhost:1337/config \
434434
-H <span class="hljs-string">'Content-Type: application/json'</span> \
435435
-H <span class="hljs-string">'pg: { "host": "DB_HOST", "password": "DB_PASSWORD" }'</span>
436436
</code></pre>
437-
<pre class="highlight tab tab-js"><code><span class="hljs-keyword">const</span> data = <span class="hljs-keyword">await</span> fetch(<span class="hljs-string">'https://pg-api.fly.dev/config'</span>, {
437+
<pre class="highlight tab tab-js"><code><span class="hljs-keyword">const</span> data = <span class="hljs-keyword">await</span> fetch(<span class="hljs-string">'http://localhost:1337/config'</span>, {
438438
<span class="hljs-attr">method</span>: <span class="hljs-string">'GET'</span>,
439439
<span class="hljs-attr">headers</span>: {
440440
<span class="hljs-string">'pg'</span>: { <span class="hljs-string">"host"</span>: <span class="hljs-string">"DB_HOST"</span>, <span class="hljs-string">"password"</span>: <span class="hljs-string">"DB_PASSWORD"</span> }
@@ -448,11 +448,11 @@ <h2 id="getversion">getVersion</h2>
448448
<blockquote>
449449
<p>GET /config/version</p>
450450
</blockquote>
451-
<pre class="highlight tab tab-sh"><code>curl -X GET https://pg-api.fly.dev/config/version \
451+
<pre class="highlight tab tab-sh"><code>curl -X GET http://localhost:1337/config/version \
452452
-H <span class="hljs-string">'Content-Type: application/json'</span> \
453453
-H <span class="hljs-string">'pg: { "host": "DB_HOST", "password": "DB_PASSWORD" }'</span>
454454
</code></pre>
455-
<pre class="highlight tab tab-js"><code><span class="hljs-keyword">const</span> data = <span class="hljs-keyword">await</span> fetch(<span class="hljs-string">'https://pg-api.fly.dev/config/version'</span>, {
455+
<pre class="highlight tab tab-js"><code><span class="hljs-keyword">const</span> data = <span class="hljs-keyword">await</span> fetch(<span class="hljs-string">'http://localhost:1337/config/version'</span>, {
456456
<span class="hljs-attr">method</span>: <span class="hljs-string">'GET'</span>,
457457
<span class="hljs-attr">headers</span>: {
458458
<span class="hljs-string">'pg'</span>: { <span class="hljs-string">"host"</span>: <span class="hljs-string">"DB_HOST"</span>, <span class="hljs-string">"password"</span>: <span class="hljs-string">"DB_PASSWORD"</span> }

docs/source/index.html.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The goal of this API is to enable the full management of a Postgres database usi
3939
> Basic usage
4040
4141
```sh
42-
curl -X GET https://pg-api.fly.dev/ \
42+
curl -X GET http://localhost:1337/ \
4343
-H 'Content-Type: application/json' \
4444
-H 'pg: {}' # see Postgres connection header below
4545
```
@@ -99,13 +99,13 @@ Directly query your database. Send any SQL you want!
9999
> POST /query
100100
101101
```sh
102-
curl -X POST https://pg-api.fly.dev/query \
102+
curl -X POST http://localhost:1337/query \
103103
-H 'Content-Type: application/json' \
104104
-d '{}' # see example body below
105105
```
106106
```js
107107

108-
const data = await fetch('https://pg-api.fly.dev/query', {
108+
const data = await fetch('http://localhost:1337/query', {
109109
method: 'POST',
110110
headers: { 'Content-Type': 'application/json' },
111111
body: {} // see example body below
@@ -143,12 +143,12 @@ View and manage your Postgres schemas.
143143
> GET /schemas
144144
145145
```sh
146-
curl -X GET https://pg-api.fly.dev/schemas \
146+
curl -X GET http://localhost:1337/schemas \
147147
-H 'Content-Type: application/json' \
148148
-H 'pg: { "host": "DB_HOST", "password": "DB_PASSWORD" }'
149149
```
150150
```js
151-
const data = await fetch('https://pg-api.fly.dev/schemas', {
151+
const data = await fetch('http://localhost:1337/schemas', {
152152
method: 'GET',
153153
headers: {
154154
'pg': { "host": "DB_HOST", "password": "DB_PASSWORD" }
@@ -196,12 +196,12 @@ View and manage your Postgres tables.
196196
> GET /tables
197197
198198
```sh
199-
curl -X GET https://pg-api.fly.dev/tables \
199+
curl -X GET http://localhost:1337/tables \
200200
-H 'Content-Type: application/json' \
201201
-H 'pg: { "host": "DB_HOST", "password": "DB_PASSWORD" }'
202202
```
203203
```js
204-
const data = await fetch('https://pg-api.fly.dev/tables', {
204+
const data = await fetch('http://localhost:1337/tables', {
205205
method: 'GET',
206206
headers: {
207207
'pg': { "host": "DB_HOST", "password": "DB_PASSWORD" }
@@ -230,12 +230,12 @@ View and manage your Postgres types.
230230
> GET /types
231231
232232
```sh
233-
curl -X GET https://pg-api.fly.dev/types \
233+
curl -X GET http://localhost:1337/types \
234234
-H 'Content-Type: application/json' \
235235
-H 'pg: { "host": "DB_HOST", "password": "DB_PASSWORD" }'
236236
```
237237
```js
238-
const data = await fetch('https://pg-api.fly.dev/types', {
238+
const data = await fetch('http://localhost:1337/types', {
239239
method: 'GET',
240240
headers: {
241241
'pg': { "host": "DB_HOST", "password": "DB_PASSWORD" }
@@ -282,12 +282,12 @@ View and manage your Postgres plugins.
282282
> GET /plugins
283283
284284
```sh
285-
curl -X GET https://pg-api.fly.dev/plugins \
285+
curl -X GET http://localhost:1337/plugins \
286286
-H 'Content-Type: application/json' \
287287
-H 'pg: { "host": "DB_HOST", "password": "DB_PASSWORD" }'
288288
```
289289
```js
290-
const data = await fetch('https://pg-api.fly.dev/plugins', {
290+
const data = await fetch('http://localhost:1337/plugins', {
291291
method: 'GET',
292292
headers: {
293293
'pg': { "host": "DB_HOST", "password": "DB_PASSWORD" }
@@ -316,12 +316,12 @@ View and manage your Postgres config.
316316
> GET /config
317317
318318
```sh
319-
curl -X GET https://pg-api.fly.dev/config \
319+
curl -X GET http://localhost:1337/config \
320320
-H 'Content-Type: application/json' \
321321
-H 'pg: { "host": "DB_HOST", "password": "DB_PASSWORD" }'
322322
```
323323
```js
324-
const data = await fetch('https://pg-api.fly.dev/config', {
324+
const data = await fetch('http://localhost:1337/config', {
325325
method: 'GET',
326326
headers: {
327327
'pg': { "host": "DB_HOST", "password": "DB_PASSWORD" }
@@ -340,12 +340,12 @@ Get your Postgres config.
340340

341341
> GET /config/version
342342
```sh
343-
curl -X GET https://pg-api.fly.dev/config/version \
343+
curl -X GET http://localhost:1337/config/version \
344344
-H 'Content-Type: application/json' \
345345
-H 'pg: { "host": "DB_HOST", "password": "DB_PASSWORD" }'
346346
```
347347
```js
348-
const data = await fetch('https://pg-api.fly.dev/config/version', {
348+
const data = await fetch('http://localhost:1337/config/version', {
349349
method: 'GET',
350350
headers: {
351351
'pg': { "host": "DB_HOST", "password": "DB_PASSWORD" }

0 commit comments

Comments
 (0)