How to use WebCenter REST API to like or comment a activity

Hi all
I want to know how to realize like or comment function with REST APIs.
I execute a REST call with following url, but the 'like' counter is not be increased.
http://cdcjp77vm3.cn.oracle.com:8888/rest/api/activities/services/oracle.webcenter.community/objectTypes/groupSpace/objects/(s2518c69b_1989_4a63_8886_c32075c76b9c)/likes?&utoken=FDNA-Z7ekZuPnVSNoPWOqTJ2IzAE_w**
Is there anything i missed?
Can anyone give me an example about how to use this API to like or comment a activity?
Thanks
Qian

So Qian;
looking through the code this is how you can
Post a comment (POST)
/rest/api/activities/services/{serviceId}/objectTypes/{objectType}/objects/({objectId})/comments?startIndex={startIndex}&itemsPerPage={itemsPerPage}&utoken=blah
{key:val}
{text:'this is my comment)
Edit a comment (PUT)
So I haven't tried it but it should do the trick.. although I don't see update under capabilities so you may get blocked.
/rest/api/activities/services/{serviceId}/objectTypes/{objectType}/objects/({objectId})/comments?startIndex={startIndex}&itemsPerPage={itemsPerPage}&utoken=blah
    id: {commentId},
    text: 'changed my comment.. magic'
Delete a comment (DELETE)
/rest/api/activities/services/{serviceId}/objectTypes/groupSpace/objects/({objectId})/comments/{commentId}?utoken=blah
Like POST
/rest/api/activities/services/{serviceId}/objectTypes/{objectType}/objects/({objectId})/likes?startIndex={startIndex}&itemsPerPage={itemsPerPage}&utoken=blah
I passed it an empty object {} seemed to work for me.
Unlike (DELETE)
/rest/api/activities/services/oracle.webcenter.community/objectTypes/groupSpace/objects/({objectId})/likes/({likeId})?utoken=blah
Let me know if this works for you

Similar Messages

  • How to use search REST api to get custom managed property data for anonymous user?

     
    I am trying build a public portal with anonymous access and i am trying to read some
    content from custom managed property using search REST api in sharepoint 2013. I have tried to enable all possible attributes of the managed prop. Like searchable,queryable,safe etc. also i am including queryparametertemplate in my REST api search query. But
    still i am not able to retrieve the managed prop. For an anonymous user. The same query returns the value if i am logged in.
    Any Help is greatly appreciated. 
    Thanks,
    Rakesh
    Thanks, Rakesh

    Hi Rakesh,
    To enable anonymous Search REST queries, we need to create queryparametertemplate.xml and upload it to the correct library in SharePoint.
    From your description I can know that you have created the file, then I recommend to check the things below:
    Please use “QueryTemplatePropertiesUrl” instead of “queryparametertemplate” in the Search REST API query as following: &QueryTemplatePropertiesUrl='spfile://webroot/queryparametertemplate.xml'.
    Make sure that the Query Properties you need have been added to the QueryProperties element in the queryparametertemplate.xml file.
    Make sure that the query parameters you need have been added to the WhiteList element in the
    queryparametertemplate.xml file. For example, if you want to use Refiners in the REST API, then the Refiners should be added to the
    WhiteList element in the queryparametertemplate.xml file as following:
    <a:string>Refiners</a:string>.
    You can also debug setting properties in anonymous Search Rest queries following the link below:
    http://www.mavention.com/blog/debugging-setting-properties-anonymous-search-rest-queries
    More references about anonymous Search REST:
    http://blog.mastykarz.nl/configuring-sharepoint-2013-search-rest-api-anonymous-users/
    http://msdn.microsoft.com/en-us/library/office/jj163876%28v=office.15%29.aspx#bk_AnonymousREST
    Thanks,
    Victoria
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Victoria Xia
    TechNet Community Support

  • How to retrieve the users that are following a document using JSOM / REST APIs in SharePoint 2013

    Hi everyone,
    Does anyone know how to use JSOM / REST APIs to retrieve the users that are following a specific document in SharePoint 2013? 
    Thanks in advance,
    Nam

    Hi Nam,
    Please use the sample code to get the followers for the document. Courtesy: Mokhtar
    Bepari 
    using Microsoft.SharePoint.Client;
    using Microsoft.SharePoint.Client.Social;
    ClientContext clientContext = new ClientContext("http://URL");
    SocialFollowingManager followingManager = new SocialFollowingManager(clientContext);
    SocialActorInfo actorInfo = new SocialActorInfo();
    actorInfo.ContentUri = "<documenturl>"; //set the document url.
    actorInfo.ActorType = SocialActorType.Document;
    //By using the GetFollowed method you can get the people who the current user is following.
    ClientResult < SocialActor[] > followedResult = followingManager.GetFollowed(SocialActorTypes.Users);
    //By using the GetFollowers() method you can get the people who are following the current user.
    ClientResult < SocialActor[] > followersResult = followingManager.GetFollowers();
    clientContext.ExecuteQuery();
    Once you get the resultset you can iterate like below:
    foreach(SocialActor actor in followedResult)
    string name = actor.Name;
    string imageURL = actor.ImageUri;
    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

  • Webcenter REST api

    Working on PS3 webcenter framework. The message items in the response for urn:oracle:webcenter:messageBoard have only read and delete capabilities. The update capabilities for messages from message board is missing. Is this a bug or a configuration issue?

    Please refer below :
    Using Oracle WebCenter REST APIs
    Oracle Webcenter Portal & Content Tips: Using WebCenter REST API from Java
    Thanks

  • Oracle Webcenter REST API Authentication

    Hi All,
    I am getting authentication error while consuming the Webcenter REST API url http://webcenter.us.oracle.com/rest/api/resourceIndex.In Jdeveloper (URL Datacontrol)
    So please help me where to Provide the authentication details.
    Thanks.

    Hi.
    You need to add Authentication to your REST requests. Using Oracle WebCenter Portal REST APIs - 11g Release 1 (11.1.1.6.3)
    From my experience, I always used REST API from a REST Java Wrapper done by a mate: Oracle Webcenter Portal &amp;amp; Content Tips: Using WebCenter REST API from Java
    - Samples snippet of authentication:
    When executing code inside of the domain use OIT:
    b64EncodedToken = WCSecurityUtility.issueTrustServiceSecurityToken();
    String auth = "OIT " + b64EncodedToken;
    connection.setRequestProperty(AUTH_PROPERTY, auth);
    When executing code for testing in your JUnit or outside, use directly BASIC authentication:
    String userpass = "weblogic:weblogic1";
    BASE64Encoder encoder = new BASE64Encoder();
    b64EncodedToken = encoder.encode(userpass.getBytes());
    String auth = "Basic " + b64EncodedToken;
    Create a DataControl manually create an instance of the connection depending of the environment.
    Take a look in the official documentation and in the blog entry links.
    Regards.

  • How to create a campaign based on a template using the REST API

    Hi CodeIt-ers,
    I'm using the REST API to create campaigns in Eloqua 10, all works well except for 1 thing: I can't seem to create a campaign based on an existing Campaign template.
    Based on the documentation on REST API - Accessing Campaigns I've tried using "sourceTemplateId" (code snippet below) but that did not do the trick.
    Does that functionality simply not work or am I missing something?
    Thanks!
    Ferry
    $campaign_data = new Campaign(); 
    $campaign_data->sourceTemplateId='442';
    $campaign_data->folderId='1137';
    $campaign_data->currentStatus='draft';

    Hi Richard,
    Unfortunately no. I reached out to support, they informed me "sourceTemplateId" could not be used to create new campaigns based on a template, instead they advised to use the "Elements " property as shown in this example: Eloqua REST API - Create a Campaign with a Segment and Email
    Thanks
    Ferry

  • How to use external Java API in Java Embedd inside BPEL

    How to use external classes inside the BPEL in Java Embed Activity ? Any sample code availble ? Like i want to use log4j API inside BPEL.

    No you dont have to change your startManagedServer.cmd/.sh everytime you need to have a Java Embedding activity. You only need it in case of using Log4J. As log4j requires a configuration xml viz log4j.debug.xml and log4j.dtd you need to let the soa managed server know about it. The best way to load this configuration files is using the JAVA_OPTIONS command during server startup.
    Hope the explanation helps.

  • How to use WebCenter Spaces 11g 2.0 Services in WebCenter Interaction 10gR3

    Hi,
    Can someone explain how to use WebCenter 11g Web 2.0 Services in WebCenter Interaction 10gR3. I have installed Webcenter 11g Spaces. I also have Webcenter Interaction 10gR3 installed. Wanted to find out how can I make use of 11g web 2.0 services i.e. wiki,blog,discussions etc. in WCI 10gR3. How can I configure those services in 10gR3.
    As reading oracle notes it says there is a seemless integration of Web 2.0 11g Services in WCI 10gR3 but can't find any steps, tutorials or examples on how to do that. Any help is appreciated.
    Thanks.

    guest0012 wrote:
    As reading oracle notes it says there is a seamless integration of Web 2.0 11g Services in WCI 10gR3 but can't find any steps, tutorials or examples on how to do that.Nothing like that seamless integration with zero documentation:)

  • Capturing Hosts,cluster,ad Resource information of hosts using SPF REST API

    Hi,
    We are using SCVMM 2012R2 to integrate Hyper-V VMM with java using SPF REST API.For this I am using tenant API. 
    I am able fetch all the entities in VMM using GET query in SPF URL,but I am unable to fetch hosts,cluster and resource information for hosts.
    Can anyone please tell me how will I fetch this information with REST API or does there any other way exists.
    If so please tell  me with the example.
    Thank you.

    Hi ,
    SPF only covers Tenant actions and information. There is no information about hosts and clusters that can be get from SPF.

  • Using Parse REST APIs

    I know that you will recommend me to download
    Parse .Net SDK.
    But the problem is that it uses Tasks which are only available in .Net 4.5
    The older versions of .Net are not supported.
    That is why I am going to use parse REST APIs.
    Having a problem in understanding.
    Here is how to create parse object:
    https://parse.com/docs/rest#objects-creating
    curl -X POST \
    -H "X-Parse-Application-Id: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
    -H "X-Parse-REST-API-Key: yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy" \
    -H "Content-Type: application/json" \
    -d '{"score":1337,"playerName":"Sean Plott","cheatMode":false}' \
    https://api.parse.com/1/classes/GameScore
    I don't know how to add "-d" string(JSon) to the request.
    I tried and here is my code:
    Using client As New WebClient
    Dim values As New NameValueCollection
    values("X-Parse-Application-Id") = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    values("X-Parse-REST-API-Key") = "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy"
    values("Content-Type") = "application/json"
    Dim response = client.UploadValues("https://api.parse.com/1/classes/GameScore", values)
    Dim str = System.Text.Encoding.Default.GetString(response)
    End Using
    And it is returning this error: (401) Unauthorized
    Allow time to reverse.

    But I got the answer and want to help the others.
    Dim request As WebRequest = WebRequest.Create("https://api.parse.com/1/classes/GameScore")
    request.Headers("X-Parse-Application-Id") = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    request.Headers("X-Parse-REST-API-Key") = "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy"
    request.ContentType = "application/json"
    request.Method = "POST"
    Dim bytes = System.Text.Encoding.GetEncoding("UTF-8").GetBytes("{""score"":1337,""playerName"":""Sean Plott"",""cheatMode"":false}")
    Dim stream = request.GetRequestStream
    stream.Write(bytes, 0, bytes.Count)
    stream.Close()
    Dim response = request.GetResponse
    Dim stream2 = response.GetResponseStream
    Dim bytes2(response.ContentLength - 1) As Byte
    stream2.Read(bytes2, 0, bytes2.Count)
    stream2.Close()
    response.Close()
    Dim s = System.Text.Encoding.Default.GetString(bytes2)
    MsgBox(s)
    Allow time to reverse.

  • Using the REST API for files, how do I get information on all the folders and files in a folder?

    I have an app that can successfully get a list of a folders content. However, by default the list is limited to 200 entries. I luckily ran into this limit when getting the list on a folder that contained 226 entries and realized I needed to then request
    a list of the next items but it wasn't obvious from the REST API document how to do that. I tried sending the skipToken query parameter and setting it to 0 initially and incrementing each time I sent the request but always got the same 200 items back. So,
    how do I get the list of files and folders beyond the initial list?

    In SP2013 the skiptoken query parameter does not work with list items. You can look at the link below which discusses using the "__next" parameter.
    http://stackoverflow.com/questions/18964936/using-skip-with-the-sharepoint-2013-rest-api
    Blog | SharePoint Field Notes Dev Tools |
    SPFastDeploy | SPRemoteAPIExplorer

  • How to fetch all the contact fields using Office365 REST API

    When I request for Contacts using webservices URL, Office365 returns only some specific fields (even though contact record has lot more fields). Is there any way so that I can fetch all the fields in contact record?

    Currently the REST APIs are limited to the fields you see now. We're constantly working to add more features though, so that might come in the future.

  • Consume Webcenter REST API for Mobile App

    Hi All,
    I have some requirement like How to consume web center REST API to the ADF mobile
    could you please guide to it any examples,links.
    When i am trying to consume by using URL Data control it is showing authentication failed, can you pls tell me how to resolve this issue.
    Is there any procedure do the same.
    Thanks in Advance .
    Message was edited by: 878913

    Well was able to resolve it however had to do workaround
    >> used rawXhrPost and put methods instead of xhrPost/put as the dojo.xhrPost seems to insist on sending the data as key=value
    pairs separated by a '&' which on one hand lead webcenter to believe there
    wasn't any POST data as it was expecting json ..
    however if anyone has used xhrPost with webcenter rest , please guide how to use it ... casue and unable to use it .
    also which is the right way to do it ? xhrpost or rawXhrPost , asthe later this method is not extensively mentioned... seems its going to be depricated...

  • Query a document library using Search Rest API

    How can we search for a specific document library using SharePoint Search through Rest API? We have a couple of document libraries which have thousands of documents with its relevant metadata information stored. We need to create an app to search through
    these document libraries and display the document and its metadata. Can someone point me in the right direction?
    V

    Taking what Shakir said you would substitute queryText with a managed property query (KQL) to query against metadata from the Document library. So if your document library has a Owner column then you would either create or use an existing managed property
    defined in the Search Schema. So your query may look like this:
    https://<site URL>/_api/search/query?querytext='(owner:smith)+AND+(path:<library url>)'
    Link:
    https://msdn.microsoft.com/en-us/library/office/ee558911.aspx?f=255&MSPPError=-2147217396
    Blog | SharePoint Field Notes Dev Tools |
    SPFastDeploy | SPRemoteAPIExplorer

  • How to filter the Rest Api data based on Taxanomy columns

    Hi Everyone,
    We are using SharePoint2010 Standard Edition.
    I wanted get the library details through REST Api. I am using as below:
    https://SiteUrl/_vti_bin/listdata.svc/Documents?$filter=Title eq 'SharePointDoc'
    Here I am able to get the info regarding "SharePointDoc". But when I am trying to get the details from Taxonomy filter, it didn't.
    Can anyone please tell me how can we filter based on Taxanomy fields.
    Thanks in Advance
    Krishnasandeep

    Hi,
    I understand that you wanted to filter the Rest Api data based on Taxanomy columns.
    Per my knowledge, in SharePoint 2010 , not all types of column are available via REST, most annoyingly managed metadata columns are amongst this group of unsupported column types.
    However, in SharePoint 2013, we can filter list items based on taxonomy (managed metadata) columns.
    Taxonomy fields can be now called via REST API using CAML query in REST calls.
    Here is a great blog for your reference:
    http://www.cleverworkarounds.com/2013/09/23/how-to-filter-on-a-managed-metadata-column-via-rest-in-sharepoint-2013/comment-page-1/
    You’d better to change the REST calls and the CAML query to check whether it works in SharePoint 2010.
    More information:
    http://platinumdogs.me/2013/03/14/sharepoint-adventures-with-the-rest-api-part-1/
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

Maybe you are looking for

  • Mini DisplayPort to HDMI Adapter Cable not working on MacBook Pro

    only showed my background on my tv, didn't recognize actions though. I could see my desktop background but it didn't show what I was seeing on my laptop screen. Help? Do I need an adapter?

  • Using two iPods on same PC

    I just bought my daughter a 5th gen Nano. We share a family computer. How do I create her own library on our computer? iTunes has already associated my library with her Nano. She has her own iTunes login - there must be same way to keep our accounts

  • Error in "Create ERP Customer"

    When using "Create ERP Customer", i am getting error message "Enter a relevant role for creation of customer master data".  What specifically am I missing, I believe I configured the CVI. I am on MDG7.0. Thanks for assistance

  • Missing catalog content

    hi all, after i ran the report bbp_ccm_transfer_catalog, i checked the payload in sxmb_moni. There was no catalogmodel and catalogcontent

  • Java.lang.Integer defaulting to zero

    I am using JAXB for several years, but never dived into details. I am not using a schema. When I am unmarshalling a XML file, JAXB always defaults my java.lang.Integer attributes to zero instead to null, when the attribute is not given in the XML fil