Getting Branch Entries
We set up a project called EC5 API Test. The project is public so anyone can perform a GET request to fetch its entries.
Here is the response of the following GET endpoint, to retrieve all branch entries for a particular branch input: (Open in browser)
1
https://five.epicollect.net/api/export/entries/ec5-api-test?branch_ref=d500a44b973e4de4a80fda57ca3dfe4d_5901f6bb53273_591ee7dc8400f
Copied!
1
{
2
"links": {
3
"self": "https://five.epicollect.net/api/export/entries/ec5-api-test?form_ref=d500a44b973e4de4a80fda57ca3dfe4d_5901f6bb53273&parent_form_ref=&branch=&branch_ref=d500a44b973e4de4a80fda57ca3dfe4d_5901f6bb53273_591ee7dc8400f&branch_owner_uuid=&parent_uuid=&uuid=&input_ref=&per_page=50&sort_order=DESC&entry_col=created_at&map_index=&page=1",
4
"first": "https://five.epicollect.net/api/export/entries/ec5-api-test?form_ref=d500a44b973e4de4a80fda57ca3dfe4d_5901f6bb53273&parent_form_ref=&branch=&branch_ref=d500a44b973e4de4a80fda57ca3dfe4d_5901f6bb53273_591ee7dc8400f&branch_owner_uuid=&parent_uuid=&uuid=&input_ref=&per_page=50&sort_order=DESC&entry_col=created_at&map_index=&page=1",
5
"prev": null,
6
"next": null,
7
"last": "https://five.epicollect.net/api/export/entries/ec5-api-test?form_ref=d500a44b973e4de4a80fda57ca3dfe4d_5901f6bb53273&parent_form_ref=&branch=&branch_ref=d500a44b973e4de4a80fda57ca3dfe4d_5901f6bb53273_591ee7dc8400f&branch_owner_uuid=&parent_uuid=&uuid=&input_ref=&per_page=50&sort_order=DESC&entry_col=created_at&map_index=&page=1"
8
},
9
"meta": {
10
"total": 4,
11
"per_page": 50,
12
"current_page": 1,
13
"last_page": 1,
14
"from": 1,
15
"to": 1
16
},
17
"data": {
18
"id": "ec5-api-test",
19
"type": "entries",
20
"entries": [
21
{
22
"ec5_branch_owner_uuid": "768bb179-fd2c-87b1-ec20-86a9acfdc87a",
23
"ec5_branch_ref": "6_Family_Members",
24
"created_at": "2017-05-19T12:51:41.674Z",
25
"7_Name": "Andrew Carrey",
26
"8_Age": 46
27
},
28
{
29
"ec5_branch_owner_uuid": "39f51e6d-6438-76ba-e63c-82b6b387c041",
30
"ec5_branch_ref": "6_Family_Members",
31
"created_at": "2017-05-19T12:49:04.825Z",
32
"7_Name": "Sally Fox",
33
"8_Age": 28
34
},
35
{
36
"ec5_branch_owner_uuid": "39f51e6d-6438-76ba-e63c-82b6b387c041",
37
"ec5_branch_ref": "6_Family_Members",
38
"created_at": "2017-05-19T12:48:57.512Z",
39
"7_Name": "Bob Fox",
40
"8_Age": 35
41
},
42
{
43
"ec5_branch_owner_uuid": "39f51e6d-6438-76ba-e63c-82b6b387c041",
44
"ec5_branch_ref": "6_Family_Members",
45
"created_at": "2017-05-19T12:48:49.713Z",
46
"7_Name": "Joe Fox",
47
"8_Age": 40
48
}
49
],
50
"mapping": {
51
"map_name": "custom",
52
"map_index": 1
53
}
54
}
55
}
Copied!
Here is the response of the following GET endpoint, to retrieve all branch entries for a particular branch input for a particular main entry: (Open in browser)
1
https://five.epicollect.net/api/export/entries/ec5-api-test?branch_ref=d500a44b973e4de4a80fda57ca3dfe4d_5901f6bb53273_591ee7dc8400f&branch_owner_uuid=39f51e6d-6438-76ba-e63c-82b6b387c041
Copied!
1
{
2
"links": {
3
"self": "https://five.epicollect.net/api/export/entries/ec5-api-test?form_ref=d500a44b973e4de4a80fda57ca3dfe4d_5901f6bb53273&parent_form_ref=&branch=&branch_ref=d500a44b973e4de4a80fda57ca3dfe4d_5901f6bb53273_591ee7dc8400f&branch_owner_uuid=39f51e6d-6438-76ba-e63c-82b6b387c041&parent_uuid=&uuid=&input_ref=&per_page=50&sort_order=DESC&entry_col=created_at&map_index=&page=1",
4
"first": "https://five.epicollect.net/api/export/entries/ec5-api-test?form_ref=d500a44b973e4de4a80fda57ca3dfe4d_5901f6bb53273&parent_form_ref=&branch=&branch_ref=d500a44b973e4de4a80fda57ca3dfe4d_5901f6bb53273_591ee7dc8400f&branch_owner_uuid=39f51e6d-6438-76ba-e63c-82b6b387c041&parent_uuid=&uuid=&input_ref=&per_page=50&sort_order=DESC&entry_col=created_at&map_index=&page=1",
5
"prev": null,
6
"next": null,
7
"last": "https://five.epicollect.net/api/export/entries/ec5-api-test?form_ref=d500a44b973e4de4a80fda57ca3dfe4d_5901f6bb53273&parent_form_ref=&branch=&branch_ref=d500a44b973e4de4a80fda57ca3dfe4d_5901f6bb53273_591ee7dc8400f&branch_owner_uuid=39f51e6d-6438-76ba-e63c-82b6b387c041&parent_uuid=&uuid=&input_ref=&per_page=50&sort_order=DESC&entry_col=created_at&map_index=&page=1"
8
},
9
"meta": {
10
"total": 3,
11
"per_page": 50,
12
"current_page": 1,
13
"last_page": 1,
14
"from": 1,
15
"to": 1
16
},
17
"data": {
18
"id": "ec5-api-test",
19
"type": "entries",
20
"entries": [
21
{
22
"ec5_branch_owner_uuid": "39f51e6d-6438-76ba-e63c-82b6b387c041",
23
"ec5_branch_ref": "6_Family_Members",
24
"created_at": "2017-05-19T12:49:04.825Z",
25
"7_Name": "Sally Fox",
26
"8_Age": 28
27
},
28
{
29
"ec5_branch_owner_uuid": "39f51e6d-6438-76ba-e63c-82b6b387c041",
30
"ec5_branch_ref": "6_Family_Members",
31
"created_at": "2017-05-19T12:48:57.512Z",
32
"7_Name": "Bob Fox",
33
"8_Age": 35
34
},
35
{
36
"ec5_branch_owner_uuid": "39f51e6d-6438-76ba-e63c-82b6b387c041",
37
"ec5_branch_ref": "6_Family_Members",
38
"created_at": "2017-05-19T12:48:49.713Z",
39
"7_Name": "Joe Fox",
40
"8_Age": 40
41
}
42
],
43
"mapping": {
44
"map_name": "custom",
45
"map_index": 1
46
}
47
}
48
}
Copied!
As we did not pass any map parameter, by default the entries are mapped against the default EC5_AUTO mapping.
Last modified 2yr ago
Copy link