Mastering Data Modeling with Liferay Objects

Course Overview

Importing Clarity's Legacy Ticket Data

When migrating to a new system, it's often necessary to import existing data to ensure continuity and preserve valuable information. Clarity's ticketing app requires integration with legacy data to provide a complete picture of past support interactions and maintain a seamless transition for their support staff. In this article, you'll use the Ticket object APIs to add legacy entries to Clarity's ticketing app.

Exercise: Importing Legacy Tickets

Here you’ll import tickets created in Clarity’s legacy ticketing app.

  1. Open the Global Menu (), go to the Control Panel tab, and click Tickets.

  2. Take note of the existing entries.

  3. In your file explorer, navigate to the exercises/module-8/ folder in the course workspace.

  4. Open import_legacy_tickets.json and review the JSON structure.

  5. In a separate browser tab, open Liferay API Explorer: http://localhost:8080/o/api?endpoint=http://localhost:8080/o/c/tickets/openapi.json

    This link takes you to the Ticket object’s API endpoints.

    Open Liferay API Explorer.

  6. Find and expand the postTicketBatch API endpoint.

  7. Copy the contents of import_legacy_tickets.json and paste them into the Request Body field for the postTicketBatch endpoint.

    Copy the contents of import_legacy_tickets.json and paste them into the Request Body field for the postTicketBatch endpoint.

  8. Click Execute to call the postTicketBatch API.

  9. Scroll down and verify it returns a 202 code.

    Verify it returns a 202 code.

  10. Return to the Tickets UI.

  11. Refresh the page to verify six new ticket entries appear.

Conclusion

Congratulations! You’ve successfully imported legacy ticket data using the Liferay Object APIs. Next, you’ll explore different strategies for synchronizing your object data with external systems.

  • Exercise: Importing Legacy Tickets

  • Conclusion

Loading Knowledge

Capabilities

Product

Education

Contact Us

Connect

Powered by Liferay
© 2024 Liferay Inc. All Rights Reserved • Privacy Policy