Skip to content

Commit c7868de

Browse files
committed
global: update resource_type/identifiers API calls
1 parent 008cdd0 commit c7868de

File tree

2 files changed

+55
-74
lines changed

2 files changed

+55
-74
lines changed

docs/develop/config.md

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -60,26 +60,20 @@ curl -k -XPOST -H "Content-Type: application/json" https://localhost:5000/api/re
6060
"access_right": "open",
6161
"resource_type": {
6262
"type": "image",
63-
"subtype": "photo"
63+
"subtype": "image-photo"
64+
},
65+
"identifiers": {
66+
"DOI": "10.9999/rdm.0",
6467
},
65-
"identifiers": [
66-
{
67-
"identifier": "10.9999/rdm.0",
68-
"scheme": "DOI"
69-
}
70-
],
7168
"creators": [
7269
{
7370
"name": "Marcus Junius Brutus",
7471
"type": "Personal",
7572
"given_name": "Marcus",
7673
"family_name": "Brutus",
77-
"identifiers": [
78-
{
79-
"identifier": "9999-9999-9999-9990",
80-
"scheme": "Orcid"
81-
}
82-
],
74+
"identifiers": {
75+
"Orcid": "9999-9999-9999-9990"
76+
},
8377
"affiliations": [
8478
{
8579
"name": "Entity One",

docs/develop/run.md

Lines changed: 48 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,24 @@ curl -k -XGET https://localhost:5000/api/records/ | python3 -m json.tool
4242
"resource_type": {
4343
"buckets": [
4444
{
45-
"doc_count": 10,
45+
"doc_count": 4,
46+
"key": "book"
47+
},
48+
{
49+
"doc_count": 3,
50+
"key": "text"
51+
},
52+
{
53+
"doc_count": 1,
4654
"key": "image"
55+
},
56+
{
57+
"doc_count": 1,
58+
"key": "multimedia"
59+
},
60+
{
61+
"doc_count": 1,
62+
"key": "periodical"
4763
}
4864
],
4965
"doc_count_error_upper_bound": 0,
@@ -91,12 +107,9 @@ curl -k -XGET https://localhost:5000/api/records/ | python3 -m json.tool
91107
"scheme": "entity-id-scheme"
92108
}
93109
],
94-
"identifiers": [
95-
{
96-
"identifier": "9999-9999-9999-9998",
97-
"scheme": "Orcid"
98-
}
99-
],
110+
"identifiers": {
111+
"Orcid": "9999-9999-9999-9998"
112+
},
100113
"name": "Gina Brown",
101114
"role": "RightsHolder",
102115
"type": "Personal"
@@ -111,12 +124,9 @@ curl -k -XGET https://localhost:5000/api/records/ | python3 -m json.tool
111124
"scheme": "entity-id-scheme"
112125
}
113126
],
114-
"identifiers": [
115-
{
116-
"identifier": "9999-9999-9999-9999",
117-
"scheme": "Orcid"
118-
}
119-
],
127+
"identifiers": {
128+
"Orcid": "9999-9999-9999-9999"
129+
},
120130
"name": "Christina Wright",
121131
"type": "Personal"
122132
}
@@ -136,16 +146,10 @@ curl -k -XGET https://localhost:5000/api/records/ | python3 -m json.tool
136146
}
137147
],
138148
"embargo_date": "1997-12-01",
139-
"identifiers": [
140-
{
141-
"identifier": "10.9999/rdm.9999999",
142-
"scheme": "DOI"
143-
},
144-
{
145-
"identifier": "9999.99999",
146-
"scheme": "arXiv"
147-
}
148-
],
149+
"identifiers": {
150+
"DOI": "10.9999/rdm.9999999",
151+
"arXiv": "9999.99999"
152+
},
149153
"language": "eng",
150154
"licenses": [
151155
{
@@ -179,14 +183,14 @@ curl -k -XGET https://localhost:5000/api/records/ | python3 -m json.tool
179183
"identifier": "10.9999/rdm.9999988",
180184
"relation_type": "Requires",
181185
"resource_type": {
182-
"subtype": "photo",
186+
"subtype": "image-photo",
183187
"type": "image"
184188
},
185189
"scheme": "DOI"
186190
}
187191
],
188192
"resource_type": {
189-
"subtype": "photo",
193+
"subtype": "image-photo",
190194
"type": "image"
191195
},
192196
"subjects": [
@@ -234,30 +238,22 @@ curl -k -XPOST -H "Content-Type: application/json" https://localhost:5000/api/re
234238
"_created_by": 1,
235239
"access_right": "open",
236240
"resource_type": {
237-
"type": "image",
238-
"subtype": "photo"
241+
"type": "publication",
242+
"subtype": "publication-article"
243+
},
244+
"identifiers": {
245+
"DOI": "10.9999/rdm.9999999",
246+
"arXiv": "9999.99999"
239247
},
240-
"identifiers": [
241-
{
242-
"identifier": "10.9999/rdm.9999999",
243-
"scheme": "DOI"
244-
}, {
245-
"identifier": "9999.99999",
246-
"scheme": "arXiv"
247-
}
248-
],
249248
"creators": [
250249
{
251250
"name": "Julio Cesar",
252251
"type": "Personal",
253252
"given_name": "Julio",
254253
"family_name": "Cesar",
255-
"identifiers": [
256-
{
257-
"identifier": "9999-9999-9999-9999",
258-
"scheme": "Orcid"
259-
}
260-
],
254+
"identifiers": {
255+
"Orcid": "9999-9999-9999-9999"
256+
},
261257
"affiliations": [
262258
{
263259
"name": "Entity One",
@@ -318,7 +314,7 @@ curl -k -XGET https://localhost:5000/api/records/?q=Gladiator | python3 -m json.
318314
"buckets": [
319315
{
320316
"doc_count": 1,
321-
"key": "image"
317+
"key": "publication"
322318
}
323319
],
324320
"doc_count_error_upper_bound": 0,
@@ -362,12 +358,9 @@ curl -k -XGET https://localhost:5000/api/records/?q=Gladiator | python3 -m json.
362358
],
363359
"family_name": "Cesar",
364360
"given_name": "Julio",
365-
"identifiers": [
366-
{
367-
"identifier": "9999-9999-9999-9999",
368-
"scheme": "Orcid"
369-
}
370-
],
361+
"identifiers": {
362+
"Orcid": "9999-9999-9999-9999"
363+
},
371364
"name": "Julio Cesar",
372365
"type": "Personal"
373366
}
@@ -379,16 +372,10 @@ curl -k -XGET https://localhost:5000/api/records/?q=Gladiator | python3 -m json.
379372
"type": "Abstract"
380373
}
381374
],
382-
"identifiers": [
383-
{
384-
"identifier": "10.9999/rdm.9999999",
385-
"scheme": "DOI"
386-
},
387-
{
388-
"identifier": "9999.99999",
389-
"scheme": "arXiv"
390-
}
391-
],
375+
"identifiers": {
376+
"DOI": "10.9999/rdm.9999999",
377+
"arXiv": "9999.99999"
378+
},
392379
"licenses": [
393380
{
394381
"identifier": "BSD-3",
@@ -400,8 +387,8 @@ curl -k -XGET https://localhost:5000/api/records/?q=Gladiator | python3 -m json.
400387
"publication_date": "2020-02-26",
401388
"recid": "8wtcp-1bs44",
402389
"resource_type": {
403-
"subtype": "photo",
404-
"type": "image"
390+
"subtype": "publication-article",
391+
"type": "publication"
405392
},
406393
"titles": [
407394
{

0 commit comments

Comments
 (0)