Skip to content

Webservice User Documentation

anja edited this page Nov 30, 2016 · 1 revision

Implemented functions

Get documents (basic)

Parameters:

Json Response:

{
    "start": null (not used),
    "rows": null (not used),
    "numFound": number of documents found,
    "docs": [list of documents(only Id field)]
}

Get documents(Complete)

Parameters:

Json Response

{
    "start": start parameter value,
    "rows": rows parameter value,
    "numFound": number of documents found,
    "docs": [list of documents with the fields indicated and hightlighted if they are indicated in highlightFields]
}

Get nodes (basic)

Parameters:

Json Response

{
    groupName1:[{"count": number count,"id": id value,"name":name value,"query": query_string}, ... ],
    groupName2:[{"count": number count,"id": id value,"name":name value,"query": query_string}, ... ]
}

Get nodes(Complete)

Parameters:

  • query java.lang.String - Solr q parameter

  • filterQuery java.lang.String - Solr fq parameter

  • groups java.lang.String - Solr facets to count

  • groupsAnyValue java.lang.String - an extra counter to know how many documents have any value of this group 

  • limit java.lang.String - Solr facet.parameter

Json Response

{
    groupName1:[{"count": number count,"id": id value,"name":name value,"query": query_string}, ..., {"count": any in group,"id":"_ANY","name":"_ANY","query":"groupName1:[\"\" TO *]"}]} ],
    groupName2:[{"count": number count,"id": id value,"name":name value,"query": query_string}, ..., {"count": any in group,"id":"_ANY","name":"_ANY","query":"groupName2:[\"\" TO *]"}]} ],
}

Export documents (basic)

Parameters:

  • query java.lang.String - Solr q parameter

  • filterQuery java.lang.StringSolr fq parameter

  • exportType java.lang.String - name of the export type (currently only "bibtex")

Json Response

{
    "start": null (not used),
    "rows": null (not used),
    "numFound": number of documents found,
    "docs": [list of documents(only Id field)]
}

Export documents(Complete)

Parameters:

Json Response

{
    "start": null (not used),
    "rows": null (not used),
    "numFound": number of documents found,
    "docs": [list of documents]
}

How to use the parameters

Passing Parameters as Part of a URL Path

You can pass parameters as part of the URL path. After the service URL, just specify method parameters in name-value pairs. Parameter names must be formed from method argument names by converting them from camelCase to names using all lower case and separated-by-dash. Here’s an example of calling one of the portal’s services:

http://localhost:8080/api/jsonws/dlapp/get-file-entries/repository-id/10172/folder-id/0
...

Passing Parameters as a URL Query

You can pass in parameters as request parameters. Parameter names are specified as is (e.g. camelCase) and are set equal to their argument values, like this:

http://localhost:8080/api/jsonws/dlapp/get-file-entries?repositoryId=10172&folderId=0
...

Sending NULL Values

To pass a null value for an argument, prefix the parameter name with a dash. Here’s an example:

.../dlsync/get-d-l-sync-update/company-id/10151/repository-id/10195/-last-access-date
...
ℹ️
Read more about Registering json web services