ADR: Provide query capability in legal tags (updated)
Problem Statement
Is it possible to add the search capability for legal tags based on the legaltag attributes including the ones in extensionProperties? There might be hundreds of thousands of Legaltags. Need to count on the number of leagltags while designing the solutions. For more details please check #36
Status
-
Proposed -
Trialing -
Under review -
Approved -
Retired
Query features that need to be supported
- Structure of ExtensionProperties attributes has no definitive format. It will be different for different companies. Shell might follow a structure which might be different for other companies. So extensionproperties need to be pretty much flexible
- With the exception of extensionproperties, the formatting of all LegalTags are pretty much standardized outside of the). These include: Name, Description, properties, isValid attributes other that id and dataPartitionId. Query should support all standard attributes in legaltags.
- Expected new API to have POST request with body which will contain the query.
- Feature will be available as a separate API under legal services.
- The response should return the entire legalTag with all attributes.
Query features that are nice to have and should be supported in the future
- Multi-attribute query along with complex queries
- Sort and Query together need to be supported along with limit and offset
- Logical Operators
Potential Solution Approach
This is an updated approach to the Search/Query of legal tags. The first ADR defined multiple potential solutions. This ADR defines on simple approach using only legal service itself which was proposed by AWS @wanzhiji in #47 (closed)
- API spec legal POST
/query
, with a valid parameter. - Payload examples:
{"queryList":\["name=test"\]}
{"queryList":\["AgreementIdentifier=test"\]}
Full documentation (early draft) on this feature is here: https://osdu.pages.opengroup.org/platform/security-and-compliance/legal/api/#legal-query
Feature Flag
To calm any concerns of performance issues etc. I'd like to introduce this in M23 with a feature flag