Endpoints

All endpoints require a secure connection (HTTPS). If a plain HTTP connection is attempted an error status code 403 (forbidden) is returned.

Authentication must be provided as either HTTP Basic authentication or as Bearer authentication using an OAuth 2.0 access token. If authentication is missing an error status code 401 (unauthorized) is returned.

Possible error codes are:

  • 400 (bad request): If there is a problem with syntax of the request.
  • 401 (unauthorized): If authentication is missing or incorrect.
  • 403 (forbidden): If the user is not authorized to access the information, if the connection is not secure, or if the user is denied access for other reasons than authentication. 
  • 404 (not found): If no information with the given ID exists.
  • 500 (internal server error): In case of an unexpected problem on the server.

These endpoint are currently deployed to the test environment only. When they go live, test-archie.cochrane.org should be replaced by archie.cochrane.org.

Person

GET https://test-archie.cochrane.org/rest/people/{personId}

(requires authentication)

Returns information about a specific person.

MIME type: application/json

 

To get information about the authenticated user this variant can be used instead:

GET https://test-archie.cochrane.org/rest/people/me

Example:

GET https://test-archie.cochrane.org/rest/people/11143
Authorization: Bearer {OAuth access token} 

 
Response
{
  "personId": "11143",
  "link": "https://test-archie.cochrane.org/rest/people/11143",
  "user": {
    "userId": "08573771072139469457090803092242",
    "userName": "testuser",
    "link": "https://test-archie.cochrane.org/rest/users/08573771072139469457090803092242"
  },
  "active": true,
  "prefix": "",
  "firstName": "Test",
  "middleNames": "",
  "lastName": "User",
  "suffix": "User",
  "primaryEmail": "rmoustgaard@cochrane.org",
  "secondaryEmail": "",
  "mobilePhone": "",
  "skypeName": "",
  "website": "",
  "addresses": [
    {
      "contactAddress": true,
      "homeAddress": false,
      "confidential": false,
      "position": "Fictional test personage",
      "department": "",
      "organisation": "",
      "address1": "No change in this Address",
      "address2": "",
      "city": "Copenhagen",
      "zip": "",
      "region": "",
      "country": {
        "code": "DK",
        "name": "Denmark"
      },
      "primaryPhone": "",
      "secondaryPhone": "",
      "primaryFax": "",
      "secondaryFax": ""
    },
    {
      "contactAddress": false,
      "homeAddress": true,
      "confidential": false,
      "position": "",
      "department": "",
      "organisation": "",
      "address1": "Fictional home adress",
      "address2": "",
      "city": "",
      "zip": "",
      "region": "",
      "country": {
        "code": "DK",
        "name": "Denmark"
      },
      "primaryPhone": "",
      "secondaryPhone": "",
      "primaryFax": "",
      "secondaryFax": ""
    }
  ],
  "primaryGroup": {
    "groupId": "D37BDF5182E26AA2013C72096D0CE6B1",
    "name": "Informatics & Knowledge Management",
    "link": "https://test-archie.cochrane.org/rest/groups/D37BDF5182E26AA2013C72096D0CE6B1"
  },
  "groupRoles": [
    {
      "name": "Other",
      "active": true,
      "group": {
        "groupId": "D37BDF5182E26AA2013C72096D0CE6B1",
        "name": "Informatics & Knowledge Management",
        "link": "https://test-archie.cochrane.org/rest/groups/D37BDF5182E26AA2013C72096D0CE6B1"
      }
    }
  ],
  "documentRoles": [
    {
      "name": "Contact Person",
      "document": {
        "documentPK": "z1303121044130580060054900477264",
        "title": "Better Health for Citizen",
        "link": "https://test-archie.cochrane.org/rest/reviews/739713031210441336/metadata"
      },
      "group": {
        "groupId": "64816320785104718949090902132501",
        "name": "Test CRG",
        "link": "https://test-archie.cochrane.org/rest/groups/64816320785104718949090902132501"
      }
    }
  ]
}

User

GET https://test-archie.cochrane.org/rest/users/{userId}

(requires authentication)

Returns information about a specific user..

MIME type: application/json

 

To get information about the authenticated user this variant can be used instead:

GET https://test-archie.cochrane.org/rest/users/me

 

Example:

GET https://test-archie.cochrane.org/rest/users/08573771072139469457090803092242

Authorization: Bearer {OAuth access token} 

Reponse
{
  "userId": "08573771072139469457090803092242",
  "userName": "testuser",
  "firstName": "Test",
  "lastName": "User",
  "person": {
    "personId": "11143",
    "name": "Test User",
    "link": "https://test-archie.cochrane.org/rest/people/11143"
  }
}
  • No labels