v 3.7.1 - REST API Question(s)

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

v 3.7.1 - REST API Question(s)

Henry Versemann

I’m currently able to use a GET/inquire request to the REST API to retrieve a contentlet.

 

Once I have it then is it possible to change a value in the contentlet, and then do a POST to update the newly changed contentlet?  

 

The value(s) I want to try to change are publish/unpublish/archive/unarchive/delete flags or values, that would mimic the manual process of doing an unpublish, archive, and then delete of entries manually.

 

Or instead of trying to do the delete process programmatically(especially if it’s not possible currently), what would be the best way to update an entry to indicate that it needs to be deleted in the future?

 

Thanks.

 

Henry

 

 

--
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/CY4PR0501MB377737163D54AE27CAA5BF15AD190%40CY4PR0501MB3777.namprd05.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: v 3.7.1 - REST API Question(s)

Chris Falzone-2
When you make an update you specify it is should be working or live by using save or publish parmaters:

Though, I don't think you can unpub/archive/delete content via the rest api directly.  But I know you can using workflow actions:

So just execute the proper workflow task that does it for you.  

On Tue, Jan 2, 2018 at 12:53 PM Henry Versemann <[hidden email]> wrote:

I’m currently able to use a GET/inquire request to the REST API to retrieve a contentlet.

 

Once I have it then is it possible to change a value in the contentlet, and then do a POST to update the newly changed contentlet?  

 

The value(s) I want to try to change are publish/unpublish/archive/unarchive/delete flags or values, that would mimic the manual process of doing an unpublish, archive, and then delete of entries manually.

 

Or instead of trying to do the delete process programmatically(especially if it’s not possible currently), what would be the best way to update an entry to indicate that it needs to be deleted in the future?

 

Thanks.

 

Henry

 

 

--
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/CY4PR0501MB377737163D54AE27CAA5BF15AD190%40CY4PR0501MB3777.namprd05.prod.outlook.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/CAMAbHgVp6RxJUWproVrCmWOyQuAbrTuKBi6oSV9YAe-9X7jw_g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

RE: v 3.7.1 - REST API Question(s)

Henry Versemann

Chris,

 

I’ve looked in the documentation and the only example I saw was one that looked like it executed just one subaction of a particular workflow like this:

 

PUT /api/content/Assign%20for%20Review/1/wfActionComments/Hey%2C%20take%20a%20look/wfActionAssign/dotCMS.org.7575

 

But it doesn’t to explain all of the parts of the URI shown, unless there are more detailed examples of calling a workflow through the REST API.

 

So I have questions about the above URI.

 

1.)    Is the actual sub-action to be executed this part of the URI: /Assign%20for%20Review/

2.)    wfActionComments’ indicates that what follows it in the next part of the URI ( /Hey%2C%20take%20a%20look/ ) is a comment right? If so is it mandatory for comments to always be declared and formatted this way and in this same position?

3.)    So is the /wfActionAssign/ part of the URI the name of the actual workflow/workflow scheme?

4.)    I’m Assuming that when a workflow scheme is created, then that workflow scheme must also be associated with the content type to be operated on, before it can be called via the REST API. Correct?

5.)    And finally in the example above is the last part of the URI above ‘dotCMS.org.7575’ always a content identifier of the contentlet to be operated on, by the workflow?

 

Let me know when you can.

Thanks.

 

Henry

 

 

From: 'Chris Falzone' via dotCMS User Group [mailto:[hidden email]]
Sent: Tuesday, January 2, 2018 3:09 PM
To: [hidden email]
Subject: Re: [dotcms] v 3.7.1 - REST API Question(s)

 

When you make an update you specify it is should be working or live by using save or publish parmaters:

 

Though, I don't think you can unpub/archive/delete content via the rest api directly.  But I know you can using workflow actions:

 

So just execute the proper workflow task that does it for you.  

 

On Tue, Jan 2, 2018 at 12:53 PM Henry Versemann <[hidden email]> wrote:

I’m currently able to use a GET/inquire request to the REST API to retrieve a contentlet.

 

Once I have it then is it possible to change a value in the contentlet, and then do a POST to update the newly changed contentlet?  

 

The value(s) I want to try to change are publish/unpublish/archive/unarchive/delete flags or values, that would mimic the manual process of doing an unpublish, archive, and then delete of entries manually.

 

Or instead of trying to do the delete process programmatically(especially if it’s not possible currently), what would be the best way to update an entry to indicate that it needs to be deleted in the future?

 

Thanks.

 

Henry

 

 

--
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/CY4PR0501MB377737163D54AE27CAA5BF15AD190%40CY4PR0501MB3777.namprd05.prod.outlook.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/CAMAbHgVp6RxJUWproVrCmWOyQuAbrTuKBi6oSV9YAe-9X7jw_g%40mail.gmail.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/CY4PR0501MB377752526746F751320258D2AD190%40CY4PR0501MB3777.namprd05.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: v 3.7.1 - REST API Question(s)

Chris Falzone-2
I'm not sure on all of the details without further poking into it.  TBH, what I would do is put a boolean field as sort of an "Active" field.  Instead of dealing with publishing/archiving in the Rest API. That is what I do with our Agent Profile Contentlets.  We have a field called "isActive" and the website checks if that is set before showing the Agent Profile on the website.  The Rest API just updates that field when the user deactivates their profile.  Our use case doesn't require us to actually delete the content.  But you could do a "toDelete" field and have someone (or a script) go in and delete them once a week or on some schedule as long as your front-end code that displays the content properly handles the content state.  

That being said ...
1) Yes, just url encode the name of the action here.  All the parameters and values have to be urlencoded properly.
2) I think comments are optional.  But only allowed when the "Allow Comments" checkbox on the workflow action is checked.
3) I think the user assignment is also optional. There is "User can Assign" checkbox on the workflow action.
4) Yes, I would also assume that.
5) The last parameter there is the value to "wfActionAssign", that is the user id the content is being assigned to.  In your use-case I do not think you need this parameter or value pair.

Hope that helps.

On Tue, Jan 2, 2018 at 4:30 PM Henry Versemann <[hidden email]> wrote:

Chris,

 

I’ve looked in the documentation and the only example I saw was one that looked like it executed just one subaction of a particular workflow like this:

 

PUT /api/content/Assign%20for%20Review/1/wfActionComments/Hey%2C%20take%20a%20look/wfActionAssign/dotCMS.org.7575

 

But it doesn’t to explain all of the parts of the URI shown, unless there are more detailed examples of calling a workflow through the REST API.

 

So I have questions about the above URI.

 

1.)    Is the actual sub-action to be executed this part of the URI: /Assign%20for%20Review/

2.)    wfActionComments’ indicates that what follows it in the next part of the URI ( /Hey%2C%20take%20a%20look/ ) is a comment right? If so is it mandatory for comments to always be declared and formatted this way and in this same position?

3.)    So is the /wfActionAssign/ part of the URI the name of the actual workflow/workflow scheme?

4.)    I’m Assuming that when a workflow scheme is created, then that workflow scheme must also be associated with the content type to be operated on, before it can be called via the REST API. Correct?

5.)    And finally in the example above is the last part of the URI above ‘dotCMS.org.7575’ always a content identifier of the contentlet to be operated on, by the workflow?

 

Let me know when you can.

Thanks.

 

Henry

 

 

From: 'Chris Falzone' via dotCMS User Group [mailto:[hidden email]]
Sent: Tuesday, January 2, 2018 3:09 PM
To: [hidden email]
Subject: Re: [dotcms] v 3.7.1 - REST API Question(s)

 

When you make an update you specify it is should be working or live by using save or publish parmaters:

 

Though, I don't think you can unpub/archive/delete content via the rest api directly.  But I know you can using workflow actions:

 

So just execute the proper workflow task that does it for you.  

 

On Tue, Jan 2, 2018 at 12:53 PM Henry Versemann <[hidden email]> wrote:

I’m currently able to use a GET/inquire request to the REST API to retrieve a contentlet.

 

Once I have it then is it possible to change a value in the contentlet, and then do a POST to update the newly changed contentlet?  

 

The value(s) I want to try to change are publish/unpublish/archive/unarchive/delete flags or values, that would mimic the manual process of doing an unpublish, archive, and then delete of entries manually.

 

Or instead of trying to do the delete process programmatically(especially if it’s not possible currently), what would be the best way to update an entry to indicate that it needs to be deleted in the future?

 

Thanks.

 

Henry

 

 

--
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/CY4PR0501MB377737163D54AE27CAA5BF15AD190%40CY4PR0501MB3777.namprd05.prod.outlook.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].


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/CY4PR0501MB377752526746F751320258D2AD190%40CY4PR0501MB3777.namprd05.prod.outlook.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/CAMAbHgXONwhioggwofQwoR0%2BoVagS3_xqpyZZj7uKDQB4tPTPw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

RE: v 3.7.1 - REST API Question(s)

Henry Versemann

Chris,

 

I asked question 5 because if I don’t supply an identifier, for the content to be operated on then how will the workflow know which contentlet it is to apply itself?

 

And are the “wfActionComments” and “wfActionAssign” strings like hard-coded keys of those key/value pairs?

 

Let me know when you can and thanks for the explanations thus far.

 

Henry

 

 

 

From: 'Chris Falzone' via dotCMS User Group [mailto:[hidden email]]
Sent: Wednesday, January 3, 2018 7:01 AM
To: [hidden email]
Subject: Re: [dotcms] v 3.7.1 - REST API Question(s)

 

I'm not sure on all of the details without further poking into it.  TBH, what I would do is put a boolean field as sort of an "Active" field.  Instead of dealing with publishing/archiving in the Rest API. That is what I do with our Agent Profile Contentlets.  We have a field called "isActive" and the website checks if that is set before showing the Agent Profile on the website.  The Rest API just updates that field when the user deactivates their profile.  Our use case doesn't require us to actually delete the content.  But you could do a "toDelete" field and have someone (or a script) go in and delete them once a week or on some schedule as long as your front-end code that displays the content properly handles the content state.  

 

That being said ...

1) Yes, just url encode the name of the action here.  All the parameters and values have to be urlencoded properly.

2) I think comments are optional.  But only allowed when the "Allow Comments" checkbox on the workflow action is checked.

3) I think the user assignment is also optional. There is "User can Assign" checkbox on the workflow action.
4) Yes, I would also assume that.

5) The last parameter there is the value to "wfActionAssign", that is the user id the content is being assigned to.  In your use-case I do not think you need this parameter or value pair.

 

Hope that helps.

 

On Tue, Jan 2, 2018 at 4:30 PM Henry Versemann <[hidden email]> wrote:

Chris,

 

I’ve looked in the documentation and the only example I saw was one that looked like it executed just one subaction of a particular workflow like this:

 

PUT /api/content/Assign%20for%20Review/1/wfActionComments/Hey%2C%20take%20a%20look/wfActionAssign/dotCMS.org.7575

 

But it doesn’t to explain all of the parts of the URI shown, unless there are more detailed examples of calling a workflow through the REST API.

 

So I have questions about the above URI.

 

1.)    Is the actual sub-action to be executed this part of the URI: /Assign%20for%20Review/

2.)    wfActionComments’ indicates that what follows it in the next part of the URI ( /Hey%2C%20take%20a%20look/ ) is a comment right? If so is it mandatory for comments to always be declared and formatted this way and in this same position?

3.)    So is the /wfActionAssign/ part of the URI the name of the actual workflow/workflow scheme?

4.)    I’m Assuming that when a workflow scheme is created, then that workflow scheme must also be associated with the content type to be operated on, before it can be called via the REST API. Correct?

5.)    And finally in the example above is the last part of the URI above ‘dotCMS.org.7575’ always a content identifier of the contentlet to be operated on, by the workflow?

 

Let me know when you can.

Thanks.

 

Henry

 

 

From: 'Chris Falzone' via dotCMS User Group [mailto:[hidden email]]
Sent: Tuesday, January 2, 2018 3:09 PM
To: [hidden email]
Subject: Re: [dotcms] v 3.7.1 - REST API Question(s)

 

When you make an update you specify it is should be working or live by using save or publish parmaters:

 

Though, I don't think you can unpub/archive/delete content via the rest api directly.  But I know you can using workflow actions:

 

So just execute the proper workflow task that does it for you.  

 

On Tue, Jan 2, 2018 at 12:53 PM Henry Versemann <[hidden email]> wrote:

I’m currently able to use a GET/inquire request to the REST API to retrieve a contentlet.

 

Once I have it then is it possible to change a value in the contentlet, and then do a POST to update the newly changed contentlet?  

 

The value(s) I want to try to change are publish/unpublish/archive/unarchive/delete flags or values, that would mimic the manual process of doing an unpublish, archive, and then delete of entries manually.

 

Or instead of trying to do the delete process programmatically(especially if it’s not possible currently), what would be the best way to update an entry to indicate that it needs to be deleted in the future?

 

Thanks.

 

Henry

 

 

--
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/CY4PR0501MB377737163D54AE27CAA5BF15AD190%40CY4PR0501MB3777.namprd05.prod.outlook.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].


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/CY4PR0501MB377752526746F751320258D2AD190%40CY4PR0501MB3777.namprd05.prod.outlook.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/CAMAbHgXONwhioggwofQwoR0%2BoVagS3_xqpyZZj7uKDQB4tPTPw%40mail.gmail.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/CY4PR0501MB377754B3768C33A152FE490FAD1E0%40CY4PR0501MB3777.namprd05.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: v 3.7.1 - REST API Question(s)

Chris Falzone-2
You are adding these parameters to an update. Instead of updating the content with the publish or save endpoints, you are using the Workflow Action Name as the endpoint.  In either case the identifier you are updating needs to be passed as part of the json data for the content.  

For example, instead of updating the content this way ...
curl -v -u "[hidden email]:admin" -XPUT http://demo.dotcms.com/api/content/publish/1 -F 'json={"identifier":"XXX",...};type=application/json'

you replace publish with the workflow step like this ...
curl -v -u "[hidden email]:admin" -XPUT http://demo.dotcms.com/api/content/workflow%20action%20name -F 'json={"identifier":"XXX",...};type=application/json'

Also according to the endpoints doc, the other parameters are optional (and yes I think the names are hardcoded keys):
Look at the "singlePUT" and "singlePost" endpoints.  




