Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

http[data-colorid=xzt8cuhw1n]{color:#4488aa} html[data-color-mode=dark] [data-colorid=xzt8cuhw1n]{color:#5599bb}[data-colorid=d291tsjza0]{color:#4488aa} html[data-color-mode=dark] [data-colorid=d291tsjza0]{color:#5599bb}[data-colorid=jmgooej7ow]{color:#ce7b00} html[data-color-mode=dark] [data-colorid=jmgooej7ow]{color:#ffac31}[data-colorid=fmecyunuew]{color:#ce7b00} html[data-color-mode=dark] [data-colorid=fmecyunuew]{color:#ffac31}[data-colorid=niut4ihu3k]{color:#ce7b00} html[data-color-mode=dark] [data-colorid=niut4ihu3k]{color:#ffac31}[data-colorid=afzmtdz6ge]{color:#4488aa} html[data-color-mode=dark] [data-colorid=afzmtdz6ge]{color:#5599bb}[data-colorid=llf0xwwjen]{color:#ce7b00} html[data-color-mode=dark] [data-colorid=llf0xwwjen]{color:#ffac31}[data-colorid=wju5u6rpfu]{color:#ce7b00} html[data-color-mode=dark] [data-colorid=wju5u6rpfu]{color:#ffac31}[data-colorid=fmm87ho4hp]{color:#4488aa} html[data-color-mode=dark] [data-colorid=fmm87ho4hp]{color:#5599bb}[data-colorid=zwc7ymqqpo]{color:#4488aa} html[data-color-mode=dark] [data-colorid=zwc7ymqqpo]{color:#5599bb}[data-colorid=hv753ovz4j]{color:#ce7b00} html[data-color-mode=dark] [data-colorid=hv753ovz4j]{color:#ffac31}[data-colorid=o62xdy3uf8]{color:#ce7b00} html[data-color-mode=dark] [data-colorid=o62xdy3uf8]{color:#ffac31}[data-colorid=ycuw9qp9l0]{color:#4488aa} html[data-color-mode=dark] [data-colorid=ycuw9qp9l0]{color:#5599bb}[data-colorid=wfqg860fw6]{color:#4488aa} html[data-color-mode=dark] [data-colorid=wfqg860fw6]{color:#5599bb}[data-colorid=hi6lz4040a]{color:#ce7b00} html[data-color-mode=dark] [data-colorid=hi6lz4040a]{color:#ffac31}[data-colorid=p4w3m6p181]{color:#777777} html[data-color-mode=dark] [data-colorid=p4w3m6p181]{color:#888888}[data-colorid=shzv8dx8pl]{color:#ce7b00} html[data-color-mode=dark] [data-colorid=shzv8dx8pl]{color:#ffac31}[data-colorid=s6ze3y4lzh]{color:#ce7b00} html[data-color-mode=dark] [data-colorid=s6ze3y4lzh]{color:#ffac31}[data-colorid=dqhlqoryyl]{color:#4488aa} html[data-color-mode=dark] [data-colorid=dqhlqoryyl]{color:#5599bb}[data-colorid=rleridn4wx]{color:#4488aa} html[data-color-mode=dark] [data-colorid=rleridn4wx]{color:#5599bb}[data-colorid=c0axbphr86]{color:#4488aa} html[data-color-mode=dark] [data-colorid=c0axbphr86]{color:#5599bb}[data-colorid=fn7uzwn4oi]{color:#ce7b00} html[data-color-mode=dark] [data-colorid=fn7uzwn4oi]{color:#ffac31}[data-colorid=kqt7t078lb]{color:#4488aa} html[data-color-mode=dark] [data-colorid=kqt7t078lb]{color:#5599bb}[data-colorid=mjp2nx7kah]{color:#777777} html[data-color-mode=dark] [data-colorid=mjp2nx7kah]{color:#888888}[data-colorid=wp19gvkrwm]{color:#4488aa} html[data-color-mode=dark] [data-colorid=wp19gvkrwm]{color:#5599bb}catissuecores]:<host>:<port>/openspecimen/rest/ng/sites

Use this resource to create new Site site in the caTissue applicationopenSpecimen application. Use HTTP POST method to call this API by passing the below details in JSONformatJSON format.

Below are the attributes which need to be sent in the request body:

Name of the state to which the site belongs
Parameter
Details
namename Name of the physical location.
instituteNameName of the institute which site is belongs to
coordinatorCollectioncoordinators

Collection of user login namesobject. User Info contains Login Name through which user can login to catissue applicationName and Domain Name

type

Type Function of the site. Permissible values are{ It could be collection, storing, experimentation or it could be unspecified

{ collection site,repository,laboratory,not specified }

activityStatus

Activity status of Defines the site, permissible values arestatus of a site record

{active, closed, pending, disabled}

streetaddressName Address of street to which the site belongs.cityName of city to which the site belongs.state [optional]

 

...

 

http[s]:<host>:<port>/catissuecoreopenspecimen/rest/ng/sites

Use this URL to add site in caTissue openSpecimen application. 

Result:

The response of this request will contains the details of the created site.

...

 

{

name"Pune"
coordinatorCollection[2]
0:  "john@bjc.com" 
1:  "site_admin@washu.com"
siteId48
type"Collection Site"
activityStatus"Active"
street"SB Road"
city"Pune"
state"Maharashtra"
country"India"
zipCode"412312"
faxNumber"123321"
phoneNumber"213434324"
URLhttp://<host>:<port>/catissuecoreopenspecimen/rest/ng/sites
MethodPOST
Requestapplication/json
json
Code Block
languagejs
{

"name" : "Pune",

"coordinatorCollection" : ["john@bjc.com","site_admin@washu.com"],

"type" : "Collection Site",

"activityStatus" : "Active",

"street" : "SB Road",

"city" : "Pune",

"state" : "Maharashtra",

"country" : "India" ,

"zipCode" : "412312",

"faxNumber" : "123321",

"phoneNumber" : "213434324"

}

Response

themeEclipse
linenumberstrue
{
    "name": "Arkansas Hospital",
    "instituteName": "A1 - For Demo Users",
    "type": "Collection Site",
    "activityStatus": "Active",
    "coordinators":
    [
        {
            "loginName": "aalfortish",
            "domain": "openspecimen"
        },
        {
            "loginName": "vinod",
            "domain": "openspecimen"
        }
    ],
    "address": "Arkansas"
}

Response

Code Block
languagejs
themeEclipse
linenumberstrue
{
    "id": 4,
    "name": "Arkansas Hospital",
    "instituteName": "A1 - For Demo Users",
    "type": "Collection Site",
    "activityStatus": "Active",
    "cpCount": 0,
    "coordinators":
    [
        {
            "id": 107,
            "firstName": "Alexandra",
            "lastName": "Alfortish",
            "loginName": "aalfortish",
            "domain": "openspecimen",
            "emailAddress": "aalfortish@lcrc.info",
            "admin": false,
            "cpCount": 0,
            "creationDate": 1438021800000
        },
        {
            "id": 14,
            "firstName": "Vinod",
            "lastName": "Gaikwad",
            "loginName": "vinod",
            "domain": "openspecimen",
            "emailAddress": "vinod.gaikwad@domain.com",
            "admin": false,
            "cpCount": 0,
            "creationDate": null
        }
    ],
    "address": "Arkansas",
}

 

Error Cases :

code
Applies to
Status Message
200All resourcesSite has been created successfully
400All requestsInvalid parameters, e.g  duplicate Site Name, blank Site Name, blank Site Type etc
401All requestsAuthorization failed, User user doesn't have Authority
500All requestsInternal server error, Encountered server error while performing operations