...
Note |
---|
Be AdvisedThe Paradigm API examples calls may be viewed in the format of a Postman Collection available via this link: https://documenter.getpostman.com/view/541303/TVRpz4qD |
Info |
---|
Advanced programmers that are familiar with connecting to APIs are welcome to dive straight in using the postman documentation for reference. |
Getting started
When reading the documentation you’ll notice contents such as {{apiUser}}
, these will need to be populated with values that would exist only on your Paradigm system. If you are making use of Postman to test call executions, this is how Postman represents environment variables.
Common Variables
Variable Name | Description | Example Content |
---|---|---|
apiUser | This is the username of the user you wish to use the API with. |
|
apiPw | The password for the user |
|
host | The hostname of your site | https://abc.edu.net.au |
Logging In
Note |
---|
BE ADVISED Do not use online tools to generate your base64 encoded logins as these 3rd party sites may store the login credential resulting in a significant risk to the security of your Paradigm site. |
To use the API you will need to set the HTTP Authorization
header as “Basic {{encodedPassString}}”. The encoded pass string is a base64 encoded form of the following information: username:password
Use the following examples as a guide on how to correctly generate a base64 encoded text string. Replace the parameters username
and password
with the values you want to use on your Paradigm site.
Windows Command Prompt:
Code Block | ||
---|---|---|
| ||
powershell "[convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes(\"username:password\")) |
Windows PowerShell:
Code Block | ||
---|---|---|
| ||
[Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes("username:password")) |
Linux Bash:
Code Block | ||
---|---|---|
| ||
echo 'username:password' | base64 |
Example Requests
In the top menu, you have the option to select the LANGUAGE - as in the programming language or method that you will be using to connect to the API.
By default this is curl:
Code Block | ||
---|---|---|
| ||
curl --location -g --request GET 'https://host/api/rest/EduNoteData/?partyId={{sampleStudentPartyId}}' \
--header 'Content-Type: application/json' |