• FEATURES
  • PRICING
  • MARKETPLACE
  • CASE STUDIES
  • BLOG
  • SETTING UP - REST API for OS 1.2 and V2

    Hello –

    I’m trying to use the OPENSPECIMEN 1.2 REST API that I installed
    in a personal PC – One thing that I’m wondering is how to set the API to work
    with my local instance – meaning what are the steps I need in the installation process
    (before OS installation and post installation) – since I looked into the caTissue and
    it seem that it requires caTissue keychain files & downloading caCORE and other
    extra steps – is this the same for OS – do I need to install a cms in order to use
    the API ? whatever steps or guides of how to configure the API will be appreciated.

    Thanks

    -I’m setting a HTTP MIRTH channel and this is what I get when I POST the request

    #################################################################

    URL: http://bio.rush.edu:8081/openspecimen/rest/ng/authentication
    METHOD: POST

    [HEADERS]

    [PARAMETERS]

    [CONTENT]
    {“loginId”:“user@rush.edu”,“password”:“vvv???VVV”,“domainName”:“catissuecore”} <–? how do I register a DOMAIN_NAME for my local OS INSTANCE ?
    ##################################################################################
    and the response is !!
    ###################################################################################

    JBoss Web/2.1.3.GA - Error report

    HTTP Status 401 - You must supply valid credentials to access the caTissue Plus REST API


    type Status report

    message You must supply valid credentials to access the caTissue Plus REST API

    description This request requires HTTP authentication (You must supply valid credentials to access the caTissue Plus REST API).


    JBoss Web/2.1.3.GA

    Hi @Rolando_Ramirez,

    To use the REST APIs, the only thing required is the OpenSpecimen application should be up and running. No other setup is required for this. The keychain files were required by caCORE only, not required for accessing REST APIS.

    To access the REST APIs, you need to pass your OpenSpecimen credentials by setting them in request Authorization header. The username/password
    should be encoded in base 64 encoding scheme.

    The documentation is available on OpenSpecimen wiki at https://openspecimen.atlassian.net/wiki/x/C4CE.

    Also I have shared one sample java client program, which register a participant in OpenSpecimen using the REST API. Sample program can be downloaded here

    Please note that v1.2 doesn’t include all the REST API’s. In version v1.2, the REST APIs which are exposed are only related to the data entry i.e. Participant creation/registration, SpecimenCollectionGroup creation, Specimen creation/collection.

    The full set of REST APIs will be available in OS-2.0.

    ~Nitesh

    Thanks Nitesh,

    I got my HTTP request working using MIRTH. I’ll upgrade to Version 2 in order to get the full set of REST APIs.

    Thanks a lot.