如何使用 rally Webservice 创建新连接 API

How to create new connections using rally Webservice API

我想 post 通过 Rally 与用户故事建立新的联系 API;但是,我不断收到错误消息。我可能做错了什么?

我尝试使用这个 API 端点: https://rally1.rallydev.com/slm/webservice/v2.0/changeset/createContent-Type: text/plain

{
  "Changeset": {
  "Message":"another test"
  }
}

我收到了这个回复

{
    "CreateResult": {
        "_rallyAPIMajor": "2",
        "_rallyAPIMinor": "0",
        "Errors": [
            "Validation error: Changeset.SCMRepository should not be null"
        ],
        "Warnings": []
    }
}

然后我在下面尝试了这个

{
  "Changeset": {
  "Message":"another test",
  "SCMRepository": {
    "ObjectName": "TestGithubRallyIntegration"
    }
  }
}

得到了

{
    "CreateResult": {
        "_rallyAPIMajor": "2",
        "_rallyAPIMinor": "0",
        "Errors": [
            "Cannot parse object reference from \"{\"SCMRepository\": {\"ObjectName\": \"TestGithubRallyIntegration\"}}\""
        ],
        "Warnings": []
    }
}

我可能做错了什么?

所以,我找到了出路。

至Update/Create ChnageSet

uri: https://rally1.rallydev.com/slm/webservice/v2.0/changeset/create

{
    "Changeset": {
        "Message":"another test",
        "Artifacts": {"Artifact":"/HierarchicalRequirement/<UserStory also known as HierarchicalRequirement>"},
        "SCMRepository": "/scmrepository/<Id>",
        "Revision":"1",
        "CommitTimestamp":"2018-08-18"
    }
}