Loading Audio...

Listen to Lesson
0:00
  • Speed 0.5x
  • Speed 0.75x
  • Speed 1x
  • Speed 1.25x
  • Speed 1.5x
  • Speed 2x
  • Brian
  • Caris

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 Applications 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.txt 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.The Liferay API Explorer provides REST APIs.

  6. Find and expand the postTicketBatch API endpoint.

  7. Copy the contents of import_legacy_tickets.txt and paste them into the Request Body field for the postTicketBatch endpoint.Copy the contents of import_legacy_tickets.txt 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.

loading-knowledge-label