Tracker API Documentation

General

  • All requests are GET requests unless otherwise stated.
  • All requests, except /linesummary/:centre/:colonyId, can be paginated using the query parameters start and resultsize
    • start – offset
    • resultsize – max number of results to retrieve
    • Both parameters need to be > 0 or are otherwise ignored
    • By default, pagination is defaulted to offset 0 and resultsize 100000

Requests

/centre/zip?centre=:shortName

Returns a list of ZIP files in summary view

  • Takes additional parameters as query string:
    • centre – The centre short name, e.g Tcp
    • updatedSinceDate – The day when file has been crawled. The endpoint point will fetch all files with a date >= updatedSinceDate. The default value is null. If this value is passed unless resultsize is selected all the values would be returned. If its null default pagination would be 100
  • Example: https://api.mousephenotype.org/tracker/centre/zip?centre=Kmpc&start=0&resultsize=50

/centre/zip/issues?centre=:shortName

Returns a list of ZIP files with failures/warnings in summary view for greater than or equal to given updatedSinceDate of the file which is the date when file has been crawled( Pagination is not effective for this endpoint as required data is controlled by date)

  • Takes additional parameters as query string:
    • centre – The centre short name, e.g Tcp
    • updatedSinceDate – The day when file has been crawled. The endpoint point will fetch all files with a date >= updatedSinceDate. The default value is one month before current date .
    • ignoreWarnings – If set as true it will exclude zip files that only contain xml files with validation warnings.
    • validationIssues – If set as true will return the zip files that contain xml files with validation issues.
    • xmlErrors – If set as true will return the zip files that contain xml files with xml errors.
    • zipErrors – If set as true will return the zip files having zip errors.
  • Filtering will be performed if any of the validationIssuesxmlErrorsignoreWarnings orzipErrors flags is set as true. If none of them is passed as an argument it will return everything. false values will not effect the result.
  • Example: https://api.mousephenotype.org/tracker/centre/zip/issues?centre=Kmpc&updatedSinceDate=2019-10-01&ignoreWarnings=true

/centre/xml?centre=:shortName

Returns a list of XML files in summary view


/centre/xml/issues?centre=:shortName

Returns a list of XMLs with failures/warnings in summary view for greater than or equal to given updatedSinceDate of the file which is the date when file has been crawled (Pagination is not effective for this endpoint as required data is controlled by date)

  • Takes additional parameters as query string:
    • centre – The centre short name, e.g Tcp
    • updatedSinceDate – The day when file has been crawled. The endpoint point will fetch all files with a date >= updatedSinceDate. The default value is one month before current date .
    • ignoreWarnings – If set as true it will exclude zip files that only contain xml files with validation warnings.
    • validationIssues – If set as true will return the zip files that contain xml files with validation issues.
    • xmlErrors – If set as true will return the zip files that contain xml files with xml errors.
  • Filtering will be performed if any of the validationIssuesxmlErrors or ignoreWarnings flags is set as true. If none of them is passed as an argument it will return everything. false values will not effect the result.
  • Example: https://api.mousephenotype.org/tracker/centre/xml/issues?centre=Kmpc&updatedSinceDate=2019-10-01&ignoreWarnings=true

/xml/:idOrFilename

Returns all instances of an XMl file with the given filename or one result with the given id – :idOrFilename– The id or filename of the XML file


/zip/:zipIdOrFilename

Returns all XML files within the given ZIP file in summary view – :zipIdOrFilename – The id or filename of a ZIP file


/issues/zip/:zipIdOrFilename

Returns all XML files with failures and warnings within the given ZIP file in summary view – :zipIdOrFilename – The id or filename of a ZIP file

  • Takes additional parameters as query string:
    • ignoreWarnings – If set as true it will exclude zip files that only contain xml files with validation warnings.
    • validationIssues – If set as true will return the zip files that contain xml files with validation issues.
    • xmlErrors – If set as true will return the zip files that contain xml files with xml errors.
  • Filtering will be performed if any of the validationIssuesxmlErrors or ignoreWarnings flags is set as true. If none of them is passed as an argument it will return everything. false values will not effect the result.
  • Example: https://api.mousephenotype.org/tracker/issues/zip/Kmpc.2019-06-21.1.impc.zip?validationIssues=true

/zip/:zipIdOrFilename/:xmlIdOrFilename

Returns the contents of an XML file with the given id or filename – :zipIdOrFilename – The id or filename of a ZIP file – :xmlIdOrFilename – The id or filename of an XML file contained in the ZIP file


