html restful api,RESTful API

Search

Currently the following search parameters are supported by the COD search endpoint in http://www.crystallography.net/cod/result:

id – a string containing one or more COD IDs separated by a comma (",") or a new line ("\n") symbol. The percent ("%") wild card symbol can be used to specify a range of IDs.;

text – a keyword that must be contained in the metadata of the entry. The metadata search covers data such as the bibliographic information of the associated publication, common and systematic name of the sample compound and the name of the sample mineral;

format – the format in which the results will be returned. Supported formats:

html – a html web page displaying the list of COD entries;

csv – a csv file containing information about the COD entries. The provided information matches the one provided by the COD MySQL database;

json – a json file containing information about the COD entries. The provided information matches the one provided by the COD MySQL database;

lst – a txt file containing a list of COD IDs;

urls – a txt file containing a list of URLs pointing to the COD CIF files;

zip – a zip archive containing CIF files. Please note that there is a limit of how many entries can be returned using this format; in case this limit is reached, a html page with an error message is returned instead;

count – the number of COD entries that match the search criteria.

formula – the empirical chemical formula of the crystal. Chemical element symbols in the formula must be ordered according to the Hill notation and separated by a space symbol, i.e. "C8 H10 N4 O2";

el1, el2, ..., el8 – chemical element symbols that must appear in the chemical formula;

nel1, nel2, ..., nel4 – chemical element symbols that must not appear in the chemical

formula;

strictmin, strictmax – the minimum/maximum number of distinct chemical elements that must appear in the chemical formula;

amin, amax – the minimum/maximum value of the lattice parameter a;

bmin, bmax – the minimum/maximum value of the lattice parameter b;

cmin, cmax – the minimum/maximum value of the lattice parameter c;

alpmin, alpmax – the minimum/maximum value of the lattice parameter alpha;

betmin, betmax – the minimum/maximum value of the lattice parameter beta;

gamin, gamax – the minimum/maximum value of the lattice parameter gamma;

vmin, vmax – the minimum/maximum volume of the lattice;

minZ, maxZ – the minimum/maximum Z value of the lattice;

minZprime, maxZprime – the minimum/maximum Z' value of the lattice;

journal – the name of the journal in which the scientific paper describing the crystal structure was published;

year – the year of publication of the crystal structure;

volume – the volume of the journal where the scientific paper describing the crystal structure was published;

issue – the issue of the journal where the scientific paper describing the crystal structure was published;

doi – the DOI that links to the online paper in which the crystal structure was published;

has_fobs – flag value denoting that entries must have an associated X-ray reflection files (Fobs or Iobs data) in the COD which contain the original reflection intensities used to determine the structures;

include_duplicates – flag value denoting that entries that are marked as duplicates of other entries in the COD should not be excluded;

include_errors – flag value denoting that entries that are marked as having errors should not be excluded;

include_theoretical – flag value denoting that entries that are marked as theoretical

should not be excluded.

Entry access

Each database entry can be accessed by appending its ID to http://www.crystallography.net/cod/ and postfixing it by the format, for example, request http://www.crystallography.net/cod/1000000.cif results in retrieval of CIF contents of COD entry 1000000.

Supported formats:

cif;

hkl – diffraction data (if an entry has associated diffraction data);

html – HTML information table for the entry;

Entry access will always return the newest version of the data. Specific revisions could be accessed for CIF and HKL formats by appending revision number preceded by "@", for example, request http://www.crystallography.net/cod/1000000.cif@1 results in retrieval of CIF contents of COD entry 1000000 as of revision 1.

Deposition

Data can be deposited to the COD by posting (HTTP POST) data to deposition endpoint https://www.crystallography.net/cod/cgi-bin/cif-deposit.pl.

Mandatory fields:

username – depositor's username;

password – depositor's password;

user_email – depsoitor's e-mail address;

deposition_type – deposition type: published, ?prepublication or personal.

cif – contents of the deposited CIF file; multiple data blocks are allowed.

Optional fields:

hkl – diffraction data associated with the deposited CIF file;

output_mode – format of the output, html by default, stdout is also accepted, resulting in more plain-looking output;

progress – if set to 1, outputs more verbose information about the deposition process.

Mandatory fields for prepublication and personal communication depositions:

author_name – name of the author as given in CIF file;

author_email – e-mail address to contact the author.

Mandatory fields for prepublication depositions:

journal – name of the journal in which the structures are intended to be published;

hold_period – number of months for which the structure should be considered as on-hold.

Mandatory fields for redeposition (update/change of data already in the COD):

replace – must be set to 1;

message – log message describing the performed changes.

The outcome of the deposition is reported in structured both human- and computer-readable format (this will hopefully change in the future to ease the automated processing of the output). Three outcomes are possible:

Success. In html format newly deposited/updated COD entry numbers are presented in ... HTML elements (may be more than one COD ID);

Duplicate. In html format COD entries already having the deposited data are presented in ... HTML elements (may be more than one COD ID);

Error. In html format errors are presented in structured both human- and computer-readable manner.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值