createProject rpc call failing Follow
I am trying to call rpc/createProject with a request body of required parameters and it is failing with a response of errorcode: 100 and message: Cannot deserialize params. Method: 'createProject', params: '{.......(all params here)...
My request message:
{
"newProjectId": "eldnk",
"settings": {
"projectName": "Elnk",
"vcsSettings": {
"mappings": [{
"id": "id",
"vcs": "svn",
"url": "http://..valid url...",
"username": "username", (non Base64 encoded)
"password": "passwd" (non Base64 encoded)
}]
},
"checkIntervalSeconds": "300",
"projectModel": {
"type": "none"
},
"codeReviewIdPattern": "ELD-CR-{}",
"issueTrackerProviderSettings": {
"providerKey": "JIRA",
"settings": {
"serverURL": "http://validjiraurl",
"projectKey": "ECP",
"login": "login", (non Base64 encoded)
"password": "password" (non Base64 encoded)
}
}
}
}
Please sign in to leave a comment.
Try the folliwng one:
{"newProjectId":"test-project",
"settings":
{
"projectName":"test-projects",
"projectModel":{"type":"none"},
"codeReviewIdPattern":"ID-CR-{}",
"runInspections":true,
"mavenSettings":"",
"mavenProfiles":"",
"createUserGroups":true,
"defaultEncoding":"",
"defaultBranch":"trunk",
"skipFileContentsImport":["*.bin","*.dll","*.exe","*.so"],
"vcsSettings":
"{\"mappings\":[{\"vcs\":\"svn\",\"url\":\"https://svn_repo/\",\"authMethod\":\"Password\",\"login\":\"svn_admin\",\"password\":\"some_password\",\"mapping\":\"\",\"client\":\"\",\"svnBranches\":\"branches/\",\"id\":\"projectId\"}]}"
}
}
Thanks dude, that worked great. Can you please provide how do I enable issueTracker in this? I am using JIRA using password authentication mode.
Hey,
There is a trick, that should help you to get answers to most questions regarding Upsource API:
You might always see the exact request that is done by Upsource UI in the browser's Network log. How to do that:
The request will contain the exact json that was sent to the backend.