Nicolas,
The fastest way to retrieve data from EnterWorks is using SQL directly against the EPIM database. The next fastest would probably be using a custom Micro-Service that implements a new EnterWorks REST endpoint (or set of endpoints) to perform SQL against the EPIM database. There is an example of this outlined in the EnterWorks Tech Talk "ETT 108 - How to use SQL Queries in REST API Repository Searches". This session goes over the example micro-service that is attached to the recording (including the Java source code) to execute SQL queries that are pre-registered in a repository (to avoid vulnerabilities). The results are returned in a JSON structure.
There are several EnterWorks Tech Talks that build on the same Micro-Service which evolved for each subsequent session. The most-recent one is in EnterWorks Tech Talk "ETT 125 - How to Create a Simplified REST API Using a Java Microservice", which includes the most-current source code.
The other relevant EnterWorks Tech Talk sessions are: "ETT 020 - Creating a Java Microservice", "ETT 117 - How to Launch Scheduled Imports from a Custom Widget in the New UI using a Micro-Service"
If accessing the EPIM database directly is not an option, I suggest you watch ETT 108 and determine whether that is something that will work for you. Then watch ETT 125 to see details on the latest version of the Micro-Service and use the binaries and source files from it to invoke SQL queries from a REST client.
Please keep in mind that these sessions cover examples that include source code and are expected to be tailored for specific implementation needs, but can be used as-is for a large percentages of use cases. It's possible that at some future date, the examples will be handed over to Product Engineering to be productized and included in future releases. Until then, the need to be considered part of the implementation and will be supported in a limited capacity. If there is a large level of adoption, this community may be the best platform for collaboration and support.
------------------------------
Brian Zupke
Precisely Software Inc.
------------------------------
Original Message:
Sent: 04-27-2023 13:28
From: Nicolas Carrillo
Subject: APIs Best Practices Documentation
Thank you, Brian!
to provide more detail to this entry,
we're approaching this data extraction using the Item Search API, and we're seeing the performance is too slow for our needs (around.75 ms, with outliers of 2secs)
we were wondering if is there a way to get this faster/optimize our system to have a quicker response. or, is there a different method that's faster? Do you have any suggestions on how to do this quicker?
Ultimately, we need a very quick way to pull a very specific piece of data out of our system in real-time.
------------------------------
Nicolas Carrillo
Steelcase, Inc
Original Message:
Sent: 04-24-2023 14:58
From: Brian Zupke
Subject: APIs Best Practices Documentation
Nicolas,
There are several ways to extract data from EnterWorks using the REST API:
* Items Search endpoint - provides ability to retrieve one or more records (1000 records maximum) from a repository. Uses paging if more records than the specified page size. Requires obtaining mappings of EnterWorks IDs for Repository and Attribute names via separate calls. The Precisely University has EnterWorks Tech Talk sessions covering various aspects of the EnterWorks REST API with many examples in the form of Postman Collections.
* Exchange Template search - provides ability to retrieve data from multiple repositories according to the designated Exchange Template defined within EnterWorks. All repositories and attributes are self-identified in the API response JSON body, but more in the form of name/value pairs in the data. There are several EnterWorks Tech Talk sessions on using the REST API to extract or update repository data using Exchange Templates, with examples using Postman.
* Use custom micro-service to implement new endpoints that provide access via SQL or a simplified CRUD REST API that translates names to IDs so the client application does not have to get the mappings. There are several EnterWorks Tech Talk sessions covering the creation of a micro-service in Java with each new session building on the previous and the most-recent one being ETT 125 - How to Create a Simplified REST API Using a Java Micro-Service.
The Precisely University can be accessed with: https://preciselyu.precisely.com, then drill down into EnterWorks and ETT - EnterWorks Tech Talks.
The Entirety of the REST API can be viewed using Swagger by specifying the following URL in a browser: http://<EnterWorksServer>/webcm/rest/swagger-ui.html
where <EnterWorksServer> is the host for the EnterWorks web service.
If you have specified questions after watching the relevant Tech Talk session recordings, please let me know.
-Brian
------------------------------
Brian Zupke
Precisely Software Inc.
Original Message:
Sent: 04-17-2023 10:24
From: Nicolas Carrillo
Subject: APIs Best Practices Documentation
Hi, we're currently working on defining templates and using the APIs to pull data out of the repositories, we had some struggles and questions about the methods we're using, and wondered if you could help us with some mentioned below:
- What are the different ways to extract data from EW (Repo APIs, Template Extract, Rabbit MQ Template) are there more ways than this?
- Documentation of when the different extraction techniques should be used and how they should be used
- We are going to have systems (such as WordPress) needing to pull data from the PIM and it is going to need to be fast and reliable. How should we be doing this?
Most tools have some type of documentation and read through about best techniques and practices and Real-Time Data Extraction but we can't find anything on EW. It is just making it challenging to design proper solutions.
Could you help us out?
Thanks.
------------------------------
Nicolas Carrillo
Steelcase, Inc
------------------------------