On Wed, Jan 3, 2018 at 8:47 AM Henry Versemann <[hidden email]> wrote:

Chris,

 

I asked question 5 because if I don’t supply an identifier, for the content to be operated on then how will the workflow know which contentlet it is to apply itself?

 

And are the “wfActionComments” and “wfActionAssign” strings like hard-coded keys of those key/value pairs?

 

Let me know when you can and thanks for the explanations thus far.

 

Henry

 

 

 

From: 'Chris Falzone' via dotCMS User Group [mailto:[hidden email]]
Sent: Wednesday, January 3, 2018 7:01 AM


To: [hidden email]
Subject: Re: [dotcms] v 3.7.1 - REST API Question(s)

 

I'm not sure on all of the details without further poking into it.  TBH, what I would do is put a boolean field as sort of an "Active" field.  Instead of dealing with publishing/archiving in the Rest API. That is what I do with our Agent Profile Contentlets.  We have a field called "isActive" and the website checks if that is set before showing the Agent Profile on the website.  The Rest API just updates that field when the user deactivates their profile.  Our use case doesn't require us to actually delete the content.  But you could do a "toDelete" field and have someone (or a script) go in and delete them once a week or on some schedule as long as your front-end code that displays the content properly handles the content state.  

 

That being said ...

1) Yes, just url encode the name of the action here.  All the parameters and values have to be urlencoded properly.

2) I think comments are optional.  But only allowed when the "Allow Comments" checkbox on the workflow action is checked.

3) I think the user assignment is also optional. There is "User can Assign" checkbox on the workflow action.
4) Yes, I would also assume that.

5) The last parameter there is the value to "wfActionAssign", that is the user id the content is being assigned to.  In your use-case I do not think you need this parameter or value pair.

 

Hope that helps.

 

On Tue, Jan 2, 2018 at 4:30 PM Henry Versemann <[hidden email]> wrote:

Chris,

 

I’ve looked in the documentation and the only example I saw was one that looked like it executed just one subaction of a particular workflow like this:

 

PUT /api/content/Assign%20for%20Review/1/wfActionComments/Hey%2C%20take%20a%20look/wfActionAssign/dotCMS.org.7575

 

But it doesn’t to explain all of the parts of the URI shown, unless there are more detailed examples of calling a workflow through the REST API.

 

So I have questions about the above URI.

 

1.)    Is the actual sub-action to be executed this part of the URI: /Assign%20for%20Review/

2.)    wfActionComments’ indicates that what follows it in the next part of the URI ( /Hey%2C%20take%20a%20look/ ) is a comment right? If so is it mandatory for comments to always be declared and formatted this way and in this same position?

3.)    So is the /wfActionAssign/ part of the URI the name of the actual workflow/workflow scheme?

4.)    I’m Assuming that when a workflow scheme is created, then that workflow scheme must also be associated with the content type to be operated on, before it can be called via the REST API. Correct?

5.)    And finally in the example above is the last part of the URI above ‘dotCMS.org.7575’ always a content identifier of the contentlet to be operated on, by the workflow?

 

Let me know when you can.

Thanks.

 

Henry

 

 

From: 'Chris Falzone' via dotCMS User Group [mailto:[hidden email]]
Sent: Tuesday, January 2, 2018 3:09 PM
To: [hidden email]
Subject: Re: [dotcms] v 3.7.1 - REST API Question(s)

 

When you make an update you specify it is should be working or live by using save or publish parmaters:

 

Though, I don't think you can unpub/archive/delete content via the rest api directly.  But I know you can using workflow actions:

 

So just execute the proper workflow task that does it for you.  

 

On Tue, Jan 2, 2018 at 12:53 PM Henry Versemann <[hidden email]> wrote:

I’m currently able to use a GET/inquire request to the REST API to retrieve a contentlet.

 

Once I have it then is it possible to change a value in the contentlet, and then do a POST to update the newly changed contentlet?  

 

The value(s) I want to try to change are publish/unpublish/archive/unarchive/delete flags or values, that would mimic the manual process of doing an unpublish, archive, and then delete of entries manually.

 

Or instead of trying to do the delete process programmatically(especially if it’s not possible currently), what would be the best way to update an entry to indicate that it needs to be deleted in the future?

 

Thanks.

 

Henry

 

 

--
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/CY4PR0501MB377737163D54AE27CAA5BF15AD190%40CY4PR0501MB3777.namprd05.prod.outlook.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].


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/CY4PR0501MB377752526746F751320258D2AD190%40CY4PR0501MB3777.namprd05.prod.outlook.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].


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/CY4PR0501MB377754B3768C33A152FE490FAD1E0%40CY4PR0501MB3777.namprd05.prod.outlook.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/CAMAbHgUwvhm%2BnXAN_YHr%3Dst7t5_5agC_MqEMG6jt_%2B9sm%3DNFgA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

RE: v 3.7.1 - REST API Question(s)

Henry Versemann

Chris,

 

So if I understand you right then the comments key/value pair and the id key/value pair would be inside a json object then in the request body right?

 

Henry

 

From: 'Chris Falzone' via dotCMS User Group [mailto:[hidden email]]
Sent: Wednesday, January 3, 2018 8:39 AM
To: [hidden email]
Subject: Re: [dotcms] v 3.7.1 - REST API Question(s)

 

You are adding these parameters to an update. Instead of updating the content with the publish or save endpoints, you are using the Workflow Action Name as the endpoint.  In either case the identifier you are updating needs to be passed as part of the json data for the content.  

For example, instead of updating the content this way ...

curl -v -u "[hidden email]" -XPUT http://demo.dotcms.com/api/content/publish/1 -F 'json={"identifier":"XXX",...};type=application/json'

 

you replace publish with the workflow step like this ...

curl -v -u "[hidden email]" -XPUT http://demo.dotcms.com/api/content/workflow%20action%20name -F 'json={"identifier":"XXX",...};type=application/json'

 

Also according to the endpoints doc, the other parameters are optional (and yes I think the names are hardcoded keys):

Look at the "singlePUT" and "singlePost" endpoints.  

 

 

 

On Wed, Jan 3, 2018 at 8:47 AM Henry Versemann <[hidden email]> wrote:

Chris,

 

I asked question 5 because if I don’t supply an identifier, for the content to be operated on then how will the workflow know which contentlet it is to apply itself?

 

And are the “wfActionComments” and “wfActionAssign” strings like hard-coded keys of those key/value pairs?

 

Let me know when you can and thanks for the explanations thus far.

 

Henry

 

 

 

From: 'Chris Falzone' via dotCMS User Group [mailto:[hidden email]]
Sent: Wednesday, January 3, 2018 7:01 AM


To: [hidden email]
Subject: Re: [dotcms] v 3.7.1 - REST API Question(s)

 

I'm not sure on all of the details without further poking into it.  TBH, what I would do is put a boolean field as sort of an "Active" field.  Instead of dealing with publishing/archiving in the Rest API. That is what I do with our Agent Profile Contentlets.  We have a field called "isActive" and the website checks if that is set before showing the Agent Profile on the website.  The Rest API just updates that field when the user deactivates their profile.  Our use case doesn't require us to actually delete the content.  But you could do a "toDelete" field and have someone (or a script) go in and delete them once a week or on some schedule as long as your front-end code that displays the content properly handles the content state.  

 

That being said ...

1) Yes, just url encode the name of the action here.  All the parameters and values have to be urlencoded properly.

2) I think comments are optional.  But only allowed when the "Allow Comments" checkbox on the workflow action is checked.

3) I think the user assignment is also optional. There is "User can Assign" checkbox on the workflow action.
4) Yes, I would also assume that.

5) The last parameter there is the value to "wfActionAssign", that is the user id the content is being assigned to.  In your use-case I do not think you need this parameter or value pair.

 

Hope that helps.

 

On Tue, Jan 2, 2018 at 4:30 PM Henry Versemann <[hidden email]> wrote:

Chris,

 

I’ve looked in the documentation and the only example I saw was one that looked like it executed just one subaction of a particular workflow like this:

 

PUT /api/content/Assign%20for%20Review/1/wfActionComments/Hey%2C%20take%20a%20look/wfActionAssign/dotCMS.org.7575

 

But it doesn’t to explain all of the parts of the URI shown, unless there are more detailed examples of calling a workflow through the REST API.

 

So I have questions about the above URI.

 

1.)    Is the actual sub-action to be executed this part of the URI: /Assign%20for%20Review/

2.)    wfActionComments’ indicates that what follows it in the next part of the URI ( /Hey%2C%20take%20a%20look/ ) is a comment right? If so is it mandatory for comments to always be declared and formatted this way and in this same position?

3.)    So is the /wfActionAssign/ part of the URI the name of the actual workflow/workflow scheme?

4.)    I’m Assuming that when a workflow scheme is created, then that workflow scheme must also be associated with the content type to be operated on, before it can be called via the REST API. Correct?

5.)    And finally in the example above is the last part of the URI above ‘dotCMS.org.7575’ always a content identifier of the contentlet to be operated on, by the workflow?

 

Let me know when you can.

Thanks.

 

Henry

 

 

From: 'Chris Falzone' via dotCMS User Group [mailto:[hidden email]]
Sent: Tuesday, January 2, 2018 3:09 PM
To: [hidden email]
Subject: Re: [dotcms] v 3.7.1 - REST API Question(s)

 

When you make an update you specify it is should be working or live by using save or publish parmaters:

 

Though, I don't think you can unpub/archive/delete content via the rest api directly.  But I know you can using workflow actions:

 

So just execute the proper workflow task that does it for you.  

 

On Tue, Jan 2, 2018 at 12:53 PM Henry Versemann <[hidden email]> wrote:

I’m currently able to use a GET/inquire request to the REST API to retrieve a contentlet.

 

Once I have it then is it possible to change a value in the contentlet, and then do a POST to update the newly changed contentlet?  

 

The value(s) I want to try to change are publish/unpublish/archive/unarchive/delete flags or values, that would mimic the manual process of doing an unpublish, archive, and then delete of entries manually.

 

Or instead of trying to do the delete process programmatically(especially if it’s not possible currently), what would be the best way to update an entry to indicate that it needs to be deleted in the future?

 

Thanks.

 

Henry

 

 

--
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/CY4PR0501MB377737163D54AE27CAA5BF15AD190%40CY4PR0501MB3777.namprd05.prod.outlook.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].


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/CY4PR0501MB377752526746F751320258D2AD190%40CY4PR0501MB3777.namprd05.prod.outlook.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].


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/CY4PR0501MB377754B3768C33A152FE490FAD1E0%40CY4PR0501MB3777.namprd05.prod.outlook.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/CAMAbHgUwvhm%2BnXAN_YHr%3Dst7t5_5agC_MqEMG6jt_%2B9sm%3DNFgA%40mail.gmail.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/CY4PR0501MB377704E170D8955F6502F0FEAD1E0%40CY4PR0501MB3777.namprd05.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: v 3.7.1 - REST API Question(s)

Chris Falzone-2
I think as part of the endpoint url, not in the json.  But, I could be wrong.  It is possible that it doesn't matter. 
Not sure that helps much.  

On Wed, Jan 3, 2018 at 9:46 AM Henry Versemann <[hidden email]> wrote:

Chris,

 

So if I understand you right then the comments key/value pair and the id key/value pair would be inside a json object then in the request body right?

 

Henry

 

From: 'Chris Falzone' via dotCMS User Group [mailto:[hidden email]]
Sent: Wednesday, January 3, 2018 8:39 AM


To: [hidden email]
Subject: Re: [dotcms] v 3.7.1 - REST API Question(s)

 

You are adding these parameters to an update. Instead of updating the content with the publish or save endpoints, you are using the Workflow Action Name as the endpoint.  In either case the identifier you are updating needs to be passed as part of the json data for the content.  

For example, instead of updating the content this way ...

curl -v -u "[hidden email]" -XPUT http://demo.dotcms.com/api/content/publish/1 -F 'json={"identifier":"XXX",...};type=application/json'

 

you replace publish with the workflow step like this ...

curl -v -u "[hidden email]" -XPUT http://demo.dotcms.com/api/content/workflow%20action%20name -F 'json={"identifier":"XXX",...};type=application/json'

 

Also according to the endpoints doc, the other parameters are optional (and yes I think the names are hardcoded keys):

Look at the "singlePUT" and "singlePost" endpoints.  

 

 

 

On Wed, Jan 3, 2018 at 8:47 AM Henry Versemann <[hidden email]> wrote:

Chris,

 

I asked question 5 because if I don’t supply an identifier, for the content to be operated on then how will the workflow know which contentlet it is to apply itself?

 

And are the “wfActionComments” and “wfActionAssign” strings like hard-coded keys of those key/value pairs?

 

Let me know when you can and thanks for the explanations thus far.

 

Henry

 

 

 

From: 'Chris Falzone' via dotCMS User Group [mailto:[hidden email]]
Sent: Wednesday, January 3, 2018 7:01 AM


To: [hidden email]
Subject: Re: [dotcms] v 3.7.1 - REST API Question(s)

 

I'm not sure on all of the details without further poking into it.  TBH, what I would do is put a boolean field as sort of an "Active" field.  Instead of dealing with publishing/archiving in the Rest API. That is what I do with our Agent Profile Contentlets.  We have a field called "isActive" and the website checks if that is set before showing the Agent Profile on the website.  The Rest API just updates that field when the user deactivates their profile.  Our use case doesn't require us to actually delete the content.  But you could do a "toDelete" field and have someone (or a script) go in and delete them once a week or on some schedule as long as your front-end code that displays the content properly handles the content state.  

 

That being said ...

1) Yes, just url encode the name of the action here.  All the parameters and values have to be urlencoded properly.

2) I think comments are optional.  But only allowed when the "Allow Comments" checkbox on the workflow action is checked.

3) I think the user assignment is also optional. There is "User can Assign" checkbox on the workflow action.
4) Yes, I would also assume that.

5) The last parameter there is the value to "wfActionAssign", that is the user id the content is being assigned to.  In your use-case I do not think you need this parameter or value pair.

 

Hope that helps.

 

On Tue, Jan 2, 2018 at 4:30 PM Henry Versemann <[hidden email]> wrote:

Chris,

 

I’ve looked in the documentation and the only example I saw was one that looked like it executed just one subaction of a particular workflow like this:

 

