0

Using json w/ Python requests to create task, fails with:

{ "_type": "Error", "error": "Bad Request", "exceptions": [ { "type": "DataException", "message": "Violation'NotSupported" } ] }

URL used: https://www5.v1host.com/INSTANCE/rest-1.v1/Data/Task

Here is the body of the request: (headers are the usual; Authorization, Content-Type, Accept)

{
  "Attributes": {
    "Parent": {
      "value": {
        "href": "/INSTANCE/rest-1.v1/Data/Story/1520179",
        "idref": "Story:1520179"
      },
      "act": "set"
    },
    "Category": {
      "value": {
        "href": "/INSTANCE/rest-1.v1/Data/TaskCategory/113",
        "idref": "TaskCategory:113"
      },
      "act": "set"
    },
    "Source": {
      "value": {
        "href": "/INSTANCE/rest-1.v1/Data/TaskSource/954121",
        "idref": "TaskSource:954121"
      },
      "act": "set"
    },
    "Status": {
      "value": {
        "href": "/INSTANCE/rest-1.v1/Data/TaskStatus/123",
        "idref": "TaskStatus:123"
      },
      "act": "set"
    },
    "Owners": {
      "value": {
        "href": "/INSTANCE/rest-1.v1/Data/Member/1337179",
        "idref": "Member:1337179"
      },
      "act": "add"
    },
    "Order": {
      "value": "1073828387",
      "act": "set"
    },
    "ToDo": {
      "value": 6,
      "act": "set"
    },
    "DetailEstimate": {
      "value": 6,
      "act": "set"
    },
    "Description": {
      "value": "<p>Meetings/Planning<br>Scrum attendance (x2)<br>Team meetings<br>Sprint planning<br>Demo coordination<br>Management meetings (x2)<br>Daily Progress Reporting</p>",
      "act": "set"
    },
    "Name": {
      "value": "Scrum Meetings/Team Mgmt",
      "act": "set"
    }
  }
}

Any ideas on what is wrong with this request? (Found very few examples of this type of operation)

  • Pretty sure this is coming from the "Order" attribute which is of type "Rank". When using the UI, there are a drop down of types to select from, but when looking at an existing task, the value of a "Order" is a numeric in quotes. – Steve Sonnenberg Sep 03 '20 at 20:19
  • When submitting "Order" with the textual form, "value": "PRJ-06839-CORE Infrastructure-Conduent", the server responds with "FormatException" message: "Input string was not in a correct format". – Steve Sonnenberg Sep 03 '20 at 20:25

0 Answers0