Setting Service
I. Architecture design
II. Public API
1. Get public settings
Get public settings
Method: GET
API endpoint
/settings/public
2. Get public setting by key
Method: GET
API endpoint
/settings/keys/:key
Params
Field name | Data type | Mandatory | Description |
---|---|---|---|
key | string | Y | Unique key of setting |
III. Admin API
1. Get list settings
Method: GET
API endpoint:
/admin/settings
Header
{ Authorization: accessToken }
Query params
Field name | Data type | Mandatory | Description |
---|---|---|---|
group | string | N | Group name of setting |
2. Update setting
Update settings by unique key
Method: PUT
API endpoint:
/admin/settings/:key
Header
{ Authorization: accessToken }
Params
Field name | Data type | Mandatory | Description |
---|---|---|---|
key | string | Y | Unique key of setting |
Body
Field name | Data type | Mandatory | Description |
---|---|---|---|
value | string | N | Value of the setting |
3. Sign upload image url (use for upload logo, favicon,…etc)
Method: POST
API endpoint:
/admin/settings/signed-upload-image-url
Header
{ Authorization: accessToken }
Body
Field name | Data type | Mandatory | Description |
---|---|---|---|
[any field] | any | N | This is post back data after the file service processes the file and reports according to the |
4. Get file info
Get file information after successful upload
Method: GET
API endpoint
/admin/settings/get-file-info/:fileId
Header
Params
Field name | Data type | Mandatory | Description |
---|---|---|---|
fileId | string | Y | This is fileID get from the response data after signing the upload URL from the file service |