Versions Compared

Key

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

http[data-colorid=vbujslgfun]{color:#4488aa} html[data-color-mode=dark] [data-colorid=vbujslgfun]{color:#5599bb}[data-colorid=u3o3yajhhj]{color:#4488aa} html[data-color-mode=dark] [data-colorid=u3o3yajhhj]{color:#5599bb}[data-colorid=jl3infifm7]{color:#ce7b00} html[data-color-mode=dark] [data-colorid=jl3infifm7]{color:#ffac31}[data-colorid=purkpufgjj]{color:#ce7b00} html[data-color-mode=dark] [data-colorid=purkpufgjj]{color:#ffac31}[data-colorid=a4es9fxnx6]{color:#4488aa} html[data-color-mode=dark] [data-colorid=a4es9fxnx6]{color:#5599bb}[data-colorid=l3fpjfq924]{color:#4488aa} html[data-color-mode=dark] [data-colorid=l3fpjfq924]{color:#5599bb}[data-colorid=wjtnaw6ru1]{color:#4488aa} html[data-color-mode=dark] [data-colorid=wjtnaw6ru1]{color:#5599bb}[data-colorid=hcky4csyg7]{color:#4488aa} html[data-color-mode=dark] [data-colorid=hcky4csyg7]{color:#5599bb}[data-colorid=waxgc0gp6p]{color:#ce7b00} html[data-color-mode=dark] [data-colorid=waxgc0gp6p]{color:#ffac31}[data-colorid=pwl1k9cb5n]{color:#4488aa} html[data-color-mode=dark] [data-colorid=pwl1k9cb5n]{color:#5599bb}[data-colorid=vvuyqxsxw4]{color:#ce7b00} html[data-color-mode=dark] [data-colorid=vvuyqxsxw4]{color:#ffac31}[data-colorid=f714xwguap]{color:#ce7b00} html[data-color-mode=dark] [data-colorid=f714xwguap]{color:#ffac31}[data-colorid=u50n7abww7]{color:#ce7b00} html[data-color-mode=dark] [data-colorid=u50n7abww7]{color:#ffac31}[data-colorid=aluol5cxdl]{color:#ce7b00} html[data-color-mode=dark] [data-colorid=aluol5cxdl]{color:#ffac31}[data-colorid=xml08jg5sd]{color:#4488aa} html[data-color-mode=dark] [data-colorid=xml08jg5sd]{color:#5599bb}[data-colorid=w4wxwi7loi]{color:#ce7b00} html[data-color-mode=dark] [data-colorid=w4wxwi7loi]{color:#ffac31}[data-colorid=swua2lwg2i]{color:#4488aa} html[data-color-mode=dark] [data-colorid=swua2lwg2i]{color:#5599bb}[data-colorid=l3l0ns796x]{color:#4488aa} html[data-color-mode=dark] [data-colorid=l3l0ns796x]{color:#5599bb}[data-colorid=nwrpkbuih3]{color:#ce7b00} html[data-color-mode=dark] [data-colorid=nwrpkbuih3]{color:#ffac31}[data-colorid=dzd7qxqul8]{color:#777777} html[data-color-mode=dark] [data-colorid=dzd7qxqul8]{color:#888888}[data-colorid=h8zg68u0pi]{color:#770088} html[data-color-mode=dark] [data-colorid=h8zg68u0pi]{color:#ee77ff}[data-colorid=mzm8gg8vah]{color:#4488aa} html[data-color-mode=dark] [data-colorid=mzm8gg8vah]{color:#5599bb}[data-colorid=cb3rx4fl4w]{color:#ce7b00} html[data-color-mode=dark] [data-colorid=cb3rx4fl4w]{color:#ffac31}[data-colorid=nzgd72vhxu]{color:#4488aa} html[data-color-mode=dark] [data-colorid=nzgd72vhxu]{color:#5599bb}[data-colorid=ngqaztm4nj]{color:#ce7b00} html[data-color-mode=dark] [data-colorid=ngqaztm4nj]{color:#ffac31}catissuecores]:<host>:<port>/openspecimen/rest/ng/sites/{siteIdid}

Use this resource to update the site in the site. Use HTTP PUT method to call this API by passing the below details in JSON format.

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

Activity status of the site, permissible values are
Parameter
Details
siteIdisSite Id of the site
namename Name of the physical location.
instituteNameName of the institute which site is belongs to
coordinatorCollectioncoordinators

Collection of user login names. Login Name through which user can login to catissue application,should be unique in authentication domainsobject. User Info contains Login Name and Domain Name

typeType

Function of

site.This attribute is should not be blank.
activityStatus

the site. It could be collection, storing, experimentation or it could be unspecified

{ collection site,repository,laboratory,not specified }

activityStatus

Defines the status of a site record

{active, closed, pending, disabled}

streetName of street to which site belongs.
cityCity of which the site belongs.
stateState of which the site belongs, By default it will be blank.
countryCountry of which the site belongs.
zipCodeZip Code of location which the site belongs.
faxNumber Fax number of the site, By default it will be blank.
phoneNumber Phone number of the site, By default it will be blank.

 

addressAddress of the site


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

Use this URL to update site in caTissue open specimen application.

Result:

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

Below is the example of the update site:

URLcatissuecore

http://<host>:<port>/openspecimen/rest/ng/sites/

{siteId}

4

MethodPUT
Requestapplication/json
json

{
"name" : "Pune1010",

"coordinatorCollection" : ["super@super.com","admin@admin.com"],

"type" : "Collection Site",

"activityStatus" : "Active",

"street" : "SB Road",

"city" : "Pune",

"state" : "MH",

"country" : "India" ,

"zipCode" : "412312",

"faxNumber" : "123321",

"phoneNumber" : "213434324"
}

Response

{
name"Pune1010"
coordinatorCollection: [2]
siteId48
type"Collection Site"
activityStatus"Active"
street"SB Road"
city"Pune"
state"MH"
country"India"
zipCode"412312"
faxNumber"123321"
phoneNumber"213434324"
}

...

Code Block
languagejs
themeEclipse
linenumberstrue
{
    "id": "4",
    "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 updated successfully
400All requestsInvalid parameters, e.g  duplicate Site Namesite name, blank Site Name site name etc
401All requestsAuthorization failed, User user doesn’t have Authority
404All requestsSite not found, Site with given details not present in the system
500All requestsInternal server error, Encountered server error while performing operations