The Codes api is how you upload new code to be executed for your tasks. List Code PackagesGET /2/projects/:project_id/codes ParametersIn URL:
Headers:
Required: Optional: HTTP GET /2/project/:project_id/codes?oauth=<token> Response{ "codes": [ { "id": "4ea9c05dcddb131f1a000002", "Timestamper": { "created_at": 1319747677957000000, "updated_at": 1319747677957000000 }, "project_id": "4ea9c05dcddb131f1a000001", "name": "HEREhelloFromPythonFLISEAFNVS", "runtime": "python", "latest_checksum": "bddaa97ffeaffb36d295511794a7f5fb", "rev": 1, "latest_history_id": "4ea9c05dcddb131f1a000003" } ] } Create/Upload a Code PackagePOST /projects/:project_id/ codesThis must be a multipart post containing the parameters below as well as the zip file containing your code package. Click here for more information on how to create a code package. ParametersIn URL:
Headers:
Required:
Optional: { "class_name": "helloFromPythonZKGVOVLHCP", "file_name": "hello.py", "code_name": "helloFromPythonZKGVOVLHCP", "oauth": "jTxYQDmMx5ZtVeZBT8jVx6oJDLw", "access_key": "helloFromPythonZKGVOVLHCP", "name": "helloFromPythonZKGVOVLHCP", "standalone": true, "version": "2", "timestamp": "Wed Nov 2 14:12:33 2011", "runtime": "python", "options": {} } Response{ "msg": "Upload successful.", "status_code": 200 } Get a Code PackageGET /projects/:project_id/codes/:code_id ParametersIn URL:
Required: Optional: HTTP GET /2/projects/4eb1b240cddb13606500000a/codes/4eb1b241cddb13606500000b?oauth=jTxYQDmMx5ZtVeZBT8jVx6oJDLw Response{ "id": "4eb1b241cddb13606500000b", "Timestamper": { "created_at": 1320268353423000000, "updated_at": 1320268353423000000 }, "project_id": "4eb1b240cddb13606500000a", "name": "helloFromPythonZKGVOVLHCP", "runtime": "python", "latest_checksum": "bddaa97ffeaffb36d295511794a7f5fb", "rev": 1, "latest_history_id": "4eb1b241cddb13606500000c" } TODO: Get zip package TODO: Code history functions. |
API - Version 2 >