Jamie
Jamie

Reputation: 782

How to get a Protein Data Bank API Post to work

I am working through the example API post request at https://alignment.rcsb.org/#submit-alignment-job. I submit the job exactly as shown below with the exact endpoint and query of their example but I get a 404 response. I have tried restructuring the query and have tried other examples on their page but it continually gives me the 404 response. How can I get this to work?

def submittwostructstoPDB():
    import requests

    url="https://alignment.rcsb.org/api/v1/structures/submit/"
    jsontext={"context":{"mode":"pairwise","method":{"name":"fatcat-rigid"},"structures":[{"entry_id":"8HSK","selection":{"asym_id":"A"}},{"entry_id":"8HSF","selection":{"asym_id": "A"}}]}}
        
    
    response = requests.post(url, json = jsontext)
        
    return response

submittwostructstoPDB()

Upvotes: 0

Views: 33

Answers (0)

Related Questions