/linesummary/:centre/:colonyId

Returns all specimens and line procedures for a given colony for a specific centre
– :centre – Phenotyping centre ILAR code – :colonyId – The colony for which to retrieve data for


/trackerexperiment/:id

Getter for experiment procedures in the interface. Returns a single instance of the identified object.
– :id – The identifier for the object, the unique id for the object to return


/trackerexperiment/multiple(POST)

Returns list of experimen procedures for multiple identifiers. Provide a list of IDs in JSON format – e.g. [ 2550682, 2550681, 2550680,] in the body of the call. With content type of the request as application/json. Note that there is a maximum of 10,000 IDs that can be submitted per request.


/trackerspecimen/:id

Getter for experiment procedures in the interface. Returns a single instance of the identified object.
– :id – The identifier for the object, the unique id for the object to return


/trackerspecimen/multiple(POST)

Returns list of experimen procedures for multiple identifiers. Provide a list of IDs in JSON format – e.g. [ 2550682, 2550681, 2550680,] in the body of the call. With content type of the request as application/json. Note that there is a maximum of 10,000 IDs that can be submitted per request.


/item/:itemType/:id

Getter for procedures in the interface. Returns a single instance of the identified object.
– :itemType – An object type from: experimentprocedures, specimens and lineprocedures. – :id – The identifier for the object, the unique id for the object to return


/item/:itemType/multiple(POST)

Returns list of procedures for multiple identifiers. Provide the proceduretype in the URL, and a list of IDs in JSON format – e.g. [ 2550682, 2550681, 2550680,] in the body of the call. With content type of the request as application/json. Note that there is a maximum of 10,000 IDs that can be submitted per request.


/search/:itemType

Returns data for given :itemType and given parameters.

For pagination both :start and :resultsize parameters should be passed.

  • :itemType – An object type from: experimentprocedures, specimens and lineprocedures.
  • Takes additional parameters as query string:
    • :showdetails – if passed as true will return the object’s content in place of identifier. However, this enforces the use of pagination, as outlined at the top of this document. If the pagination fields are omitted default values of 0 for :start and 100 for :resultsize are used.

lineprocedures:

  • Takes parameters as query string:
    • :centre – The centre short name, e.g Tcp
    • :colonyId – The colony id for which to retrieve line procedures for
    • :createdDateFrom – Date when the file crawled.
    • :createdDateTo – Date when the file crawled.
    • :status – A valid status as defined by /pcv/meta/status

specimens:

  • Takes parameters as query string:
    • centre – The centre short name, e.g Tcp (Mandatory)
  • Additional parameters are :
    • createdDateFrom – Date when the file crawled.
    • createdDateTo – Date when the file crawled.
    • status – A valid status as defined by /pcv/meta/status
    • specimenId – The specimen for which to retrieve data for
    • pipeline – The pipeline mapped with procedure

experimentprocedures:

  • Takes parameters as query string:
    • centre – The centre short name, e.g Tcp (Mandatory)
  • Additional parameters are :
    • createdDateFrom – Date when the file crawled.
    • createdDateTo – Date when the file crawled.
    • status – A valid status as defined by /pcv/meta/status
    • specimenId – The specimen for which to retrieve data for
    • pipeline – The pipeline mapped with the procedure
    • procedure – The procedure key

Note: createdDateFrom , createdDateTo and start, resultsize should be passed together otherwise they will not be added as criteria


/activeanimal/:colony/:procedure

result to show which animals in provided colony have an active experiment or status code for provided procedure
– :colony – The colony name- :procedure– The identifier for the object, the unique id for the object to return


/xml/meta/status

Returns a lookup of the xml statuses:

Status
pending
running
done
cancelled
failed

/pcv/meta/status

Returns a lookup of the pcv statuses:

Status
failed
valid
active
pending
duplicate
status_coded
failed_overviews

/xml/meta/phase

Returns a lookup of the xml phases:

Phase
download
zip_name
zip_md5
unzip
xml_name
xsd
upload
data
context
overview
qc

Data structures

Datatype : logs[]

"logs": [
            {
                "line": 3,
                "column": 27,
                "message": "cvc-complex-type.2.4.b: The content of element 'centre' is not complete. One of '{\"https://www.mousephenotype.org/dcc/exportlibrary/datastructure/core/specimen\":mouse, \"https://www.mousephenotype.org/dcc/exportlibrary/datastructure/core/specimen\":embryo}' is expected.",
                "fatality": "Error"
            }
        ]

Datatype : experimentProcedures[]

