API reference
This is a guide on how to use API.
Url
Url for Web
{BASEURL}/web/{Function}
e.g. http://localhost:8080/web/users/auth/login
Url for App
{BASEURL}/app/{Function}
e.g. http://localhost:8080/app/users/auth/login
Environment
Test Environment
Domain
BASEURL: http://jcci-test.app-domain.com
Core API
BASEURL: http://jcci-test.app-domain.com:4000
Notification Service API
BASEURL: http://jcci-test.app-domain.com:4001
Media Service API
BASEURL: http://jcci-test.app-domain.com:4002
Analytics Service API
BASEURL: http://jcci-test.app-domain.com:4003
Health Service API
BASEURL: http://jcci-test.app-domain.com:4004
Stage Environment
Domain
BASEURL: https://uat-admin.jccomin.com
Core API
BASEURL: http://uat-admin.jccomin.com:8443
Notification Service has no internet inbound
Notification Service API
BASEURL: http://jcci-notification-service:4001
Media Service has no internet inbound
Media Service API
BASEURL: http://jcci-media-service:4002
Analytics Service has no internet inbound
Analytics Service API
BASEURL: http://jcci-analytics-service:4003
Health Service has no internet inbound
Health Service API
BASEURL: http://jcci-health-service:4004
### Production Environment
``` text title="Domain"
BASEURL: TBC
Authentication
JCCI API uses jwt for authentication. Once granted access, JCCI Frontend will receive a short-life access token and a long-life refresh token. JCCI Frontend will store the refresh token in a safier manner. For every requests after login, JCCI Frontend needs the access token
How to use?
Append the bearer token in your request header.
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIyZGUwYjg3Ni1jNmM2LTExZWQtYTQ5Yy0wMjQyYWMxMjAwMDIiLCJleHAiOjE2NzkzNzMyMjd9.qKp6Wr44IKD7e8XgbERC3Us71vgqMiRG-ExERAL5L84
When the access token expires...
- You will get a 403 code
- logout the user