improved

Changes to History API in Targetprocess 3.10.9

As you probably know we're working on a new History API at the moment. Because of that, we had to bring a little change in the existing History API and rename Histories collections to SimpleHistories collections.

Here is how it worked before the version 3.10.9:

/api/v1/userstoryhistories
<UserStoryHistories Next="https://restapi.tpondemand.com/api/v1/UserStoryHistories/?take=25&skip=25">
  <UserStoryHistory ResourceType="UserStoryHistory" Id="1">
  <Date>2016-10-28T09:00:00</Date>
  <Effort>0.0000</Effort>
  <EffortCompleted>0.0000</EffortCompleted>
  <EffortToDo>0.0000</EffortToDo>
  <Project ResourceType="Project" Id="13" Name="Tau Product Web Site - Scrum #1"/>
  <EntityState ResourceType="EntityState" Id="73" Name="Open">
  <NumericPriority>73</NumericPriority>
  </EntityState>
  <Modifier ResourceType="GeneralUser" Id="5">
  <FirstName>Target</FirstName>
  <LastName>Process</LastName>
  <Login>System</Login>
  </Modifier>
  <UserStory ResourceType="UserStory" Id="15" Name="Search for support articles"/>
  <Release nil="true"/>
  <Iteration nil="true"/>
  </UserStoryHistory>
  ...
</UserStoryHistories>
{
  "Next": "https://restapi.tpondemand.com/api/v1/UserStoryHistories/?format=json&take=25&skip=25",
  "Items": [
    {
      "ResourceType": "UserStoryHistory",
      "Id": 1,
      "Date": "\/Date(1477663200000-0500)\/",
      "Effort": 0.0000,
      "EffortCompleted": 0.0000,
      "EffortToDo": 0.0000,
      "Project": {
        "ResourceType": "Project",
        "Id": 13,
        "Name": "Tau Product Web Site - Scrum #1"
      },
      "EntityState": {
        "ResourceType": "EntityState",
        "Id": 73,
        "Name": "Open",
        "NumericPriority": 73.0
      },
      "Modifier": {
        "ResourceType": "GeneralUser",
        "Id": 5,
        "FirstName": "Target",
        "LastName": "Process",
        "Login": "System"
      },
      "UserStory": {
        "ResourceType": "UserStory",
        "Id": 15,
        "Name": "Search for support articles"
      },
      "Release": null,
      "Iteration": null
    }
    ...
}

And here is it works now:

/api/v1/userstoryhistories
or
/api/v1/userstorysimplehistories
<UserStorySimpleHistories Next="https://restapi.tpondemand.com/api/v1/UserStorySimpleHistories/?take=25&skip=25">
  <UserStorySimpleHistory ResourceType="UserStorySimpleHistory" Id="1">
  <Date>2016-10-28T09:00:00</Date>
  <Effort>0.0000</Effort>
  <EffortCompleted>0.0000</EffortCompleted>
  <EffortToDo>0.0000</EffortToDo>
  <Project ResourceType="Project" Id="13" Name="Tau Product Web Site - Scrum #1"/>
  <EntityState ResourceType="EntityState" Id="73" Name="Open">
  <NumericPriority>73</NumericPriority>
  </EntityState>
  <Modifier ResourceType="GeneralUser" Id="5">
  <FirstName>Target</FirstName>
  <LastName>Process</LastName>
  <Login>System</Login>
  </Modifier>
  <UserStory ResourceType="UserStory" Id="15" Name="Search for support articles"/>
  <Release nil="true"/>
  <Iteration nil="true"/>
  </UserStorySimpleHistory>
  ...
</UserStorySimpleHistories>
{
  "Next": "https://restapi.tpondemand.com/api/v1/UserStorySimpleHistories/?format=json&take=25&skip=25",
  "Items": [
    {
      "ResourceType": "UserStorySimpleHistory",
      "Id": 1,
      "Date": "\/Date(1477663200000-0500)\/",
      "Effort": 0.0000,
      "EffortCompleted": 0.0000,
      "EffortToDo": 0.0000,
      "Project": {
        "ResourceType": "Project",
        "Id": 13,
        "Name": "Tau Product Web Site - Scrum #1"
      },
      "EntityState": {
        "ResourceType": "EntityState",
        "Id": 73,
        "Name": "Open",
        "NumericPriority": 73.0
      },
      "Modifier": {
        "ResourceType": "GeneralUser",
        "Id": 5,
        "FirstName": "Target",
        "LastName": "Process",
        "Login": "System"
      },
      "UserStory": {
        "ResourceType": "UserStory",
        "Id": 15,
        "Name": "Search for support articles"
      },
      "Release": null,
      "Iteration": null
    }
    ...
}