Direkt zum Inhalt
RADAR API

ERSTE SCHRITTE ZUR NUTZUNG DES RADAR API

RADAR API Documentation

Target Systems

Development: https://www.dev.fiz-karlsruhe.de/radar/api

Production: https://www.radar-services.eu/api

Security

OAuth

Most of the endpoints requires an authenticated escidoc user to perform the action. In the RADAR all authentication is done via OAuth.

An API client has to send a valid OAuth Token in the request header to gain access to specific endpoints.

 

Oauth header

Authorization: Bearer 0b79bab50daca910b000d4f1a2b675d604257e42

Error handling

  • For secured endpoints: If no OAuth token  is send a 401 error message appears
  • If an invalid OAuth token is send a 403 error message is returned

 

Interested developers can request a clientId, clientPassword, and redirectUrl via email (info@radar-service.eu).

OAuth tokens

 

Method

Path

Query

Return

Implemented

ReadPOST/tokens

200, 400, 401, 500

x

DeleteDELETE/tokens 204, 400, 500x

ReadPOST/tokens/refresh 200, 400, 401, 500x

POST body for retrieving oauth tokens  

1

{"clientId":"myClientId", "clientSecret":"myClientSecret", "redirectUrl" : \"myRedirectUrl", "userName":"myUserName", "userPassword":"myPassword"}

POST body for refresh an oauth token  

1

{"clientId":"myClientId", "clientSecret":"myClientSecret", "refreshToken":"0b79bab50daca910b000d4f1a2b675d604257e42"}

Contract

 

Method

Path

Query

Return

Implemented

CreatePOST/contracts

201, 400, 401, 403, 500

x

ReadGET/contracts/{id} 200, 401, 403, 404, 500x

UpdatePUT/contracts/{id} 200, 400, 401, 403, 404, 500x

DeleteDELETE/contracts/{id} 200, 401, 403, 404, 500x

Read AdministratorsGET/contracts/{id}/administrators 200, 401, 403, 404, 500x

Change AdministratorsPOST/contracts/{id}/administrators 200, 401, 403, 404, 500x

SearchGET/contracts

sort

offset

rows

query

200, 400x

Example:

POST body for creating a new contract  

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

   "id":null,

   "parentId":null,

   "createdDate":null,

   "lastModifiedDate":null,

   "descriptiveMetadata":{ 

      "title":"Test contract",

      "description":"This is the test contract"

   },

   "technicalMetadata":{ 

      "diskQuota":5000,

      "archiveQuota":10000,

      "categories":{ 

         "category":[ 

            

               "title":"Institutions",

               "value":[ 

                  

                     "value":"FIZ",

                     "id":"1453127511216"

                  },

                  

                     "value":"SCC",

                     "id":"1453127511221"

                  },

                  

                     "value":"IMK",

                     "id":"1453127511221"

                  }

               ],

               "id":"1453127511216"

            }

         ]

      }

   }

}

POST body for changing contract administrators  

1

["username1", "username1"]

Workspace

 

Method

Path

Query

Return

Implemented

CreatePOST/workspaces

201, 400, 401, 403, 500

x

ReadGET/workspaces/{id} 200, 401, 403, 404, 500x

UpdatePUT/workspaces/{id} 200, 400, 401, 403, 404, 500x

DeleteDELETE/workspaces/{id} 200, 401, 403, 404, 500x

Read CuratorsGET/workspaces/{id}/curators 200, 401, 403, 404, 500x

Change CuratorsPOST/workspaces/{id}/curators 200, 401, 403, 404, 422, 500x

Read SubCuratorsGET/workspaces/{id}/subcurators 200, 401, 403, 404, 500x

Change SubCuratorsPOST/workspaces/{id}/subcurators 200, 401, 403, 404, 422, 500x

SearchGET/workspaces

sort

offset

rows

query

facetValues[]

200, 400xFacetsGET/workspaces/facets

facetName

searchQuery

facetQuery

facetValues[]

rows

200, 400x

 

Examples:

POST body for creating a new workspace  

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

   "id":null,

   "parentId":"tSnyWSTKrtvieNpv",

   "createdDate":null,

   "lastModifiedDate":null,

   "datasetIds":null,

   "descriptiveMetadata":{ 

      "title":"Workspace Foo",

      "description":"to be used only by Alice and Bob"

   },

   "technicalMetadata":{ 

      "defaultDatasetRetentionPeriod":42,

      "defaultDatasetResponsibleEmail":"alice_and_bob@foo.bar",

      "categoryAssignments":{ 

         "categoryAssignment":[ 

            "JHJHASD,LKJKJASD",

            "KJHKJH,IJOIJASD3"

         ]

      }

   }

}

POST body for changing curators/subcurators  

1

["username1", "username1"]

Dataset

 

Method

Path

Query

Return

Implemented

CreatePOST/datasets

201, 400, 401, 403, 500

x

ReadGET/datasets/{id} 200, 401, 403, 404, 500x

UpdatePUT/datasets/{id} 200, 400, 401, 403, 404, 500x

DeleteDELETE/datasets/{id} 200, 401, 403, 404, 500x

DownloadGET/datasets/{id}/download 200, 401, 403, 404, 500x

SearchGET/datasets

sort

offset

rows

query
facetValues200, 400xFacetsGET/datasets/facets

facetName

searchQuery

facetQuery

facetValues[]

rows

200, 400x

PublishPOST/datasets/{id}/publish 200, 401, 403, 404, 422, 500x

ArchivePOST/datasets/{id}/archive 200, 401, 403, 404, 422, 500x

