RTC REST or OSCL API : how to archive a user / contributor ?
Accepted answer
If there is no REST API for this, the Plain Java Client Libraries are available and can modify users.
- https://rsjazz.wordpress.com/2013/01/08/maintaing-user-photos-with-the-plain-java-client-libraries/
- https://rsjazz.wordpress.com/2012/10/12/changing-the-jazz-user-id-using-the-rtc-plain-java-client-libraries/ (Does not work for DNG)
- https://rsjazz.wordpress.com/2017/03/29/managing-contributor-licenses-using-the-plain-java-client-libraries/
3 other answers
You can find documentation on the foundation users API referenced from
The syntax of the query is described in https://jazz.net/wiki/bin/view/Main/JFSApplicationQueryLib#Query_Syntax
For example, you might use a query string (unencoded) of foaf:name="Firstname Lastname" or foaf:mbox="user@domainname.com".
Remember that query parameters should be URL encoded. For example:
GET https://jazz.net/jazz/users?query=foaf%3Aname%3D%22Firstname%20Lastname%22
application/atom+xml
Comments
You can also try looking at the history of the Wiki page: https://jazz.net/wiki/bin/rdiff/Main/JFSUsersAPI?type=history. Not sure if you have access to that.
Have you tried a GET followed by a PUT?
This might provide:
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:jfs="http://jazz.net/xmlns/prod/jazz/jfs/1.0/"
xmlns:foaf="http://xmlns.com/foaf/0.1/">
<rdf:Description rdf:about="https://clmwb.com:9443/jts/users/TestJazzAdmin1">
<foaf:mbox rdf:resource="mailto:jazzdt@info.com"/>
<foaf:nick>TestJazzAdmin1</foaf:nick>
<foaf:name>TestJazzAdmin1</foaf:name>
<jfs:archived rdf:datatype="http://www.w3.org/2001/XMLSchema#boolean"
>false</jfs:archived>
<rdf:type rdf:resource="http://xmlns.com/foaf/0.1/Person"/>
</rdf:Description>
</rdf:RDF>
Change the jfs:archived property to true, then perform a PUT.
Try that.
Comments
He probably does not know how to discover the base URI to find users etc. David. It is not obvious.
Yep. Good guess. :) How can I get the base URI for a particular user ?
Don't forget to get the etag returned in the GET response header and put it in the PUT call header !
Precision : The PUT or PATCH methods are not supported by this url.
The original documentation on the Wiki says:
User Write Access
This service provides read-only access to user resources, and while future versions may provide the ability to create, update and delete user resources today this must be accomplished through the Jazz administration web UI.
So it looks like there is no public REST API to support modifying JTS users.
You will have to use the web UI
I have searched this forum and find the users API confusing.