Skip to content

Commit 4f2b609

Browse files
author
Renato Juaçaba Neto
committed
Add url convertion endpoints to API page
1 parent 5135b31 commit 4f2b609

File tree

1 file changed

+75
-0
lines changed

1 file changed

+75
-0
lines changed

pages/api.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,82 @@ Refer to the example for more details.
5151
{: .list-none}
5252

5353

54+
##### <i class="icon icon-common icon-external-link-alt mw-2"></i>Convert provider URL to identifiers.org URI
5455

56+
- **Endpoint:** `https://resolver.api.identifiers.org/reverse/byPrefix`
57+
- **Method:** POST
58+
- **Description:** Converges a provider URL into an identifiers.org URL if an exact match is found.
59+
- **Request body example:**
60+
```json
61+
{
62+
"apiVersion":"1.0",
63+
"payload": {
64+
"url":"https://www.ebi.ac.uk/intact/interaction/EBI-2307691",
65+
"accession": "EBI-2307691"
66+
}
67+
}
68+
```
69+
- &#8618; The accession attribute is optional. When undefined, the resolver will guess it based on the URL components.
70+
{: .list-none}
71+
- **Response body example:**
72+
```json
73+
{
74+
"apiVersion": "1.0",
75+
"errorMessage": null,
76+
"payload": {
77+
"prefix": "intact",
78+
"possible_idorg_url": "http://identifiers.org/intact:EBI-2307691",
79+
"possible_idorg_curie": "intact:EBI-2307691",
80+
"lui_pattern_match": true,
81+
"similarity_score": 100.0
82+
}
83+
}
84+
```
85+
- &#8618; Response code 200 means a match was found while 204 represents no match.
86+
{: .list-none}
87+
{: .list-none}
88+
89+
90+
##### <i class="icon icon-common icon-external-link-alt mw-2"></i>List identifiers.org URI similar to a provider URL
91+
92+
- **Endpoint:** `https://resolver.api.identifiers.org/reverse/bySimilarity`
93+
- **Method:** POST
94+
- **Description:** Lists resources by similarity with given URL and accession. This is useful when an exact match is not available.
95+
- **Request body example:**
96+
```json
97+
{
98+
"apiVersion":"1.0",
99+
"payload": {
100+
"url":"https://www.ebi.ac.uk/intact/interaction/EBI-2307691",
101+
"accession": "EBI-2307691"
102+
}
103+
}
104+
```
105+
- &#8618; The accession attribute is optional. When undefined, the resolver will guess it based on the URL components.
106+
{: .list-none}
107+
- **Response body example:**
108+
```json
109+
{
110+
"apiVersion":"1.0",
111+
"errorMessage": null,
112+
"payload": [{
113+
"prefix":"intact",
114+
"possible_idorg_url":"http://identifiers.org/intact:EBI-2307691",
115+
"possible_idorg_curie":"intact:EBI-2307691",
116+
"lui_pattern_match":true,
117+
"similarity_score":100.0
118+
},{
119+
"prefix":"intact.molecule",
120+
"possible_idorg_url":"http://identifiers.org/intact.molecule:EBI-2307691",
121+
"possible_idorg_curie":"intact.molecule:EBI-2307691",
122+
"lui_pattern_match":true,
123+
"similarity_score":77.5
124+
},{
125+
...
126+
}]
127+
}
128+
```
129+
{: .list-none}
55130

56131

57132

0 commit comments

Comments
 (0)