PUT /api/content/Assign%20for%20Review/1/wfActionComments/Hey%2C%20take%20a%20look/wfActionAssign/dotCMS.org.7575

 

But it doesn’t to explain all of the parts of the URI shown, unless there are more detailed examples of calling a workflow through the REST API.

 

So I have questions about the above URI.

 

1.)    Is the actual sub-action to be executed this part of the URI: /Assign%20for%20Review/

2.)    wfActionComments’ indicates that what follows it in the next part of the URI ( /Hey%2C%20take%20a%20look/ ) is a comment right? If so is it mandatory for comments to always be declared and formatted this way and in this same position?

3.)    So is the /wfActionAssign/ part of the URI the name of the actual workflow/workflow scheme?

4.)    I’m Assuming that when a workflow scheme is created, then that workflow scheme must also be associated with the content type to be operated on, before it can be called via the REST API. Correct?

5.)    And finally in the example above is the last part of the URI above ‘dotCMS.org.7575’ always a content identifier of the contentlet to be operated on, by the workflow?

 

Let me know when you can.

Thanks.

 

Henry

 

 

From: 'Chris Falzone' via dotCMS User Group [mailto:[hidden email]]
Sent: Tuesday, January 2, 2018 3:09 PM
To: [hidden email]
Subject: Re: [dotcms] v 3.7.1 - REST API Question(s)

 

When you make an update you specify it is should be working or live by using save or publish parmaters:

 

Though, I don't think you can unpub/archive/delete content via the rest api directly.  But I know you can using workflow actions:

 

So just execute the proper workflow task that does it for you.  

 

On Tue, Jan 2, 2018 at 12:53 PM Henry Versemann <[hidden email]> wrote:

I’m currently able to use a GET/inquire request to the REST API to retrieve a contentlet.

 

Once I have it then is it possible to change a value in the contentlet, and then do a POST to update the newly changed contentlet?  

 

The value(s) I want to try to change are publish/unpublish/archive/unarchive/delete flags or values, that would mimic the manual process of doing an unpublish, archive, and then delete of entries manually.

 

Or instead of trying to do the delete process programmatically(especially if it’s not possible currently), what would be the best way to update an entry to indicate that it needs to be deleted in the future?

 

Thanks.

 

Henry

 

 

--
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/CY4PR0501MB377737163D54AE27CAA5BF15AD190%40CY4PR0501MB3777.namprd05.prod.outlook.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].


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/CY4PR0501MB377752526746F751320258D2AD190%40CY4PR0501MB3777.namprd05.prod.outlook.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].


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/CY4PR0501MB377754B3768C33A152FE490FAD1E0%40CY4PR0501MB3777.namprd05.prod.outlook.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].


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/CY4PR0501MB377704E170D8955F6502F0FEAD1E0%40CY4PR0501MB3777.namprd05.prod.outlook.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/CAMAbHgV9WL4LkzW2Drx0NFPNuPCvmvZvAiu3qE5y5ean%3Dneqbg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

RE: v 3.7.1 - REST API Question(s)

Nathan Keiter
In reply to this post by Henry Versemann

I believe that last part is the user id to assign the workflow to. “dotCMS.org.7575”

 

Nathan I. Keiter | Lead Network Applications Programmer | Benefits Advisory Council Member | I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993

https://www.gettysburg.edu

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Henry Versemann
Sent: Tuesday, January 02, 2018 4:30 PM
To: [hidden email]
Subject: RE: [dotcms] v 3.7.1 - REST API Question(s)

 

Chris,

 

I’ve looked in the documentation and the only example I saw was one that looked like it executed just one subaction of a particular workflow like this:

 

PUT /api/content/Assign%20for%20Review/1/wfActionComments/Hey%2C%20take%20a%20look/wfActionAssign/dotCMS.org.7575

 

But it doesn’t to explain all of the parts of the URI shown, unless there are more detailed examples of calling a workflow through the REST API.

 

So I have questions about the above URI.

 

1.)    Is the actual sub-action to be executed this part of the URI: /Assign%20for%20Review/

2.)    wfActionComments’ indicates that what follows it in the next part of the URI ( /Hey%2C%20take%20a%20look/ ) is a comment right? If so is it mandatory for comments to always be declared and formatted this way and in this same position?

3.)    So is the /wfActionAssign/ part of the URI the name of the actual workflow/workflow scheme?

4.)    I’m Assuming that when a workflow scheme is created, then that workflow scheme must also be associated with the content type to be operated on, before it can be called via the REST API. Correct?

5.)    And finally in the example above is the last part of the URI above ‘dotCMS.org.7575’ always a content identifier of the contentlet to be operated on, by the workflow?

 

Let me know when you can.

Thanks.

 

Henry

 

 

 

From: 'Chris Falzone' via dotCMS User Group [[hidden email]]
Sent: Tuesday, January 2, 2018 3:09 PM
To: [hidden email]
Subject: Re: [dotcms] v 3.7.1 - REST API Question(s)

 

When you make an update you specify it is should be working or live by using save or publish parmaters:

 

Though, I don't think you can unpub/archive/delete content via the rest api directly.  But I know you can using workflow actions:

 

So just execute the proper workflow task that does it for you.  

 

On Tue, Jan 2, 2018 at 12:53 PM Henry Versemann <[hidden email]> wrote:

I’m currently able to use a GET/inquire request to the REST API to retrieve a contentlet.

 

Once I have it then is it possible to change a value in the contentlet, and then do a POST to update the newly changed contentlet?  

 

The value(s) I want to try to change are publish/unpublish/archive/unarchive/delete flags or values, that would mimic the manual process of doing an unpublish, archive, and then delete of entries manually.

 

Or instead of trying to do the delete process programmatically(especially if it’s not possible currently), what would be the best way to update an entry to indicate that it needs to be deleted in the future?

 

Thanks.

 

Henry

 

 

--
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/CY4PR0501MB377737163D54AE27CAA5BF15AD190%40CY4PR0501MB3777.namprd05.prod.outlook.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/CAMAbHgVp6RxJUWproVrCmWOyQuAbrTuKBi6oSV9YAe-9X7jw_g%40mail.gmail.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/CY4PR0501MB377752526746F751320258D2AD190%40CY4PR0501MB3777.namprd05.prod.outlook.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/1542fb25a08042b6bc1b6c293a1b9b7d%40exch13b.ms.gettysburg.edu.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

RE: v 3.7.1 - REST API Question(s)

Henry Versemann

Nathan,

 

In my particular situation I’m trying to delete a particular item contentlet from its structure, by way of the REST API.

So I was hoping to pass the contentlet id value to my workflow using the “wfActionAssign” key, so the workflow would only operate on that single piece of content.

 

Is that the way to do it then?

And should I include it in the request as part of the URL, or as a key/value pair in a json object?

 

Henry

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Nathan Keiter
Sent: Wednesday, January 3, 2018 10:33 AM
To: [hidden email]
Subject: RE: [dotcms] v 3.7.1 - REST API Question(s)

 

I believe that last part is the user id to assign the workflow to. “dotCMS.org.7575”

 

Nathan I. Keiter | Lead Network Applications Programmer | Benefits Advisory Council Member | I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993

https://www.gettysburg.edu

 

From: [hidden email] [[hidden email]] On Behalf Of Henry Versemann
Sent: Tuesday, January 02, 2018 4:30 PM
To: [hidden email]
Subject: RE: [dotcms] v 3.7.1 - REST API Question(s)

 

Chris,

 

I’ve looked in the documentation and the only example I saw was one that looked like it executed just one subaction of a particular workflow like this:

 

PUT /api/content/Assign%20for%20Review/1/wfActionComments/Hey%2C%20take%20a%20look/wfActionAssign/dotCMS.org.7575

 

But it doesn’t to explain all of the parts of the URI shown, unless there are more detailed examples of calling a workflow through the REST API.

 

So I have questions about the above URI.

 

1.)    Is the actual sub-action to be executed this part of the URI: /Assign%20for%20Review/

2.)    wfActionComments’ indicates that what follows it in the next part of the URI ( /Hey%2C%20take%20a%20look/ ) is a comment right? If so is it mandatory for comments to always be declared and formatted this way and in this same position?

3.)    So is the /wfActionAssign/ part of the URI the name of the actual workflow/workflow scheme?

4.)    I’m Assuming that when a workflow scheme is created, then that workflow scheme must also be associated with the content type to be operated on, before it can be called via the REST API. Correct?

5.)    And finally in the example above is the last part of the URI above ‘dotCMS.org.7575’ always a content identifier of the contentlet to be operated on, by the workflow?

 

Let me know when you can.

Thanks.

 

Henry

 

 

 

From: 'Chris Falzone' via dotCMS User Group [[hidden email]]
Sent: Tuesday, January 2, 2018 3:09 PM
To: [hidden email]
Subject: Re: [dotcms] v 3.7.1 - REST API Question(s)

 

When you make an update you specify it is should be working or live by using save or publish parmaters:

 

Though, I don't think you can unpub/archive/delete content via the rest api directly.  But I know you can using workflow actions:

 

So just execute the proper workflow task that does it for you.  

 

On Tue, Jan 2, 2018 at 12:53 PM Henry Versemann <[hidden email]> wrote:

I’m currently able to use a GET/inquire request to the REST API to retrieve a contentlet.

 

Once I have it then is it possible to change a value in the contentlet, and then do a POST to update the newly changed contentlet?  

 

The value(s) I want to try to change are publish/unpublish/archive/unarchive/delete flags or values, that would mimic the manual process of doing an unpublish, archive, and then delete of entries manually.

 

Or instead of trying to do the delete process programmatically(especially if it’s not possible currently), what would be the best way to update an entry to indicate that it needs to be deleted in the future?

 

Thanks.

 

Henry

 

 

--
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/CY4PR0501MB377737163D54AE27CAA5BF15AD190%40CY4PR0501MB3777.namprd05.prod.outlook.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/CAMAbHgVp6RxJUWproVrCmWOyQuAbrTuKBi6oSV9YAe-9X7jw_g%40mail.gmail.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/CY4PR0501MB377752526746F751320258D2AD190%40CY4PR0501MB3777.namprd05.prod.outlook.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/1542fb25a08042b6bc1b6c293a1b9b7d%40exch13b.ms.gettysburg.edu.
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/CY4PR0501MB37777EC73B2BEADAC3F06812AD1E0%40CY4PR0501MB3777.namprd05.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

RE: v 3.7.1 - REST API Question(s)

Nathan Keiter

I believe you are correct.

 

It looks like workflow stuff in URL.

 

https://dotcms.com/docs/latest/rest-api-end-points#ContentResource

 

Then object in payload.

 

https://dotcms.com/docs/latest/save-content-using-the-rest-api#json

 

Nathan I. Keiter | Lead Network Applications Programmer | Benefits Advisory Council Member | I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993

https://www.gettysburg.edu

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Henry Versemann
Sent: Wednesday, January 03, 2018 11:39 AM
To: [hidden email]
Subject: RE: [dotcms] v 3.7.1 - REST API Question(s)

 

Nathan,

 

In my particular situation I’m trying to delete a particular item contentlet from its structure, by way of the REST API.

So I was hoping to pass the contentlet id value to my workflow using the “wfActionAssign” key, so the workflow would only operate on that single piece of content.

 

Is that the way to do it then?

And should I include it in the request as part of the URL, or as a key/value pair in a json object?

 

Henry

 

 

From: [hidden email] [[hidden email]] On Behalf Of Nathan Keiter
Sent: Wednesday, January 3, 2018 10:33 AM
To: [hidden email]
Subject: RE: [dotcms] v 3.7.1 - REST API Question(s)

 

I believe that last part is the user id to assign the workflow to. “dotCMS.org.7575”

 

Nathan I. Keiter | Lead Network Applications Programmer | Benefits Advisory Council Member | I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993

https://www.gettysburg.edu

 

From: [hidden email] [[hidden email]] On Behalf Of Henry Versemann
Sent: Tuesday, January 02, 2018 4:30 PM
To: [hidden email]
Subject: RE: [dotcms] v 3.7.1 - REST API Question(s)

 

Chris,

 

I’ve looked in the documentation and the only example I saw was one that looked like it executed just one subaction of a particular workflow like this:

 

PUT /api/content/Assign%20for%20Review/1/wfActionComments/Hey%2C%20take%20a%20look/wfActionAssign/dotCMS.org.7575

 

But it doesn’t to explain all of the parts of the URI shown, unless there are more detailed examples of calling a workflow through the REST API.

 

So I have questions about the above URI.

 

1.)    Is the actual sub-action to be executed this part of the URI: /Assign%20for%20Review/

2.)    wfActionComments’ indicates that what follows it in the next part of the URI ( /Hey%2C%20take%20a%20look/ ) is a comment right? If so is it mandatory for comments to always be declared and formatted this way and in this same position?

3.)    So is the /wfActionAssign/ part of the URI the name of the actual workflow/workflow scheme?

4.)    I’m Assuming that when a workflow scheme is created, then that workflow scheme must also be associated with the content type to be operated on, before it can be called via the REST API. Correct?

5.)    And finally in the example above is the last part of the URI above ‘dotCMS.org.7575’ always a content identifier of the contentlet to be operated on, by the workflow?

 

Let me know when you can.

Thanks.

 

Henry

 

 

 

From: 'Chris Falzone' via dotCMS User Group [[hidden email]]
Sent: Tuesday, January 2, 2018 3:09 PM
To: [hidden email]
Subject: Re: [dotcms] v 3.7.1 - REST API Question(s)

 

When you make an update you specify it is should be working or live by using save or publish parmaters:

 

Though, I don't think you can unpub/archive/delete content via the rest api directly.  But I know you can using workflow actions:

 

So just execute the proper workflow task that does it for you.  

 

On Tue, Jan 2, 2018 at 12:53 PM Henry Versemann <[hidden email]> wrote:

I’m currently able to use a GET/inquire request to the REST API to retrieve a contentlet.

 

Once I have it then is it possible to change a value in the contentlet, and then do a POST to update the newly changed contentlet?  

 

The value(s) I want to try to change are publish/unpublish/archive/unarchive/delete flags or values, that would mimic the manual process of doing an unpublish, archive, and then delete of entries manually.

 

Or instead of trying to do the delete process programmatically(especially if it’s not possible currently), what would be the best way to update an entry to indicate that it needs to be deleted in the future?

 

Thanks.

 

Henry

 

 

