Example: Adding a Community Manager developer portal Signup Legal Agreement

This example gives you the basic steps for adding a new portal signup legal agreement in the Akana API Platform by using the API rather than the user interface.

This exercise assumes that you already have a valid login for the Akana API Platform and are a Site Admin.

Before starting, you will need:

  • A valid UserID and password for portal access.
  • The legal agreement itself.

For more information about legal agreements, refer to Managing Legal Agreements on the Portal.

Essentially, you'll need to complete these activities, in sequence:

  1. First, make sure there isn't already a portal signup legal agreement. The API platform allows only one signup agreement. If there is one already existing, you'll have to deactivate it first. For instruction on how to do that in the Community Manager developer portal, refer to the Community Manager developer portal Site Admin help. To deactivate/update using the API, use the PUT /api/legals/{LegalDocumentID} operation.
  2. Log in using the authorized user profile you've already set up. Operation: POST /api/login.

    The platform API returns the login cookie, which you'll need to send with the request headers for any operation that requires login.

  3. Upload the portal legal agreement using the Content API. Operation: POST /content/{path} (with multipart/form-data content-type). You'll need to upload your agreement document to this location:

    /content/system/agreements

    For an example, see Request URL #4: Adding a platform legal agreement (documentation for the POST /content/{path} operation).

  4. Define the new agreement as the portal's signup legal agreement. Operation: POST /api/legals.
  5. When done, remember to log out using the GET /api/login/endsession operation. Use the following values:
    • URL: https://{hostname}/api/login/endsession
    • Accept header: application/json