Access Keys:
Skip to content (Access Key - 0)

Middleware REST specification

This page contains the REST specification of Middleware use cases. Please note the status if the web service is implemented or not, some are still under development.

Metadata Queries

Use Case: Get Bibliographic reference record by ID
URI: http://ibp.generationcp.org/middleware/bibref/{referenceId}
HTTP Method: GET
Version: 1.0
Date: Jan 20, 2012
Status: Under development
JSON Output:

{"bibref":
     {"bibrefId":"some-id", 
      "type":"some-type", 
      "publicationDate":"some-date", 
      "authors":"some-authors", 
      "editors":"some-editors",
      "title":"some-title",
      "series":"some-series",
      "volume":"some-volume",
      "issue":"some-issue",
      "publisher":"some-publisher",
      "publishingCity":"some-city",
      "publishingCountry":"some-country"}}

Use Case: Get Location by ID
URI: http://ibp.generationcp.org/middleware/location/{locationId}
HTTP Method: GET
Version: 1.0
Date: Jan 20, 2012
Status: Under development
JSON Output:

{"location":
     {"locationId":"some-id",
      "name":"some-name",
      "type":"some-type",
      "nameAbbreviation":"some-abbr",
      "country":"some-country"}}

Use Case: Get User Defined Field by ID
URI: http://ibp.generationcp.org/middleware/udfield/{udfieldId}
HTTP Method: GET
Version: 1.0
Date: Jan 20, 2012
Status: Under development
JSON Output:

{"udfield":
     {"udfieldId":"some-id",
      "code":"some-code",
      "name":"some-name",
      "description":"some-desc"}}

GMS Queries

Use Case: Get Method by Method ID
URI: http://ibp.generationcp.org/middleware/methods/{methodId}
HTTP Method: GET
Version: 1.0
Date: Jan 20, 2012
Status: Under development
JSON Output:

{"method":
     {"methodId":"some-id",
      "type":"some-type",
      "code":"some-code",
      "name":"some-name",
      "description":"some-desc",
      "numberOfProgenitors":"some-number",
      "numberOfFemaleParents":"some-number",
      "breedingSystem":"some-system"}}

Use Case: Get All Methods
URI: http://ibp.generationcp.org/middleware/methods/
HTTP Method: GET
Version: 1.0
Date: Jan 20, 2012
Status: Under development
JSON Output:

{"methods-results":
     {"count":"some-number",
      "methods":[
          {"methodId":"some-id",
           "type":"some-type",
           "code":"some-code",
           "name":"some-name",
           "description":"some-desc",
           "numberOfProgenitors":"some-number",
           "numberOfFemaleParents":"some-number",
           "breedingSystem":"some-system"},
          ...
          ...
          {"methodId":"some-id",
           "type":"some-type",
           "code":"some-code",
           "name":"some-name",
           "description":"some-desc",
           "numberOfProgenitors":"some-number",
           "numberOfFemaleParents":"some-number",
           "breedingSystem":"some-system"}]}}

Use Case: Get Attributes By GID
URI: http://ibp.generationcp.org/middleware/attributes/{GID}
HTTP Method: GET
Version: 1.0
Date: Jan 20, 2012
Status: Under development
JSON Output:

{"attribute-results":
     {"count":"some-number",
      "attributes":[
          {"attributeId":"some-id",
           "type":"some-type",
           "value":"some-value",
           "date":"some-date"},
           ...
           ...
          {"attributeId":"some-id",
           "type":"some-type",
           "value":"some-value",
           "date":"some-date"}]}}

Use Case: Get Names By GID
URI: http://ibp.generationcp.org/middleware/names/{GID}
HTTP Method: GET
Version: 1.0
Date: Jan 20, 2012
Status: Under development
JSON Output:

{"names-results":
     {"count":"some-number",
      "names":[
          {"nameId":"some-id",
           "type":"some-type",
           "status":"some-status",
           "value":"some-value",
           "date":"some-date"},
          ...
          ...
          {"nameId":"some-id",
           "type":"some-type",
           "status":"some-status",
           "value":"some-value",
           "date":"some-date"}]}}

