Creating a simple Activities API

The following topics describe how to create a simple Activities API using the PolicyCenter REST API framework. The example Activities API provides the following functionality:
  • Retrieves a list of activities
  • Retrieves a single activity
  • Creates a new activity
  • Updates an existing activity

API design

As you think about what it takes to build an Activities REST API, consider the following:
  • What HTTP operations does the API need to provide the required functionality
  • What types of endpoints (URLs) and query parameters does the API need
  • What kind of JSON inputs and outputs does the API need
For inspiration, you can work either from either the client perspective or the system perspective, or ideally a mix of both. As you work in constructing the API, think about the following items:
  • What fields exist on the PolicyCenter Activity entity?
  • What domain properties exist on the Activity entity?
  • What fields does the PolicyCenter application expose on the desktop pages, or, in the context of a policy, an account, or a job.