Skip to content

Commit 8c285ad

Browse files
Merge pull request CrunchyData#305 from dpuckett98/patch-2
Update to REST API documentation
2 parents bf606dd + ecc6361 commit 8c285ad

File tree

1 file changed

+115
-12
lines changed

1 file changed

+115
-12
lines changed

hugo/content/installation/configuration.adoc

Lines changed: 115 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -443,41 +443,144 @@ su - $USER
443443
Because the *apiserver* implements a REST API, it is possible to integrate with it using your own
444444
application code. To demonstrate this, the following *curl* commands show the API usage -
445445

446+
Note: Some setups may require the user to add '?version=x.x' to the end of the commands.
447+
446448
*pgo version*
447449
....
448450
curl -v -X GET -u readonlyuser:testpass -H "Content-Type: application/json" --insecure https://10.101.155.218:8443/version
449451
....
450452

451-
*pgo show policy all*
453+
*pgo show policy <name>*
454+
....
455+
curl -v -X GET -u readonlyuser:testpass -H "Content-Type: application/json" --insecure https://10.101.155.218:8443/policies/<name>
456+
....
457+
458+
*pgo delete policy <name>*
459+
....
460+
curl -v -X GET -u readonlyuser:testpass -H "Content-Type: application/json" --insecure https://10.101.155.218:8443/policiesdelete/<name>
461+
....
462+
463+
*pgo show pvc <name>*
464+
....
465+
curl -v -X GET -u readonlyuser:testpass -H "Content-Type: application/json" --insecure https://10.101.155.218:8443/pvc/<name>
466+
....
467+
468+
*pgo apply policy <name>*
469+
....
470+
curl -v -X POST -u readonlyuser:testpass -H "Content-Type: application/json" --insecure https://10.101.155.218:8443/policies/apply/<name>
471+
....
472+
473+
*pgo show ingest <name>*
474+
....
475+
curl -v -X GET -u readonlyuser:testpass -H "Content-Type: application/json" --insecure https://10.101.155.218:8443/ingest/<name>
476+
....
477+
478+
*pgo label*
479+
....
480+
curl -v -X POST -u readonlyuser:testpass -H "Content-Type: application/json" --insecure https://10.101.155.218:8443/label
481+
....
482+
483+
*pgo load*
484+
....
485+
curl -v -X POST -u readonlyuser:testpass -H "Content-Type: application/json" --insecure https://10.101.155.218:8443/load
486+
....
487+
488+
*pgo user*
489+
....
490+
curl -v -X POST -u readonlyuser:testpass -H "Content-Type: application/json" --insecure https://10.101.155.218:8443/user
491+
....
492+
493+
*pgo users <name>*
494+
....
495+
curl -v -X GET -u readonlyuser:testpass -H "Content-Type: application/json" --insecure https://10.101.155.218:8443/users/<name>
496+
....
497+
498+
*pgo delete user <name>*
499+
....
500+
curl -v -X GET -u readonlyuser:testpass -H "Content-Type: application/json" --insecure https://10.101.155.218:8443/usersdelete/<name>
501+
....
502+
503+
*pgo show upgrade <name>*
452504
....
453-
curl -v -X GET -u readonlyuser:testpass -H "Content-Type: application/json" --insecure https://10.101.155.218:8443/policies/all
505+
curl -v -X GET -u readonlyuser:testpass -H "Content-Type: application/json" --insecure https://10.101.155.218:8443/upgrades/<name>
454506
....
455507

456-
*pgo show pvc danger*
508+
*pgo delete upgrade <name>*
457509
....
458-
curl -v -X GET -u readonlyuser:testpass -H "Content-Type: application/json" --insecure https://10.101.155.218:8443/pvc/danger
510+
curl -v -X GET -u readonlyuser:testpass -H "Content-Type: application/json" --insecure https://10.101.155.218:8443/upgradesdelete/<name>
459511
....
460512

