-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi-geonetwork.yaml
More file actions
11418 lines (11417 loc) · 293 KB
/
api-geonetwork.yaml
File metadata and controls
11418 lines (11417 loc) · 293 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
swagger: '2.0'
info:
description: Learn how to access the catalog using the GeoNetwork REST API.
version: '0.1'
title: GeoNetwork Api Documentation (beta)
termsOfService: 'urn:tos'
contact:
name: geonetwork@osgeo.org
license:
name: GPL 2.0
url: 'http://www.gnu.org/licenses/old-licenses/gpl-2.0.html'
host: 'localhost:28080'
basePath: /geonetwork
tags:
- name: csw
description: Virtual CSW operations
- name: customstyle
description: Functionalities for custom styling
- name: formatters
description: Formatter operations
- name: groups
description: Groups operations
- name: harvesters
description: Harvester operations
- name: identifiers
description: Identifiers operations
- name: languages
description: Languages operations
- name: links
description: Record link operations
- name: logos
description: Logos operations
- name: mapservers
description: Mapservers related operations
- name: me
description: Me operations
- name: operations
description: Privileges operations
- name: pages
description: Static pages inside GeoNetwork
- name: processes
description: Processing operations
- name: records
description: Metadata record operations
- name: regions
description: Regions operations
- name: registries
description: Registries related operations
- name: related
description: Related records
- name: selections
description: Selection related operations
- name: site
description: Catalog operations
- name: sources
description: Source catalogue operations
- name: standards
description: Standard related operations
- name: status
description: Workflow status operations
- name: tags
description: Tags operations
- name: tools
description: Utility operations
- name: ui
description: User interface configuration operations
- name: userfeedback
description: User feedback
- name: users
description: User operations
- name: usersearches
description: User custom searches operations
- name: userselections
description: User selections related operations
- name: workers
description: Workers related operations
paths:
'/srv/api/csw/virtuals':
get:
tags:
- csw
summary: Get virtual CSW services
description: >-
Virtual CSWs are created to easily setup services providing access to
records without the need to define filters. For example, in Europe,
local, regional and national organizations define entry point for
records in the scope of the INSPIRE directive. Those services can then
be easily harvested to exchange information. Virtual CSWs do not support
transaction. For this use the main catalog CSW service.
operationId: getAllVirtualCsw
produces:
- application/json
responses:
'200':
description: OK
schema:
type: array
items:
$ref: '#/definitions/Service'
put:
tags:
- csw
summary: Add a virtual CSW
description: >-
The service name MUST be unique. An exception is returned if not the
case.
operationId: addVirtualCsw
consumes:
- application/json
produces:
- application/json
parameters:
- in: body
name: service
description: Service details
required: true
schema:
$ref: '#/definitions/Service'
responses:
'201':
description: Return the identifier of the newly created service
schema:
type: integer
format: int32
'403':
description: Operation not allowed. Only Administrator can access it.
'404':
description: A service already exist with this name
security:
- basicAuth: []
'/srv/api/csw/virtuals/{identifier}':
get:
tags:
- csw
summary: Get a virtual CSW
operationId: getVirtualCsw
produces:
- application/json
parameters:
- name: identifier
in: path
description: Service identifier
required: true
type: integer
format: int32
responses:
'200':
description: OK
schema:
$ref: '#/definitions/Service'
'404':
description: Resource not found.
put:
tags:
- csw
summary: Update a virtual CSW
operationId: updateVirtualCsw
consumes:
- application/json
produces:
- application/json
parameters:
- name: identifier
in: path
description: Service identifier
required: true
type: integer
format: int32
- in: body
name: service
description: Service details
required: true
schema:
$ref: '#/definitions/Service'
responses:
'204':
description: Service updated.
'403':
description: Operation not allowed. Only Administrator can access it.
'404':
description: Resource not found.
security:
- basicAuth: []
delete:
tags:
- csw
summary: Remove a virtual CSW
description: 'After removal, all virtual CSW configuration is reloaded.'
operationId: deleteVirtualCsw
produces:
- application/json
parameters:
- name: identifier
in: path
description: Service identifier
required: true
type: integer
format: int32
responses:
'204':
description: Service removed.
'403':
description: Operation not allowed. Only Administrator can access it.
'404':
description: Resource not found.
security:
- basicAuth: []
'/srv/api/customstyle':
get:
tags:
- customstyle
summary: Get CssStyleSettings
description: This returns a map with all Less variables.
operationId: getCssStyle
produces:
- application/json
responses:
'200':
description: OK
schema:
type: object
additionalProperties:
type: string
post:
tags:
- customstyle
summary: Saves custom style variables.
description: Saves custom style variables.
operationId: saveCustomStyle
consumes:
- application/json
produces:
- application/json
parameters:
- in: body
name: gnCssStyle
description: jsonVariables
required: false
schema:
type: string
responses:
'201':
description: Created
schema:
type: string
'/srv/api/formatters/cache':
delete:
tags:
- formatters
summary: Clear formatter cache
description: >-
Formatters are used to render records in various format (HTML, PDF,
...). When a record is rendered a cache is populated for better
performance. By default the cache is an H2 database with files on the
filesystems (See <dataDirectory>/resources/htmlcache/formatter-cache
folder).
operationId: clearFormatterCache
produces:
- '*/*'
responses:
'204':
description: Cache cleared.
'403':
description: Operation not allowed. Only Administrator can access it.
security:
- basicAuth: []
'/srv/api/groups':
get:
tags:
- groups
summary: Get groups
description: >-
The catalog contains one or more groups. By default, there is 3 reserved
groups (Internet, Intranet, Guest) and a sample group.<br/>This service
returns all catalog groups when not authenticated or when current is
user is an administrator. The list can contains or not reserved groups
depending on the parameters.<br/>When authenticated, return user groups
optionally filtered on a specific user profile.
operationId: getGroups
produces:
- application/json
parameters:
- name: withReservedGroup
in: query
description: 'Including Internet, Intranet, Guest groups or not'
required: false
type: boolean
default: false
- name: profile
in: query
description: For a specific profile
required: false
type: string
responses:
'200':
description: OK
schema:
type: array
items:
$ref: '#/definitions/Group'
put:
tags:
- groups
summary: Add a group
description: Return the identifier of the group created.
operationId: addGroup
consumes:
- application/json
produces:
- application/json
parameters:
- in: body
name: group
description: Group details
required: false
schema:
$ref: '#/definitions/Group'
responses:
'200':
description: OK
schema:
type: integer
format: int32
'201':
description: Group created.
schema:
type: integer
format: int32
'400':
description: Group with that id or name already exist.
'403':
description: Operation not allowed. Only UserAdmins can access it.
security:
- basicAuth: []
'/srv/api/groups/{groupIdentifier}':
get:
tags:
- groups
summary: Get group
description: Return the requested group details.
operationId: getGroup
produces:
- application/json
parameters:
- name: groupIdentifier
in: path
description: Group identifier
required: true
type: integer
format: int32
responses:
'200':
description: OK
schema:
$ref: '#/definitions/Group'
'404':
description: Resource not found.
put:
tags:
- groups
summary: Update a group
operationId: updateGroup
consumes:
- application/json
produces:
- application/json
parameters:
- name: groupIdentifier
in: path
description: Group identifier
required: true
type: integer
format: int32
- in: body
name: group
description: Group details
required: false
schema:
$ref: '#/definitions/Group'
responses:
'204':
description: Group updated.
'403':
description: Operation not allowed. Only UserAdmins can access it.
'404':
description: Resource not found.
security:
- basicAuth: []
delete:
tags:
- groups
summary: Remove a group
description: >-
Remove a group by first removing sharing settings, link to users and
finally reindex all affected records.
operationId: deleteGroup
produces:
- application/json
parameters:
- name: groupIdentifier
in: path
description: Group identifier.
required: true
type: integer
format: int32
- name: force
in: query
description: Force removal even if records are assigned to that group.
required: false
type: boolean
default: false
responses:
'204':
description: Group removed.
'403':
description: Operation not allowed. Only UserAdmins can access it.
'404':
description: Resource not found.
security:
- basicAuth: []
'/srv/api/groups/{groupIdentifier}/users':
get:
tags:
- groups
summary: Get group users
operationId: getGroupUsers
produces:
- application/json
parameters:
- name: groupIdentifier
in: path
description: Group identifier
required: true
type: integer
format: int32
responses:
'200':
description: List of users in that group.
schema:
type: array
items:
$ref: '#/definitions/User'
'403':
description: Operation not allowed. Only UserAdmins can access it.
'404':
description: Resource not found.
security:
- basicAuth: []
'/srv/api/groups/{groupId}/logo':
get:
tags:
- groups
summary: Get the group logo image.
description: >-
If last-modified header is present it is used to check if the logo has
been modified since the header date. If it hasn't been modified returns
an empty 304 Not Modified response. If modified returns the image. If
the group has no logo then returns a transparent 1x1 px PNG image.
operationId: get
produces:
- '*/*'
parameters:
- name: groupId
in: path
description: Group identifier
required: true
type: integer
format: int32
responses:
'200':
description: OK
'/srv/api/harvesters/properties/{property}':
get:
tags:
- harvesters
summary: Check if a harvester name or host already exist
operationId: checkHarvesterPropertyExist
produces:
- '*/*'
parameters:
- name: property
in: path
description: The harvester property to check
required: true
type: string
- name: exist
in: query
description: The value to search
required: false
type: string
responses:
'200':
description: Property does not exist.
schema:
type: string
enum:
- '100'
- '101'
- '102'
- '103'
- '200'
- '201'
- '202'
- '203'
- '204'
- '205'
- '206'
- '207'
- '208'
- '226'
- '300'
- '301'
- '302'
- '303'
- '304'
- '305'
- '307'
- '308'
- '400'
- '401'
- '402'
- '403'
- '404'
- '405'
- '406'
- '407'
- '408'
- '409'
- '410'
- '411'
- '412'
- '413'
- '414'
- '415'
- '416'
- '417'
- '418'
- '419'
- '420'
- '421'
- '422'
- '423'
- '424'
- '426'
- '428'
- '429'
- '431'
- '500'
- '501'
- '502'
- '503'
- '504'
- '505'
- '506'
- '507'
- '508'
- '509'
- '510'
- '511'
'403':
description: Operation not allowed. Only UserAdmins can access it.
'404':
description: A property with that value already exist.
security:
- basicAuth: []
'/srv/api/harvesters/{harvesterUuid}/assign':
post:
tags:
- harvesters
summary: Assign harvester records to a new source
operationId: assignHarvestedRecordToSource
consumes:
- application/json
produces:
- application/json
parameters:
- name: harvesterUuid
in: path
description: The harvester UUID
required: true
type: string
- name: source
in: query
description: The target source UUID
required: false
type: string
responses:
'204':
description: Harvester records transfered to new source.
schema:
type: string
enum:
- '100'
- '101'
- '102'
- '103'
- '200'
- '201'
- '202'
- '203'
- '204'
- '205'
- '206'
- '207'
- '208'
- '226'
- '300'
- '301'
- '302'
- '303'
- '304'
- '305'
- '307'
- '308'
- '400'
- '401'
- '402'
- '403'
- '404'
- '405'
- '406'
- '407'
- '408'
- '409'
- '410'
- '411'
- '412'
- '413'
- '414'
- '415'
- '416'
- '417'
- '418'
- '419'
- '420'
- '421'
- '422'
- '423'
- '424'
- '426'
- '428'
- '429'
- '431'
- '500'
- '501'
- '502'
- '503'
- '504'
- '505'
- '506'
- '507'
- '508'
- '509'
- '510'
- '511'
'403':
description: Operation not allowed. Only UserAdmins can access it.
'404':
description: Resource not found.
security:
- basicAuth: []
'/srv/api/identifiers':
get:
tags:
- identifiers
summary: Get identifier templates
description: >-
Identifier templates are used to create record UUIDs havind a particular
structure. The template will be used when user creates a new record. The
template identifier to use is defined in the administration > settings.
operationId: getIdentifiers
produces:
- application/json
parameters:
- name: userDefinedOnly
in: query
description: Only user defined ones
required: false
type: boolean
default: false
responses:
'200':
description: List of identifier templates.
schema:
type: array
items:
$ref: '#/definitions/MetadataIdentifierTemplate'
'403':
description: Operation not allowed. Only Editor can access it.
security:
- basicAuth: []
put:
tags:
- identifiers
summary: Add an identifier template
operationId: addIdentifier
consumes:
- application/json
produces:
- application/json
parameters:
- in: body
name: metadataIdentifierTemplate
description: Identifier template details
required: false
schema:
$ref: '#/definitions/MetadataIdentifierTemplate'
responses:
'201':
description: Identifier template created.
schema:
type: integer
format: int32
'403':
description: Operation not allowed. Only Editor can access it.
security:
- basicAuth: []
'/srv/api/identifiers/{identifier}':
put:
tags:
- identifiers
summary: Update an identifier template
operationId: updateIdentifier
consumes:
- application/json
produces:
- application/json
parameters:
- name: identifier
in: path
description: Identifier template identifier
required: true
type: integer
format: int32
- in: body
name: metadataIdentifierTemplate
description: Identifier template details
required: false
schema:
$ref: '#/definitions/MetadataIdentifierTemplate'
responses:
'204':
description: Identifier template updated.
'403':
description: Operation not allowed. Only Editor can access it.
'404':
description: Resource not found.
security:
- basicAuth: []
delete:
tags:
- identifiers
summary: Remove an identifier template
operationId: deleteIdentifier
produces:
- application/json
parameters:
- name: identifier
in: path
description: Identifier template identifier
required: true
type: integer
format: int32
responses:
'204':
description: Template identifier removed.
'403':
description: Operation not allowed. Only Editor can access it.
'404':
description: Resource not found.
security:
- basicAuth: []
'/srv/api/isolanguages':
get:
tags:
- languages
summary: Get ISO languages
description: >-
ISO languages provides a list of all languages (eg. used for
autocompletion in metadata editor).
operationId: getIsoLanguages
produces:
- application/json
responses:
'200':
description: OK
schema:
type: array
items:
$ref: '#/definitions/IsoLanguage'
'/srv/api/languages':
get:
tags:
- languages
summary: Get languages
description: >-
Languages for the application having translations in the database. All
tables with 'Desc' suffix contains translation for some domain objects
like groups, tags, ...
operationId: getLanguages
produces:
- application/json
responses:
'200':
description: OK
schema:
type: array
items:
$ref: '#/definitions/Language'
'/srv/api/languages/{langCode}':
put:
tags:
- languages
summary: Add a language
description: >-
Add all default translations from all *Desc tables in the database. This
operation will only add translations for a default catalog installation.
Defaults can be customized in SQL scripts located in
WEB-INF/classes/setup/sql/data/*.
operationId: addLanguage
consumes:
- application/json
produces:
- '*/*'
parameters:
- name: langCode
in: path
description: ISO 3 letter code
required: true
type: string
responses:
'201':
description: Language translations added.
'403':
description: Operation not allowed. Only Administrator can access it.
'404':
description: Resource not found. eg. No SQL file available for that langugae.
security:
- basicAuth: []
delete:
tags:
- languages
summary: Remove a language
description: >-
Delete all translations from all *Desc tables in the database. Warning:
This will also remove all translations you may have done to those
objects (eg. custom groups).
operationId: deleteLanguage
produces:
- '*/*'
parameters:
- name: langCode
in: path
description: ISO 3 letter code
required: true
type: string
responses:
'204':
description: Language translations removed.
'403':
description: Operation not allowed. Only Administrator can access it.
'404':
description: Resource not found.
security:
- basicAuth: []
'/srv/api/logos':
get:
tags:
- logos
summary: Get all logos
description: >-
Logos are used for the catalog, the groups logos, and harvester icons.
Logos are stored in the data directory in
<dataDirectory>/resources/images/harvesting.<br/> Records are attached
to a source. A source can be the local catalog or a harvester node. When
a source is created, its logo is located in the images/logos folder with
the source UUID as filename. For some sources the logo can be
automatically retrieved (eg. when harvesting GeoNetwork catalogs). For
others, the logo is usually manually defined when configuring the
harvester.
operationId: getLogos
produces:
- application/json
responses:
'200':
description: OK
schema:
type: array
items:
type: string
post:
tags:
- logos
summary: Add a logo
operationId: addLogo
consumes:
- application/json
- multipart/form-data
produces:
- application/json
parameters:
- name: file
in: formData
description: The logo image to upload
required: false
type: array
items:
type: file
collectionFormat: multi
- name: overwrite
in: query
description: Overwrite if exists
required: false
type: boolean
default: false
responses:
'201':
description: Logo added.
schema:
$ref: '#/definitions/ResponseEntity'
'403':
description: Operation not allowed. Only UserAdmins can access it.
security:
- basicAuth: []
'/srv/api/logos/{file}':
delete:
tags:
- logos
summary: Remove a logo
operationId: deleteLogo
produces:
- application/json
parameters:
- name: file
in: path
description: The logo filename to delete
required: true
type: string
responses:
'204':
description: Logo removed.
'403':
description: Operation not allowed. Only UserAdmins can access it.
'404':
description: Resource not found.
security:
- basicAuth: []
'/srv/api/mapservers':
get:
tags:
- mapservers
summary: Get mapservers
description: >-
Mapservers are used by the catalog to publish record attachements (eg.
ZIP file with shape) or record associated resources (eg. database table,
file on the local network) in a remote mapserver like GeoServer or
MapServer. The catalog communicate with the mapserver using GeoServer
REST API.
operationId: getMapservers
produces:
- application/json
responses:
'200':
description: OK
schema:
type: array
items:
$ref: '#/definitions/AnonymousMapserver'
'403':
description: Operation not allowed. Only Editors can access it.
security:
- basicAuth: []
put:
tags:
- mapservers
summary: Add a mapserver
description: Return the id of the newly created mapserver.
operationId: addMapserver
consumes:
- application/json
produces:
- application/json
parameters:
- in: body
name: mapserver
description: Mapserver details
required: true
schema:
$ref: '#/definitions/MapServer'
responses:
'201':
description: Mapserver created.
schema:
type: integer
format: int32
'400':
description: Bad parameters.
'403':
description: Operation not allowed. Only Reviewvers can access it.
security: