I have looked over the API documentation here: http://testlink.org/api/phpdoc_generate ... rtTCResult
I have also seen some bugs and posts on how the use of the external ID in the API has caused slowness with large data sets.
The use-case I am looking for is to be able to import test results using the external Id of the test. I could not find anything on the road map or bugs that speaks to this use case.
The process at our company is to create manual tests then automate the manual test once it has proven stable enough to be automated. We are looking for a common reporting mechanism across manual and automated tests and test link's provides a good way to do that.
For automated test reporting right now I am using the helper function getTestCaseIDByName to look up the testcase ID. The issue is that this dictates that the names of the tests be unique. If your test name is not unique the system will return a list of internal ids for every test and there is no good way to say which is the real test to match.
There are a few ways to address the issue.
1) Have reportTCResult require either of the following:
int $args["testcaseid"]:
int $args["testcaseexternalid"]:
2) Supply a new helper method called "getTextCaseIDByExternalID"
3) Show the internal ID of the test in the UI so that the Automation folks could just put in the mapping.
4) Fix the issue with the performance of the external ID in the APIs and have all apis use that unique external id. In my experience this type of performance issue is caused by a join over large data sets. This is just a guess but again it seems like a join issue. I am going to avoid the soap box if why we would ever want to expose an internal database ID over an already unique external id that is exposed in the UI.

I would prefer the have option 1 as that would remove the need for an extra lookup for every test result imported but considering all of the issues with API performance with large data sets issue 2 might be a better solution for the short term.
Note: I have considered a mapping on my end of external ID's and Internal IDs but the rate at which the manual testers are producing tests this would be a maintenance challenge as this is data I would like to have checked into source control.
Thanks!
Jonathan