--
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/CY4PR0501MB377737163D54AE27CAA5BF15AD190%40CY4PR0501MB3777.namprd05.prod.outlook.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/CAMAbHgVp6RxJUWproVrCmWOyQuAbrTuKBi6oSV9YAe-9X7jw_g%40mail.gmail.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/CY4PR0501MB377752526746F751320258D2AD190%40CY4PR0501MB3777.namprd05.prod.outlook.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/1542fb25a08042b6bc1b6c293a1b9b7d%40exch13b.ms.gettysburg.edu.
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/CY4PR0501MB37777EC73B2BEADAC3F06812AD1E0%40CY4PR0501MB3777.namprd05.prod.outlook.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/cfb1ff94bc444531a0647e2feb7d85dd%40exch13b.ms.gettysburg.edu.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

RE: v 3.7.1 - REST API Question(s)

Henry Versemann

So my workflow scheme that I’m trying to use and call the action from is named “REST API Test”.

It has two workflow steps defined within it.

The first step name is “Lock” and contains an action named “REST API Lock Employee” which has only one sub-action of “Lock content”.

The second step is “Delete” and contains an action named “REST API Delete Employee” which has only one sub-action of “Delete content”.

I think I read in the documentation that a “Delete content” sub-action will automatically do an Unpublish, an Archive, and a Delete all in one call, so that’s what I’m hoping to do when calling my “REST API Delete Employee” action and here’s what my latest request looks like(minus the domain):

 

/api/content/REST%20API%20Delete%20Employee/1/wfActionComments/Deleted%20Employee%20Contentlet%20ID%20of%20%289554f6e0-8dc4-4d36-a033-f9a09ab2ddf0%29%2E/wfActionAssign/9554f6e0-8dc4-4d36-a033-f9a09

ab2ddf0

 

using the suggested format with both comments and the identifier showing as part of the URL. I’m also using the PUT method with this request.

I’m also using only two headers, with this request. One for my authorization header and an “Accept” header for “text/plain” which seems to be common.

So far when I try to call the delete action mentioned above I’ve gotten this web exception:

 

WARNING: Delete-Employee-PSItemString=HTTP Status 400 - Bad Request

 

type Status report

message Bad Request

description The request sent by the client was syntactically incorrect.

 

 

 

Apache Tomcat/8.0.18

WARNING: Delete-Employee-InvocationInfo=System.Management.Automation.InvocationInfo

WARNING: Delete-Employee-ExceptionMessage=The remote server returned an error: (400) Bad Request.

WARNING: Delete-Employee-InnerException=

WARNING: Delete-Employee-ExceptionStacktrace=   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request)

   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()

WARNING: Delete-Employee-ScriptStackTrace=at Delete-Employee, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 337

at ReadAddUpdate-File, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 957

at <ScriptBlock>, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 1033

WARNING: ReadAddUpdate-File-PSItemString=The remote server returned an error: (400) Bad Request.

WARNING: ReadAddUpdate-File-InvocationInfo=System.Management.Automation.InvocationInfo

WARNING: ReadAddUpdate-File-ExceptionMessage=The remote server returned an error: (400) Bad Request.

WARNING: ReadAddUpdate-File-InnerException=

WARNING: ReadAddUpdate-File-ExceptionStacktrace=   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request)

   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()

WARNING: ReadAddUpdate-File-ScriptStackTrace=at Delete-Employee, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 416

at ReadAddUpdate-File, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 957

at <ScriptBlock>, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 1033

The remote server returned an error: (400) Bad Request.

At C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1:1000 char:9

+         throw $_.Exception

+         ~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : OperationStopped: (:) [], WebException

    + FullyQualifiedErrorId : The remote server returned an error: (400) Bad Request.

 

So I’m trying to figure out how to change my request, to be more syntactically correct.

Any thoughts on some more things or format variations that I can try?

Thanks for the help.

 

Henry

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Nathan Keiter
Sent: Wednesday, January 3, 2018 11:03 AM
To: [hidden email]
Subject: RE: [dotcms] v 3.7.1 - REST API Question(s)

 

I believe you are correct.

 

It looks like workflow stuff in URL.

 

https://dotcms.com/docs/latest/rest-api-end-points#ContentResource

 

Then object in payload.

 

https://dotcms.com/docs/latest/save-content-using-the-rest-api#json

 

Nathan I. Keiter | Lead Network Applications Programmer | Benefits Advisory Council Member | I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993

https://www.gettysburg.edu

 

From: [hidden email] [[hidden email]] On Behalf Of Henry Versemann
Sent: Wednesday, January 03, 2018 11:39 AM
To:
[hidden email]
Subject: RE: [dotcms] v 3.7.1 - REST API Question(s)

 

Nathan,

 

In my particular situation I’m trying to delete a particular item contentlet from its structure, by way of the REST API.

So I was hoping to pass the contentlet id value to my workflow using the “wfActionAssign” key, so the workflow would only operate on that single piece of content.

 

Is that the way to do it then?

And should I include it in the request as part of the URL, or as a key/value pair in a json object?

 

Henry

 

 

From: [hidden email] [[hidden email]] On Behalf Of Nathan Keiter
Sent: Wednesday, January 3, 2018 10:33 AM
To:
[hidden email]
Subject: RE: [dotcms] v 3.7.1 - REST API Question(s)

 

I believe that last part is the user id to assign the workflow to. “dotCMS.org.7575”

 

Nathan I. Keiter | Lead Network Applications Programmer | Benefits Advisory Council Member | I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993

https://www.gettysburg.edu

 

From: [hidden email] [[hidden email]] On Behalf Of Henry Versemann
Sent: Tuesday, January 02, 2018 4:30 PM
To:
[hidden email]
Subject: RE: [dotcms] v 3.7.1 - REST API Question(s)

 

Chris,

 

I’ve looked in the documentation and the only example I saw was one that looked like it executed just one subaction of a particular workflow like this:

 

PUT /api/content/Assign%20for%20Review/1/wfActionComments/Hey%2C%20take%20a%20look/wfActionAssign/dotCMS.org.7575

 

But it doesn’t to explain all of the parts of the URI shown, unless there are more detailed examples of calling a workflow through the REST API.

 

So I have questions about the above URI.

 

1.)    Is the actual sub-action to be executed this part of the URI: /Assign%20for%20Review/

2.)    wfActionComments’ indicates that what follows it in the next part of the URI ( /Hey%2C%20take%20a%20look/ ) is a comment right? If so is it mandatory for comments to always be declared and formatted this way and in this same position?

3.)    So is the /wfActionAssign/ part of the URI the name of the actual workflow/workflow scheme?

4.)    I’m Assuming that when a workflow scheme is created, then that workflow scheme must also be associated with the content type to be operated on, before it can be called via the REST API. Correct?

5.)    And finally in the example above is the last part of the URI above ‘dotCMS.org.7575’ always a content identifier of the contentlet to be operated on, by the workflow?

 

Let me know when you can.

Thanks.

 

Henry

 

 

 

From: 'Chris Falzone' via dotCMS User Group [[hidden email]]
Sent: Tuesday, January 2, 2018 3:09 PM
To:
[hidden email]
Subject: Re: [dotcms] v 3.7.1 - REST API Question(s)

 

When you make an update you specify it is should be working or live by using save or publish parmaters:

 

Though, I don't think you can unpub/archive/delete content via the rest api directly.  But I know you can using workflow actions:

 

So just execute the proper workflow task that does it for you.  

 

On Tue, Jan 2, 2018 at 12:53 PM Henry Versemann <[hidden email]> wrote:

I’m currently able to use a GET/inquire request to the REST API to retrieve a contentlet.

 

Once I have it then is it possible to change a value in the contentlet, and then do a POST to update the newly changed contentlet?  

 

The value(s) I want to try to change are publish/unpublish/archive/unarchive/delete flags or values, that would mimic the manual process of doing an unpublish, archive, and then delete of entries manually.

 

Or instead of trying to do the delete process programmatically(especially if it’s not possible currently), what would be the best way to update an entry to indicate that it needs to be deleted in the future?

 

Thanks.

 

Henry

 

 

--
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/CY4PR0501MB377737163D54AE27CAA5BF15AD190%40CY4PR0501MB3777.namprd05.prod.outlook.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/CAMAbHgVp6RxJUWproVrCmWOyQuAbrTuKBi6oSV9YAe-9X7jw_g%40mail.gmail.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/CY4PR0501MB377752526746F751320258D2AD190%40CY4PR0501MB3777.namprd05.prod.outlook.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/1542fb25a08042b6bc1b6c293a1b9b7d%40exch13b.ms.gettysburg.edu.
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/CY4PR0501MB37777EC73B2BEADAC3F06812AD1E0%40CY4PR0501MB3777.namprd05.prod.outlook.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/cfb1ff94bc444531a0647e2feb7d85dd%40exch13b.ms.gettysburg.edu.
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/CY4PR0501MB37779B8C637C2F9494F3225CAD1E0%40CY4PR0501MB3777.namprd05.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: v 3.7.1 - REST API Question(s)

Chris Falzone-2
Your Endpoint is just:  /api/content/REST%20API%20Delete%20Employee
in the json payload you put the identifier like: json={"identifier":"9554f6e0-8dc4-4d36-a033-f9a09"}

So via curl would look something like:
curl -v -u "[hidden email]:admin" -XPUT http://demo.dotcms.com/api/content/REST%20API%20Delete%20Employee -F 'json={"identifier":"9554f6e0-8dc4-4d36-a033-f9a09"};type=application/json'

You probably need to (at least) also pass any required fields as well as the languageId of the content in the json payload.


On Wed, Jan 3, 2018 at 12:31 PM Henry Versemann <[hidden email]> wrote:

So my workflow scheme that I’m trying to use and call the action from is named “REST API Test”.

It has two workflow steps defined within it.

The first step name is “Lock” and contains an action named “REST API Lock Employee” which has only one sub-action of “Lock content”.

The second step is “Delete” and contains an action named “REST API Delete Employee” which has only one sub-action of “Delete content”.

I think I read in the documentation that a “Delete content” sub-action will automatically do an Unpublish, an Archive, and a Delete all in one call, so that’s what I’m hoping to do when calling my “REST API Delete Employee” action and here’s what my latest request looks like(minus the domain):

 

/api/content/REST%20API%20Delete%20Employee/1/wfActionComments/Deleted%20Employee%20Contentlet%20ID%20of%20%289554f6e0-8dc4-4d36-a033-f9a09ab2ddf0%29%2E/wfActionAssign/9554f6e0-8dc4-4d36-a033-f9a09

ab2ddf0

 

using the suggested format with both comments and the identifier showing as part of the URL. I’m also using the PUT method with this request.

I’m also using only two headers, with this request. One for my authorization header and an “Accept” header for “text/plain” which seems to be common.

So far when I try to call the delete action mentioned above I’ve gotten this web exception:

 

WARNING: Delete-Employee-PSItemString=HTTP Status 400 - Bad Request

 

type Status report

message Bad Request

description The request sent by the client was syntactically incorrect.

 

 

 

Apache Tomcat/8.0.18

WARNING: Delete-Employee-InvocationInfo=System.Management.Automation.InvocationInfo

WARNING: Delete-Employee-ExceptionMessage=The remote server returned an error: (400) Bad Request.

WARNING: Delete-Employee-InnerException=

WARNING: Delete-Employee-ExceptionStacktrace=   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request)

   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()

WARNING: Delete-Employee-ScriptStackTrace=at Delete-Employee, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 337

at ReadAddUpdate-File, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 957

at <ScriptBlock>, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 1033

WARNING: ReadAddUpdate-File-PSItemString=The remote server returned an error: (400) Bad Request.

WARNING: ReadAddUpdate-File-InvocationInfo=System.Management.Automation.InvocationInfo

WARNING: ReadAddUpdate-File-ExceptionMessage=The remote server returned an error: (400) Bad Request.

WARNING: ReadAddUpdate-File-InnerException=

WARNING: ReadAddUpdate-File-ExceptionStacktrace=   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request)

   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()

WARNING: ReadAddUpdate-File-ScriptStackTrace=at Delete-Employee, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 416

at ReadAddUpdate-File, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 957

at <ScriptBlock>, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 1033

The remote server returned an error: (400) Bad Request.

At C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1:1000 char:9

+         throw $_.Exception

+         ~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : OperationStopped: (:) [], WebException

    + FullyQualifiedErrorId : The remote server returned an error: (400) Bad Request.

 

So I’m trying to figure out how to change my request, to be more syntactically correct.

Any thoughts on some more things or format variations that I can try?

Thanks for the help.

 

Henry

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Nathan Keiter
Sent: Wednesday, January 3, 2018 11:03 AM


To: [hidden email]
Subject: RE: [dotcms] v 3.7.1 - REST API Question(s)

 

I believe you are correct.

 

It looks like workflow stuff in URL.

 

https://dotcms.com/docs/latest/rest-api-end-points#ContentResource

 

Then object in payload.

 

https://dotcms.com/docs/latest/save-content-using-the-rest-api#json

 

Nathan I. Keiter | Lead Network Applications Programmer | Benefits Advisory Council Member | I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: <a href="tel:(717)%20337-6993" value="+17173376993" target="_blank">717.337.6993

https://www.gettysburg.edu

 

From: [hidden email] [[hidden email]] On Behalf Of Henry Versemann
Sent: Wednesday, January 03, 2018 11:39 AM
To:
[hidden email]
Subject: RE: [dotcms] v 3.7.1 - REST API Question(s)

 

Nathan,

 

In my particular situation I’m trying to delete a particular item contentlet from its structure, by way of the REST API.

So I was hoping to pass the contentlet id value to my workflow using the “wfActionAssign” key, so the workflow would only operate on that single piece of content.

 

Is that the way to do it then?

And should I include it in the request as part of the URL, or as a key/value pair in a json object?

 

Henry

 

 

From: [hidden email] [[hidden email]] On Behalf Of Nathan Keiter
Sent: Wednesday, January 3, 2018 10:33 AM
To:
[hidden email]
Subject: RE: [dotcms] v 3.7.1 - REST API Question(s)

 

I believe that last part is the user id to assign the workflow to. “dotCMS.org.7575”

 

Nathan I. Keiter | Lead Network Applications Programmer | Benefits Advisory Council Member | I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: <a href="tel:(717)%20337-6993" value="+17173376993" target="_blank">717.337.6993

