Service Side
Authentication
For authentication on service is used the module: lexik/jwt-authentication-bundle which is based on using JWT token.
Before using need to create key-pairs:
php bin/console lexik:jwt:generate-keypair
There are 2 ways for authentication:
with Login ( email ) and password - this default one, used user entity as source of data
with Server UUID and Server Secret Key - this is additional and using only for access to API
Both of types return as result JWT token which must be used for any API request. Those token must be added to header:
Authorization: Bearer < token >To use Server credentials you must:
add an additional header:
Authorization-Type: Tokena server must be in Enabled status
Steps to get Server JWT token:
need to send on URL: /api/token_check POST request with Json data:
uuid:
secret_key:
Example:
Public API:
Server:
POST: /api/servers -
OST array:
\
DB Cleaning rules
Main structure for whole table:
Structure for updating columns of table:
Example:
Backup Cleaning Rules:
List or backups for deleting will be returned by URL: api/servers//get_dump_delete_list.
The URL will take all DB related to server, get Server rules and according to rules will return array:
Rules on service side must be saved into the next variant:
In field "rule" could be used:
gt => '>'
lt => '<'
In field value could be used
date in format: ISO 8601 ( https://www.digi.com/resources/documentation/digidocs//90001488-13/reference/r_iso_8601_duration_format.htm )
Last updated