BCODB Sandbox: Difference between revisions

From BCOeditor Wiki
Jump to navigation Jump to search
(Created page with "==BCODB Sandbox== #To add BCODB Sandbox to your account, please contact BioCompute Team. #Once added, you should see BCODB Sandbox under your account page:thumb|center #The first '''Copy''' button will copy your token to the clipboard. #Then go to https://sandbox.biocomputeobject.org/api/docs/, you can either authorize using the button at the top:thumb|centerOr, the lock icon next to the API to authorize...")
 
(No difference)

Latest revision as of 18:27, 20 June 2023

BCODB Sandbox

  1. To add BCODB Sandbox to your account, please contact BioCompute Team.
  2. Once added, you should see BCODB Sandbox under your account page:
    BCODB Sandbox Account Page.png
  3. The first Copy button will copy your token to the clipboard.
  4. Then go to https://sandbox.biocomputeobject.org/api/docs/, you can either authorize using the button at the top:
    Sandbox login1.png
    Or, the lock icon next to the API to authorize:
    Lock button.png
  5. In the popup window, enter the following: "Token <Your copied token>". Then click Authorize.
    Token entry.png
  6. Click on Try it out, enter the BCO content in JSON format in the editable text box, then click Execute to finish. You will get a 401 The token provided does not have draft permissions for this prefix 'string' but you will see the CURL as well:

<curl -X POST "https://sandbox.biocomputeobject.org/api/objects/drafts/create/" -H "accept: application/json" -H "Authorization: Token ******************************" -H "Content-Type: application/json" -H "X-CSRFToken: heH4n52dPNFR4fLiYrL8MbyBS77Q0lEkV2KiwXuxpnMd0NspVfxrWTisMsS7DNdK" -d "{ \"POST_api_objects_draft_create\": [ { \"prefix\": \"string\", \"owner_group\": \"string\", \"object_id\": \"string\", \"schema\": \"string\", \"contents\": { \"additionalProp1\": {} } } ]}">