Use Case: Get Name By name ID
URI: http://ibp.generationcp.org/middleware/name/{nameID}
HTTP Method: GET
Version: 1.0
Date: Jan 20, 2012
Status: Under development
JSON Output:

{"name":
     {"nameId":"some-id",
      "type":"some-type",
      "status":"some-status",
      "value":"some-value",
      "date":"some-date"}}

Use Case: Get Germplasm with Preferred Name and Abbreviation
URI: http://ibp.generationcp.org/middleware/germplasm/prefName/abbreviation/{GID}
HTTP Method: GET
Version: 1.0
Date: Jan 20, 2012
Status: Under development
JSON Output:

{"germplasm":
     {"gid":"some-id",
      "numberOfProgenitors":"some-number",
      "firstParent":"some-id",
      "secondParent":"some-id",
      "creationDate":"some-date",
      "creationMethod":"some-method",
      "location":"location",
      "prefName":
          {"nameId":"some-id",
           "type":"some-type",
           "status":"some-status",
           "value":"some-value",
           "date":"some-date"},
      "prefAbbreviation":"some-abbreviation"}}

Use Case: Get Germplasm with Preferred Name
URI: http://ibp.generationcp.org/middleware/germplasm/prefName/{GID}
HTTP Method: GET
Version: 1.0
Date: Jan 20, 2012
Status: Under development
JSON Output:

{"germplasm":
     {"gid":"some-id",
      "numberOfProgenitors":"some-number",
      "firstParent":"some-id",
      "secondParent":"some-id",
      "creationDate":"some-date",
      "creationMethod":"some-method",
      "location":"location",
      "prefName":
          {"nameId":"some-id",
           "type":"some-type",
           "status":"some-status",
           "value":"some-value",
           "date":"some-date"}}}

Use Case: Get Germplasm by GID
URI: http://ibp.generationcp.org/middleware/germplasm/{GID}
HTTP Method: GET
Version: 1.0
Date: Jan 20, 2012
Status: Under development
JSON Output:

{"germplasm":
     {"gid":"some-id",
      "numberOfProgenitors":"some-number",
      "firstParent":"some-id",
      "secondParent":"some-id",
      "creationDate":"some-date",
      "creationMethod":"some-method",
      "location":"location"}}

Use Case: Find Germplasm by Method Name
URI: http://ibp.generationcp.org/middleware/germplasms/bymethodname/{methodName}/{start}/{numberOfRows}
HTTP Method: GET
Version: 1.0
Date: Jan 20, 2012
Status: Under development
JSON Output:

{"germplasms-results":
     {"count":"some-number",
      "germplasms":[
          {"gid":"some-id",
           "numberOfProgenitors":"some-number",
           "firstParent":"some-id",
           "secondParent":"some-id",
           "creationDate":"some-date",
           "creationMethod":"some-method",
           "location":"location"},
           ...
           ...
          {"gid":"some-id",
           "numberOfProgenitors":"some-number",
           "firstParent":"some-id",
           "secondParent":"some-id",
           "creationDate":"some-date",
           "creationMethod":"some-method",
           "location":"location"}]}}

Use Case: Find Germplasm by Location Name
URI: http://ibp.generationcp.org/middleware/germplasms/bylocationname/{locationName}/{start}/{numberOfRows}
HTTP Method: GET
Version: 1.0
Date: Jan 20, 2012
Status: Under development
JSON Output:

{"germplasms-results":
     {"count":"some-number",
      "germplasms":[
          {"gid":"some-id",
           "numberOfProgenitors":"some-number",
           "firstParent":"some-id",
           "secondParent":"some-id",
           "creationDate":"some-date",
           "creationMethod":"some-method",
           "location":"location"},
           ...
           ...
          {"gid":"some-id",
           "numberOfProgenitors":"some-number",
           "firstParent":"some-id",
           "secondParent":"some-id",
           "creationDate":"some-date",
           "creationMethod":"some-method",
           "location":"location"}]}}

