getroadmap / roadmap-api

API documentation for Roadmap
3 stars 2 forks source link

Some items return null resources #8

Closed SPGB closed 8 years ago

SPGB commented 9 years ago

Some of the todos assigned with me as a resource report back as Resources: null

For example, within Roadmap I can see that I am a resource for this todo: roadmap api 2b

From the api, resources returns null when it should return with my user collection: roadmap bug2

bkingbking commented 9 years ago

Hi @SPGB, I wanted to at least acknowledge your question as our primary API developer is gone for the day. Is it possible your question is related to #7? If yes, we plan to address in the next API update.

SPGB commented 9 years ago

Thanks for the quick response @bkingbking

It may be related, although he is looking at the project level or /project/{projectID}/resource, a use case which I understand is currently not supported. ("we will add a method to support your use case in the near future.")

My issue is at an individual item level, a use case which should currently be supported, is returning null when it should be returning with a resource.

AndrewKaplanovsky commented 9 years ago

@SPGB Dear Sam, the Public API call that you're using is designed to retrieve all todos that belong to a todo list specified

https://api.ppmroadmap.com/Help/Api/GET-v1.1-project-projectId-todolist-todoListId-item

Please note that as mentioned in the documentation, for the performance and load balance purposes we do not retrieve the resources that are assigned to the todos. That's why you see the Resources property set to null. If you need to retrieve the full information about a todo (including its assigned resources), please use another PublicAPI call

https://api.ppmroadmap.com/Help/Api/GET-v1.1-project-projectId-todolist-todoListId-item-todoItemId

Please also not that the same logic is applied for project milestones. This call

https://api.ppmroadmap.com/Help/Api/GET-v1.1-project-projectId-milestone

will return the list of all project milestones (resources excluded), while

https://api.ppmroadmap.com/Help/Api/GET-v1.1-project-projectId-milestone-milestoneId

will retrieve a milestone and all the resources assigned to it.

If you still have any questions, please let us know, we'll be glad to help.

SPGB commented 9 years ago

@AndrewKaplanovsky

The v1.1 endpoint "/project/{projectId}/todolist/{todoListId}/item" used to return resources, but now only returns a null field for Resources?

Checking it now, I see a note has been recently added to the documentation "Note! Resources that are assigned to todos are NOT returned. In case if you need resources assigned to a todo, get this todo by its ID (use /project/{projectId}/todolist{todoListId}/item{todoItemId})."

The feature originally worked but appears to have been recently removed. It seems like breaking existing functionality in this way defeats the point of versioning an api.

davejclausen commented 9 years ago

Sam, Andrew and I are going to confer on this, and then be in touch with a response. Thanks.

davejclausen commented 9 years ago

Hi again Sam - here is our explanation:

We did not change the behavior of v1.1. However, the behavior did change between v1.0 and v1.1.

v1.1 coincided with an enhancement to Roadmap supporting multiple resources per todo.

In v1.0 when you retrieve todos, you get the (single) resource assignment. However in v1.1 when you retrieve todos, we do not return the (list) of resources assigned to each todo (in order to control the size of responses). A separate call is needed to get the list of resources assigned to a todo.

With that being said, if your organization by convention only assigns one resource to a todo, you can use the v1.0 method to get todos together with their (single/first) resource assignment.