Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
agrawal
Product and Topic Expert
Product and Topic Expert
853

Introduction


Using the Collaboration offering of SAP Intelligent Product Design (IPD); you can collaborate with internal and external participants, using documents, design models (2D and 3D), and product data (like BOM). For detailed documentation on OData APIs, you can refer to the product documentation here.

This blog provides you an insight on how to work with Collaboration via the OData APIs using OAuth 2.0 Client Credentials Authentication - Collaboration Capability API Reference.



Prerequisites



  • Register an OAuth client in SAP Cloud Platform cockpit for your subaccount with the subscription as cpdc and Authorization Grant as Client Credentials

    • Security > OAuth > Clients > Register New Client



  • Assign the required roles to oauth_client_<client_ID>

    • cpdc – CollaborationUser

    • mobiledocs – User







Steps



  1. Get access token; using the token endpoint and the client id secret generated


  2. Get X-CSRF-Token; using collaboration API and the access token generated

    • GET - /cpdc/odata/v1/
      Sample snippet from Postman



  3. Create Collaboration; using collaboration API, access token generated, and the X-CSRF-Token fetched

    • POST - /cpdc/odata/v1/CollaborationSet
      Sample snippet from Postman



  4. Add Participant to the Collaboration; using collaboration API, access token generated, X-CSRF-Token fetched and the collaboration id

    • POST - /cpdc/odata/v1/CollaborationSet(‘CollaborationId’)/ Contributors
      Sample snippet from Postman






Conclusion


Going through the steps in this blog you can create Collaborations and Add Participants to that Collaboration, using OAuth 2.0 Client Credentials Authentication flow in SAP IPD.



PS – Please share your feedback and write to me if you have any follow-up.