ReviewPOST/datasets/{id}/startreview 200, 401, 403, 404, 422, 500x

PendingPOST/datasets/{id}/endreview 200, 401, 403, 404, 422, 500x

Get XML Descriptive MDGET/datasets/{id}/descriptivemd 200, 401, 403, 404, 422, 500 

Import XML Descriptive MDPOST/datasets/{id}/descriptivemd 200, 401, 403, 404, 422, 500 

 

Examples:

POST body for creating a new dataset  

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

   "id":null,

   "parentId":"oCnmQAQTPXBomRIm",

   "createdDate":null,

   "lastModifiedDate":null,

   "hasChildren":false,

   "state":"PENDING",

   "uploadUrl":null,

   "technicalMetadata":{ 

      "retentionPeriod":25,

      "archiveDate":1453118839734,

      "publishDate":1453118839739,

      "responsibleEmail":"alice@bob.de",

      "publicationBacklink":"http://alice-bob.de/publication",

      "embargoEndingDate":1453982839735,

      "numberOfPendingNotificationMailsSent":0,

      "categoryAssignments":null

   },

   "descriptiveMetadata":{ 

      "identifier":null,

      "alternateIdentifiers":null,

      "relatedIdentifiers":null,

      "creators":{ 

         "creator":[ 

            

               "creatorName":"Max Mustermann",

               "creatorAffiliation":[ 

                  "Scientist"

               ]

            },

            

               "creatorName":"Maike Maler",

               "creatorAffiliation":[ 

                  "Scientist"

               ]

            }

         ]

      },

      "contributors":null,

      "title":"Dataset title.",

      "additionalTitles":null,

      "descriptions":null,

      "keywords":null,

      "publishers":null,

      "productionYear":null,

      "publicationYear":null,

      "language":null,

      "subjectAreas":null,

      "resource":null,

      "geoLocations":null,

      "dataSources":null,

      "software":null,

      "processing":null,

      "rights":null,

      "rightsHolders":null,

      "relatedInformations":null

   }

}

Folder

 

Method

Path

Query

Return

Implemented

CreatePOST

/folders

 

201, 400, 401, 403, 500

x

ReadGET/folders/{id} 200, 401, 403, 404, 500x

UpdatePUT/folders/{id} 200, 400, 401, 403, 404, 500x

DeleteDELETE/folders/{id} 200, 401, 403, 404, 500x

SearchGET

/folders

sort

offset

rows

query

facetValues[]

200, 400xFacetsGET/folders/facets

facetName

searchQuery

facetQuery

facetValues[]

rows

200, 400x

Import XML Descriptive MDPOST/folders/{id}/descriptivemd 200, 401, 403, 404, 422, 500 

Examples:

POST body for creating a new folder  

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

   "id":null,

   "parentId":"kVxkjkgGbiiZWJPp",

   "createdDate":null,

   "lastModifiedDate":null,

   "folders":null,

   "files":null,

   "descriptiveMetadata":{ 

      "identifier":null,

      "alternateIdentifiers":null,

      "relatedIdentifiers":null,

      "creators":{ 

         "creator":[ 

            

               "creatorName":"Max Mustermann",

               "creatorAffiliation":[ 

                  "Scientist"

               ]

            },

            

               "creatorName":"Maike Maler",

               "creatorAffiliation":[ 

                  "Scientist"

               ]

            }

         ]

      },

      "contributors":null,

      "title":"Folder Foo.",

      "additionalTitles":null,

      "descriptions":null,

      "keywords":null,

      "publishers":null,

      "productionYear":null,

      "publicationYear":null,

      "language":null,

      "subjectAreas":null,

      "resource":null,

      "geoLocations":null,

      "dataSources":null,

      "software":null,

      "processing":null,

      "rights":null,

      "rightsHolders":null,

      "relatedInformations":null

   }

}

File

 

Method

Path

 

Return

Implemented

CreatePOST

/files

 

201, 400, 401, 403, 500

x

ReadGET/files/{id} 200, 401, 403, 404, 500x

UpdatePUT/files/{id} 200, 400, 401, 403, 404, 500x

DeleteDELETE/files/{id} 200, 401, 403, 404, 500x

SearchGET

/files

sort

offset

rows

query

facetValues[]

200, 400xFacetsGET/files/facets

facetName

searchQuery

facetQuery

facetValues[]

rows

200, 400x

Import XML Descriptive MDPOST/files/{id}/descriptivemd 200, 401, 403, 404, 422, 500 

Examples:

POST body for creating a new file  

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

   "id":null,

   "parentId":"dmCANFLLDgRhOYqb",

   "createdDate":null,

   "lastModifiedDate":null,

   "fileName":null,

   "binaryUrl":null,

   "descriptiveMetadata":{ 

      "identifier":null,

      "alternateIdentifiers":null,

      "relatedIdentifiers":null,

      "creators":{ 

         "creator":[ 

            

               "creatorName":"Max Mustermann",

               "creatorAffiliation":[ 

                  "Scientist"

               ]

            },

            

               "creatorName":"Maike Maler",

               "creatorAffiliation":[ 

                  "Scientist"

               ]

            }

         ]

      },

      "contributors":null,

      "title":"File bar.",

      "additionalTitles":null,

      "descriptions":null,

      "keywords":null,

      "publishers":null,

      "productionYear":null,

      "publicationYear":null,

      "language":null,

      "subjectAreas":null,

      "resource":null,

      "geoLocations":null,

      "dataSources":null,

      "software":null,

      "processing":null,

      "rights":null,

      "rightsHolders":null,

      "relatedInformations":null

   }

}