"experimentProcedures": [
           18159310,
           18159309,
           18159308,
           18159307,
           18159306,
           18159305,
           18159304
]

Datatype : specimens[]

"specimens": [
            2428822,
            2428821,
            2428820,
            2428819,
            2428818,
            2428817,
            2428816
]

Datatype : lineProcedures[]

"lineProcedures":  [
            119679,
            119678,
            119677,
            119676,
            119675,
            119674,
            119673,
            119672,
            119671,
            119670,
            119669,
            119668,
            119667
        ]

Datatype : validationLogs[]

  • Example Link: No real time case present
  • Example Structure :
"validationLogs": [
                    {
                        "message": "'Message for failure",
                        "parameterType": "Parameter Type", 
                        "parameterKey": "Parameter Key",
                        "fatality": "Warning/Error"
                    },
]

Endpoint :/trackerexperiment/:id

{
    "id": 2550682,
    "xmlId": 265805,
    "experimentName": "141357065",
    "pipeline": "MGP_001",
    "procedure": "IMPC_BWT_001",
    "specimen": "1340291",
    "phenotypingCentre": "WTSI",
    "sequenceId": "10",
    "statusId": 1,
    "status": "valid",
    "ageAtExperiment": "15.86 weeks",
    "created": 1442940122,
    "createdDate": "2015-09-22T16:42:02",
    "logs": [],
    "dateOfExperiment": "2013-03-13T00:00:00"
}

Endpoint : /item/:itemType/:id itemType – experimentprocedures

{
    "id": 4016251,
    "specimen": "CR10639-191",
    "isBaseline": true,
    "zygosity": "WILD_TYPE",
    "sex": "MALE",
    "type": "mouse",
    "phenotypingCentre": "UCD",
    "pipeline": "UCD_001",
    "colony": "CR10639",
    "dateOfBirth": "2020-07-06T23:00:00",
    "xmlId": 777058,
    "statusId": 2,
    "status": "active",
    "created": 1597435098000,
    "createdDate": "2020-08-14T19:58:18",
    "strain": "C57BL/6NCrl",
    "project": "DTCC",
    "logs": []
}

Endpoint : /trackerspecimen/:id

[
    {
        "id": 18085293,
        "xmlId": 784232,
        "experimentName": "XRY_BL1601-407_2013-02-15",
        "pipeline": "UCD_001",
        "procedure": "IMPC_XRY_001",
        "specimen": "BL1601-407",
        "phenotypingCentre": "UCD",
        "sequenceId": null,
        "statusId": 2,
        "status": "active",
        "ageAtExperiment": "14.14 weeks",
        "created": 1599938892,
        "createdDate": "2020-09-12T20:28:12",
        "logs": [],
        "dateOfExperiment": "2013-02-15T00:00:00"
    },
    {
        "id": 18017521,
        "xmlId": 782865,
        "experimentName": "EYE_BL1601-407_2013-02-22",
        "pipeline": "UCD_001",
        "procedure": "IMPC_EYE_002",
        "specimen": "BL1601-407",
        "phenotypingCentre": "UCD",
        "sequenceId": null,
        "statusId": 2,
        "status": "active",
        "ageAtExperiment": "15.14 weeks",
        "created": 1599736394,
        "createdDate": "2020-09-10T12:13:14",
        "logs": [],
        "dateOfExperiment": "2013-02-22T00:00:00"
    }
]

Endpoint : /item/:itemType/:id itemType – specimens

{
    "id": 4016251,
    "specimen": "CR10639-191",
    "isBaseline": true,
    "zygosity": "WILD_TYPE",
    "sex": "MALE",
    "type": "mouse",
    "phenotypingCentre": "UCD",
    "pipeline": "UCD_001",
    "colony": "CR10639",
    "dateOfBirth": "2020-07-06T23:00:00",
    "xmlId": 777058,
    "statusId": 2,
    "status": "active",
    "created": 1597435098000,
    "createdDate": "2020-08-14T19:58:18",
    "strain": "C57BL/6NCrl",
    "project": "DTCC",
    "logs": []
}

Endpoint : /activeanimal/:colony/:procedure:

[
        {
        "id": 598832760,
        "specimenId": "AEKU_92_910592",
        "gender": "MALE",
        "status": "active",
        "zygosity": "HOMOZYGOUS"
    },
    {
        "id": 598832764,
        "specimenId": "AEKU_98_910698",
        "gender": "FEMALE",
        "status": "active",
        "zygosity": "HOMOZYGOUS"
    }
]

---