Hi Manoj,
Thank you for your feedback!
I believe it was already started with external ids as well to use them similarly as the short names that Marta shared.
I would say we can start a discussion about the API endpoint URIs design and find an approach that is acceptable by the community (i guess it means majority) and for v2 or v3 we can enforce the usage of them.
What do you think?
Regards, Adam Sent from my iPhone On 29 Aug 2024, at 16:37, Manoj VM <ma...@fynarfin.io> wrote:
Hi Marta,
This is a good Idea to have static names for jobs, Thanks for adding this.
I have one suggestion though.
The API paths mentioned above are not correct according to the REST API guidelines. The `short name` is not a resource under jobs, instead it is another field. So it should not be part of the path. For example, The right way to access a resource by a field other than primary key is by using a query parameter and not by the path. ie, the right GET API would be GET /v1/jobs?shortName={shortName}
Thanks and Regards, Manoj Mohanan Hi Marta,
I like the idea of having a short name for the jobs, thanks for that.
Would it be possible though to generate some default short names from the jobs' regular names automatically instead of writing custom liquibase scripts?
Thanks. Best, ARnold
Hi All,
This is great because now we have an identifier for the jobs, which are not auto-incremented, and are static, regardless how the system has been initialised. You are now able to use this new field, instead of the primary key, to address the jobs in all known job related API endpoints.
GET /v1/jobs/short-name/{shortName} GET /v1/jobs/short-name/{shortName}/runhistory POST /v1/jobs/short-name/{shortName} PUT /v1/jobs/short-name/{shortName}
I’ve filled this new field for the existing jobs. But if you have a custom job, which is not contributed back to the community, then you should specify the short_name, and add it to the liquibase script.
The short_name has a naming convention. First part is like a namespace, second part is specific for the job, separated by _. Example: ACC_AATR (Add Accrual Transactions)
Top namespaces: LA: Loan Account SA: Savings Account SH: Shares ACC: Accounting STI: Standing Instruction EM: Email sending SMS: Sms sending BDT: Business Date COM: Commands EXE: External Events
Thank you, Marta
|