What is the 'tid' attribute in the /service/extdirect API payload?

633 views
Skip to first unread message

Haani Niyaz

unread,
Oct 23, 2020, 9:23:43 PM10/23/20
to Nexus Users
I recently discovered a potential bug in the Nexus 3 User API where roles aren't returned:

I know I can use a GET /service/extdirect endpoint to get the right results I need. However there is a tid attribute which seems to take an int and from what I can tell accepts an arbitrary value.

I'm developing a REST API client in Go and would like to get past this hurdle until the aforementioned issue is fixed. Can I get some context around 'tid' attribute in the RPC call:

{"action":"coreui_User","method":"get","data":["d12345","Crowd"],"type":"rpc","tid":70}

Thanks.

Wes Wannemacher

unread,
Oct 26, 2020, 11:26:38 AM10/26/20
to Nexus Users, Haani Niyaz
In the NXRM code, that extdirect endpoint is managed by / consumed as an external dependency. At one point, it was an open source project, but the upstream seems to have been abandoned. Instead, we have maintained our fork here: https://github.com/sonatype/directjngine. On our dev team, we prefer to use REST endpoints and I would consider the use of the extdirect endpoint to be "deprecated" (as in, for new development, we use REST). That being said, hopefully you can reverse engineer what is expected for that `tid` value. 

-Wes

--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users...@glists.sonatype.com.
To view this discussion on the web visit https://groups.google.com/a/glists.sonatype.com/d/msgid/nexus-users/6b6e83cd-2e69-4fb3-af62-944fedf84edbn%40glists.sonatype.com.


--
Sonatype
Wesley Wannemacher
Engineering Manager
Phone: 567.204.3766

Matthew Piggott

unread,
Oct 26, 2020, 2:42:13 PM10/26/20
to Nexus Users, haani...@gmail.com

The tldr is multiple requests are multiplexed into a single request and the tid is used to identify the response for a given request. If you're only sending one request at a time any integer ought to work on the request and you can ignore it on the response.
Message has been deleted

Haani Niyaz

unread,
Oct 28, 2020, 6:44:32 PM10/28/20
to Nexus Users, Matthew Piggott, Haani Niyaz
Thanks Matthew, that definitely helps.
Reply all
Reply to author
Forward
0 new messages