461-
*pgo show cluster mycluster*
513+
*pgo show cluster <name>*
462514
....
463-
curl -v -X GET -u readonlyuser:testpass -H "Content-Type: application/json" --insecure https://10.101.155.218:8443/clusters/mycluster
515+
curl -v -X GET -u readonlyuser:testpass -H "Content-Type: application/json" --insecure https://10.101.155.218:8443/clusters/<name>
464516
....
465517

466-
*pgo show upgrade mycluster*
518+
*pgo delete cluster*
467519
....
468-
curl -v -X GET -u readonlyuser:testpass -H "Content-Type: application/json" --insecure https://10.101.155.218:8443/upgrades/mycluster
520+
curl -v -X GET -u readonlyuser:testpass -H "Content-Type: application/json" --insecure https://10.101.155.218:8443/clustersdelete/<name>
469521
....
470522

471-
*pgo test mycluster*
523+
*pgo test <name>*
472524
....
473-
curl -v -X GET -u readonlyuser:testpass -H "Content-Type: application/json" --insecure https://10.101.155.218:8443/clusters/test/mycluster
525+
curl -v -X GET -u readonlyuser:testpass -H "Content-Type: application/json" --insecure https://10.101.155.218:8443/clusters/test/<name>
474526
....
475527

476-
*pgo show backup mycluster*
528+
*pgo scale <name>*
477529
....
478-
curl -v -X GET -u readonlyuser:testpass -H "Content-Type: application/json" --insecure https://10.101.155.218:8443/backups/mycluster
530+
curl -v -X GET -u readonlyuser:testpass -H "Content-Type: application/json" --insecure https://10.101.155.218:8443/clusters/scale/<name>
479531
....
480532

533+
*pgo scale <name>*
534+
....
535+
curl -v -X GET -u readonlyuser:testpass -H "Content-Type: application/json" --insecure https://10.101.155.218:8443/scale/<name>
536+
....
537+
538+
*pgo scaledown <name>*
539+
....
540+
curl -v -X GET -u readonlyuser:testpass -H "Content-Type: application/json" --insecure https://10.101.155.218:8443/scaledown/<name>
541+
....
542+
543+
*pgo status*
544+
....
545+
curl -v -X GET -u readonlyuser:testpass -H "Content-Type: application/json" --insecure https://10.101.155.218:8443/status
546+
....
547+
548+
*pgo df <name>*
549+
....
550+
curl -v -X GET -u readonlyuser:testpass -H "Content-Type: application/json" --insecure https://10.101.155.218:8443/df/<name>
551+
....
552+
553+
*pgo config*
554+
....
555+
curl -v -X GET -u readonlyuser:testpass -H "Content-Type: application/json" --insecure https://10.101.155.218:8443/config
556+
....
557+
558+
*pgo show backup <name>*
559+
....
560+
curl -v -X GET -u readonlyuser:testpass -H "Content-Type: application/json" --insecure https://10.101.155.218:8443/backups/<name>
561+
....
562+
563+
*pgo delete backup <name>*
564+
....
565+
curl -v -X GET -u readonlyuser:testpass -H "Content-Type: application/json" --insecure https://10.101.155.218:8443/backupsdelete/<name>
566+
....
567+
568+
*pgo backrest <name>*
569+
....
570+
curl -v -X GET -u readonlyuser:testpass -H "Content-Type: application/json" --insecure https://10.101.155.218:8443/backrest/<name>
571+
....
572+
573+
*pgo reload*
574+
....
575+
curl -v -X POST -u readonlyuser:testpass -H "Content-Type: application/json" --insecure https://10.101.155.218:8443/reload
576+
....
577+
578+
*pgo failover <name>*
579+
....
580+
curl -v -X GET -u readonlyuser:testpass -H "Content-Type: application/json" --insecure https://10.101.155.218:8443/failover/<name>
581+
....
582+
583+
481584
== Deploying pgpool
482585

483586
One option with pgo is enabling the creation of a pgpool deployment in addition to the PostgreSQL cluster.

0 commit comments

Comments
 (0)