チケット #101 (reopened 仕様) — at バージョン 8
OReFiL オンラインリソースページ情報取得 WebAPI 対応の仕様
報告者: | h-morita | 担当者: | h-morita |
---|---|---|---|
優先度: | 現マイルストーンで作業の停滞を招く | マイルストーン: | Iterate8(2/21) |
コンポーネント: | OReFiL | バージョン: | |
キーワード: | 関係者: | ||
GanttChart表示: | OFF | 依存TaskNo: | |
開始予定日: | YYYY/MM/DD | 終了予定日: | YYYY/MM/DD |
説明 (最終更新者: h-morita) (diff)
OReFiL オンラインリソースページ情報取得 WebAPI 機能
概要
OReFiL オンラインリソースページ情報取得 WebAPI に対応する。
理由
スコープ
OReFiL フロントエンドシステム
インタフェース仕様
SOAP
- WSDL
- /online_resource/service.wsdl
- エントリポイント
- /online_resource/api
- SOAPAction
- /online_resource/api/GetResourceInfoById
- パラメータ仕様
パラメータ名 | パラメータ内容 | 必須/オプション | デフォルト値 | 設定可能な値 |
id | オンラインリソースの ID | 必須 | ー | 整数値 |
- エラー仕様
- できうる限り SOAP エラー仕様に従ってエラーを返す
REST
- URI
- /online_resource/< id >.xml
- < id >部にオンラインリソースの ID を指定
- /online_resource/< id >.xml
- エラー仕様
- 基本的には HTTP ステータスをもとにエラーハンドリングを行うこと
- ユーザパラメータにエラーがある場合は出来うる限りそのエラー内容を XML で返す
- エラー内容の仕様
- errors: エラーリスト
- error: エラー
- http_status_code: HTTP ステータスコード
- code: アプリケーションエラーコード
- name: エラー名
- message: エラーメッセージ
- error: エラー
- errors: エラーリスト
- エラーサンプル
<?xml version="1.0" encoding="UTF-8"?> <errors> <error> <http_status_code>401</http_status_code> <code>40401</code> <name>Orefil::InvalidOnlineResourceId</name> <message>Entry not Found. (:id => 99999)</message> </error> </errors>
- エラー内容の仕様
レスポンス仕様
- return (OnlineResource): オンラインリソース ( REST の場合は online_resource )
- id: オンラインリソース ID
- title: オンラインリソースタイトル
- updated_at: データ更新日 ( XML Schema 形式の日付で記載 )
- average_stars: レーティング平均値
- mesh_term_list: MeSH リスト
- item: MeSH 単体 ( REST の場合は mesh_term )
- url: オンラインリソース URL
- pages: 参照リンク検索 URL リスト
- item: 参照リンク検索 ( REST の場合は page )
- name: 検索エンジン名
- url: 参照リンク検索 URL
- item: 参照リンク検索 ( REST の場合は page )
- papers: 参照文献検索 URI リスト
- item: 参照文献検索 ( REST の場合は paper )
- name: 検索エンジン名
- url: 参照文献検索 URL
- item: 参照文献検索 ( REST の場合は paper )
- pmid_list: 参照 PubMed の PMID リスト
- item: 参照 PubMed の pmid ( REST の場合は pmid )
リクエスト / レスポンスサンプル
以下のクエリで Web API を呼び出すリクエストとその結果のレスポンスを SOAP / REST の二つでサンプルとして示す。
- リクエスト内容
- オンラインリソース ID : 4980
SOAP
- リクエスト
<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Body> <m:GetResourceInfoById xmlns:m="urn:ActionWebService"> <id xsi:type="xsd:int">4980</id> </m:GetResourceInfoById> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
- レスポンス
<?xml version="1.0" encoding="UTF-8" ?> <env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <env:Body> <n1:GetResourceInfoByIdResponse xmlns:n1="urn:ActionWebService" env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <return xsi:type="n1:Resource..OnlineResource"> <id xsi:type="xsd:int">4980</id> <mesh_term_list n2:arrayType="xsd:string[28]" xmlns:n2="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="n2:Array"> <item>Abnormalities, Multiple</item> <item>Carbamoyl-Phosphate Synthase I Deficiency Disease</item> <item>Chickens</item> <item>Chromosome Deletion</item> <item>Chromosome Mapping</item> <item>Chromosomes, Human, Pair 2</item> <item>Computational Biology</item> <item>DNA Primers</item> <item>Database Management Systems</item> <item>Databases, Genetic</item> <item>Databases, Nucleic Acid</item> <item>Databases, Protein</item> <item>Exons</item> <item>Genome</item> <item>Genome, Human</item> <item>Genomics</item> <item>Information Storage and Retrieval</item> <item>Internet</item> <item>Linkage (Genetics)</item> <item>Microsatellite Repeats</item> <item>Polymorphism, Single Nucleotide</item> <item>Proteins</item> <item>Proteome</item> <item>Proteomics</item> <item>RNA, Messenger</item> <item>Sequence Alignment</item> <item>Software</item> <item>Zebrafish</item> </mesh_term_list> <pmid_list xmlns:n3="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="n3:Array" n3:arrayType="xsd:string[15]"> <item>16888352</item> <item>16381938</item> <item>12045153</item> <item>15216554</item> <item>17151077</item> <item>16888348</item> <item>16372332</item> <item>11932250</item> <item>16722777</item> <item>12519945</item> <item>16500937</item> <item>17142222</item> <item>15554057</item> <item>15608236</item> <item>16888346</item> </pmid_list> <papers n4:arrayType="n1:Resource..Paper[4]" xmlns:n4="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="n4:Array"> <item> <name xsi:type="xsd:string">BioMed Central</name> <url xsi:type="xsd:string">http://www.biomedcentral.com/search/results.asp?txtSearch1=genome.ucsc.edu%2F&amp;chkBMCJournals=true&amp;chkCurrentOpinion=true&amp;drpFromDate=&amp;drpToDate=&amp;chkNSP=true&amp;drpAddedInLast=&amp;drpOrderBy=by+date&amp;drpPerPage=20&amp;drpAbstract=no+abstract&amp;strTempString=&amp;strSearchBoxType=bmc_boolean_results&amp;Search.x=10&amp;jou_id=&amp;Search.x=0&amp;Search.y=0&amp;Search=Search</url> </item> <item> <name xsi:type="xsd:string">Scirus</name> <url xsi:type="xsd:string">http://www.scirus.com/srsapp/search?q=genome.ucsc.edu%2F&amp;ds=jnl&amp;g=s&amp;t=all</url> </item> <item> <name xsi:type="xsd:string">HighWire Press</name> <url xsi:type="xsd:string">http://highwire.org/cgi/searchresults?fulltext=genome.ucsc.edu%2F&amp;andorexactfulltext=and&amp;author1=&amp;pubdate_year=&amp;volume=&amp;firstpage=&amp;src=hw&amp;searchsubmit=redo&amp;resourcetype=1&amp;search=Search&amp;fmonth=Jan&amp;fyear=1844&amp;tmonth=Dec&amp;tyear=2007&amp;fdatedef=1+January+1844&amp;tdatedef=31+Dec+2007</url> </item> <item> <name xsi:type="xsd:string">Google Scholar</name> <url xsi:type="xsd:string">http://scholar.google.com/scholar?hl=en&amp;lr=&amp;q=genome.ucsc.edu%2F&amp;btnG=Search</url> </item> </papers> <average_stars xsi:type="xsd:double">+3.5</average_stars> <url xsi:type="xsd:string">http://genome.ucsc.edu/</url> <updated_at xsi:type="xsd:dateTime">2008-02-20T00:00:00+09:00</updated_at> <pages n5:arrayType="n1:Resource..Page[2]" xmlns:n5="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="n5:Array"> <item> <name xsi:type="xsd:string">Google</name> <url xsi:type="xsd:string">http://www.google.com/search?hl=en&amp;q=link%3ahttp%3A%2F%2Fgenome.ucsc.edu%2F&amp;btnG=Google+Search</url> </item> <item> <name xsi:type="xsd:string">Altavista</name> <url xsi:type="xsd:string">http://www.altavista.com/web/results?itag=ody&amp;q=link:http%3A%2F%2Fgenome.ucsc.edu%2F&amp;kgs=0&amp;kls=1</url> </item> </pages> <title xsi:type="xsd:string">UCSC Genome Browser Home</title> </return> </n1:GetResourceInfoByIdResponse> </env:Body> </env:Envelope>
REST
- リクエスト
/online_resource/4980.xml
- レスポンス
<?xml version="1.0" encoding="UTF-8"?> <online_resource> <id>4980</id> <title>UCSC Genome Browser Home</title> <updated_at>2008-02-20T00:00:00+09:00</updated_at> <average_stars>3.5</average_stars> <mesh_term_list> <mesh_term>Abnormalities, Multiple</mesh_term> <mesh_term>Carbamoyl-Phosphate Synthase I Deficiency Disease</mesh_term> <mesh_term>Chickens</mesh_term> <mesh_term>Chromosome Deletion</mesh_term> <mesh_term>Chromosome Mapping</mesh_term> <mesh_term>Chromosomes, Human, Pair 2</mesh_term> <mesh_term>Computational Biology</mesh_term> <mesh_term>DNA Primers</mesh_term> <mesh_term>Database Management Systems</mesh_term> <mesh_term>Databases, Genetic</mesh_term> <mesh_term>Databases, Nucleic Acid</mesh_term> <mesh_term>Databases, Protein</mesh_term> <mesh_term>Exons</mesh_term> <mesh_term>Genome</mesh_term> <mesh_term>Genome, Human</mesh_term> <mesh_term>Genomics</mesh_term> <mesh_term>Information Storage and Retrieval</mesh_term> <mesh_term>Internet</mesh_term> <mesh_term>Linkage (Genetics)</mesh_term> <mesh_term>Microsatellite Repeats</mesh_term> <mesh_term>Polymorphism, Single Nucleotide</mesh_term> <mesh_term>Proteins</mesh_term> <mesh_term>Proteome</mesh_term> <mesh_term>Proteomics</mesh_term> <mesh_term>RNA, Messenger</mesh_term> <mesh_term>Sequence Alignment</mesh_term> <mesh_term>Software</mesh_term> <mesh_term>Zebrafish</mesh_term> </mesh_term_list> <url>http://genome.ucsc.edu/</url> <pages> <page> <name>Google</name> <url> http://www.google.com/search?hl=en&q=link%3ahttp%3A%2F%2Fgenome.ucsc.edu%2F&btnG=Google+Search </url> </page> <page> <name>Altavista</name> <url> http://www.altavista.com/web/results?itag=ody&q=link:http%3A%2F%2Fgenome.ucsc.edu%2F&kgs=0&kls=1 </url> </page> </pages> <papers> <paper> <name>BioMed Central</name> <url> http://www.biomedcentral.com/search/results.asp?txtSearch1=genome.ucsc.edu%2F&chkBMCJournals=true&chkCurrentOpinion=true&drpFromDate=&drpToDate=&chkNSP=true&drpAddedInLast=&drpOrderBy=by+date&drpPerPage=20&drpAbstract=no+abstract&strTempString=&strSearchBoxType=bmc_boolean_results&Search.x=10&jou_id=&Search.x=0&Search.y=0&Search=Search </url> </paper> <paper> <name>Scirus</name> <url> http://www.scirus.com/srsapp/search?q=genome.ucsc.edu%2F&ds=jnl&g=s&t=all </url> </paper> <paper> <name>HighWire Press</name> <url> http://highwire.org/cgi/searchresults?fulltext=genome.ucsc.edu%2F&andorexactfulltext=and&author1=&pubdate_year=&volume=&firstpage=&src=hw&searchsubmit=redo&resourcetype=1&search=Search&fmonth=Jan&fyear=1844&tmonth=Dec&tyear=2007&fdatedef=1+January+1844&tdatedef=31+Dec+2007 </url> </paper> <paper> <name>Google Scholar</name> <url> http://scholar.google.com/scholar?hl=en&lr=&q=genome.ucsc.edu%2F&btnG=Search </url> </paper> </papers> <pmid_list> <pmid>16888352</pmid> <pmid>16381938</pmid> <pmid>12045153</pmid> <pmid>15216554</pmid> <pmid>17151077</pmid> <pmid>16888348</pmid> <pmid>16372332</pmid> <pmid>11932250</pmid> <pmid>16722777</pmid> <pmid>12519945</pmid> <pmid>16500937</pmid> <pmid>17142222</pmid> <pmid>15554057</pmid> <pmid>15608236</pmid> <pmid>16888346</pmid> </pmid_list> </online_resource>
チケットの履歴
Note: チケットについてのヘルプは
TracTickets を参照
して下さい。