Skip to content

API manual

祝云篪 edited this page Apr 26, 2023 · 5 revisions

PDB-CIF converter

Convert PDB to CIF for Mol* visualization.

URL

/api/pdb2alphacif/

Request

POST JSON

{
    "name": protein name
    "data": base64-encoded PDB text
}

Response

CIF TEXT

Elasticsearch interface

Transfer requests to Elasticsearch API.

Add

Add protein to Elasticsearch.

URL

/api/es/<repo>/add/<_id>

<repo>   target repository name
<_id>    target id

Request

POST JSON

{
    "name": protein name
    "seq": protein sequence
    "anno": 
    {
        "homolog": UniProt homolog
        "description": [annotation1, annotation2, ...]
    }
}

Response

Standard response of Elasticsearch Index API.


Delete

Delete protein in Elasticsearch.

URL

  • Delete one protein
/api/es/<repo>/del/<_id>

<repo>   target repository name
<_id>    target protein id
  • Delete one repository
/api/es/<repo>/del/

<repo>   target repository name

Request

POST

Response

Standard response of Elasticsearch Delete API.


Get

Get protein information from Elasticsearch.

URL

/api/es/<repo>/get/<_id>

<repo>   target repository name
<_id>    target protein id

Request

GET, POST

Response

Standard response of Elasticsearch Get API.


Search

Search proteins from Elasticsearch.

URL

/api/es/<repo>/search/<term>

<repo>    target repository name
<term>    base64-encoded search terms

Request

GET, POST

Response

The {hits{{hits}} subset of Elasticsearch Search API reponse.

[
    {
        "_index": ...,
        "_type": ...,
        "_id": ...,
        "_score": ...,
        "_source": {...}
    },
    {
        "_index": ...,
        "_type": ...,
        "_id": ...,
        "_score": ...,
        "_source": {...}
    }...
]

Import to repository

Import data to target protein repository.

Check

Check if file to upload already exists in target protein repository.

URL

/api/import2repo/check.php

Request

GET

{
    "name": file name
    "repo": repository name
}

Response

MD5 of target file repo/name


Import

URL

/api/import2repo/

Request

POST JSON GZIP

{
    "name": protein name
    "repo": target repository name
    "text": base64-encoded file text
    "force": force overwritting or not
    "gzip": compress files or not
}

Salign

Generate Salign cache and start structure alignment calculation.

URL

/api/salign/

Request

POST

{
    "repo": target repository name
    "search": keywords for restricting the searching scope
    "rmsd": max RMSD
    "structure": query structure
}

Response

rid for USalign job

Access <mineprot_url>/salign/result.php?rid=<rid> for results.

Cache processing

Clear

Clear cache for Browse page.

URL

/api/cache/clear.php

Request

GET

{
    "repo": repository name
}

Get

Get results from Salign cache.

URL

/api/cache/get.php

Request

GET

{
    "data_url": base64-encoded path to target Salign cache
}

Update

Update cache for Browse page and clear Salign cache.

URL

/api/cache/update.php

Request

GET

This feature is only available on the Linux platform.