Use Case: Find Germplasm by Name
URI: http://ibp.generationcp.org/middleware/germplasms/byname/{name}/{start}/{numberOfRows}
HTTP Method: GET
Version: 1.0
Date: Jan 20, 2012
Status: Under development
JSON Output:

{"germplasms-results":
     {"count":"some-number",
      "germplasms":[
          {"gid":"some-id",
           "numberOfProgenitors":"some-number",
           "firstParent":"some-id",
           "secondParent":"some-id",
           "creationDate":"some-date",
           "creationMethod":"some-method",
           "location":"location"},
           ...
           ...
          {"gid":"some-id",
           "numberOfProgenitors":"some-number",
           "firstParent":"some-id",
           "secondParent":"some-id",
           "creationDate":"some-date",
           "creationMethod":"some-method",
           "location":"location"}]}}

Use Case: Get Progenitor by GID and progenitor number
URI: http://ibp.generationcp.org/middleware/germplasm/progenitor/{GID}/{progenitorNumber}
HTTP Method: GET
Version: 1.0
Date: Jan 28, 2012
Status: Under development
JSON Output:

{"germplasm":
     {"gid":"some-id",
      "numberOfProgenitors":"some-number",
      "firstParent":"some-id",
      "secondParent":"some-id",
      "creationDate":"some-date",
      "creationMethod":"some-method",
      "location":"location"}}

Use Case: Find Descendants
URI: http://ibp.generationcp.org/middleware/germplasm/descendants/{GID}/
HTTP Method: GET
Version: 1.0
Date: Jan 28, 2012
Status: Under development
JSON Output:

{"descendants-results":
   {"count":"some-number",
    "descendants":[
       {"descendant":
        "progenitorNumber":"some-number",
        "germplasm":
            {"gid":"some-id",
             "numberOfProgenitors":"some-number",
             "firstParent":"some-id",
             "secondParent":"some-id",
             "creationDate":"some-date",
             "creationMethod":"some-method",
             "location":"location"}},
         ...
         ...
         {"descendant":
        "progenitorNumber":"some-number",
        "germplasm":
            {"gid":"some-id",
             "numberOfProgenitors":"some-number",
             "firstParent":"some-id",
             "secondParent":"some-id",
             "creationDate":"some-date",
             "creationMethod":"some-method",
             "location":"location"}}]}}

Use Case: Generate Tree
URI: http://ibp.generationcp.org/middleware/germplasm/pedigreetree/{GID}/
HTTP Method: GET
Version: 1.0
Date: Jan 28, 2012
Status: Under development
JSON Output:

{"pedigree-tree":
   {"root":
      {"germplasm":
         {"gid":"some-id",
          "numberOfProgenitors":"some-number",
          "firstParent":"some-id",
          "secondParent":"some-id",
          "creationDate":"some-date",
          "creationMethod":"some-method",
          "location":"location",
          "prefName":
             {"nameId":"some-id",
              "type":"some-type",
              "status":"some-status",
              "value":"some-value",
              "date":"some-date"}},
      {"parents":[
         {"node":
            {"germplasm":
               {"gid":"some-id",
                "numberOfProgenitors":"some-number",
                "firstParent":"some-id",
                "secondParent":"some-id",
                "creationDate":"some-date",
                "creationMethod":"some-method",
                "location":"location",
                "prefName":
                   {"nameId":"some-id",
                    "type":"some-type",
                    "status":"some-status",
                    "value":"some-value",
                    "date":"some-date"}}},
             {"parents":[
                 ...
                 ...]}},
         ...
         ...
         {"node":
            {"germplasm":
               {"gid":"some-id",
                "numberOfProgenitors":"some-number",
                "firstParent":"some-id",
                "secondParent":"some-id",
                "creationDate":"some-date",
                "creationMethod":"some-method",
                "location":"location",
                "prefName":
                   {"nameId":"some-id",
                    "type":"some-type",
                    "status":"some-status",
                    "value":"some-value",
                    "date":"some-date"}}}]}}}
Adaptavist Theme Builder (3.3.3-conf210) Powered by Atlassian Confluence 2.10.3, the Enterprise Wiki.
Free theme builder license