API Overview
(→Authentication using session cookies) |
(→$connect API) |
||
(18 révisions intermédiaires par un utilisateur sont masquées) | |||
Ligne 1 : | Ligne 1 : | ||
=Authentication= | =Authentication= | ||
− | API accesses must be authentified | + | All API accesses must be authentified. |
There are two ways to manage authentication : | There are two ways to manage authentication : | ||
Ligne 9 : | Ligne 9 : | ||
A token contains all information relative to a user session, including user, folder and share context identifications. | A token contains all information relative to a user session, including user, folder and share context identifications. | ||
− | Authentication tokens are managed by administrator using administration interfaces. | + | [[Jeton_d%27authentification_(Administration)|Authentication tokens]] are managed by administrator using administration interfaces. |
Tokens are under customer control and could expire or be revoked. | Tokens are under customer control and could expire or be revoked. | ||
Token must be set in the Authorization http header of requests in bearer format. | Token must be set in the Authorization http header of requests in bearer format. | ||
+ | |||
+ | {{tip|When token are used, a silent authentication process is performed.}} | ||
==Authentication using session cookies== | ==Authentication using session cookies== | ||
Ligne 20 : | Ligne 22 : | ||
To use session cookies your application must act behind a user and manage user connection prior to execute API requests. | To use session cookies your application must act behind a user and manage user connection prior to execute API requests. | ||
− | See $connect API to manage user connection | + | See $connect API to manage user connection. |
=Data oriented APIs= | =Data oriented APIs= | ||
Data oriented APIs let you access the Application data. | Data oriented APIs let you access the Application data. | ||
− | Data oriented APIs | + | Data oriented APIs can be used on any classes of the Application |
{{tip|In the context of FRP 1000, data means objects and doesnt' mean SQL database data. There are no API to access raw SQL Data.}} | {{tip|In the context of FRP 1000, data means objects and doesnt' mean SQL database data. There are no API to access raw SQL Data.}} | ||
==SDATA REST API== | ==SDATA REST API== | ||
− | SDATA API is a REST API which could be | + | SDATA API is a REST API which could be used to query data, execute CRUD operations, BATCH operations and calling classes and objects methods. |
SDATA REST API supports XML and Json format. | SDATA REST API supports XML and Json format. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Build in feeds== | ==Build in feeds== | ||
Ligne 48 : | Ligne 43 : | ||
{{tip|The user, behind the API call, must have administration role to use accesses some of these feeds}} | {{tip|The user, behind the API call, must have administration role to use accesses some of these feeds}} | ||
− | = | + | =Request oriented APIs= |
− | + | ||
− | + | ==$connect API== | |
+ | [[$connect_(sdata)|$connect API]] is an API to manage user authentication. | ||
− | + | This API can be used to : | |
+ | * Authenticate a user using a single call to $connect | ||
+ | * Build a login form using a set of API calls. | ||
− | A json method is a method receiving a json request and returning a json response. | + | ==Json API== |
+ | Json API is based on service packages and may require to use the development platform (DSM) to extend the application model. | ||
+ | |||
+ | A Service package may expose some json methods which can be call in a remote call paradigm from a javascript application . | ||
+ | |||
+ | A [[Operation_json_(model)|json method]] is a method receiving a json request and returning a json response. | ||
Typical signature of a json method is : | Typical signature of a json method is : | ||
Ligne 62 : | Ligne 64 : | ||
</pre> | </pre> | ||
− | {{tip|FRP 1000 language supports Json using TJson class which | + | {{tip|FRP 1000 language supports Json using TJson class which allows to dynamically explore and build json structure.}} |
+ | |||
+ | =Service oriented APIs= | ||
+ | Service oriented APIs let you access some build in services of the Application | ||
+ | |||
+ | ==Queue service== | ||
+ | Queue service API lets you post and consume messages in the Application queues. | ||
+ | |||
+ | Using this service you can : | ||
+ | |||
+ | * Post task messages that will be executed by the MOM Service. | ||
+ | * Post event messages that will trigger pending tasks or workflows | ||
+ | |||
+ | ==Event service== | ||
+ | Event service API lets you post in the event queue. | ||
+ | |||
+ | Using this service you can : | ||
+ | * Trigger pending tasks or workflows. | ||
=Legacy APIs= | =Legacy APIs= | ||
Ligne 70 : | Ligne 89 : | ||
SOAP API requires using the application development platform (DSM) to add SOAP service packages. | SOAP API requires using the application development platform (DSM) to add SOAP service packages. | ||
− | SOAP may be | + | SOAP may be used in both client and server use cases. |
* In client scenario you import a WSDL service definition as a SOAP client package. | * In client scenario you import a WSDL service definition as a SOAP client package. | ||
Ligne 77 : | Ligne 96 : | ||
[[category:API]] | [[category:API]] | ||
− | [[category: | + | [[category:SData]] |
Version actuelle en date du 23 novembre 2020 à 10:52
Sommaire |
Authentication
All API accesses must be authentified.
There are two ways to manage authentication :
- Token based
- Session based
Authentication using token
A token contains all information relative to a user session, including user, folder and share context identifications.
Authentication tokens are managed by administrator using administration interfaces.
Tokens are under customer control and could expire or be revoked.
Token must be set in the Authorization http header of requests in bearer format.
Authentication using session cookies
Session cookies are set when a user connects to an Application.
To use session cookies your application must act behind a user and manage user connection prior to execute API requests.
See $connect API to manage user connection.
Data oriented APIs
Data oriented APIs let you access the Application data.
Data oriented APIs can be used on any classes of the Application
Tip : In the context of FRP 1000, data means objects and doesnt' mean SQL database data. There are no API to access raw SQL Data. |
SDATA REST API
SDATA API is a REST API which could be used to query data, execute CRUD operations, BATCH operations and calling classes and objects methods.
SDATA REST API supports XML and Json format.
Build in feeds
Build in feeds are data feeds and services which are exposed under the SDATA API.
Build In feed let you access administration and exploitation information.
Tip : The user, behind the API call, must have administration role to use accesses some of these feeds |
Request oriented APIs
$connect API
$connect API is an API to manage user authentication.
This API can be used to :
- Authenticate a user using a single call to $connect
- Build a login form using a set of API calls.
Json API
Json API is based on service packages and may require to use the development platform (DSM) to extend the application model.
A Service package may expose some json methods which can be call in a remote call paradigm from a javascript application .
A json method is a method receiving a json request and returning a json response.
Typical signature of a json method is :
procedure myServicePackage.myJsonMethod(req:TJson; var resp:TJson);
Tip : FRP 1000 language supports Json using TJson class which allows to dynamically explore and build json structure. |
Service oriented APIs
Service oriented APIs let you access some build in services of the Application
Queue service
Queue service API lets you post and consume messages in the Application queues.
Using this service you can :
- Post task messages that will be executed by the MOM Service.
- Post event messages that will trigger pending tasks or workflows
Event service
Event service API lets you post in the event queue.
Using this service you can :
- Trigger pending tasks or workflows.
Legacy APIs
Legacy APIs are API which are still supported but which must not be used for new developments.
SOAP API
SOAP API requires using the application development platform (DSM) to add SOAP service packages.
SOAP may be used in both client and server use cases.
- In client scenario you import a WSDL service definition as a SOAP client package.
- In server scenario you build a SOAP Server package to expose services as SOAP functions and entities.