-
Notifications
You must be signed in to change notification settings - Fork 1
Entity endpoints
tudorgroza edited this page Apr 6, 2021
·
7 revisions
- Endpoint:
GET /v1/projects/{projectId}/entities?search=<search>&page=<PAGE>&size=<SIZE>
(page
andsize
are optional, with default values of0
and20
, respectively) - The
search
parameter provides free-text search capabilities over thename
field of the entities - Sorting: Add
sort=<FIELD>,asc/desc
param to the endpoint. List of accepted fields for sorting:context
,priority
andmappingStatus
.asc / desc
values are optional. - Response (Paginated list of Entity):
200 | OK
{
"content": [
{
"id": "60252fc2d5efd95ee8890ead",
"name": "Achondroplasia",
"mappingStatus": "AUTO_MAPPED | ...",
"source": <SOURCE_OBJECT>,
"upstreamId": "STRING",
"context": "STRING",
"priority": INTEGER,
"mappingSuggestions": [
<MAPPING_SUGGESTION_OBJECT>
],
"mapping": <MAPPING_OBJECT>,
"auditTrail": [
<AUDIT_OBJECT>
],
"created": {
"user": {
"name": "Test User 1",
"email": "[email protected]"
},
"timestamp": "2021-02-11T21:23:14.156+08:00"
},
...
],
"number": 0,
"size": 20,
"totalElements": 0,
"pageable": {
"sort": {
"sorted": false,
"unsorted": true,
"empty": true
},
"offset": 0,
"pageNumber": 0,
"pageSize": 20,
"paged": true,
"unpaged": false
},
"last": true,
"totalPages": 0,
"sort": {
"sorted": false,
"unsorted": true,
"empty": true
},
"first": true,
"numberOfElements": 0,
"empty": true
}
OR
404 | NOT FOUND
- If
projectId
is inexistent or user doesn't have access to it
- Endpoint:
GET /v1/projects/{projectId}/entities/{entityId}
- Response (Entity):
200 | OK
{
"id": "60252fc2d5efd95ee8890ead",
"name": "Achondroplasia",
"mappingStatus": "AUTO_MAPPED | ...",
"source": <SOURCE_OBJECT>,
"upstreamId": "STRING",
"context": "STRING",
"priority": INTEGER,
"mappingSuggestions": [
<MAPPING_SUGGESTION_OBJECT>
],
"mapping": <MAPPING_OBJECT>,
"auditTrail": [
<AUDIT_OBJECT>
],
"created": {
"user": {
"name": "Test User 1",
"email": "[email protected]"
},
"timestamp": "2021-02-11T21:23:14.156+08:00"
}
}
OR
404 | NOT FOUND
- If
projectId
orentityId
are inexistent or user doesn't have access toprojectId