Archive Journals On RESTful Command

The listing below directs AMPS to archive journals when a query is made to the /amps/administrator/actions/archive_journals resource. The request must include an AGE query parameter. When the request is submitted, AMPS will mark journals older than the specified age for archival.

<Actions>
    <Action>
        <On>
            <Module>amps-action-on-admin</Module>
            <Options>
                <Path>archive_journals</Path>
                <RequiredParameter>AGE</RequiredParameter>
                <Name>Archive Journals</Name>
            </Options>
        </On>
        <Do>
            <Module>amps-action-do-archive-journal</Module>
            <Options>
                <Age>{{AGE}}</Age>
            </Options>
        </Do>
    </Action>
</Actions>

The On configuration for this action specifies that the action will run when a request is made to the /amps/administrator/actions/archive_journals resource, and that the request must contain an AGE query parameter. When the request runs, the AGE parameter is added to the context for the action.

The Do configuration for this action runs the amps-action-do-archive-journal module, and fills in the value of the AGE parameter provided by the HTTP request.

If the AGE parameter is missing, the amps-action-on-admin module will refuse the request.

If the AGE parameter is not a valid interval (for example, if someone provided the string "LastThursday" instead of a valid AMPS interval like 48h), the amps-action-do-archive-journal module will log an error and refuse to run the request.

Last updated

Copyright 2013-2024 60East Technologies, Inc.