https://www.gettysburg.edu

 

From: [hidden email] [[hidden email]] On Behalf Of Henry Versemann
Sent: Tuesday, January 02, 2018 4:30 PM
To:
[hidden email]
Subject: RE: [dotcms] v 3.7.1 - REST API Question(s)

 

Chris,

 

I’ve looked in the documentation and the only example I saw was one that looked like it executed just one subaction of a particular workflow like this:

 

PUT /api/content/Assign%20for%20Review/1/wfActionComments/Hey%2C%20take%20a%20look/wfActionAssign/dotCMS.org.7575

 

But it doesn’t to explain all of the parts of the URI shown, unless there are more detailed examples of calling a workflow through the REST API.

 

So I have questions about the above URI.

 

1.)    Is the actual sub-action to be executed this part of the URI: /Assign%20for%20Review/

2.)    wfActionComments’ indicates that what follows it in the next part of the URI ( /Hey%2C%20take%20a%20look/ ) is a comment right? If so is it mandatory for comments to always be declared and formatted this way and in this same position?

3.)    So is the /wfActionAssign/ part of the URI the name of the actual workflow/workflow scheme?

4.)    I’m Assuming that when a workflow scheme is created, then that workflow scheme must also be associated with the content type to be operated on, before it can be called via the REST API. Correct?

5.)    And finally in the example above is the last part of the URI above ‘dotCMS.org.7575’ always a content identifier of the contentlet to be operated on, by the workflow?

 

Let me know when you can.

Thanks.

 

Henry

 

 

 

From: 'Chris Falzone' via dotCMS User Group [[hidden email]]
Sent: Tuesday, January 2, 2018 3:09 PM
To:
[hidden email]
Subject: Re: [dotcms] v 3.7.1 - REST API Question(s)

 

When you make an update you specify it is should be working or live by using save or publish parmaters:

 

Though, I don't think you can unpub/archive/delete content via the rest api directly.  But I know you can using workflow actions:

 

So just execute the proper workflow task that does it for you.  

 

On Tue, Jan 2, 2018 at 12:53 PM Henry Versemann <[hidden email]> wrote:

I’m currently able to use a GET/inquire request to the REST API to retrieve a contentlet.

 

Once I have it then is it possible to change a value in the contentlet, and then do a POST to update the newly changed contentlet?  

 

The value(s) I want to try to change are publish/unpublish/archive/unarchive/delete flags or values, that would mimic the manual process of doing an unpublish, archive, and then delete of entries manually.

 

Or instead of trying to do the delete process programmatically(especially if it’s not possible currently), what would be the best way to update an entry to indicate that it needs to be deleted in the future?

 

Thanks.

 

Henry

 

 

--
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/CY4PR0501MB377737163D54AE27CAA5BF15AD190%40CY4PR0501MB3777.namprd05.prod.outlook.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/CAMAbHgVp6RxJUWproVrCmWOyQuAbrTuKBi6oSV9YAe-9X7jw_g%40mail.gmail.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/CY4PR0501MB377752526746F751320258D2AD190%40CY4PR0501MB3777.namprd05.prod.outlook.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/1542fb25a08042b6bc1b6c293a1b9b7d%40exch13b.ms.gettysburg.edu.
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/CY4PR0501MB37777EC73B2BEADAC3F06812AD1E0%40CY4PR0501MB3777.namprd05.prod.outlook.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/cfb1ff94bc444531a0647e2feb7d85dd%40exch13b.ms.gettysburg.edu.
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/CY4PR0501MB37779B8C637C2F9494F3225CAD1E0%40CY4PR0501MB3777.namprd05.prod.outlook.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/CAMAbHgWxXE_pAU%3D8QgnhCZWFj025HcGM4WWwD%3DgoQeZcKg9J7w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

RE: v 3.7.1 - REST API Question(s)

Nathan Keiter

That’s pretty cool Chris. I didn’t see anything about delete in the documentation.

 

Nathan I. Keiter | Lead Network Applications Programmer | Benefits Advisory Council Member | I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: 717.337.6993

https://www.gettysburg.edu

 

From: 'Chris Falzone' via dotCMS User Group [mailto:[hidden email]]
Sent: Thursday, January 04, 2018 10:13 AM
To: [hidden email]
Subject: Re: [dotcms] v 3.7.1 - REST API Question(s)

 

Your Endpoint is just:  /api/content/REST%20API%20Delete%20Employee

in the json payload you put the identifier like: json={"identifier":"9554f6e0-8dc4-4d36-a033-f9a09"}

 

So via curl would look something like:
curl -v -u "[hidden email]" -XPUT http://demo.dotcms.com/api/content/REST%20API%20Delete%20Employee -F 'json={"identifier":"9554f6e0-8dc4-4d36-a033-f9a09"};type=application/json'

 

You probably need to (at least) also pass any required fields as well as the languageId of the content in the json payload.

 

On Wed, Jan 3, 2018 at 12:31 PM Henry Versemann <[hidden email]> wrote:

So my workflow scheme that I’m trying to use and call the action from is named “REST API Test”.

It has two workflow steps defined within it.

The first step name is “Lock” and contains an action named “REST API Lock Employee” which has only one sub-action of “Lock content”.

The second step is “Delete” and contains an action named “REST API Delete Employee” which has only one sub-action of “Delete content”.

I think I read in the documentation that a “Delete content” sub-action will automatically do an Unpublish, an Archive, and a Delete all in one call, so that’s what I’m hoping to do when calling my “REST API Delete Employee” action and here’s what my latest request looks like(minus the domain):

 

/api/content/REST%20API%20Delete%20Employee/1/wfActionComments/Deleted%20Employee%20Contentlet%20ID%20of%20%289554f6e0-8dc4-4d36-a033-f9a09ab2ddf0%29%2E/wfActionAssign/9554f6e0-8dc4-4d36-a033-f9a09

ab2ddf0

 

using the suggested format with both comments and the identifier showing as part of the URL. I’m also using the PUT method with this request.

I’m also using only two headers, with this request. One for my authorization header and an “Accept” header for “text/plain” which seems to be common.

So far when I try to call the delete action mentioned above I’ve gotten this web exception:

 

WARNING: Delete-Employee-PSItemString=HTTP Status 400 - Bad Request

 

type Status report

message Bad Request

description The request sent by the client was syntactically incorrect.

 

 

 

Apache Tomcat/8.0.18

WARNING: Delete-Employee-InvocationInfo=System.Management.Automation.InvocationInfo

WARNING: Delete-Employee-ExceptionMessage=The remote server returned an error: (400) Bad Request.

WARNING: Delete-Employee-InnerException=

WARNING: Delete-Employee-ExceptionStacktrace=   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request)

   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()

WARNING: Delete-Employee-ScriptStackTrace=at Delete-Employee, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 337

at ReadAddUpdate-File, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 957

at <ScriptBlock>, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 1033

WARNING: ReadAddUpdate-File-PSItemString=The remote server returned an error: (400) Bad Request.

WARNING: ReadAddUpdate-File-InvocationInfo=System.Management.Automation.InvocationInfo

WARNING: ReadAddUpdate-File-ExceptionMessage=The remote server returned an error: (400) Bad Request.

WARNING: ReadAddUpdate-File-InnerException=

WARNING: ReadAddUpdate-File-ExceptionStacktrace=   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request)

   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()

WARNING: ReadAddUpdate-File-ScriptStackTrace=at Delete-Employee, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 416

at ReadAddUpdate-File, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 957

at <ScriptBlock>, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 1033

The remote server returned an error: (400) Bad Request.

At C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1:1000 char:9

+         throw $_.Exception

+         ~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : OperationStopped: (:) [], WebException

    + FullyQualifiedErrorId : The remote server returned an error: (400) Bad Request.

 

So I’m trying to figure out how to change my request, to be more syntactically correct.

Any thoughts on some more things or format variations that I can try?

Thanks for the help.

 

Henry

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Nathan Keiter
Sent: Wednesday, January 3, 2018 11:03 AM


To: [hidden email]
Subject: RE: [dotcms] v 3.7.1 - REST API Question(s)

 

I believe you are correct.

 

It looks like workflow stuff in URL.

 

https://dotcms.com/docs/latest/rest-api-end-points#ContentResource

 

Then object in payload.

 

https://dotcms.com/docs/latest/save-content-using-the-rest-api#json

 

Nathan I. Keiter | Lead Network Applications Programmer | Benefits Advisory Council Member | I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box <a href="https://maps.google.com/?q=2453&#43;%7C&#43;300&#43;North&#43;Washington&#43;Street&#43;%7C&#43;Gettysburg,&#43;PA&#43;17325&amp;entry=gmail&amp;source=g"> 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: <a href="tel:(717)%20337-6993" target="_blank"> 717.337.6993

https://www.gettysburg.edu

 

From: [hidden email] [[hidden email]] On Behalf Of Henry Versemann
Sent: Wednesday, January 03, 2018 11:39 AM
To:
[hidden email]
Subject: RE: [dotcms] v 3.7.1 - REST API Question(s)

 

Nathan,

 

In my particular situation I’m trying to delete a particular item contentlet from its structure, by way of the REST API.

So I was hoping to pass the contentlet id value to my workflow using the “wfActionAssign” key, so the workflow would only operate on that single piece of content.

 

Is that the way to do it then?

And should I include it in the request as part of the URL, or as a key/value pair in a json object?

 

Henry

 

 

From: [hidden email] [[hidden email]] On Behalf Of Nathan Keiter
Sent: Wednesday, January 3, 2018 10:33 AM
To:
[hidden email]
Subject: RE: [dotcms] v 3.7.1 - REST API Question(s)

 

I believe that last part is the user id to assign the workflow to. “dotCMS.org.7575”

 

Nathan I. Keiter | Lead Network Applications Programmer | Benefits Advisory Council Member | I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box <a href="https://maps.google.com/?q=2453&#43;%7C&#43;300&#43;North&#43;Washington&#43;Street&#43;%7C&#43;Gettysburg,&#43;PA&#43;17325&amp;entry=gmail&amp;source=g"> 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: <a href="tel:(717)%20337-6993" target="_blank"> 717.337.6993

https://www.gettysburg.edu

 

From: [hidden email] [[hidden email]] On Behalf Of Henry Versemann
Sent: Tuesday, January 02, 2018 4:30 PM
To:
[hidden email]
Subject: RE: [dotcms] v 3.7.1 - REST API Question(s)

 

Chris,

 

I’ve looked in the documentation and the only example I saw was one that looked like it executed just one subaction of a particular workflow like this:

 

PUT /api/content/Assign%20for%20Review/1/wfActionComments/Hey%2C%20take%20a%20look/wfActionAssign/dotCMS.org.7575

 

But it doesn’t to explain all of the parts of the URI shown, unless there are more detailed examples of calling a workflow through the REST API.

 

So I have questions about the above URI.

 

1.)    Is the actual sub-action to be executed this part of the URI: /Assign%20for%20Review/

2.)    wfActionComments’ indicates that what follows it in the next part of the URI ( /Hey%2C%20take%20a%20look/ ) is a comment right? If so is it mandatory for comments to always be declared and formatted this way and in this same position?

3.)    So is the /wfActionAssign/ part of the URI the name of the actual workflow/workflow scheme?

4.)    I’m Assuming that when a workflow scheme is created, then that workflow scheme must also be associated with the content type to be operated on, before it can be called via the REST API. Correct?

5.)    And finally in the example above is the last part of the URI above ‘dotCMS.org.7575’ always a content identifier of the contentlet to be operated on, by the workflow?

 

Let me know when you can.

Thanks.

 

Henry

 

 

 

From: 'Chris Falzone' via dotCMS User Group [[hidden email]]
Sent: Tuesday, January 2, 2018 3:09 PM
To:
[hidden email]
Subject: Re: [dotcms] v 3.7.1 - REST API Question(s)

 

When you make an update you specify it is should be working or live by using save or publish parmaters:

 

Though, I don't think you can unpub/archive/delete content via the rest api directly.  But I know you can using workflow actions:

 

So just execute the proper workflow task that does it for you.  

 

On Tue, Jan 2, 2018 at 12:53 PM Henry Versemann <[hidden email]> wrote:

I’m currently able to use a GET/inquire request to the REST API to retrieve a contentlet.

 

Once I have it then is it possible to change a value in the contentlet, and then do a POST to update the newly changed contentlet?  

 

The value(s) I want to try to change are publish/unpublish/archive/unarchive/delete flags or values, that would mimic the manual process of doing an unpublish, archive, and then delete of entries manually.

 

Or instead of trying to do the delete process programmatically(especially if it’s not possible currently), what would be the best way to update an entry to indicate that it needs to be deleted in the future?

 

Thanks.

 

Henry

 

 

--
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/CY4PR0501MB377737163D54AE27CAA5BF15AD190%40CY4PR0501MB3777.namprd05.prod.outlook.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/CAMAbHgVp6RxJUWproVrCmWOyQuAbrTuKBi6oSV9YAe-9X7jw_g%40mail.gmail.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/CY4PR0501MB377752526746F751320258D2AD190%40CY4PR0501MB3777.namprd05.prod.outlook.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/1542fb25a08042b6bc1b6c293a1b9b7d%40exch13b.ms.gettysburg.edu.
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/CY4PR0501MB37777EC73B2BEADAC3F06812AD1E0%40CY4PR0501MB3777.namprd05.prod.outlook.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/cfb1ff94bc444531a0647e2feb7d85dd%40exch13b.ms.gettysburg.edu.
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/CY4PR0501MB37779B8C637C2F9494F3225CAD1E0%40CY4PR0501MB3777.namprd05.prod.outlook.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/CAMAbHgWxXE_pAU%3D8QgnhCZWFj025HcGM4WWwD%3DgoQeZcKg9J7w%40mail.gmail.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/91b8d27769484132887e59974efe28cf%40exch13b.ms.gettysburg.edu.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

RE: v 3.7.1 - REST API Question(s)

Henry Versemann
In reply to this post by Chris Falzone-2

Chris,

 

So for a delete action what else besides maybe language id would be required for a delete?

The fields marked in red in the backend when I open up an entry for the structure in question, or something more than those?

Thanks for the help.

 

Henry

 

