Code Integration Scenarios
R Convenience Functions
"Level 1" functions
"Level 2" functions
Web Services
These manipulation only the metadata, stored in Synapse.
Note: It is assumed that code versions are represented by refererences.
Create Code
POST https://repo-staging.sagebase.org/repo/v1/code {"parentId":"1234", "codeRepoId":"4567", "codeRepoLoc":"/trunk/analysisProject/R"}
Note: "parentId" is the ID of a Synapse Project; "codeRepoId" is the ID of a Code Repository object.
Successful Response:
HTTP/1.1 201 Created {"id":"8901", "parentId":"1234", "codeRepoId":"4567", "codeRepoLoc":"/trunk/analysisProject/R"}
Get Code
GET https://repo-staging.sagebase.org/repo/v1/code/8901
Successful Response:
HTTP/1.1 200 OK {"id":"8901", "parentId":"1234", "codeRepoId":"4567", "codeRepoLoc":"/trunk/analysisProject/R"}
Update Code
PUT https://repo-staging.sagebase.org/repo/v1/code/8901 {"id":"8901", "parentId":"5432", "codeRepoId":"4567", "codeRepoLoc":"/trunk/analysisProject/R"}
Successful Response:
HTTP/1.1 200 OK {"id":"8901", "parentId":"5432", "codeRepoId":"4567", "codeRepoLoc":"/trunk/analysisProject/R"}
Delete Code
DELETE https://repo-staging.sagebase.org/repo/v1/code/8901
Successful Response:
HTTP/1.1 204 No Content
Create Code Repository
POST https://repo-staging.sagebase.org/repo/v1/codeRepo {"codeRepoType":"svn", "codeRepoURL":"https://sagebionetworks.jira.com/svn"}
Successful Response:
HTTP/1.1 201 Created {id:"9876", "codeRepoType":"svn", "codeRepoURL":"https://sagebionetworks.jira.com/svn"}
TODO: GET, PUT, DELETE
Create Code Repo Credentials
POST https://repo-staging.sagebase.org/repo/v1/codeRepoCredentials {"codeRepoId:"9876", "username":"foo": "password":"bar"}
Note: This request must be authenticated and the credentials are created for the authenticated user. The given "username" need not be the same as the user's Synapse username.
Successful Response:
HTTP/1.1 201 Created {"id":"5432", "codeRepoId:"9876", "username":"foo": "password":"bar"}
TODO: Should the password be 'echoed'?
TODO: GET, PUT, DELETE