File tree Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -18,13 +18,14 @@ Count Example 1: Get # of records with a certain subject_id
18
18
from aind_data_access_api.document_db import MetadataDbClient
19
19
20
20
API_GATEWAY_HOST = " api.allenneuraldynamics.org"
21
- DATABASE = " metadata_index"
22
- COLLECTION = " data_assets"
21
+ # Default database and collection names are set in the client
22
+ # DATABASE = "metadata_index"
23
+ # COLLECTION = "data_assets"
23
24
24
25
docdb_api_client = MetadataDbClient(
25
26
host = API_GATEWAY_HOST ,
26
- database = DATABASE ,
27
- collection = COLLECTION ,
27
+ # database=DATABASE,
28
+ # collection=COLLECTION,
28
29
)
29
30
30
31
filter = {" subject.subject_id" : " 731015" }
@@ -136,8 +137,6 @@ It's possible to attach a custom Session to retry certain requests errors:
136
137
from aind_data_access_api.document_db import MetadataDbClient
137
138
138
139
API_GATEWAY_HOST = " api.allenneuraldynamics.org"
139
- DATABASE = " metadata_index"
140
- COLLECTION = " data_assets"
141
140
142
141
retry = Retry(
143
142
total = 5 ,
@@ -151,8 +150,6 @@ It's possible to attach a custom Session to retry certain requests errors:
151
150
152
151
with MetadataDbClient(
153
152
host = API_GATEWAY_HOST ,
154
- database = DATABASE ,
155
- collection = COLLECTION ,
156
153
session = session,
157
154
) as docdb_api_client:
158
155
records = docdb_api_client.retrieve_docdb_records(limit = 10 )
Original file line number Diff line number Diff line change @@ -54,13 +54,14 @@ REST API
54
54
from aind_data_access_api.document_db import MetadataDbClient
55
55
56
56
API_GATEWAY_HOST = " api.allenneuraldynamics.org"
57
- DATABASE = " metadata_index"
58
- COLLECTION = " data_assets"
57
+ # Default database and collection names are set in the client
58
+ # DATABASE = "metadata_index"
59
+ # COLLECTION = "data_assets"
59
60
60
61
docdb_api_client = MetadataDbClient(
61
62
host = API_GATEWAY_HOST ,
62
- database = DATABASE ,
63
- collection = COLLECTION ,
63
+ # database=DATABASE,
64
+ # collection=COLLECTION,
64
65
)
65
66
66
67
filter = {" subject.subject_id" : " 731015" }
You can’t perform that action at this time.
0 commit comments