From: 'Chris Falzone' via dotCMS User Group [mailto:[hidden email]]
Sent: Thursday, January 4, 2018 9:13 AM
To: [hidden email]
Subject: Re: [dotcms] v 3.7.1 - REST API Question(s)

 

Your Endpoint is just:  /api/content/REST%20API%20Delete%20Employee

in the json payload you put the identifier like: json={"identifier":"9554f6e0-8dc4-4d36-a033-f9a09"}

 

So via curl would look something like:
curl -v -u "[hidden email]" -XPUT http://demo.dotcms.com/api/content/REST%20API%20Delete%20Employee -F 'json={"identifier":"9554f6e0-8dc4-4d36-a033-f9a09"};type=application/json'

 

You probably need to (at least) also pass any required fields as well as the languageId of the content in the json payload.

 

On Wed, Jan 3, 2018 at 12:31 PM Henry Versemann <[hidden email]> wrote:

So my workflow scheme that I’m trying to use and call the action from is named “REST API Test”.

It has two workflow steps defined within it.

The first step name is “Lock” and contains an action named “REST API Lock Employee” which has only one sub-action of “Lock content”.

The second step is “Delete” and contains an action named “REST API Delete Employee” which has only one sub-action of “Delete content”.

I think I read in the documentation that a “Delete content” sub-action will automatically do an Unpublish, an Archive, and a Delete all in one call, so that’s what I’m hoping to do when calling my “REST API Delete Employee” action and here’s what my latest request looks like(minus the domain):

 

/api/content/REST%20API%20Delete%20Employee/1/wfActionComments/Deleted%20Employee%20Contentlet%20ID%20of%20%289554f6e0-8dc4-4d36-a033-f9a09ab2ddf0%29%2E/wfActionAssign/9554f6e0-8dc4-4d36-a033-f9a09

ab2ddf0

 

using the suggested format with both comments and the identifier showing as part of the URL. I’m also using the PUT method with this request.

I’m also using only two headers, with this request. One for my authorization header and an “Accept” header for “text/plain” which seems to be common.

So far when I try to call the delete action mentioned above I’ve gotten this web exception:

 

WARNING: Delete-Employee-PSItemString=HTTP Status 400 - Bad Request

 

type Status report

message Bad Request

description The request sent by the client was syntactically incorrect.

 

 

 

Apache Tomcat/8.0.18

WARNING: Delete-Employee-InvocationInfo=System.Management.Automation.InvocationInfo

WARNING: Delete-Employee-ExceptionMessage=The remote server returned an error: (400) Bad Request.

WARNING: Delete-Employee-InnerException=

WARNING: Delete-Employee-ExceptionStacktrace=   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request)

   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()

WARNING: Delete-Employee-ScriptStackTrace=at Delete-Employee, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 337

at ReadAddUpdate-File, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 957

at <ScriptBlock>, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 1033

WARNING: ReadAddUpdate-File-PSItemString=The remote server returned an error: (400) Bad Request.

WARNING: ReadAddUpdate-File-InvocationInfo=System.Management.Automation.InvocationInfo

WARNING: ReadAddUpdate-File-ExceptionMessage=The remote server returned an error: (400) Bad Request.

WARNING: ReadAddUpdate-File-InnerException=

WARNING: ReadAddUpdate-File-ExceptionStacktrace=   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request)

   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()

WARNING: ReadAddUpdate-File-ScriptStackTrace=at Delete-Employee, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 416

at ReadAddUpdate-File, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 957

at <ScriptBlock>, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 1033

The remote server returned an error: (400) Bad Request.

At C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1:1000 char:9

+         throw $_.Exception

+         ~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : OperationStopped: (:) [], WebException

    + FullyQualifiedErrorId : The remote server returned an error: (400) Bad Request.

 

So I’m trying to figure out how to change my request, to be more syntactically correct.

Any thoughts on some more things or format variations that I can try?

Thanks for the help.

 

Henry

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Nathan Keiter
Sent: Wednesday, January 3, 2018 11:03 AM


To: [hidden email]
Subject: RE: [dotcms] v 3.7.1 - REST API Question(s)

 

I believe you are correct.

 

It looks like workflow stuff in URL.

 

https://dotcms.com/docs/latest/rest-api-end-points#ContentResource

 

Then object in payload.

 

https://dotcms.com/docs/latest/save-content-using-the-rest-api#json

 

Nathan I. Keiter | Lead Network Applications Programmer | Benefits Advisory Council Member | I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box <a href="https://maps.google.com/?q=2453&#43;%7C&#43;300&#43;North&#43;Washington&#43;Street&#43;%7C&#43;Gettysburg,&#43;PA&#43;17325&amp;entry=gmail&amp;source=g"> 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: <a href="tel:(717)%20337-6993" target="_blank"> 717.337.6993

https://www.gettysburg.edu

 

From: [hidden email] [[hidden email]] On Behalf Of Henry Versemann
Sent: Wednesday, January 03, 2018 11:39 AM
To:
[hidden email]
Subject: RE: [dotcms] v 3.7.1 - REST API Question(s)

 

Nathan,

 

In my particular situation I’m trying to delete a particular item contentlet from its structure, by way of the REST API.

So I was hoping to pass the contentlet id value to my workflow using the “wfActionAssign” key, so the workflow would only operate on that single piece of content.

 

Is that the way to do it then?

And should I include it in the request as part of the URL, or as a key/value pair in a json object?

 

Henry

 

 

From: [hidden email] [[hidden email]] On Behalf Of Nathan Keiter
Sent: Wednesday, January 3, 2018 10:33 AM
To:
[hidden email]
Subject: RE: [dotcms] v 3.7.1 - REST API Question(s)

 

I believe that last part is the user id to assign the workflow to. “dotCMS.org.7575”

 

Nathan I. Keiter | Lead Network Applications Programmer | Benefits Advisory Council Member | I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box <a href="https://maps.google.com/?q=2453&#43;%7C&#43;300&#43;North&#43;Washington&#43;Street&#43;%7C&#43;Gettysburg,&#43;PA&#43;17325&amp;entry=gmail&amp;source=g"> 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: <a href="tel:(717)%20337-6993" target="_blank"> 717.337.6993

https://www.gettysburg.edu

 

From: [hidden email] [[hidden email]] On Behalf Of Henry Versemann
Sent: Tuesday, January 02, 2018 4:30 PM
To:
[hidden email]
Subject: RE: [dotcms] v 3.7.1 - REST API Question(s)

 

Chris,

 

I’ve looked in the documentation and the only example I saw was one that looked like it executed just one subaction of a particular workflow like this:

 

PUT /api/content/Assign%20for%20Review/1/wfActionComments/Hey%2C%20take%20a%20look/wfActionAssign/dotCMS.org.7575

 

But it doesn’t to explain all of the parts of the URI shown, unless there are more detailed examples of calling a workflow through the REST API.

 

So I have questions about the above URI.

 

1.)    Is the actual sub-action to be executed this part of the URI: /Assign%20for%20Review/

2.)    wfActionComments’ indicates that what follows it in the next part of the URI ( /Hey%2C%20take%20a%20look/ ) is a comment right? If so is it mandatory for comments to always be declared and formatted this way and in this same position?

3.)    So is the /wfActionAssign/ part of the URI the name of the actual workflow/workflow scheme?

4.)    I’m Assuming that when a workflow scheme is created, then that workflow scheme must also be associated with the content type to be operated on, before it can be called via the REST API. Correct?

5.)    And finally in the example above is the last part of the URI above ‘dotCMS.org.7575’ always a content identifier of the contentlet to be operated on, by the workflow?

 

Let me know when you can.

Thanks.

 

Henry

 

 

 

From: 'Chris Falzone' via dotCMS User Group [[hidden email]]
Sent: Tuesday, January 2, 2018 3:09 PM
To:
[hidden email]
Subject: Re: [dotcms] v 3.7.1 - REST API Question(s)

 

When you make an update you specify it is should be working or live by using save or publish parmaters:

 

Though, I don't think you can unpub/archive/delete content via the rest api directly.  But I know you can using workflow actions:

 

So just execute the proper workflow task that does it for you.  

 

On Tue, Jan 2, 2018 at 12:53 PM Henry Versemann <[hidden email]> wrote:

I’m currently able to use a GET/inquire request to the REST API to retrieve a contentlet.

 

Once I have it then is it possible to change a value in the contentlet, and then do a POST to update the newly changed contentlet?  

 

The value(s) I want to try to change are publish/unpublish/archive/unarchive/delete flags or values, that would mimic the manual process of doing an unpublish, archive, and then delete of entries manually.

 

Or instead of trying to do the delete process programmatically(especially if it’s not possible currently), what would be the best way to update an entry to indicate that it needs to be deleted in the future?

 

Thanks.

 

Henry

 

 

--
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/CY4PR0501MB377737163D54AE27CAA5BF15AD190%40CY4PR0501MB3777.namprd05.prod.outlook.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/CAMAbHgVp6RxJUWproVrCmWOyQuAbrTuKBi6oSV9YAe-9X7jw_g%40mail.gmail.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/CY4PR0501MB377752526746F751320258D2AD190%40CY4PR0501MB3777.namprd05.prod.outlook.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/1542fb25a08042b6bc1b6c293a1b9b7d%40exch13b.ms.gettysburg.edu.
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/CY4PR0501MB37777EC73B2BEADAC3F06812AD1E0%40CY4PR0501MB3777.namprd05.prod.outlook.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/cfb1ff94bc444531a0647e2feb7d85dd%40exch13b.ms.gettysburg.edu.
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/CY4PR0501MB37779B8C637C2F9494F3225CAD1E0%40CY4PR0501MB3777.namprd05.prod.outlook.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/CAMAbHgWxXE_pAU%3D8QgnhCZWFj025HcGM4WWwD%3DgoQeZcKg9J7w%40mail.gmail.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/CY4PR0501MB37776FEDB6CB516F5D9C1FC0AD1F0%40CY4PR0501MB3777.namprd05.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: v 3.7.1 - REST API Question(s)

Chris Falzone-2
In reply to this post by Nathan Keiter
Yeah, there are a lot of ways to handle it, but it doesn't out of the box.  We use a flag and clean them up later.  I've also made a my own REST API Endpoint to delete files by inode because we needed to be able to do that in our deploy script from jenkins.  So multiple ways to handle it, but I think the "stock" way would be workflows right now. 

On Thu, Jan 4, 2018 at 10:15 AM Nathan Keiter <[hidden email]> wrote:

That’s pretty cool Chris. I didn’t see anything about delete in the documentation.

 

Nathan I. Keiter | Lead Network Applications Programmer | Benefits Advisory Council Member | I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: <a href="tel:(717)%20337-6993" value="+17173376993" target="_blank">717.337.6993

https://www.gettysburg.edu

 

From: 'Chris Falzone' via dotCMS User Group [mailto:[hidden email]]
Sent: Thursday, January 04, 2018 10:13 AM


To: [hidden email]
Subject: Re: [dotcms] v 3.7.1 - REST API Question(s)

 

Your Endpoint is just:  /api/content/REST%20API%20Delete%20Employee

in the json payload you put the identifier like: json={"identifier":"9554f6e0-8dc4-4d36-a033-f9a09"}

 

So via curl would look something like:
curl -v -u "[hidden email]" -XPUT http://demo.dotcms.com/api/content/REST%20API%20Delete%20Employee -F 'json={"identifier":"9554f6e0-8dc4-4d36-a033-f9a09"};type=application/json'

 

You probably need to (at least) also pass any required fields as well as the languageId of the content in the json payload.

 

On Wed, Jan 3, 2018 at 12:31 PM Henry Versemann <[hidden email]> wrote:

So my workflow scheme that I’m trying to use and call the action from is named “REST API Test”.

It has two workflow steps defined within it.

The first step name is “Lock” and contains an action named “REST API Lock Employee” which has only one sub-action of “Lock content”.

The second step is “Delete” and contains an action named “REST API Delete Employee” which has only one sub-action of “Delete content”.

I think I read in the documentation that a “Delete content” sub-action will automatically do an Unpublish, an Archive, and a Delete all in one call, so that’s what I’m hoping to do when calling my “REST API Delete Employee” action and here’s what my latest request looks like(minus the domain):

 

/api/content/REST%20API%20Delete%20Employee/1/wfActionComments/Deleted%20Employee%20Contentlet%20ID%20of%20%289554f6e0-8dc4-4d36-a033-f9a09ab2ddf0%29%2E/wfActionAssign/9554f6e0-8dc4-4d36-a033-f9a09

ab2ddf0

 

using the suggested format with both comments and the identifier showing as part of the URL. I’m also using the PUT method with this request.

I’m also using only two headers, with this request. One for my authorization header and an “Accept” header for “text/plain” which seems to be common.

So far when I try to call the delete action mentioned above I’ve gotten this web exception:

 

WARNING: Delete-Employee-PSItemString=HTTP Status 400 - Bad Request

 

type Status report

message Bad Request

description The request sent by the client was syntactically incorrect.

 

 

 

Apache Tomcat/8.0.18

WARNING: Delete-Employee-InvocationInfo=System.Management.Automation.InvocationInfo

WARNING: Delete-Employee-ExceptionMessage=The remote server returned an error: (400) Bad Request.

WARNING: Delete-Employee-InnerException=

WARNING: Delete-Employee-ExceptionStacktrace=   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request)

   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()

WARNING: Delete-Employee-ScriptStackTrace=at Delete-Employee, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 337

at ReadAddUpdate-File, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 957

at <ScriptBlock>, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 1033

WARNING: ReadAddUpdate-File-PSItemString=The remote server returned an error: (400) Bad Request.

WARNING: ReadAddUpdate-File-InvocationInfo=System.Management.Automation.InvocationInfo

WARNING: ReadAddUpdate-File-ExceptionMessage=The remote server returned an error: (400) Bad Request.

WARNING: ReadAddUpdate-File-InnerException=

WARNING: ReadAddUpdate-File-ExceptionStacktrace=   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request)

   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()

WARNING: ReadAddUpdate-File-ScriptStackTrace=at Delete-Employee, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 416

at ReadAddUpdate-File, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 957

at <ScriptBlock>, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 1033

The remote server returned an error: (400) Bad Request.

At C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1:1000 char:9

+         throw $_.Exception

+         ~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : OperationStopped: (:) [], WebException

    + FullyQualifiedErrorId : The remote server returned an error: (400) Bad Request.

 

