Skip to content

Commit 313b2de

Browse files
jmckulkjkatz
authored andcommitted
Updates the curl examples for apiserver calls.
As the Postgres-operator has been updated to v4.1.0 these examples needed to be updated to work with the new version. The following changes were made: - The client version was updated to 4.1.0 - The username/password were updated to use the new default values - removes a backslash from data struct that prevented the command from being run without changes
1 parent f444553 commit 313b2de

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

hugo/content/gettingstarted/Design/direct-api-calls.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The API server is setup to work with the pgo command line interface so the param
1616
###### Get API Server Version
1717
```
1818
curl --cacert $PGO_CA_CERT --key $PGO_CLIENT_KEY --cert $PGO_CA_CERT \
19-
-u username:password -H "Content-Type:application/json" --insecure \
19+
-u pgoadmin:examplepassword -H "Content-Type:application/json" --insecure \
2020
-X GET $PGO_APISERVER_URL/version
2121
```
2222

@@ -25,11 +25,11 @@ You can create a cluster by sending a POST request to `$PGO_APISERVER_URL/cluste
2525
###### Create Cluster
2626
```
2727
curl --cacert $PGO_CA_CERT --key $PGO_CLIENT_KEY --cert $PGO_CA_CERT \
28-
-u username:password -H "Content-Type:application/json" --insecure \
29-
-X POST --data '{ \
30-
"ClientVersion":"4.0.0", \
31-
"Namespace":"pgouser1", \
32-
"Name":"mycluster", \
28+
-u pgoadmin:examplepassword -H "Content-Type:application/json" --insecure \
29+
-X POST --data \
30+
'{"ClientVersion":"4.1.0",
31+
"Namespace":"pgouser1",
32+
"Name":"mycluster",
3333
"Series":1}' \
3434
$PGO_APISERVER_URL/clusters
3535
```
@@ -39,21 +39,21 @@ The last two examples show you how to `show` and `delete` a cluster. Notice how
3939
###### Show Cluster
4040
```
4141
curl --cacert $PGO_CA_CERT --key $PGO_CLIENT_KEY --cert $PGO_CA_CERT \
42-
-u username:password -H "Content-Type:application/json" --insecure \
43-
-X POST --data '{ \
44-
"ClientVersion":"4.0.0", \
45-
"Namespace":"pgouser1", \
42+
-u pgoadmin:examplepassword -H "Content-Type:application/json" --insecure \
43+
-X POST --data \
44+
'{"ClientVersion":"4.1.0",
45+
"Namespace":"pgouser1",
4646
"Clustername":"mycluster"}' \
4747
$PGO_APISERVER_URL/showclusters
4848
```
4949

5050
###### Delete Cluster
5151
```
5252
curl --cacert $PGO_CA_CERT --key $PGO_CLIENT_KEY --cert $PGO_CA_CERT \
53-
-u username:password -H "Content-Type:application/json" --insecure \
54-
-X POST --data '{ \
55-
"ClientVersion":"4.0.0", \
56-
"Namespace":"pgouser1", \
53+
-u pgoadmin:examplepassword -H "Content-Type:application/json" --insecure \
54+
-X POST --data \
55+
'{"ClientVersion":"4.1.0",
56+
"Namespace":"pgouser1",
5757
"Clustername":"mycluster"}' \
5858
$PGO_APISERVER_URL/clustersdelete
5959
```

0 commit comments

Comments
 (0)