Skip to content

Commit

Permalink
Added comments with associated curl commands to hurl scripts (#1256)
Browse files Browse the repository at this point in the history
  • Loading branch information
basiliskus authored Sep 4, 2024
1 parent 3367c95 commit b8bbcf0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions scripts/hurl/rs/delivery.hurl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# curl --header 'Content-Type: application/x-www-form-urlencoded' --data 'scope=flexion.*.report' --data 'client_assertion=$(jwt encode --exp=+5min --jti $(uuidgen) --alg RS256 -k $client -i $client -s $client -a $host --no-iat -S @/path/to/ucsd-epic-private-key.pem) --data 'client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer' --data 'grant_type=client_credentials' 'http://localhost:7071/api/token'
POST {{url}}/api/token
Content-Type: application/x-www-form-urlencoded
[FormParams]
Expand Down
2 changes: 2 additions & 0 deletions scripts/hurl/rs/history.hurl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# curl --header 'Content-Type: application/x-www-form-urlencoded' --data 'scope=flexion.*.report' --data 'client_assertion=$(jwt encode --exp=+5min --jti $(uuidgen) --alg RS256 -k $client -i $client -s $client -a $host --no-iat -S @/path/to/ucsd-epic-private-key.pem) --data 'client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer' --data 'grant_type=client_credentials' 'http://localhost:7071/api/token'
POST {{url}}/api/token
Content-Type: application/x-www-form-urlencoded
[FormParams]
Expand All @@ -11,5 +12,6 @@ HTTP 200
[Captures]
token: jsonpath "$['access_token']"

# curl --header 'Authorization: Bearer $token' 'http://localhost:7071/api/waters/report/$submissionid/history'
GET {{url}}/api/waters/report/{{submissionid}}/history
Authorization: Bearer {{token}}
1 change: 1 addition & 0 deletions scripts/hurl/rs/token.hurl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# curl --header 'Content-Type: application/x-www-form-urlencoded' --data 'scope=flexion.*.report' --data 'client_assertion=$(jwt encode --exp=+5min --jti $(uuidgen) --alg RS256 -k $client -i $client -s $client -a $host --no-iat -S @/path/to/ucsd-epic-private-key.pem) --data 'client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer' --data 'grant_type=client_credentials' 'http://localhost:7071/api/token'
POST {{url}}/api/token
Content-Type: application/x-www-form-urlencoded
[FormParams]
Expand Down
2 changes: 2 additions & 0 deletions scripts/hurl/rs/waters.hurl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# curl --header 'Content-Type: application/x-www-form-urlencoded' --data 'scope=flexion.*.report' --data 'client_assertion=$(jwt encode --exp=+5min --jti $(uuidgen) --alg RS256 -k $client -i $client -s $client -a $host --no-iat -S @/path/to/ucsd-epic-private-key.pem) --data 'client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer' --data 'grant_type=client_credentials' 'http://localhost:7071/api/token'
POST {{url}}/api/token
Content-Type: application/x-www-form-urlencoded
[FormParams]
Expand All @@ -11,6 +12,7 @@ HTTP 200
[Captures]
token: jsonpath "$['access_token']"

# curl --header 'Content-Type: application/hl7-v2' --header 'Client: flexion.simulated-hospital' --header 'Authorization: Bearer $token' --data-binary '@/path/to/message.hl7' 'http://localhost:7071/api/waters'
POST {{url}}/api/waters
Content-Type: {{content-type}}
Client: {{client-id}}.{{client-sender}}
Expand Down

0 comments on commit b8bbcf0

Please sign in to comment.