Extensive JSON APIs allow you to interact with the data in your GGCE instance.
The API endpoints ensure that the the business logic is properly applied and followed.
Access tokens
All endpoints require a valid access token , and we will get to that in the next section .
The HTTP header Authorization: Bearer <access token>
must be present in every API request.
Unauthenticated requests and requests with an invalid access token will result in 401 Unauthorized HTTP error code.
403 Forbidden signifies that the user does not have permissions to access the operation or the data.
The API responds with data in JSON format, and for requests that require a body, expects the body to be valid JSON.
Data types
The API uses a data transfer object (DTO type) to represent a record in the system. The DTO is used to update the record. When a DTO references another object (e.g. the accession of an inventory), it will use only the basic information (Info type). This is a shorter, compact representation of the object that includes the key information, the ID and versioning information only. A DTO does not include lists of related objects (e.g. accession's inventory records). Instead, a special endpoint is sometimes available to fetch an object with detailed information (Detail type).
A DTO never includes lists of related (child) objects.
A DTO always references objects by their Info representation.
An Info type never makes use of DTO types.
Y
and N
values are now booleans true
and false
.
The following are examples of DTO , Info and Detail types used by Accession endpoints.
AccessionDTO AccessionInfo AccessionDetail The DTO carries information about an object. It never includes lists of related (child) objects, and always references objects by their Info representation.
AccessionDTO
looks like this:
id ownedBy ownedDate createdBy createdDate modifiedBy modifiedDate required
string <date-time> (Last modified date)
Maintained by the server, original value must be included in all update and delete operations.
site required
accessionNumber string [ 0 .. 128 ] characters
preferredName mlsStatus string [ 0 .. 30 ] characters
accessionNumberPart1 required
string [ 0 .. 50 ] characters (^$)|(^\S+(?:\s\S+)*$)
accessionNumberPart2 accessionNumberPart3 string [ 0 .. 50 ] characters
backupLocation1Site backupLocation2Site doi string [ 0 .. 20 ] characters
improvementStatusCode initialReceivedDate initialReceivedDateCode initialReceivedFormCode isBackedUp isCore isWebVisible lifeFormCode note reproductiveUniformityCode statusCode curationTypeCode taxonomySpecies required
object (TaxonomySpeciesInfo)
exploration collectionCode
Copy
Expand all Collapse all { "id" : 0 ,
"ownedBy" : "string" ,
"ownedDate" : "2019-08-24T14:15:22Z" ,
"createdBy" : "string" ,
"createdDate" : "2019-08-24T14:15:22Z" ,
"modifiedBy" : "string" ,
"modifiedDate" : "2019-08-24T14:15:22Z" ,
"site" :
{ "id" : 0 ,
"siteShortName" : "string" ,
"siteLongName" : "string" ,
"faoInstituteNumber" : "string"
} , "accessionNumber" : "string" ,
"preferredName" : "string" ,
"mlsStatus" : "string" ,
"accessionNumberPart1" : "string" ,
"accessionNumberPart2" : 0 ,
"accessionNumberPart3" : "string" ,
"backupLocation1Site" :
{ "id" : 0 ,
"siteShortName" : "string" ,
"siteLongName" : "string" ,
"faoInstituteNumber" : "string"
} , "backupLocation2Site" :
{ "id" : 0 ,
"siteShortName" : "string" ,
"siteLongName" : "string" ,
"faoInstituteNumber" : "string"
} , "doi" : "string" ,
"improvementStatusCode" : "string" ,
"initialReceivedDate" : "2019-08-24T14:15:22Z" ,
"initialReceivedDateCode" : "string" ,
"initialReceivedFormCode" : "string" ,
"isBackedUp" : true ,
"isCore" : true ,
"isWebVisible" : true ,
"lifeFormCode" : "string" ,
"note" : "string" ,
"reproductiveUniformityCode" : "string" ,
"statusCode" : "string" ,
"curationTypeCode" : "string" ,
"taxonomySpecies" :
{ "id" : 0 ,
"name" : "string" ,
"nameAuthority" : "string" ,
"hybridCode" : "string" ,
"genusName" : "string" ,
"isSpecificHybrid" : true ,
"speciesName" : "string" ,
"speciesAuthority" : "string" ,
"isSubspecificHybrid" : true ,
"subspeciesName" : "string" ,
"varietyName" : "string" ,
"subvarietyName" : "string" ,
"formaName" : "string" ,
"formaRankType" : "string" ,
"isCurrent" : true
} , "exploration" :
{ "id" : 0 ,
"explorationNumber" : "string" ,
"title" : "string" ,
"beganDate" : "2019-08-24T14:15:22Z" ,
"finishedDate" : "2019-08-24T14:15:22Z" ,
"fiscalYear" : 0
} , "collectionCode" : "string"
}
The Info carries the most important information about an object.
AccessionInfo
includes only the identifying information of an accession, and is always kept as brief as possible.
id accessionNumber accessionNumberPart1 accessionNumberPart2 accessionNumberPart3 doi taxonomySpecies object (TaxonomySpeciesInfo)
site improvementStatusCode curationTypeCode preferredName statusCode
Copy
Expand all Collapse all { "id" : 0 ,
"accessionNumber" : "string" ,
"accessionNumberPart1" : "string" ,
"accessionNumberPart2" : 0 ,
"accessionNumberPart3" : "string" ,
"doi" : "string" ,
"taxonomySpecies" :
{ "id" : 0 ,
"name" : "string" ,
"nameAuthority" : "string" ,
"hybridCode" : "string" ,
"genusName" : "string" ,
"isSpecificHybrid" : true ,
"speciesName" : "string" ,
"speciesAuthority" : "string" ,
"isSubspecificHybrid" : true ,
"subspeciesName" : "string" ,
"varietyName" : "string" ,
"subvarietyName" : "string" ,
"formaName" : "string" ,
"formaRankType" : "string" ,
"isCurrent" : true
} , "site" :
{ "id" : 0 ,
"siteShortName" : "string" ,
"siteLongName" : "string" ,
"faoInstituteNumber" : "string"
} , "improvementStatusCode" : "string" ,
"curationTypeCode" : "string" ,
"preferredName" : "string" ,
"statusCode" : "string"
}
The Detail type is similar to the DTO , but it commonly includes lists of related (child) objects in their DTO representation.
AccessionDetail
includes lists of sources
, groups
, actions
, etc. as DTOs .
id ownedBy ownedDate createdBy createdDate modifiedBy modifiedDate required
string <date-time> (Last modified date)
Maintained by the server, original value must be included in all update and delete operations.
site required
accessionNumber string [ 0 .. 128 ] characters
preferredName mlsStatus string [ 0 .. 30 ] characters
accessionNumberPart1 required
string [ 0 .. 50 ] characters (^$)|(^\S+(?:\s\S+)*$)
accessionNumberPart2 accessionNumberPart3 string [ 0 .. 50 ] characters
backupLocation1Site backupLocation2Site doi string [ 0 .. 20 ] characters
improvementStatusCode initialReceivedDate initialReceivedDateCode initialReceivedFormCode isBackedUp isCore isWebVisible lifeFormCode note reproductiveUniformityCode statusCode curationTypeCode taxonomySpecies required
object (TaxonomySpeciesInfo)
exploration collectionCode sources Array of objects (AccessionSourceDTO)
groups Array of objects (AccessionInvGroupDTO)
sourceCooperators Array of objects (AccessionSourceMapDTO)
actions Array of objects (AccessionActionDTO)
ipr Array of objects (AccessionIprDTO)
pedigree object (AccessionPedigreeDTO)
quarantine Array of objects (AccessionQuarantineDTO)
citations Array of objects (CitationDTO)
names Array of objects (AccessionInvNameDTO)
attachments Array of objects (AccessionInvAttachDTO)
annotations Array of objects (AccessionInvAnnotationDTO)
Copy
Expand all Collapse all { "id" : 0 ,
"ownedBy" : "string" ,
"ownedDate" : "2019-08-24T14:15:22Z" ,
"createdBy" : "string" ,
"createdDate" : "2019-08-24T14:15:22Z" ,
"modifiedBy" : "string" ,
"modifiedDate" : "2019-08-24T14:15:22Z" ,
"site" :
{ "id" : 0 ,
"siteShortName" : "string" ,
"siteLongName" : "string" ,
"faoInstituteNumber" : "string"
} , "accessionNumber" : "string" ,
"preferredName" : "string" ,
"mlsStatus" : "string" ,
"accessionNumberPart1" : "string" ,
"accessionNumberPart2" : 0 ,
"accessionNumberPart3" : "string" ,
"backupLocation1Site" :
{ "id" : 0 ,
"siteShortName" : "string" ,
"siteLongName" : "string" ,
"faoInstituteNumber" : "string"
} , "backupLocation2Site" :
{ "id" : 0 ,
"siteShortName" : "string" ,
"siteLongName" : "string" ,
"faoInstituteNumber" : "string"
} , "doi" : "string" ,
"improvementStatusCode" : "string" ,
"initialReceivedDate" : "2019-08-24T14:15:22Z" ,
"initialReceivedDateCode" : "string" ,
"initialReceivedFormCode" : "string" ,
"isBackedUp" : true ,
"isCore" : true ,
"isWebVisible" : true ,
"lifeFormCode" : "string" ,
"note" : "string" ,
"reproductiveUniformityCode" : "string" ,
"statusCode" : "string" ,
"curationTypeCode" : "string" ,
"taxonomySpecies" :
{ "id" : 0 ,
"name" : "string" ,
"nameAuthority" : "string" ,
"hybridCode" : "string" ,
"genusName" : "string" ,
"isSpecificHybrid" : true ,
"speciesName" : "string" ,
"speciesAuthority" : "string" ,
"isSubspecificHybrid" : true ,
"subspeciesName" : "string" ,
"varietyName" : "string" ,
"subvarietyName" : "string" ,
"formaName" : "string" ,
"formaRankType" : "string" ,
"isCurrent" : true
} , "exploration" :
{ "id" : 0 ,
"explorationNumber" : "string" ,
"title" : "string" ,
"beganDate" : "2019-08-24T14:15:22Z" ,
"finishedDate" : "2019-08-24T14:15:22Z" ,
"fiscalYear" : 0
} , "collectionCode" : "string" ,
"sources" :
[ { "id" : 0 ,
"ownedBy" : "string" ,
"ownedDate" : "2019-08-24T14:15:22Z" ,
"createdBy" : "string" ,
"createdDate" : "2019-08-24T14:15:22Z" ,
"modifiedBy" : "string" ,
"modifiedDate" : "2019-08-24T14:15:22Z" ,
"accession" :
{ "id" : 0 ,
"accessionNumber" : "string" ,
"accessionNumberPart1" : "string" ,
"accessionNumberPart2" : 0 ,
"accessionNumberPart3" : "string" ,
"doi" : "string" ,
"taxonomySpecies" :
{ "id" : 0 ,
"name" : "string" ,
"nameAuthority" : "string" ,
"hybridCode" : "string" ,
"genusName" : "string" ,
"isSpecificHybrid" : true ,
"speciesName" : "string" ,
"speciesAuthority" : "string" ,
"isSubspecificHybrid" : true ,
"subspeciesName" : "string" ,
"varietyName" : "string" ,
"subvarietyName" : "string" ,
"formaName" : "string" ,
"formaRankType" : "string" ,
"isCurrent" : true
} , "site" :
{ "id" : 0 ,
"siteShortName" : "string" ,
"siteLongName" : "string" ,
"faoInstituteNumber" : "string"
} , "improvementStatusCode" : "string" ,
"curationTypeCode" : "string" ,
"preferredName" : "string" ,
"statusCode" : "string"
} , "sourceTypeCode" : "string" ,
"acquisitionSource" : "string" ,
"associatedSpecies" : "string" ,
"collectedFormCode" : "string" ,
"collectorVerbatimLocality" : "string" ,
"elevationMeters" : 0 ,
"environmentDescription" : "string" ,
"formattedLocality" : "string" ,
"geography" :
{ "id" : 0 ,
"countryCode" : "string" ,
"adm1" : "string" ,
"adm1Abbrev" : "string" ,
"adm1TypeCode" : "string" ,
"adm2" : "string" ,
"adm2Abbrev" : "string" ,
"adm2TypeCode" : "string" ,
"adm3" : "string" ,
"adm3Abbrev" : "string" ,
"adm3TypeCode" : "string" ,
"adm4" : "string" ,
"adm4Abbrev" : "string" ,
"adm4TypeCode" : "string" ,
"isCurrent" : true ,
"isValid" : true
} , "georeferenceAnnotation" : "string" ,
"georeferenceDatum" : "string" ,
"georeferenceProtocolCode" : "string" ,
"isOrigin" : true ,
"isWebVisible" : true ,
"latitude" : 0.1 ,
"longitude" : 0.1 ,
"note" : "string" ,
"numberPlantsSampled" : 0 ,
"quantityCollected" : 0.1 ,
"sourceDate" : "2019-08-24T14:15:22Z" ,
"sourceDateCode" : "string" ,
"uncertainty" : 0 ,
"unitQuantityCollectedCode" : "string"
} ] , "groups" :
[ { "id" : 0 ,
"ownedBy" : "string" ,
"ownedDate" : "2019-08-24T14:15:22Z" ,
"createdBy" : "string" ,
"createdDate" : "2019-08-24T14:15:22Z" ,
"modifiedBy" : "string" ,
"modifiedDate" : "2019-08-24T14:15:22Z" ,
"groupName" : "string" ,
"isWebVisible" : true ,
"note" : "string" ,
"numberOfItems" : 0
} ] , "sourceCooperators" :
[ { "id" : 0 ,
"ownedBy" : "string" ,
"ownedDate" : "2019-08-24T14:15:22Z" ,
"createdBy" : "string" ,
"createdDate" : "2019-08-24T14:15:22Z" ,
"modifiedBy" : "string" ,
"modifiedDate" : "2019-08-24T14:15:22Z" ,
"accessionSource" :
{ "id" : 0 ,
"accession" :
{ "id" : 0 ,
"accessionNumber" : "string" ,
"accessionNumberPart1" : "string" ,
"accessionNumberPart2" : 0 ,
"accessionNumberPart3" : "string" ,
"doi" : "string" ,
"taxonomySpecies" :
{ "id" : 0 ,
"name" : "string" ,
"nameAuthority" : "string" ,
"hybridCode" : "string" ,
"genusName" : "string" ,
"isSpecificHybrid" : true ,
"speciesName" : "string" ,
"speciesAuthority" : "string" ,
"isSubspecificHybrid" : true ,
"subspeciesName" : "string" ,
"varietyName" : "string" ,
"subvarietyName" : "string" ,
"formaName" : "string" ,
"formaRankType" : "string" ,
"isCurrent" : true
} , "site" :
{ "id" : 0 ,
"siteShortName" : "string" ,
"siteLongName" : "string" ,
"faoInstituteNumber" : "string"
} , "improvementStatusCode" : "string" ,
"curationTypeCode" : "string" ,
"preferredName" : "string" ,
"statusCode" : "string"
} , "sourceTypeCode" : "string" ,
"geography" :
{ "id" : 0 ,
"countryCode" : "string" ,
"adm1" : "string" ,
"adm1Abbrev" : "string" ,
"adm1TypeCode" : "string" ,
"adm2" : "string" ,
"adm2Abbrev" : "string" ,
"adm2TypeCode" : "string" ,
"adm3" : "string" ,
"adm3Abbrev" : "string" ,
"adm3TypeCode" : "string" ,
"adm4" : "string" ,
"adm4Abbrev" : "string" ,
"adm4TypeCode" : "string" ,
"isCurrent" : true ,
"isValid" : true
} , "isOrigin" : true ,
"sourceDate" : "2019-08-24T14:15:22Z" ,
"sourceDateCode" : "string"
} , "cooperator" :
{ "id" : 0 ,
"ownedBy" : "string" ,
"ownedDate" : "2019-08-24T14:15:22Z" ,
"createdBy" : "string" ,
"createdDate" : "2019-08-24T14:15:22Z" ,
"modifiedBy" : "string" ,
"modifiedDate" : "2019-08-24T14:15:22Z" ,
"addressLine1" : "string" ,
"addressLine2" : "string" ,
"addressLine3" : "string" ,
"categoryCode" : "string" ,
"city" : "string" ,
"disciplineCode" : "string" ,
"email" : "string" ,
"fax" : "string" ,
"firstName" : "string" ,
"geography" :
{ "id" : 0 ,
"countryCode" : "string" ,
"adm1" : "string" ,
"adm1Abbrev" : "string" ,
"adm1TypeCode" : "string" ,
"adm2" : "string" ,
"adm2Abbrev" : "string" ,
"adm2TypeCode" : "string" ,
"adm3" : "string" ,
"adm3Abbrev" : "string" ,
"adm3TypeCode" : "string" ,
"adm4" : "string" ,
"adm4Abbrev" : "string" ,
"adm4TypeCode" : "string" ,
"isCurrent" : true ,
"isValid" : true
} , "job" : "string" ,
"lastName" : "string" ,
"note" : "string" ,
"organization" : "string" ,
"organizationAbbrev" : "string" ,
"organizationRegionCode" : "string" ,
"postalIndex" : "string" ,
"primaryPhone" : "string" ,
"secondaryAddressLine1" : "string" ,
"secondaryAddressLine2" : "string" ,
"secondaryAddressLine3" : "string" ,
"secondaryCity" : "string" ,
"secondaryEmail" : "string" ,
"secondaryGeography" :
{ "id" : 0 ,
"countryCode" : "string" ,
"adm1" : "string" ,
"adm1Abbrev" : "string" ,
"adm1TypeCode" : "string" ,
"adm2" : "string" ,
"adm2Abbrev" : "string" ,
"adm2TypeCode" : "string" ,
"adm3" : "string" ,
"adm3Abbrev" : "string" ,
"adm3TypeCode" : "string" ,
"adm4" : "string" ,
"adm4Abbrev" : "string" ,
"adm4TypeCode" : "string" ,
"isCurrent" : true ,
"isValid" : true
} , "secondaryOrganization" : "string" ,
"secondaryOrganizationAbbrev" : "string" ,
"secondaryPhone" : "string" ,
"secondaryPostalIndex" : "string" ,
"site" :
{ "id" : 0 ,
"siteShortName" : "string" ,
"siteLongName" : "string" ,
"faoInstituteNumber" : "string"
} , "statusCode" : "string" ,
"title" : "string" ,
"faoInstituteNumber" : "string" ,
"itpgrfaPid" : "string"
} } ] , "actions" :
[ { "id" : 0 ,
"ownedBy" : "string" ,
"ownedDate" : "2019-08-24T14:15:22Z" ,
"createdBy" : "string" ,
"createdDate" : "2019-08-24T14:15:22Z" ,
"modifiedBy" : "string" ,
"modifiedDate" : "2019-08-24T14:15:22Z" ,
"state" : "PENDING" ,
"startedDate" : "2019-08-24T14:15:22Z" ,
"startedDateCode" : "string" ,
"notBeforeDate" : "2019-08-24T14:15:22Z" ,
"notBeforeDateCode" : "string" ,
"completedDate" : "2019-08-24T14:15:22Z" ,
"completedDateCode" : "string" ,
"note" : "string" ,
"actionNameCode" : "string" ,
"durationInDays" : 0 ,
"assignee" :
{ "id" : 0 ,
"active" : true ,
"principal" : true ,
"sid" : "string" ,
"fullName" : "string"
} , "isDone" : true ,
"accession" :
{ "id" : 0 ,
"ownedBy" : "string" ,
"ownedDate" : "2019-08-24T14:15:22Z" ,
"createdBy" : "string" ,
"createdDate" : "2019-08-24T14:15:22Z" ,
"modifiedBy" : "string" ,
"modifiedDate" : "2019-08-24T14:15:22Z" ,
"site" :
{ "id" : 0 ,
"siteShortName" : "string" ,
"siteLongName" : "string" ,
"faoInstituteNumber" : "string"
} , "accessionNumber" : "string" ,
"preferredName" : "string" ,
"mlsStatus" : "string" ,
"accessionNumberPart1" : "string" ,
"accessionNumberPart2" : 0 ,
"accessionNumberPart3" : "string" ,
"backupLocation1Site" :
{ "id" : 0 ,
"siteShortName" : "string" ,
"siteLongName" : "string" ,
"faoInstituteNumber" : "string"
} , "backupLocation2Site" :
{ "id" : 0 ,
"siteShortName" : "string" ,
"siteLongName" : "string" ,
"faoInstituteNumber" : "string"
} , "doi" : "string" ,
"improvementStatusCode" : "string" ,
"initialReceivedDate" : "2019-08-24T14:15:22Z" ,
"initialReceivedDateCode" : "string" ,
"initialReceivedFormCode" : "string" ,
"isBackedUp" : true ,
"isCore" : true ,
"isWebVisible" : true ,
"lifeFormCode" : "string" ,
"note" : "string" ,
"reproductiveUniformityCode" : "string" ,
"statusCode" : "string" ,
"curationTypeCode" : "string" ,
"taxonomySpecies" :
{ "id" : 0 ,
"name" : "string" ,
"nameAuthority" : "string" ,
"hybridCode" : "string" ,
"genusName" : "string" ,
"isSpecificHybrid" : true ,
"speciesName" : "string" ,
"speciesAuthority" : "string" ,
"isSubspecificHybrid" : true ,
"subspeciesName" : "string" ,
"varietyName" : "string" ,
"subvarietyName" : "string" ,
"formaName" : "string" ,
"formaRankType" : "string" ,
"isCurrent" : true
} , "exploration" :
{ "id" : 0 ,
"explorationNumber" : "string" ,
"title" : "string" ,
"beganDate" : "2019-08-24T14:15:22Z" ,
"finishedDate" : "2019-08-24T14:15:22Z" ,
"fiscalYear" : 0
} , "collectionCode" : "string"
} , "isWebVisible" : true ,
} ] , "ipr" :
[ { "id" : 0 ,
"ownedBy" : "string" ,
"ownedDate" : "2019-08-24T14:15:22Z" ,
"createdBy" : "string" ,
"createdDate" : "2019-08-24T14:15:22Z" ,
"modifiedBy" : "string" ,
"modifiedDate" : "2019-08-24T14:15:22Z" ,
"acceptedDate" : "2019-08-24T14:15:22Z" ,
"accession" :
{ "id" : 0 ,
"accessionNumber" : "string" ,
"accessionNumberPart1" : "string" ,
"accessionNumberPart2" : 0 ,
"accessionNumberPart3" : "string" ,
"doi" : "string" ,
"taxonomySpecies" :
{ "id" : 0 ,
"name" : "string" ,
"nameAuthority" : "string" ,
"hybridCode" : "string" ,
"genusName" : "string" ,
"isSpecificHybrid" : true ,
"speciesName" : "string" ,
"speciesAuthority" : "string" ,
"isSubspecificHybrid" : true ,
"subspeciesName" : "string" ,
"varietyName" : "string" ,
"subvarietyName" : "string" ,
"formaName" : "string" ,
"formaRankType" : "string" ,
"isCurrent" : true
} , "site" :
{ "id" : 0 ,
"siteShortName" : "string" ,
"siteLongName" : "string" ,
"faoInstituteNumber" : "string"
} , "improvementStatusCode" : "string" ,
"curationTypeCode" : "string" ,
"preferredName" : "string" ,
"statusCode" : "string"
} , "expectedDate" : "2019-08-24T14:15:22Z" ,
"expiredDate" : "2019-08-24T14:15:22Z" ,
"iprCropName" : "string" ,
"iprFullName" : "string" ,
"iprNumber" : "string" ,
"issuedDate" : "2019-08-24T14:15:22Z" ,
"note" : "string" ,
"typeCode" : "string"
} ] , "pedigree" :
{ "id" : 0 ,
"ownedBy" : "string" ,
"ownedDate" : "2019-08-24T14:15:22Z" ,
"createdBy" : "string" ,
"createdDate" : "2019-08-24T14:15:22Z" ,
"modifiedBy" : "string" ,
"modifiedDate" : "2019-08-24T14:15:22Z" ,
"accession" :
{ "id" : 0 ,
"accessionNumber" : "string" ,
"accessionNumberPart1" : "string" ,
"accessionNumberPart2" : 0 ,
"accessionNumberPart3" : "string" ,
"doi" : "string" ,
"taxonomySpecies" :
{ "id" : 0 ,
"name" : "string" ,
"nameAuthority" : "string" ,
"hybridCode" : "string" ,
"genusName" : "string" ,
"isSpecificHybrid" : true ,
"speciesName" : "string" ,
"speciesAuthority" : "string" ,
"isSubspecificHybrid" : true ,
"subspeciesName" : "string" ,
"varietyName" : "string" ,
"subvarietyName" : "string" ,
"formaName" : "string" ,
"formaRankType" : "string" ,
"isCurrent" : true
} , "site" :
{ "id" : 0 ,
"siteShortName" : "string" ,
"siteLongName" : "string" ,
"faoInstituteNumber" : "string"
} , "improvementStatusCode" : "string" ,
"curationTypeCode" : "string" ,
"preferredName" : "string" ,
"statusCode" : "string"
} , "crossCode" : "string" ,
"description" : "string" ,
"femaleAccession" :
{ "id" : 0 ,
"accessionNumber" : "string" ,
"accessionNumberPart1" : "string" ,
"accessionNumberPart2" : 0 ,
"accessionNumberPart3" : "string" ,
"doi" : "string" ,
"taxonomySpecies" :
{ "id" : 0 ,
"name" : "string" ,
"nameAuthority" : "string" ,
"hybridCode" : "string" ,
"genusName" : "string" ,
"isSpecificHybrid" : true ,
"speciesName" : "string" ,
"speciesAuthority" : "string" ,
"isSubspecificHybrid" : true ,
"subspeciesName" : "string" ,
"varietyName" : "string" ,
"subvarietyName" : "string" ,
"formaName" : "string" ,
"formaRankType" : "string" ,
"isCurrent" : true
} , "site" :
{ "id" : 0 ,
"siteShortName" : "string" ,
"siteLongName" : "string" ,
"faoInstituteNumber" : "string"
} , "improvementStatusCode" : "string" ,
"curationTypeCode" : "string" ,
"preferredName" : "string" ,
"statusCode" : "string"
} , "femaleExternalAccession" : "string" ,
"maleAccession" :
{ "id" : 0 ,
"accessionNumber" : "string" ,
"accessionNumberPart1" : "string" ,
"accessionNumberPart2" : 0 ,
"accessionNumberPart3" : "string" ,
"doi" : "string" ,
"taxonomySpecies" :
{ "id" : 0 ,
"name" : "string" ,
"nameAuthority" : "string" ,
"hybridCode" : "string" ,
"genusName" : "string" ,
"isSpecificHybrid" : true ,
"speciesName" : "string" ,
"speciesAuthority" : "string" ,
"isSubspecificHybrid" : true ,
"subspeciesName" : "string" ,
"varietyName" : "string" ,
"subvarietyName" : "string" ,
"formaName" : "string" ,
"formaRankType" : "string" ,
"isCurrent" : true
} , "site" :
{ "id" : 0 ,
"siteShortName" : "string" ,
"siteLongName" : "string" ,
"faoInstituteNumber" : "string"
} , "improvementStatusCode" : "string" ,
"curationTypeCode" : "string" ,
"preferredName" : "string" ,
"statusCode" : "string"
} , "maleExternalAccession" : "string" ,
"releasedDate" : "2019-08-24T14:15:22Z" ,
"releasedDateCode" : "string"
} , "quarantine" :
[ { "id" : 0 ,
"ownedBy" : "string" ,
"ownedDate" : "2019-08-24T14:15:22Z" ,
"createdBy" : "string" ,
"createdDate" : "2019-08-24T14:15:22Z" ,
"modifiedBy" : "string" ,
"modifiedDate" : "2019-08-24T14:15:22Z" ,
"accession" :
{ "id" : 0 ,
"accessionNumber" : "string" ,
"accessionNumberPart1" : "string" ,
"accessionNumberPart2" : 0 ,
"accessionNumberPart3" : "string" ,
"doi" : "string" ,
"taxonomySpecies" :
{ "id" : 0 ,
"name" : "string" ,
"nameAuthority" : "string" ,
"hybridCode" : "string" ,
"genusName" : "string" ,
"isSpecificHybrid" : true ,
"speciesName" : "string" ,
"speciesAuthority" : "string" ,
"isSubspecificHybrid" : true ,
"subspeciesName" : "string" ,
"varietyName" : "string" ,
"subvarietyName" : "string" ,
"formaName" : "string" ,
"formaRankType" : "string" ,
"isCurrent" : true
} , "site" :
{ "id" : 0 ,
"siteShortName" : "string" ,
"siteLongName" : "string" ,
"faoInstituteNumber" : "string"
} , "improvementStatusCode" : "string" ,
"curationTypeCode" : "string" ,
"preferredName" : "string" ,
"statusCode" : "string"
} , "custodialCooperator" :
{ } , "enteredDate" : "2019-08-24T14:15:22Z" ,
"establishedDate" : "2019-08-24T14:15:22Z" ,
"expectedReleaseDate" : "2019-08-24T14:15:22Z" ,
"note" : "string" ,
"progressStatusCode" : "string" ,
"quarantineTypeCode" : "string" ,
"releasedDate" : "2019-08-24T14:15:22Z"
} ] , "citations" :
[ { "id" : 0 ,
"ownedBy" : "string" ,
"ownedDate" : "2019-08-24T14:15:22Z" ,
"createdBy" : "string" ,
"createdDate" : "2019-08-24T14:15:22Z" ,
"modifiedBy" : "string" ,
"modifiedDate" : "2019-08-24T14:15:22Z" ,
"authorName" : "string" ,
"citationTitle" : "string" ,
"citationYear" : 0 ,
"description" : "string" ,
"doiReference" : "string" ,
"literature" :
{ "id" : 0 ,
"literatureTypeCode" : "string" ,
"publicationYear" : "string" ,
"abbreviation" : "string" ,
"editorAuthorName" : "string" ,
"publisherName" : "string" ,
"referenceTitle" : "string" ,
"standardAbbreviation" : "string" ,
"url" : "string"
} , "note" : "string" ,
"title" : "string" ,
"typeCode" : "string" ,
"uniqueKey" : 0 ,
"url" : "string" ,
"reference" : "string" ,
"isAcceptedName" : true ,
"accession" :
{ "id" : 0 ,
"accessionNumber" : "string" ,
"accessionNumberPart1" : "string" ,
"accessionNumberPart2" : 0 ,
"accessionNumberPart3" : "string" ,
"doi" : "string" ,
"taxonomySpecies" :
{ "id" : 0 ,
"name" : "string" ,
"nameAuthority" : "string" ,
"hybridCode" : "string" ,
"genusName" : "string" ,
"isSpecificHybrid" : true ,
"speciesName" : "string" ,
"speciesAuthority" : "string" ,
"isSubspecificHybrid" : true ,
"subspeciesName" : "string" ,
"varietyName" : "string" ,
"subvarietyName" : "string" ,
"formaName" : "string" ,
"formaRankType" : "string" ,
"isCurrent" : true
} , "site" :
{ "id" : 0 ,
"siteShortName" : "string" ,
"siteLongName" : "string" ,
"faoInstituteNumber" : "string"
} , "improvementStatusCode" : "string" ,
"curationTypeCode" : "string" ,
"preferredName" : "string" ,
"statusCode" : "string"
} , "accessionIpr" :
{ "id" : 0 ,
"iprNumber" : "string" ,
"typeCode" : "string" ,
"acceptedDate" : "2019-08-24T14:15:22Z" ,
"expectedDate" : "2019-08-24T14:15:22Z" ,
"issuedDate" : "2019-08-24T14:15:22Z" ,
"expiredDate" : "2019-08-24T14:15:22Z" ,
"iprCropName" : "string" ,
"iprFullName" : "string"
} , "accessionPedigree" :
{ "id" : 0 ,
"crossCode" : "string" ,
"description" : "string" ,
"femaleAccession" :
{ "id" : 0 ,
"accessionNumber" : "string" ,
"accessionNumberPart1" : "string" ,
"accessionNumberPart2" : 0 ,
"accessionNumberPart3" : "string" ,
"doi" : "string" ,
"taxonomySpecies" :
{ "id" : 0 ,
"name" : "string" ,
"nameAuthority" : "string" ,
"hybridCode" : "string" ,
"genusName" : "string" ,
"isSpecificHybrid" : true ,
"speciesName" : "string" ,
"speciesAuthority" : "string" ,
"isSubspecificHybrid" : true ,
"subspeciesName" : "string" ,
"varietyName" : "string" ,
"subvarietyName" : "string" ,
"formaName" : "string" ,
"formaRankType" : "string" ,
"isCurrent" : true
} , "site" :
{ "id" : 0 ,
"siteShortName" : "string" ,
"siteLongName" : "string" ,
"faoInstituteNumber" : "string"
} , "improvementStatusCode" : "string" ,
"curationTypeCode" : "string" ,
"preferredName" : "string" ,
"statusCode" : "string"
} , "femaleExternalAccession" : "string" ,
"maleAccession" :
{ "id" : 0 ,
"accessionNumber" : "string" ,
"accessionNumberPart1" : "string" ,
"accessionNumberPart2" : 0 ,
"accessionNumberPart3" : "string" ,
"doi" : "string" ,
"taxonomySpecies" :
{ "id" : 0 ,
"name" : "string" ,
"nameAuthority" : "string" ,
"hybridCode" : "string" ,
"genusName" : "string" ,
"isSpecificHybrid" : true ,
"speciesName" : "string" ,
"speciesAuthority" : "string" ,
"isSubspecificHybrid" : true ,
"subspeciesName" : "string" ,
"varietyName" : "string" ,
"subvarietyName" : "string" ,
"formaName" : "string" ,
"formaRankType" : "string" ,
"isCurrent" : true
} , "site" :
{ "id" : 0 ,
"siteShortName" : "string" ,
"siteLongName" : "string" ,
"faoInstituteNumber" : "string"
} , "improvementStatusCode" : "string" ,
"curationTypeCode" : "string" ,
"preferredName" : "string" ,
"statusCode" : "string"
} , "maleExternalAccession" : "string" ,
"releasedDate" : "2019-08-24T14:15:22Z" ,
"releasedDateCode" : "string"
} , "geneticMarker" :
{ "id" : 0 ,
"assayConditions" : "string" ,
"genbankNumber" : "string" ,
"knownStandards" : "string" ,
"mapLocation" : "string" ,
"name" : "string" ,
"note" : "string" ,
"polyTypeCode" : "string" ,
"position" : "string" ,
"primers" : "string" ,
"rangeProducts" : "string" ,
"repeatMotif" : "string" ,
"synonyms" : "string"
} , "taxonomyFamily" :
{ "id" : 0 ,
"familyName" : "string" ,
"familyAuthority" : "string" ,
"suprafamilyRankCode" : "string" ,
"suprafamilyRankName" : "string" ,
"subfamilyName" : "string" ,
"tribeName" : "string" ,
"subtribeName" : "string"
} , "taxonomyGenus" :
{ "id" : 0 ,
"genusName" : "string" ,
"genusAuthority" : "string" ,
"hybridCode" : "string" ,
"qualifyingCode" : "string" ,
"subgenusName" : "string" ,
"sectionName" : "string" ,
"subsectionName" : "string" ,
"seriesName" : "string" ,
"subseriesName" : "string" ,
"familyName" : "string" ,
"subfamilyName" : "string" ,
"tribeName" : "string" ,
"subtribeName" : "string"
} , "taxonomySpecies" :
{ "id" : 0 ,
"name" : "string" ,
"nameAuthority" : "string" ,
"hybridCode" : "string" ,
"genusName" : "string" ,
"isSpecificHybrid" : true ,
"speciesName" : "string" ,
"speciesAuthority" : "string" ,
"isSubspecificHybrid" : true ,
"subspeciesName" : "string" ,
"varietyName" : "string" ,
"subvarietyName" : "string" ,
"formaName" : "string" ,
"formaRankType" : "string" ,
"isCurrent" : true
} } ] , "names" :
[ { "id" : 0 ,
"ownedBy" : "string" ,
"ownedDate" : "2019-08-24T14:15:22Z" ,
"createdBy" : "string" ,
"createdDate" : "2019-08-24T14:15:22Z" ,
"modifiedBy" : "string" ,
"modifiedDate" : "2019-08-24T14:15:22Z" ,
"inventory" :
{ "id" : 0 ,
"accessionNumber" : "string" ,
"accessionId" : "string" ,
"curationTypeCode" : "string" ,
"formTypeCode" : "string" ,
"inventoryNumber" : "string" ,
"barcode" : "string" ,
"storageLocationPart1" : "string" ,
"storageLocationPart2" : "string" ,
"storageLocationPart3" : "string" ,
"storageLocationPart4" : "string" ,
"quantityOnHand" : 0.1 ,
"quantityOnHandUnitCode" : "string" ,
"pathogenStatusCode" : "string" ,
"generation" : 0 ,
"siteShortName" : "string" ,
"siteId" : 0 ,
"isAvailable" : true ,
"isDistributable" : true
} , "categoryCode" : "string" ,
"plantName" : "string" ,
"plantNameRank" : 0 ,
"isWebVisible" : true ,
"nameGroup" :
{ "id" : 0 ,
"groupName" : "string" ,
"url" : "string"
} , "nameSourceCooperator" :
{ } , "note" : "string"
} ] , "attachments" :
[ { "id" : 0 ,
"ownedBy" : "string" ,
"ownedDate" : "2019-08-24T14:15:22Z" ,
"createdBy" : "string" ,
"createdDate" : "2019-08-24T14:15:22Z" ,
"modifiedBy" : "string" ,
"modifiedDate" : "2019-08-24T14:15:22Z" ,
"title" : "string" ,
"virtualPath" : "string" ,
"thumbnailVirtualPath" : "string" ,
"contentType" : "string" ,
"isWebVisible" : true ,
"sortOrder" : 0 ,
"note" : "string" ,
"repositoryFile" :
{ "id" : 0 ,
"version" : 0 ,
"active" : true ,
"createdBy" : "string" ,
"createdDate" : "2019-08-24T14:15:22Z" ,
"lastModifiedBy" : "string" ,
"lastModifiedDate" : "2019-08-24T14:15:22Z" ,
"uuid" : "095be615-a8ad-4c33-8e9c-c7612fbf6c9f" ,
"folder" : "string" ,
"originalFilename" : "string" ,
"extension" : "string" ,
"title" : "string" ,
"subject" : "string" ,
"description" : "string" ,
"creator" : "string" ,
"created" : "string" ,
"rightsHolder" : "string" ,
"accessRights" : "string" ,
"license" : "string" ,
"contentType" : "string" ,
"extent" : "string" ,
"bibliographicCitation" : "string" ,
"originalUrl" : "string" ,
"dateRetrieved" : "2019-08-24T14:15:22Z" ,
"sha1Sum" : "string" ,
"md5Sum" : "string" ,
"size" : 0 ,
"identifier" : "string" ,
"filename" : "string" ,
"metadataFilename" : "string" ,
"storageFolder" : "string" ,
"storagePath" : "string" ,
"isPublic" : true ,
"isManage" : true
} , "attachDate" : "2019-08-24T14:15:22Z" ,
"attachDateCode" : "string" ,
"categoryCode" : "string" ,
"copyrightInformation" : "string" ,
"description" : "string" ,
"descriptionCode" : "string" ,
"inventory" :
{ "id" : 0 ,
"accessionNumber" : "string" ,
"accessionId" : "string" ,
"curationTypeCode" : "string" ,
"formTypeCode" : "string" ,
"inventoryNumber" : "string" ,
"barcode" : "string" ,
"storageLocationPart1" : "string" ,
"storageLocationPart2" : "string" ,
"storageLocationPart3" : "string" ,
"storageLocationPart4" : "string" ,
"quantityOnHand" : 0.1 ,
"quantityOnHandUnitCode" : "string" ,
"pathogenStatusCode" : "string" ,
"generation" : 0 ,
"siteShortName" : "string" ,
"siteId" : 0 ,
"isAvailable" : true ,
"isDistributable" : true
} } ] , "annotations" :
[ { "id" : 0 ,
"ownedBy" : "string" ,
"ownedDate" : "2019-08-24T14:15:22Z" ,
"createdBy" : "string" ,
"createdDate" : "2019-08-24T14:15:22Z" ,
"modifiedBy" : "string" ,
"modifiedDate" : "2019-08-24T14:15:22Z" ,
"annotationCooperator" :
{ } , "annotationDate" : "2019-08-24T14:15:22Z" ,
"annotationDateCode" : "string" ,
"annotationTypeCode" : "string" ,
"inventory" :
{ "id" : 0 ,
"accessionNumber" : "string" ,
"accessionId" : "string" ,
"curationTypeCode" : "string" ,
"formTypeCode" : "string" ,
"inventoryNumber" : "string" ,
"barcode" : "string" ,
"storageLocationPart1" : "string" ,
"storageLocationPart2" : "string" ,
"storageLocationPart3" : "string" ,
"storageLocationPart4" : "string" ,
"quantityOnHand" : 0.1 ,
"quantityOnHandUnitCode" : "string" ,
"pathogenStatusCode" : "string" ,
"generation" : 0 ,
"siteShortName" : "string" ,
"siteId" : 0 ,
"isAvailable" : true ,
"isDistributable" : true
} , "newTaxonomySpecies" :
{ "id" : 0 ,
"name" : "string" ,
"nameAuthority" : "string" ,
"hybridCode" : "string" ,
"genusName" : "string" ,
"isSpecificHybrid" : true ,
"speciesName" : "string" ,
"speciesAuthority" : "string" ,
"isSubspecificHybrid" : true ,
"subspeciesName" : "string" ,
"varietyName" : "string" ,
"subvarietyName" : "string" ,
"formaName" : "string" ,
"formaRankType" : "string" ,
"isCurrent" : true
} , "note" : "string" ,
"oldTaxonomySpecies" :
{ "id" : 0 ,
"name" : "string" ,
"nameAuthority" : "string" ,
"hybridCode" : "string" ,
"genusName" : "string" ,
"isSpecificHybrid" : true ,
"speciesName" : "string" ,
"speciesAuthority" : "string" ,
"isSubspecificHybrid" : true ,
"subspeciesName" : "string" ,
"varietyName" : "string" ,
"subvarietyName" : "string" ,
"formaName" : "string" ,
"formaRankType" : "string" ,
"isCurrent" : true
} , "orderRequest" :
{ "id" : 0 ,
"localNumber" : "string" ,
"orderTypeCode" : "string" ,
"orderedDate" : "2019-08-24T14:15:22Z" ,
"completedDate" : "2019-08-24T14:15:22Z" ,
} } ] }
Endpoint paths
The common path prefix for the current version of the API is /api/v2 .
API operations are then grouped by the type of the record, and the same path prefix is used for that type:
Type Path prefix Description Accession /api/v2/a Business operations and CRUD endpoints. For example, /api/v2/a/{id}/assign-doi that will submit the accession with id
to ITPGRFA's DOI Registration Service and obtain a DOI for it. AccessionSource /api/v2/a/source CRUD endpoints. AccessionPedigree /api/v2/a/pedigree CRUD endpoints. Inventory /api/v2/i Business operations and CRUD endpoints. InventoryViability /api/v2/i/viability Business operations and CRUD endpoints. ...
CRUD operations
API provides create, read, update, delete (CRUD) endpoints for all types of records supported by GGCE.
Create a new record
POST the object in request body to the corresponding .../XXX endpoint to create a new record of type XXX .
The record must have all the required fields and must pass all data validation constraints defined by GGCE.
Response
The API will return the created object, including any auto-generated properties such as id
, createdBy
, createdDate
(and barcode
for Inventories).
Validation error : the provided record is invalid. It may be missing required fields or the data does not satisfy the constraints imposed by GGCE.
Read a record by its id
GET the object by its id with the .../XXX/{id} endpoint.
Response
The API will return the object matching the id
. A 404 error means that there is no record with this id
in the system.
Update an existing record
PUT the updated object in request body to the .../XXX endpoint to update an existing record.
The modifiedDate
of your updated object must not be different from what is stored on the server. When the two don't match, the server will respond with a HTTP error,
meaning that your version of the record is outdated and should be reloaded.
Response
The API will return the updated object. A 404 error means that there is no record with this id
in the system.
Other errors include:
Validation error : your record is invalid. It may be missing required fields or the data does not satisfy the constraints imposed by GGCE.
Concurrency error : your version of the record is outdated according to modifiedDate
.
Delete a record by id
Use HTTP DELETE method on .../XXX/{id} endpoint to remove a record by its id .
Response
The API will return the deleted object, including its id
.
List records
API provides a GET .../XXX/list endpoint that allows you to browse the records of that type.
All /list endpoints accept pagination parameters described below. They must be provided in the URL query string.
Parameter Description l Specifies the requested size of the page. l
is not required and a sensible default will be used by the API. Note that if the requested page length exceeds API limits, the API will return less than the requested number of records per page. p Defaults to 0
, representing the first page. The second page is 1
, and so on. s List of properties to sort the records. For example, s=name,id
will sort the records by name
, then by id
, and return the requested page after sorting. Sorting is ascending by default. d Allows you to specify the sort direction for the properties listed in s
. For example, s=name,id&d=DESC,ASC
is equivalent to ORDER BY name DESC, id ASC
in SQL.
Response
The response from the server contains the records and pagination information:
{ "content": [ ], // array of records "number": 0, // page index "size": 100, // page size "numberOfElements": 100, // number of records on this page, can be less than "size" "totalElements": 134, // total number of records in the database "totalPages": 2, "first": true, "last": false, "sort": [ ] }
content
is the array of records that you're interested in, and it should contain numberOfElements
objects.
number
is the index of the returned page. It should correspond with the p parameter you submitted.
size
is the size of the page. API may return less than the requested l records per page.
numberOfElements
is usually the same as the size of the content
array.
totalElements
provides the total number of records in the database.
totalPages
is calculated from totalElements / size
.
first
means API returned the first page (i.e. number === 0
).
last
means that the page is the last page (i.e. number === totalPages - 1
).
sort
provides sorting information applied by the server.