Skip to content

Commit

Permalink
bruno documentation (#571)
Browse files Browse the repository at this point in the history
  • Loading branch information
sumathi-thirumani authored Jan 27, 2025
1 parent c347e89 commit 5953650
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tools/bruno/EDUC-GRAD-ALGORITHM-API/bruno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"version": "1",
"name": "EDUC-GRAD-ALGORITHM-API",
"type": "collection",
"ignore": [
"node_modules",
".git"
]
}
21 changes: 21 additions & 0 deletions tools/bruno/EDUC-GRAD-ALGORITHM-API/collection.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
headers {
Authorization: Bearer {{token}}
}

auth {
mode: oauth2
}

auth:oauth2 {
grant_type: client_credentials
access_token_url: {{tokenRootUrl}}/auth/realms/master/protocol/openid-connect/token
client_id: {{clientId}}
client_secret: {{secret}}
scope:
}

script:post-response {
if(req.getAuthMode() == 'oauth2' && res.body.access_token) {
bru.setVar('token', res.body.access_token);
}
}
8 changes: 8 additions & 0 deletions tools/bruno/EDUC-GRAD-ALGORITHM-API/environments/dev.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
vars {
baseUrl: https://educ-grad-algorithm-api-e8a97a-dev.apps.silver.devops.gov.bc.ca
tokenRootUrl: https://soam-dev.apps.silver.devops.gov.bc.ca
}
vars:secret [
clientId,
secret
]
8 changes: 8 additions & 0 deletions tools/bruno/EDUC-GRAD-ALGORITHM-API/environments/local.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
vars {
baseUrl: http://localhost:8081
tokenRootUrl: https://soam-dev.apps.silver.devops.gov.bc.ca
}
vars:secret [
clientId,
secret
]
8 changes: 8 additions & 0 deletions tools/bruno/EDUC-GRAD-ALGORITHM-API/environments/prod.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
vars {
baseUrl: http://localhost:8888
tokenRootUrl: https://soam-prod.apps.silver.devops.gov.bc.ca
}
vars:secret [
clientId,
secret
]
8 changes: 8 additions & 0 deletions tools/bruno/EDUC-GRAD-ALGORITHM-API/environments/test.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
vars {
baseUrl: http://localhost:8888
tokenRootUrl: https://soam-test.apps.silver.devops.gov.bc.ca
}
vars:secret [
clientId,
secret
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
meta {
name: graduateStudent
type: http
seq: 1
}

get {
url: {{baseUrl}}/api/v1/graduatestudent
body: none
auth: none
}

params:query {
studentID:
gradProgram:
~projected:
~hypotheticalGradYear:
}

headers {
Authorization:
}

0 comments on commit 5953650

Please sign in to comment.