So I’m trying to figure out how to change my request, to be more syntactically correct.

Any thoughts on some more things or format variations that I can try?

Thanks for the help.

 

Henry

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Nathan Keiter
Sent: Wednesday, January 3, 2018 11:03 AM


To: [hidden email]
Subject: RE: [dotcms] v 3.7.1 - REST API Question(s)

 

I believe you are correct.

 

It looks like workflow stuff in URL.

 

https://dotcms.com/docs/latest/rest-api-end-points#ContentResource

 

Then object in payload.

 

https://dotcms.com/docs/latest/save-content-using-the-rest-api#json

 

Nathan I. Keiter | Lead Network Applications Programmer | Benefits Advisory Council Member | I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: <a href="tel:(717)%20337-6993" target="_blank"> 717.337.6993

https://www.gettysburg.edu

 

From: [hidden email] [[hidden email]] On Behalf Of Henry Versemann
Sent: Wednesday, January 03, 2018 11:39 AM
To:
[hidden email]
Subject: RE: [dotcms] v 3.7.1 - REST API Question(s)

 

Nathan,

 

In my particular situation I’m trying to delete a particular item contentlet from its structure, by way of the REST API.

So I was hoping to pass the contentlet id value to my workflow using the “wfActionAssign” key, so the workflow would only operate on that single piece of content.

 

Is that the way to do it then?

And should I include it in the request as part of the URL, or as a key/value pair in a json object?

 

Henry

 

 

From: [hidden email] [[hidden email]] On Behalf Of Nathan Keiter
Sent: Wednesday, January 3, 2018 10:33 AM
To:
[hidden email]
Subject: RE: [dotcms] v 3.7.1 - REST API Question(s)

 

I believe that last part is the user id to assign the workflow to. “dotCMS.org.7575”

 

Nathan I. Keiter | Lead Network Applications Programmer | Benefits Advisory Council Member | I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: <a href="tel:(717)%20337-6993" target="_blank"> 717.337.6993

https://www.gettysburg.edu

 

From: [hidden email] [[hidden email]] On Behalf Of Henry Versemann
Sent: Tuesday, January 02, 2018 4:30 PM
To:
[hidden email]
Subject: RE: [dotcms] v 3.7.1 - REST API Question(s)

 

Chris,

 

I’ve looked in the documentation and the only example I saw was one that looked like it executed just one subaction of a particular workflow like this:

 

PUT /api/content/Assign%20for%20Review/1/wfActionComments/Hey%2C%20take%20a%20look/wfActionAssign/dotCMS.org.7575

 

But it doesn’t to explain all of the parts of the URI shown, unless there are more detailed examples of calling a workflow through the REST API.

 

So I have questions about the above URI.

 

1.)    Is the actual sub-action to be executed this part of the URI: /Assign%20for%20Review/

2.)    wfActionComments’ indicates that what follows it in the next part of the URI ( /Hey%2C%20take%20a%20look/ ) is a comment right? If so is it mandatory for comments to always be declared and formatted this way and in this same position?

3.)    So is the /wfActionAssign/ part of the URI the name of the actual workflow/workflow scheme?

4.)    I’m Assuming that when a workflow scheme is created, then that workflow scheme must also be associated with the content type to be operated on, before it can be called via the REST API. Correct?

5.)    And finally in the example above is the last part of the URI above ‘dotCMS.org.7575’ always a content identifier of the contentlet to be operated on, by the workflow?

 

Let me know when you can.

Thanks.

 

Henry

 

 

 

From: 'Chris Falzone' via dotCMS User Group [[hidden email]]
Sent: Tuesday, January 2, 2018 3:09 PM
To:
[hidden email]
Subject: Re: [dotcms] v 3.7.1 - REST API Question(s)

 

When you make an update you specify it is should be working or live by using save or publish parmaters:

 

Though, I don't think you can unpub/archive/delete content via the rest api directly.  But I know you can using workflow actions:

 

So just execute the proper workflow task that does it for you.  

 

On Tue, Jan 2, 2018 at 12:53 PM Henry Versemann <[hidden email]> wrote:

I’m currently able to use a GET/inquire request to the REST API to retrieve a contentlet.

 

Once I have it then is it possible to change a value in the contentlet, and then do a POST to update the newly changed contentlet?  

 

The value(s) I want to try to change are publish/unpublish/archive/unarchive/delete flags or values, that would mimic the manual process of doing an unpublish, archive, and then delete of entries manually.

 

Or instead of trying to do the delete process programmatically(especially if it’s not possible currently), what would be the best way to update an entry to indicate that it needs to be deleted in the future?

 

Thanks.

 

Henry

 

 

--
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/CY4PR0501MB377737163D54AE27CAA5BF15AD190%40CY4PR0501MB3777.namprd05.prod.outlook.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/CAMAbHgVp6RxJUWproVrCmWOyQuAbrTuKBi6oSV9YAe-9X7jw_g%40mail.gmail.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/CY4PR0501MB377752526746F751320258D2AD190%40CY4PR0501MB3777.namprd05.prod.outlook.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/1542fb25a08042b6bc1b6c293a1b9b7d%40exch13b.ms.gettysburg.edu.
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/CY4PR0501MB37777EC73B2BEADAC3F06812AD1E0%40CY4PR0501MB3777.namprd05.prod.outlook.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/cfb1ff94bc444531a0647e2feb7d85dd%40exch13b.ms.gettysburg.edu.
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/CY4PR0501MB37779B8C637C2F9494F3225CAD1E0%40CY4PR0501MB3777.namprd05.prod.outlook.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].


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/91b8d27769484132887e59974efe28cf%40exch13b.ms.gettysburg.edu.
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/CAMAbHgVwyr9MnNRC1hc%2B6_-ECCSWvm_psqjXrcvQwSwXkss4eA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: v 3.7.1 - REST API Question(s)

Chris Falzone-2
I am not 100% sure since I have not tested it.  But looking at the code, it is basically saving a new version of the content with the workflow task id associated which on save triggers the workflow.  In order to save the content you would need to pass all of the fields that you have set as required.  Personally I would just send the entire content object, but I suppose if the idea is to delete it, that might not be necessary.  Since it is identifier based, you also need languageId to make it unique.  Just assumptions since I have not tried it for myself.

On Thu, Jan 4, 2018 at 10:20 AM Chris Falzone <[hidden email]> wrote:
Yeah, there are a lot of ways to handle it, but it doesn't out of the box.  We use a flag and clean them up later.  I've also made a my own REST API Endpoint to delete files by inode because we needed to be able to do that in our deploy script from jenkins.  So multiple ways to handle it, but I think the "stock" way would be workflows right now. 

On Thu, Jan 4, 2018 at 10:15 AM Nathan Keiter <[hidden email]> wrote:

That’s pretty cool Chris. I didn’t see anything about delete in the documentation.

 

Nathan I. Keiter | Lead Network Applications Programmer | Benefits Advisory Council Member | I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: <a href="tel:(717)%20337-6993" value="+17173376993" target="_blank">717.337.6993

https://www.gettysburg.edu

 

From: 'Chris Falzone' via dotCMS User Group [mailto:[hidden email]]
Sent: Thursday, January 04, 2018 10:13 AM


To: [hidden email]
Subject: Re: [dotcms] v 3.7.1 - REST API Question(s)

 

Your Endpoint is just:  /api/content/REST%20API%20Delete%20Employee

in the json payload you put the identifier like: json={"identifier":"9554f6e0-8dc4-4d36-a033-f9a09"}

 

So via curl would look something like:
curl -v -u "[hidden email]" -XPUT http://demo.dotcms.com/api/content/REST%20API%20Delete%20Employee -F 'json={"identifier":"9554f6e0-8dc4-4d36-a033-f9a09"};type=application/json'

 

You probably need to (at least) also pass any required fields as well as the languageId of the content in the json payload.

 

On Wed, Jan 3, 2018 at 12:31 PM Henry Versemann <[hidden email]> wrote:

So my workflow scheme that I’m trying to use and call the action from is named “REST API Test”.

It has two workflow steps defined within it.

The first step name is “Lock” and contains an action named “REST API Lock Employee” which has only one sub-action of “Lock content”.

The second step is “Delete” and contains an action named “REST API Delete Employee” which has only one sub-action of “Delete content”.

I think I read in the documentation that a “Delete content” sub-action will automatically do an Unpublish, an Archive, and a Delete all in one call, so that’s what I’m hoping to do when calling my “REST API Delete Employee” action and here’s what my latest request looks like(minus the domain):

 

/api/content/REST%20API%20Delete%20Employee/1/wfActionComments/Deleted%20Employee%20Contentlet%20ID%20of%20%289554f6e0-8dc4-4d36-a033-f9a09ab2ddf0%29%2E/wfActionAssign/9554f6e0-8dc4-4d36-a033-f9a09

ab2ddf0

 

using the suggested format with both comments and the identifier showing as part of the URL. I’m also using the PUT method with this request.

I’m also using only two headers, with this request. One for my authorization header and an “Accept” header for “text/plain” which seems to be common.

So far when I try to call the delete action mentioned above I’ve gotten this web exception:

 

WARNING: Delete-Employee-PSItemString=HTTP Status 400 - Bad Request

 

type Status report

message Bad Request

description The request sent by the client was syntactically incorrect.

 

 

 

Apache Tomcat/8.0.18

WARNING: Delete-Employee-InvocationInfo=System.Management.Automation.InvocationInfo

WARNING: Delete-Employee-ExceptionMessage=The remote server returned an error: (400) Bad Request.

WARNING: Delete-Employee-InnerException=

WARNING: Delete-Employee-ExceptionStacktrace=   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request)

   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()

WARNING: Delete-Employee-ScriptStackTrace=at Delete-Employee, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 337

at ReadAddUpdate-File, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 957

at <ScriptBlock>, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 1033

WARNING: ReadAddUpdate-File-PSItemString=The remote server returned an error: (400) Bad Request.

WARNING: ReadAddUpdate-File-InvocationInfo=System.Management.Automation.InvocationInfo

WARNING: ReadAddUpdate-File-ExceptionMessage=The remote server returned an error: (400) Bad Request.

WARNING: ReadAddUpdate-File-InnerException=

WARNING: ReadAddUpdate-File-ExceptionStacktrace=   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request)

   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()

WARNING: ReadAddUpdate-File-ScriptStackTrace=at Delete-Employee, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 416

at ReadAddUpdate-File, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 957

at <ScriptBlock>, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 1033

The remote server returned an error: (400) Bad Request.

At C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1:1000 char:9

+         throw $_.Exception

+         ~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : OperationStopped: (:) [], WebException

    + FullyQualifiedErrorId : The remote server returned an error: (400) Bad Request.

 

So I’m trying to figure out how to change my request, to be more syntactically correct.

Any thoughts on some more things or format variations that I can try?

Thanks for the help.

 

Henry

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Nathan Keiter
Sent: Wednesday, January 3, 2018 11:03 AM


To: [hidden email]
Subject: RE: [dotcms] v 3.7.1 - REST API Question(s)

 

I believe you are correct.

 

It looks like workflow stuff in URL.

 

https://dotcms.com/docs/latest/rest-api-end-points#ContentResource

 

Then object in payload.

 

https://dotcms.com/docs/latest/save-content-using-the-rest-api#json

 

Nathan I. Keiter | Lead Network Applications Programmer | Benefits Advisory Council Member | I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: <a href="tel:(717)%20337-6993" target="_blank"> 717.337.6993

https://www.gettysburg.edu

 

From: [hidden email] [[hidden email]] On Behalf Of Henry Versemann
Sent: Wednesday, January 03, 2018 11:39 AM
To:
[hidden email]
Subject: RE: [dotcms] v 3.7.1 - REST API Question(s)

 

Nathan,

 

In my particular situation I’m trying to delete a particular item contentlet from its structure, by way of the REST API.

So I was hoping to pass the contentlet id value to my workflow using the “wfActionAssign” key, so the workflow would only operate on that single piece of content.

 

Is that the way to do it then?

And should I include it in the request as part of the URL, or as a key/value pair in a json object?

 

Henry

 

 

From: [hidden email] [[hidden email]] On Behalf Of Nathan Keiter
Sent: Wednesday, January 3, 2018 10:33 AM
To:
[hidden email]
Subject: RE: [dotcms] v 3.7.1 - REST API Question(s)

 

I believe that last part is the user id to assign the workflow to. “dotCMS.org.7575”

 

Nathan I. Keiter | Lead Network Applications Programmer | Benefits Advisory Council Member | I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: <a href="tel:(717)%20337-6993" target="_blank"> 717.337.6993

https://www.gettysburg.edu

 

From: [hidden email] [[hidden email]] On Behalf Of Henry Versemann
Sent: Tuesday, January 02, 2018 4:30 PM
To:
[hidden email]
Subject: RE: [dotcms] v 3.7.1 - REST API Question(s)

 

Chris,

 

I’ve looked in the documentation and the only example I saw was one that looked like it executed just one subaction of a particular workflow like this:

 

PUT /api/content/Assign%20for%20Review/1/wfActionComments/Hey%2C%20take%20a%20look/wfActionAssign/dotCMS.org.7575

 

But it doesn’t to explain all of the parts of the URI shown, unless there are more detailed examples of calling a workflow through the REST API.

 

So I have questions about the above URI.

 

1.)    Is the actual sub-action to be executed this part of the URI: /Assign%20for%20Review/

2.)    wfActionComments’ indicates that what follows it in the next part of the URI ( /Hey%2C%20take%20a%20look/ ) is a comment right? If so is it mandatory for comments to always be declared and formatted this way and in this same position?

3.)    So is the /wfActionAssign/ part of the URI the name of the actual workflow/workflow scheme?

4.)    I’m Assuming that when a workflow scheme is created, then that workflow scheme must also be associated with the content type to be operated on, before it can be called via the REST API. Correct?

5.)    And finally in the example above is the last part of the URI above ‘dotCMS.org.7575’ always a content identifier of the contentlet to be operated on, by the workflow?

 

Let me know when you can.

Thanks.

 

Henry

 

 

 

From: 'Chris Falzone' via dotCMS User Group [[hidden email]]
Sent: Tuesday, January 2, 2018 3:09 PM
To:
[hidden email]
Subject: Re: [dotcms] v 3.7.1 - REST API Question(s)

 

When you make an update you specify it is should be working or live by using save or publish parmaters:

 

