![]() XML data will have “Content-Type: application/xml”. The Content-Type in the HTTP response header will also be set by the reverse of the above table, e.g. The value of “Accept” may be a MIME type that will tell the service what output format is accepted by the client, and hence what format is returned by the server. ![]() The HTTP request header may be used to supply some types of information to this service. JSONP takes an optional callback function name (which defaults to “callback” if not specified). TXT output is only available in a restricted set of cases where all the information is the same – for example, synonyms for a single CID where there is one synonym per line.įor example, to access the molecular formula for CID 2244 in JSON format, one would use the (now complete) URL: Note that not all formats are applicable to the results of all operations one cannot, for example, retrieve a whole compound record as CSV or a property table as SDF. = XML | ASNT | ASNB | JSON | JSONP | SDF | CSV | PNG | TXTĪSNT is NCBI’s text (human-readable) variant of ASN.1 ASNB is standard binary ASN.1 and is currently returned as Base64-encoded ascii text. Note that this is formally optional, as output format can also be specified in the HTTP Accept field of the request header – see below for more detail. The final portion of the URL tells the service what output format is desired. Pathway domain = summary | cids | geneids | accessionsįor example, to access the molecular formula and InChI key for CID 2244, one would use a URL like: Protein domain = summary | aids | concise | pwaccs Gene domain = summary | aids | concise | pwaccs = substance | compound | assay | gene | protein | pathway | taxonomy | cell | Ĭompound domain = cid | name | smiles | inchi | sdf | inchikey | formula | | | listkey | This is further subdivided into two or more locations in the URL “path” as follows: The input portion of the URL tells the service which records to use as the subject of the query. The general form of the URL has three parts – input, operation, and output – after the common prefix, followed by operation options as URL arguments (after the ‘?’): Most – if not all – of the information the service needs to produce its results is encoded into the URL. ![]() Example Perl scripts demonstrating how to access PubChem data through PUG-REST are available here.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |