Skip to main content
Skip table of contents

Project Access Request API

Get All Site-wide Project Access Requests For The Logged-in User

This REST call is run automatically upon login, If you have been invited to join XNAT or join a project, you will be notified of any outstanding Project Access Requests awaiting your decision. This REST path only returns PARS for the logged-in user. There is no REST path that displays all open PARs for all users across all projects.

CODE
GET - /data/pars

Parameters:

format

Optional querystring parameter:

  • json (default)

  • html

  • xml

  • csv

Response:

CODE
{
  "ResultSet": {
    "Result": [
      {
        "firstname": "string",
        "par_id": "integer",
        "level": "string",
        "secondary_id": "string",
        "name": "string",
        "description": "string",
        "id": "string",
        "create_date": "timestamp",
        "login": "string",
        "proj_id": "string",
        "lastname": "string",
        "?column?": "string"
      }
    ],
    "totalRecords": "integer"
  }
}

In the response, the "firstname", "lastname", and "login" fields refer to the user who created the invitation. "level" refers to the project access group. "?column?" is used for the project investigator field.

Accept Or Decline Project Access Request

CODE
PUT - /data/pars/{PAR_ID}?{action}=true

Parameters:

{PAR_ID}

Required path parameter – must match the "par_id" specified in the above GET request

{action}

Required querystring parameter. A PAR action can be one of either:

  • accept

  • decline

Response: Returns an updated list of open PARs that have not been responded to.

List All Project Access Requests For A Project

This REST request will only succeed for a user with edit access to your project data

CODE
GET - /data/projects/{PROJECT_ID}/pars

Parameters:

{PROJECT_ID}

Required path parameter

format

Optional querystring parameter:

  • json (default)

  • html

  • xml

  • csv

Response:

CODE
{
  "ResultSet": {
    "Result": [
      {
        "approved": "boolean",
        "approval_date": "timestamp",
        "par_id": "integer",
        "level": "string",
        "secondary_id": "string",
        "create_date": "timestamp",
        "login": "string",
        "proj_id": "string",
        "email": "string"
      }
    ]
  }
}

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.