Though, I don't think you can unpub/archive/delete content via the rest api directly.  But I know you can using workflow actions:

 

So just execute the proper workflow task that does it for you.  

 

On Tue, Jan 2, 2018 at 12:53 PM Henry Versemann <[hidden email]> wrote:

I’m currently able to use a GET/inquire request to the REST API to retrieve a contentlet.

 

Once I have it then is it possible to change a value in the contentlet, and then do a POST to update the newly changed contentlet?  

 

The value(s) I want to try to change are publish/unpublish/archive/unarchive/delete flags or values, that would mimic the manual process of doing an unpublish, archive, and then delete of entries manually.

 

Or instead of trying to do the delete process programmatically(especially if it’s not possible currently), what would be the best way to update an entry to indicate that it needs to be deleted in the future?

 

Thanks.

 

Henry

 

 

--
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/CY4PR0501MB377737163D54AE27CAA5BF15AD190%40CY4PR0501MB3777.namprd05.prod.outlook.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/CAMAbHgVp6RxJUWproVrCmWOyQuAbrTuKBi6oSV9YAe-9X7jw_g%40mail.gmail.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/CY4PR0501MB377752526746F751320258D2AD190%40CY4PR0501MB3777.namprd05.prod.outlook.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/1542fb25a08042b6bc1b6c293a1b9b7d%40exch13b.ms.gettysburg.edu.
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/CY4PR0501MB37777EC73B2BEADAC3F06812AD1E0%40CY4PR0501MB3777.namprd05.prod.outlook.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/cfb1ff94bc444531a0647e2feb7d85dd%40exch13b.ms.gettysburg.edu.
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/CY4PR0501MB37779B8C637C2F9494F3225CAD1E0%40CY4PR0501MB3777.namprd05.prod.outlook.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].


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/91b8d27769484132887e59974efe28cf%40exch13b.ms.gettysburg.edu.
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/CAMAbHgU_FCbdMaFNbJE-kVde%2BoWSC%3DnsqTvPe53PPWh6G_3LQw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

RE: v 3.7.1 - REST API Question(s)

Henry Versemann

OK thanks.

I’ll try it and see what happens.

 

Henry

 

From: 'Chris Falzone' via dotCMS User Group [mailto:[hidden email]]
Sent: Thursday, January 4, 2018 9:23 AM
To: [hidden email]
Subject: Re: [dotcms] v 3.7.1 - REST API Question(s)

 

I am not 100% sure since I have not tested it.  But looking at the code, it is basically saving a new version of the content with the workflow task id associated which on save triggers the workflow.  In order to save the content you would need to pass all of the fields that you have set as required.  Personally I would just send the entire content object, but I suppose if the idea is to delete it, that might not be necessary.  Since it is identifier based, you also need languageId to make it unique.  Just assumptions since I have not tried it for myself.

 

On Thu, Jan 4, 2018 at 10:20 AM Chris Falzone <[hidden email]> wrote:

Yeah, there are a lot of ways to handle it, but it doesn't out of the box.  We use a flag and clean them up later.  I've also made a my own REST API Endpoint to delete files by inode because we needed to be able to do that in our deploy script from jenkins.  So multiple ways to handle it, but I think the "stock" way would be workflows right now. 

 

On Thu, Jan 4, 2018 at 10:15 AM Nathan Keiter <[hidden email]> wrote:

That’s pretty cool Chris. I didn’t see anything about delete in the documentation.

 

Nathan I. Keiter | Lead Network Applications Programmer | Benefits Advisory Council Member | I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box <a href="https://maps.google.com/?q=2453&#43;%7C&#43;300&#43;North&#43;Washington&#43;Street&#43;%7C&#43;Gettysburg,&#43;PA&#43;17325&amp;entry=gmail&amp;source=g" target="_blank"> 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: <a href="tel:(717)%20337-6993" target="_blank"> 717.337.6993

https://www.gettysburg.edu

 

From: 'Chris Falzone' via dotCMS User Group [mailto:[hidden email]]
Sent: Thursday, January 04, 2018 10:13 AM


To: [hidden email]
Subject: Re: [dotcms] v 3.7.1 - REST API Question(s)

 

Your Endpoint is just:  /api/content/REST%20API%20Delete%20Employee

in the json payload you put the identifier like: json={"identifier":"9554f6e0-8dc4-4d36-a033-f9a09"}

 

So via curl would look something like:
curl -v -u "[hidden email]" -XPUT http://demo.dotcms.com/api/content/REST%20API%20Delete%20Employee -F 'json={"identifier":"9554f6e0-8dc4-4d36-a033-f9a09"};type=application/json'

 

You probably need to (at least) also pass any required fields as well as the languageId of the content in the json payload.

 

On Wed, Jan 3, 2018 at 12:31 PM Henry Versemann <[hidden email]> wrote:

So my workflow scheme that I’m trying to use and call the action from is named “REST API Test”.

It has two workflow steps defined within it.

The first step name is “Lock” and contains an action named “REST API Lock Employee” which has only one sub-action of “Lock content”.

The second step is “Delete” and contains an action named “REST API Delete Employee” which has only one sub-action of “Delete content”.

I think I read in the documentation that a “Delete content” sub-action will automatically do an Unpublish, an Archive, and a Delete all in one call, so that’s what I’m hoping to do when calling my “REST API Delete Employee” action and here’s what my latest request looks like(minus the domain):

 

/api/content/REST%20API%20Delete%20Employee/1/wfActionComments/Deleted%20Employee%20Contentlet%20ID%20of%20%289554f6e0-8dc4-4d36-a033-f9a09ab2ddf0%29%2E/wfActionAssign/9554f6e0-8dc4-4d36-a033-f9a09

ab2ddf0

 

using the suggested format with both comments and the identifier showing as part of the URL. I’m also using the PUT method with this request.

I’m also using only two headers, with this request. One for my authorization header and an “Accept” header for “text/plain” which seems to be common.

So far when I try to call the delete action mentioned above I’ve gotten this web exception:

 

WARNING: Delete-Employee-PSItemString=HTTP Status 400 - Bad Request

 

type Status report

message Bad Request

description The request sent by the client was syntactically incorrect.

 

 

 

Apache Tomcat/8.0.18

WARNING: Delete-Employee-InvocationInfo=System.Management.Automation.InvocationInfo

WARNING: Delete-Employee-ExceptionMessage=The remote server returned an error: (400) Bad Request.

WARNING: Delete-Employee-InnerException=

WARNING: Delete-Employee-ExceptionStacktrace=   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request)

   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()

WARNING: Delete-Employee-ScriptStackTrace=at Delete-Employee, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 337

at ReadAddUpdate-File, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 957

at <ScriptBlock>, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 1033

WARNING: ReadAddUpdate-File-PSItemString=The remote server returned an error: (400) Bad Request.

WARNING: ReadAddUpdate-File-InvocationInfo=System.Management.Automation.InvocationInfo

WARNING: ReadAddUpdate-File-ExceptionMessage=The remote server returned an error: (400) Bad Request.

WARNING: ReadAddUpdate-File-InnerException=

WARNING: ReadAddUpdate-File-ExceptionStacktrace=   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request)

   at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()

WARNING: ReadAddUpdate-File-ScriptStackTrace=at Delete-Employee, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 416

at ReadAddUpdate-File, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 957

at <ScriptBlock>, C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1: line 1033

The remote server returned an error: (400) Bad Request.

At C:\Users\hversemann\CAMPUS_DIRECTORY_AUTO_UPDATE_PROJECT\CAMPUS_DIRECTORY_UPDATE_AUTOMATION\Staging_PartTimeEmployeeUpdates_UsingWebRequest4_12212017.ps1:1000 char:9

+         throw $_.Exception

+         ~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : OperationStopped: (:) [], WebException

    + FullyQualifiedErrorId : The remote server returned an error: (400) Bad Request.

 

So I’m trying to figure out how to change my request, to be more syntactically correct.

Any thoughts on some more things or format variations that I can try?

Thanks for the help.

 

Henry

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Nathan Keiter
Sent: Wednesday, January 3, 2018 11:03 AM


To: [hidden email]
Subject: RE: [dotcms] v 3.7.1 - REST API Question(s)

 

I believe you are correct.

 

It looks like workflow stuff in URL.

 

https://dotcms.com/docs/latest/rest-api-end-points#ContentResource

 

Then object in payload.

 

https://dotcms.com/docs/latest/save-content-using-the-rest-api#json

 

Nathan I. Keiter | Lead Network Applications Programmer | Benefits Advisory Council Member | I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box <a href="https://maps.google.com/?q=2453&#43;%7C&#43;300&#43;North&#43;Washington&#43;Street&#43;%7C&#43;Gettysburg,&#43;PA&#43;17325&amp;entry=gmail&amp;source=g" target="_blank"> 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: <a href="tel:(717)%20337-6993" target="_blank"> 717.337.6993

https://www.gettysburg.edu

 

From: [hidden email] [[hidden email]] On Behalf Of Henry Versemann
Sent: Wednesday, January 03, 2018 11:39 AM
To:
[hidden email]
Subject: RE: [dotcms] v 3.7.1 - REST API Question(s)

 

Nathan,

 

In my particular situation I’m trying to delete a particular item contentlet from its structure, by way of the REST API.

So I was hoping to pass the contentlet id value to my workflow using the “wfActionAssign” key, so the workflow would only operate on that single piece of content.

 

Is that the way to do it then?

And should I include it in the request as part of the URL, or as a key/value pair in a json object?

 

Henry

 

 

From: [hidden email] [[hidden email]] On Behalf Of Nathan Keiter
Sent: Wednesday, January 3, 2018 10:33 AM
To:
[hidden email]
Subject: RE: [dotcms] v 3.7.1 - REST API Question(s)

 

I believe that last part is the user id to assign the workflow to. “dotCMS.org.7575”

 

Nathan I. Keiter | Lead Network Applications Programmer | Benefits Advisory Council Member | I.D.E.A Council Member
Gettysburg College | Information Technology | DataSystems
Campus Box <a href="https://maps.google.com/?q=2453&#43;%7C&#43;300&#43;North&#43;Washington&#43;Street&#43;%7C&#43;Gettysburg,&#43;PA&#43;17325&amp;entry=gmail&amp;source=g" target="_blank"> 2453 | 300 North Washington Street | Gettysburg, PA 17325
Phone: <a href="tel:(717)%20337-6993" target="_blank"> 717.337.6993

https://www.gettysburg.edu

 

From: [hidden email] [[hidden email]] On Behalf Of Henry Versemann
Sent: Tuesday, January 02, 2018 4:30 PM
To:
[hidden email]
Subject: RE: [dotcms] v 3.7.1 - REST API Question(s)

 

Chris,

 

I’ve looked in the documentation and the only example I saw was one that looked like it executed just one subaction of a particular workflow like this:

 

PUT /api/content/Assign%20for%20Review/1/wfActionComments/Hey%2C%20take%20a%20look/wfActionAssign/dotCMS.org.7575

 

But it doesn’t to explain all of the parts of the URI shown, unless there are more detailed examples of calling a workflow through the REST API.

 

So I have questions about the above URI.

 

1.)    Is the actual sub-action to be executed this part of the URI: /Assign%20for%20Review/

2.)    wfActionComments’ indicates that what follows it in the next part of the URI ( /Hey%2C%20take%20a%20look/ ) is a comment right? If so is it mandatory for comments to always be declared and formatted this way and in this same position?

3.)    So is the /wfActionAssign/ part of the URI the name of the actual workflow/workflow scheme?

4.)    I’m Assuming that when a workflow scheme is created, then that workflow scheme must also be associated with the content type to be operated on, before it can be called via the REST API. Correct?

5.)    And finally in the example above is the last part of the URI above ‘dotCMS.org.7575’ always a content identifier of the contentlet to be operated on, by the workflow?

 

Let me know when you can.

Thanks.

 

Henry

 

 

 

From: 'Chris Falzone' via dotCMS User Group [[hidden email]]
Sent: Tuesday, January 2, 2018 3:09 PM
To:
[hidden email]
Subject: Re: [dotcms] v 3.7.1 - REST API Question(s)

 

When you make an update you specify it is should be working or live by using save or publish parmaters:

 

Though, I don't think you can unpub/archive/delete content via the rest api directly.  But I know you can using workflow actions:

 

So just execute the proper workflow task that does it for you.  

 

On Tue, Jan 2, 2018 at 12:53 PM Henry Versemann <[hidden email]> wrote:

I’m currently able to use a GET/inquire request to the REST API to retrieve a contentlet.

 

Once I have it then is it possible to change a value in the contentlet, and then do a POST to update the newly changed contentlet?  

 

The value(s) I want to try to change are publish/unpublish/archive/unarchive/delete flags or values, that would mimic the manual process of doing an unpublish, archive, and then delete of entries manually.

 

Or instead of trying to do the delete process programmatically(especially if it’s not possible currently), what would be the best way to update an entry to indicate that it needs to be deleted in the future?

 

Thanks.

 

Henry

 

 

--
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/CY4PR0501MB377737163D54AE27CAA5BF15AD190%40CY4PR0501MB3777.namprd05.prod.outlook.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/CAMAbHgVp6RxJUWproVrCmWOyQuAbrTuKBi6oSV9YAe-9X7jw_g%40mail.gmail.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/CY4PR0501MB377752526746F751320258D2AD190%40CY4PR0501MB3777.namprd05.prod.outlook.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/1542fb25a08042b6bc1b6c293a1b9b7d%40exch13b.ms.gettysburg.edu.
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/CY4PR0501MB37777EC73B2BEADAC3F06812AD1E0%40CY4PR0501MB3777.namprd05.prod.outlook.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/cfb1ff94bc444531a0647e2feb7d85dd%40exch13b.ms.gettysburg.edu.
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/CY4PR0501MB37779B8C637C2F9494F3225CAD1E0%40CY4PR0501MB3777.namprd05.prod.outlook.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].


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/91b8d27769484132887e59974efe28cf%40exch13b.ms.gettysburg.edu.
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/CAMAbHgU_FCbdMaFNbJE-kVde%2BoWSC%3DnsqTvPe53PPWh6G_3LQw%40mail.gmail.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/CY4PR0501MB3777B9A83AE10999C9FF0C87AD1F0%40CY4PR0501MB3777.namprd05.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.