Retrieve Variants for Reference Identifiers and Database with POST Request
post
/ohfapi/cg/v3.3/variants/byReferenceId
This endpoint supports the retrieval of Variant Identifiers for multiple Reference Identifiers, multiple Database and single Assembly/Alignment ID.It also returns if any Invalid Reference Identifiers are passed in the Request.
Request
Supported Media Types
- application/json
- application/xml
Query Parameters
-
limit(optional): integer(int32)
Number of rows to return
-
offset(optional): integer(int32)
Row number to start from
Root Schema : VariantReferenceIdDatabaseDef
Type:
Show Source
object-
alignmentId:
integer(int64)
Minimum Value:
0Assembly/Alignment ID -
databases(optional):
array databases
List of Database Names. For ex.,dbSNP_142
-
referenceIds:
array referenceIds
Minimum Number of Items:
1Maximum Number of Items:2147483647List of Reference IDs to External Database. For ex.,rs13079411
Nested Schema : referenceIds
Type:
arrayMinimum Number of Items:
1Maximum Number of Items:
2147483647List of Reference IDs to External Database. For ex.,rs13079411
Show Source
Security
-
basicAuth: basic
Type:
basic
Response
Supported Media Types
- application/json
- application/xml
200 Response
successful operation
Model for paginated collections of data.
Root Schema : PageableDetailedCollection
Type:
objectModel for paginated collections of data.
Show Source
-
count(optional):
integer(int64)
Number of objects in the 'items' collection.
-
hasMore(optional):
boolean
Default Value:
falseA boolean indicating if more pages are available. -
invalidAssemblies(optional):
array invalidAssemblies
List of Invalid Assemblies in request.
-
invalidGeneNames(optional):
array invalidGeneNames
List of Invalid Genenames in request.
-
invalidHugoNames(optional):
array invalidHugoNames
List of Invalid Hugonames in request.
-
invalidReferenceIds(optional):
array invalidReferenceIds
List of Invalid Reference IDs in request.
-
items(optional):
array items
A collection of paged items.
-
links(optional):
array link
A collection of links containing hrefs to the current, next, and previous pages as applicable.
-
resourceType(optional):
string
Identify the resource type
Nested Schema : invalidReferenceIds
Type:
arrayList of Invalid Reference IDs in request.
Show Source
Nested Schema : link
Type:
arrayA collection of links containing hrefs to the current, next, and previous pages as applicable.
Show Source
Example:
{rel: 'next',href: '/patientapi/patients?limit=100&offset=300'}Nested Schema : Serializable
Type:
object400 Response
Assembly/Alignment Id is not supplied
404 Response
Variants not found for the Reference Ids and Reference Databases supplied
Examples
The following example submits a POST request.
API URL
http://localhost:7010/ohfapi/cg/v3.3/variants/byReferenceId?limit=2&offset=0
Example of Request Body
The following example shows the response returned in JSON format.
{
"alignmentId": 1,
"referenceIds": [
"rs142950474",
"rs142950477",
"COSM297314",
"COSM",
"rs"
],
"databases": [
"dbSNP_138",
"COSMIC_COSMIC.V67"
]
}
Example of Response Body
The following example shows the response returned in JSON format.
{
"resourceType" : "Variants",
"items" : [ {
"identifier" : {
"system" : "ODB",
"value" : "4754980"
}
}, {
"identifier" : {
"system" : "ODB",
"value" : "38063682"
}
} ],
"count" : 2,
"hasMore" : true,
"links" : [ {
"rel" : "self",
"href" : "http://localhost:7010/ohfapi/cg/v3.3/variants/byReferenceId?limit=2&offset=0"
}, {
"rel" : "next",
"href" : "http://localhost:7010/ohfapi/cg/v3.3/variants/byReferenceId?offset=2&limit=2"
} ],
"invalidReferenceIds" : [ "COSM", "rs" ]
}