Page tree

Versions Compared

Key

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

...

Note
titleNote

A valid CSRF token is required for all PUT, POST and DELETE API calls.


Get a listing of all projects

Returns a listing of all projects in your XNAT.

...

Code Block
[
    { 
        description: "string",
        ID: "string",
        name: "string",
        pi_firstname: "string"
        pi_lastname: "string",
        secondary_ID: "string",
        URI: "path"
    }
]

 

 

Create one or more projects

This POST form accepts an XML file specifying project parameters. See available project parameters.

...

HTTP Status CodeMessage
201

Project successfully created.

400

The submitted data was invalid.

401

Must be authenticated to access the XNAT REST API.

404

Not Found

500

An unexpected error occurred.

 

 

Get information on a specific project

Returns project metadata for a single project, specified by ID.

...

ParameterDescriptionParameter TypeData Type
idProject ID (value of xnat:projectData/ID)pathstring
formatOptional. Set the format of the response. If not specified, HTML for the project report page will be returned (and displayed if using a web browser)querystringstring: json, html, xml, csv

 

 

Update parameters for a specific project

Allows the user to edit project metadata by passing values through the querystring, or as XML data.

...

HTTP Status CodeMessage
200Project successfully updated.
400

The submitted data was invalid.

401Must be authenticated to access the XNAT REST API.
404Not found.
500An unexpected error occurred.

 


Delete a project

Note

This operation is permanent and cannot be undone.

...