fix naming in prod
This commit is contained in:
@@ -67,44 +67,44 @@
|
||||
</summary>
|
||||
<div class="workflow-content">
|
||||
<h3>Reader user examples</h3>
|
||||
<pre><code>READER_TOKEN=$(curl -s -X POST https://go-api.poc.fló.fo/login \
|
||||
<pre><code>READER_TOKEN=$(curl -s -X POST https://abuse-registration-api.poc.fló.fo/login \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{"user_name":"reader","password":"reader-password"}' \
|
||||
| sed -n 's/.*"token":"\([^"]*\)".*/\1/p')
|
||||
|
||||
curl -s 'https://go-api.poc.fló.fo/api/v1/registrations?location=Tórshavn&limit=5' \
|
||||
curl -s 'https://abuse-registration-api.poc.fló.fo/api/v1/registrations?location=Tórshavn&limit=5' \
|
||||
-H "Authorization: $READER_TOKEN" | jq
|
||||
|
||||
curl -s 'https://go-api.poc.fló.fo/api/v1/registrations?gender=female&abuse_type=psychological&status=open&limit=10' \
|
||||
curl -s 'https://abuse-registration-api.poc.fló.fo/api/v1/registrations?gender=female&abuse_type=psychological&status=open&limit=10' \
|
||||
-H "Authorization: $READER_TOKEN" | jq
|
||||
|
||||
curl -s 'https://go-api.poc.fló.fo/api/v1/registrations?from=1989-01-01&to=1990-01-01&offset=20&limit=10' \
|
||||
curl -s 'https://abuse-registration-api.poc.fló.fo/api/v1/registrations?from=1989-01-01&to=1990-01-01&offset=20&limit=10' \
|
||||
-H "Authorization: $READER_TOKEN" | jq
|
||||
|
||||
curl -s 'https://go-api.poc.fló.fo/api/v1/locations' \
|
||||
curl -s 'https://abuse-registration-api.poc.fló.fo/api/v1/locations' \
|
||||
-H "Authorization: $READER_TOKEN" | jq</code></pre>
|
||||
|
||||
<h3>CRUD user — create, update, and delete examples</h3>
|
||||
<pre><code>ADMIN_TOKEN=$(curl -s -X POST https://go-api.poc.fló.fo/login \
|
||||
<pre><code>ADMIN_TOKEN=$(curl -s -X POST https://abuse-registration-api.poc.fló.fo/login \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{"user_name":"admin","password":"admin-password"}' \
|
||||
| sed -n 's/.*"token":"\([^"]*\)".*/\1/p')
|
||||
|
||||
CREATED_ID=$(curl -s -X POST https://go-api.poc.fló.fo/api/v1/registrations \
|
||||
CREATED_ID=$(curl -s -X POST https://abuse-registration-api.poc.fló.fo/api/v1/registrations \
|
||||
-H "Authorization: $ADMIN_TOKEN" \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{"gender":"unknown","location":"Tórshavn","abuse_type":"psychological","status":"new"}' \
|
||||
| sed -n 's/.*"id":"\([^"]*\)".*/\1/p')
|
||||
|
||||
curl -s "https://go-api.poc.fló.fo/api/v1/registrations/$CREATED_ID" \
|
||||
curl -s "https://abuse-registration-api.poc.fló.fo/api/v1/registrations/$CREATED_ID" \
|
||||
-H "Authorization: $ADMIN_TOKEN"
|
||||
|
||||
curl -s -X PUT "https://go-api.poc.fló.fo/api/v1/registrations/$CREATED_ID" \
|
||||
curl -s -X PUT "https://abuse-registration-api.poc.fló.fo/api/v1/registrations/$CREATED_ID" \
|
||||
-H "Authorization: $ADMIN_TOKEN" \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{"gender":"female","location":"Skopun","abuse_type":"digital","status":"referred"}'
|
||||
|
||||
curl -s -X DELETE "https://go-api.poc.fló.fo/api/v1/registrations/$CREATED_ID" \
|
||||
curl -s -X DELETE "https://abuse-registration-api.poc.fló.fo/api/v1/registrations/$CREATED_ID" \
|
||||
-H "Authorization: $ADMIN_TOKEN"</code></pre>
|
||||
</div>
|
||||
</details>
|
||||
@@ -117,32 +117,32 @@ curl -s -X DELETE "https://go-api.poc.fló.fo/api/v1/registrations/$CREATED_ID"
|
||||
<h3>Reader user examples</h3>
|
||||
<pre><code>$reader = Invoke-RestMethod `
|
||||
-Method Post `
|
||||
-Uri "https://go-api.poc.fló.fo/login" `
|
||||
-Uri "https://abuse-registration-api.poc.fló.fo/login" `
|
||||
-ContentType "application/json" `
|
||||
-Body '{"user_name":"reader","password":"reader-password"}'
|
||||
|
||||
$READER_TOKEN = $reader.token
|
||||
|
||||
Invoke-RestMethod `
|
||||
-Uri "https://go-api.poc.fló.fo/api/v1/registrations?location=Tórshavn&limit=5" `
|
||||
-Uri "https://abuse-registration-api.poc.fló.fo/api/v1/registrations?location=Tórshavn&limit=5" `
|
||||
-Headers @{Authorization=$READER_TOKEN}
|
||||
|
||||
Invoke-RestMethod `
|
||||
-Uri "https://go-api.poc.fló.fo/api/v1/registrations?gender=female&abuse_type=psychological&status=open&limit=10" `
|
||||
-Uri "https://abuse-registration-api.poc.fló.fo/api/v1/registrations?gender=female&abuse_type=psychological&status=open&limit=10" `
|
||||
-Headers @{Authorization=$READER_TOKEN}
|
||||
|
||||
Invoke-RestMethod `
|
||||
-Uri "https://go-api.poc.fló.fo/api/v1/registrations?from=1989-01-01&to=1990-01-01&offset=20&limit=10" `
|
||||
-Uri "https://abuse-registration-api.poc.fló.fo/api/v1/registrations?from=1989-01-01&to=1990-01-01&offset=20&limit=10" `
|
||||
-Headers @{Authorization=$READER_TOKEN}
|
||||
|
||||
Invoke-RestMethod `
|
||||
-Uri "https://go-api.poc.fló.fo/api/v1/locations" `
|
||||
-Uri "https://abuse-registration-api.poc.fló.fo/api/v1/locations" `
|
||||
-Headers @{Authorization=$READER_TOKEN}</code></pre>
|
||||
|
||||
<h3>CRUD user — create, update, and delete examples</h3>
|
||||
<pre><code>$admin = Invoke-RestMethod `
|
||||
-Method Post `
|
||||
-Uri "https://go-api.poc.fló.fo/login" `
|
||||
-Uri "https://abuse-registration-api.poc.fló.fo/login" `
|
||||
-ContentType "application/json" `
|
||||
-Body '{"user_name":"admin","password":"admin-password"}'
|
||||
|
||||
@@ -150,7 +150,7 @@ $ADMIN_TOKEN = $admin.token
|
||||
|
||||
$created = Invoke-RestMethod `
|
||||
-Method Post `
|
||||
-Uri "https://go-api.poc.fló.fo/api/v1/registrations" `
|
||||
-Uri "https://abuse-registration-api.poc.fló.fo/api/v1/registrations" `
|
||||
-Headers @{Authorization=$ADMIN_TOKEN} `
|
||||
-ContentType "application/json" `
|
||||
-Body '{"gender":"unknown","location":"Tórshavn","abuse_type":"psychological","status":"new"}'
|
||||
@@ -159,14 +159,14 @@ $CREATED_ID = $created.id
|
||||
|
||||
Invoke-RestMethod `
|
||||
-Method Put `
|
||||
-Uri "https://go-api.poc.fló.fo/api/v1/registrations/$CREATED_ID" `
|
||||
-Uri "https://abuse-registration-api.poc.fló.fo/api/v1/registrations/$CREATED_ID" `
|
||||
-Headers @{Authorization=$ADMIN_TOKEN} `
|
||||
-ContentType "application/json" `
|
||||
-Body '{"gender":"female","location":"Skopun","abuse_type":"digital","status":"referred"}'
|
||||
|
||||
Invoke-RestMethod `
|
||||
-Method Delete `
|
||||
-Uri "https://go-api.poc.fló.fo/api/v1/registrations/$CREATED_ID" `
|
||||
-Uri "https://abuse-registration-api.poc.fló.fo/api/v1/registrations/$CREATED_ID" `
|
||||
-Headers @{Authorization=$ADMIN_TOKEN}</code></pre>
|
||||
</div>
|
||||
</details>
|
||||
|
||||
Reference in New Issue
Block a user