Website Usage Documentation
REST API Usage Documentation
API requests can be sent with the command line tool curl or with a browser rest
      client plugin. The API allows the user to create jobs for the respective tools with the HTTP method POST, each
      requiring a different set of parameters.
      Calculation results can then be accessed and downloaded with the HTTP method GET.
      The base url for current version (v1) is https://poseedit.proteins.plus/api.
      
Sample Call (curl):
curl -F pdb_file[pathvar]=@/path/myfile.pdb -X POST https://poseedit.proteins.plus/api/pdb_files_rest -H "Accept: application/json"400 is returned if an error occurrs. The response contains an id that can subsequently be used for tool calls instead of a pdb code.
Create PoseEdit Job
Creates a new PoseEdit job passing json data in body and returns json data about the location of the results.
- 
        URL: https://poseedit.proteins.plus/api/poseview2_rest 
- 
        Method: POST
- 
        URL Params: None 
- 
        Data Params: Required: 
 poseview2=[hash] - Contains the following parameters: pdbCode=[string] - Select a structure form the Protein Data Bank (PDB) via its PDB code. ligand=[string] - Set a ligand with respect to specified pdbCode or "".
- 
        Success Response: - Code: 200
            
 Content:{ status_code: 200, location: "", message: "Job already exists" }
 OR - Code: 202
            
 Content:{ status_code: 202, message: "The job will be created in the specified location", location: "" }
 OR - Code: 202
            
 Content:{ status_code: 202, message: "Job exists and is still in 'processing' state", location: "" }
 
- Code: 200
            
- 
        Error Response: - Code: 400 BAD REQUEST
            
 Content:{ status_code: 400, error: "Bad Request", message: "Parameter values must be strings" }
 OR - Code: 400 BAD REQUEST
            
 Content:{ status_code: 400, error: "Bad Request", message: "Invalid number of parameters or incorrect parameter name" }
 OR - Code: 400 BAD REQUEST
            
 Content:{ status_code: 400, error: "Bad Request", message: "Invalid pdbCode" }
 OR - Code: 400 BAD REQUEST
            
 Content:{ status_code: 400, error: "Bad Request", message: "Invalid ligand" }
 OR - Code: 400 BAD REQUEST
            
 Content:{ status_code: 400, error: "Bad Request", message: "Job saving error" }
 OR - Code: 400 BAD REQUEST
            
 Content:{ status_code: 400, error: "Bad Request", message: "Job loading error" }
 OR - Code: 429 TOO MANY REQUESTS
            
 Content:{ status_code: 429, error: "Too Many Requests", message: "Throttle limit reached. Retry later." }
 
- Code: 400 BAD REQUEST
            
- 
        Sample Data: { "poseview2": { "pdbCode":"1kzk", "ligand":"JE2_A_701"} }Sample Call (curl): curl -d '{"poseview2": {"pdbCode":"1kzk","ligand":"JE2_A_701"}}' -H "Accept: application/json" -H "Content-Type: application/json" -X POST https://poseedit.proteins.plus/api/poseview2_rest
Show PoseEdit Job
Returns json data about a single PoseEdit job.
- 
        URL: https://poseedit.proteins.plus/api/poseview2_rest/:id 
- 
        Method: GET
- 
        URL Params: Required: id=[string]
- 
        Data Params: None 
- 
        Success Response: - Code: 200
            
 Content:{ status_code: 200, result_svg: "" }
 OR - Code: 202
            
 Content:{ status_code: 202, message: "Job exists and is still in 'processing' state", location: "" }
 
- Code: 200
            
- 
        Error Response: - Code: 400 BAD REQUEST
            
 Content:{ status_code: 400, error: "Bad Request", message: "Job loading error" }
 OR - Code: 404 NOT FOUND
            
 Content:{ status_code: 404, error: "Not Found", message: "Invalid ID" }
 OR - Code: 429 TOO MANY REQUESTS
            
 Content:{ status_code: 429, error: "Too Many Requests", message: "Throttle limit reached. Retry later." }
 
 
- Code: 400 BAD REQUEST
            
- 
        Sample Call (curl): curl https://poseedit.proteins.plus/api/poseview2_rest/ixenp5kLNHohrRbj56fbt4dd
- 
        Output: result_svg - 2D-diagram of protein/DNA/RNA-ligand interactions (SVG-file) result_json - Input for the PoseEdit JavaScript library for the generation of interactive 2D-diagrams of protein/DNA/RNA-ligand interactions pdbCode - Code of the input PDB ligandName - Name of the input ligand
