Get contentlet inode after api/content/publish/1

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Get contentlet inode after api/content/publish/1

mvelasco
Hi All, 
Do you know how to get inode after updating or creating a new contentlet? I tried reading response, data and xhr but although they are empty, a new contentlet is created 

Thanks, 
=====
var apiURL = "http://localhost:8080/api/content/publish/1";
var json = null;
var getUrl = $.ajax({
url: apiURL,
type: 'PUT',
cache: false,
data: dataform,
processData: false,
contentType: false,
beforeSend: function (request) {
$("#loaderDiv").show();
request.setRequestHeader("DOTAUTH", window.btoa("[hidden email]:admin"));
},
success: function (request, response, data, status, xhr) {

$("#loaderDiv").hide();

console.log("done!");
},
error: function (data, status, xhr) {
console.log(data);
},
});

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/b6575b99-762b-47df-9086-9460ea60de4b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Get contentlet inode after api/content/publish/1

Jason Tesser-2
Should be in the header of the response.  Can also look at the data object

On Mon, Nov 13, 2017 at 10:21 AM mvelasco <[hidden email]> wrote:
Hi All, 
Do you know how to get inode after updating or creating a new contentlet? I tried reading response, data and xhr but although they are empty, a new contentlet is created 

Thanks, 
=====
var json = null;
var getUrl = $.ajax({
url: apiURL,
type: 'PUT',
cache: false,
data: dataform,
processData: false,
contentType: false,
beforeSend: function (request) {
$("#loaderDiv").show();
request.setRequestHeader("DOTAUTH", window.btoa("[hidden email]:admin"));
},
success: function (request, response, data, status, xhr) {

$("#loaderDiv").hide();

console.log("done!");
},
error: function (data, status, xhr) {
console.log(data);
},
});

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/b6575b99-762b-47df-9086-9460ea60de4b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CALDe1GOh4UaT%3Dnw_N7cEvfOmUjmvFKgKCtZyEwhm0wRPvatVUA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.