Expand my Community achievements bar.

SOLVED

DPS API & How to use it

Avatar

Former Community Member

Is there an example of how to use the DPS API's or a community article? I want to be able to push out articles and folios using these API's.

 

Thanks

1 Accepted Solution

Avatar

Correct answer by
Level 4

Creating and invoking workflows are already documented and should help with what you are trying to do.

The DPS Upload workflow can be seen at;

http://localhost:4502/libs/cq/workflow/admin/console/content/models.html/etc/workflow/models

http://localhost:4502/cf#/%252Fetc%252Fworkflow%252Fmodels%252Fdps%252Fupload-content.html

That workflow can be edited or copied depending on what you need.

It contains/users 2 steps 'Upload HTMLResources to DPS' and 'Upload to DPS' which can also be reused in your own workflow if needed.

You can invoke this workflow from http://localhost:4502/libs/cq/workflow/admin/console/content/models.html/etc/workflow/models which is the same workflow the DPS console uses.  Workflows can also be invoked via workflow apis or post operations.

John

View solution in original post

11 Replies

Avatar

Level 10

I dont think we have any community article on this !

Avatar

Level 10

Here is a community article on using the DPS API:

http://www.adobe.com/devnet/digitalpublishingsuite/working-with-dps-apis.html

However - I am not aware of any articles for AEM that shows using this API within AEM. I will look and post back if I find any such article. 

Avatar

Level 10

Here is a Java API that may be helpful:

https://docs.adobe.com/docs/en/cq/5-6-1/javadoc/com/adobe/cq/media/publishing/dps/fp/DPSFolioProduce...

I will look to see if there are code examples using this API. 

Avatar

Level 4

AEM already supports uploading articles into DPS.  What are you trying to do beyond what is supported via the console?

 

Those APIs are not documented explicitly as they were not intended to be used.

Also, with the introduction of DPS2015 the DPS classic support will be deprecated in favour of the integration with DPS2015.

Regards,

John

Avatar

Former Community Member

That link does not have any java API only JavaScript could be found. If anyone has an article or link that would be greatly

appreciated!

 

Thanks

Avatar

Former Community Member

JohnFait wrote...

AEM already supports uploading articles into DPS.  What are you trying to do beyond what is supported via the console?

 

Those APIs are not documented explicitly as they were not intended to be used.

Also, with the introduction of DPS2015 the DPS classic support will be deprecated in favour of the integration with DPS2015.

Regards,

John

 

 

 

 

 


I wanted to automate the ingestion of folios living on AEM to DPS. From what I see in the API's, they have functions which can do this which I want to incorporate in a workflow.

Avatar

Level 4

Classic uploads use a workflow to do that which you should find in the workflow console. You can reuse that workflow or just the process(es) it uses.

Avatar

Correct answer by
Level 4

Creating and invoking workflows are already documented and should help with what you are trying to do.

The DPS Upload workflow can be seen at;

http://localhost:4502/libs/cq/workflow/admin/console/content/models.html/etc/workflow/models

http://localhost:4502/cf#/%252Fetc%252Fworkflow%252Fmodels%252Fdps%252Fupload-content.html

That workflow can be edited or copied depending on what you need.

It contains/users 2 steps 'Upload HTMLResources to DPS' and 'Upload to DPS' which can also be reused in your own workflow if needed.

You can invoke this workflow from http://localhost:4502/libs/cq/workflow/admin/console/content/models.html/etc/workflow/models which is the same workflow the DPS console uses.  Workflows can also be invoked via workflow apis or post operations.

John

Avatar

Level 4

btw, AEM's DPS2015 integration uses individual post operations rather than a workflow. Reuse and automation will be easier with DPS2015 as a result.

Avatar

Former Community Member

JohnFait wrote...

btw, AEM's DPS2015 integration uses individual post operations rather than a workflow. Reuse and automation will be easier with DPS2015 as a result.

 

 

I'm currently on AEM 6.0, don't have the 6.1 upgrade just yet. The links you provided me earlier don't work possibly because it's a 6.1 local instance?

Anywho, I managed to work something up with the following code here but I keep getting a null point exceptions even though my password & username is correct:

 

public class DpsBuilder{ private static DPSSessionService sessionService; private static DPSSession dpsSession = null; private static DPSFolioProducerService folioProducer; public static void main(String[] argv){ try { dpsSession = sessionService.createSession("username", "password"); String url = dpsSession.getServiceURL(); System.out.println(url); folioProducer = dpsSession.adaptTo(DPSFolioProducerService.class); folioProducer.deleteFolio("test"); sessionService.deleteSession(dpsSession); } catch (DPSSessionServiceException ex) { System.out.println("ERROR"); } catch (DPSFolioProducerServiceException e) { System.out.println("Delete Folio failed"); } } }

Thanks!