-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Summary of request
This feature introduces an endpoint designed to verify the existence of a record with a specified value. The endpoint will be capable of performing checks within a given category, organization, and entity to ensure the existence of a record.
This feature is essential for applications that require validation of records within specific contexts, enhancing data integrity and user experience by preventing duplicate entries or ensuring the presence of required records.
Functionality Details:
- The endpoint is a GET method, it will receive query parameters that specify the
studyIdandvalueto be checked, as well as thecategoryIdandentityNamein which the record should be searched. Example:
GET http://localhost:3030/validator/category/{categoryId}/entity/{entityName}/exists?organization={studyId}&value{value}
Where:
- {categoryId} is the ID of the category the record belongs. Number type.
- {entityName} is a string, also known as Analysis Type in Song
- {studyId} is a string, also known as Organization in Lyric
- {value} is a string, value to check
- Search should performed exclusively within the
submitted_datatable. - If the record is found, the endpoint will respond with a 200 OK status with empty body, confirming the existence of the record.
- If the record does not exist, the endpoint will return a 404 Not found status, indicating that the specified value was not found. E.g.
{
"error": "Not found",
"message": "The specified value was not found."
}
- Endpoint should require to be configured to enable searching by category and entityName. Ticket Configuration of external validation endpoint #110
Metadata
Metadata
Assignees
Labels
No labels