Jasper Task
Patriot can automatically activate or deactivate SIM cards via the Jasper Task .
Prerequisites
This feature requires the Jasper module added to your license.
You will also need an account setup in M2MOne before you will be able to test any commissioning and decommissioning.
Task Setup
Add a new Task into the system. See Tasks for general task setup information.
Select Jasper as the task type.
When a client account in Patriot is commissioned or decommissioned, the Jasper task will send the appropriate command to the Jasper webservice, to change the status of the associated SIM card.
Configuring the Commission and Decommission events
Event Types
There are two system events which you will need to link to the Jasper task:
- 65516 - Client Commissioned
- 65517 - Client Decommissioned
These are triggered by clicking the Commission Client and Decommission Client buttons on the Maintenance Tab of a client.
Configure the event type settings in a template account, such as the System Events template. Add 65516 and 65517 if they are not already present. Assign a suitable action plan for each event. It may be simplest to create two new action plans, for example "Commission" and "Decommission". See Event Types and Action Plans documents for more information.
Create a User
Open the User Maintenance window and create a single global user that will be used to trigger API requests when commissioning and decommissioning clients.
Response Plans
Configure two responses plan for the two action plans, Commission and Decommission, which includes the global Jasper user in the response. There are a number of methods for doing this, but the simplest way is as follows:
- Open Maintenance > General > Response Plans
- Create 2 response plans, called Commission, and Decommission.
- Add the global Jasper user into the two new response plans.
- Assign the new response plans to the matching action plans.
See Response Plans for more general information on how to configure a response plan.
These two response plans also need to have the corresponding task command assigned to them:
-
Commission Response Plan:
- Double click on the user to open settings.
- Assign the Jasper task to this user.
- Double click to open the task options popup.
- Set the Command Type to Activate.
-
Decommission Response Plan:
- Double click on the user to open settings.
- Assign the Jasper task to this user.
- Double click to open the task options popup.
- Set the Command Type to Deactivate.
Communicator Type
Open the Communicator Type maintenance screen by going to Maintenance > General > Communicator Types.
Create at least one new communicator type.
Configure the following settings:
- First, set the Type to Jasper. Selecting this will display the server settings for the API connection.
- Server Address: This is the address of the Jasper Web API. It must include the protocol in the URL (http:// or https://), and the path to the API version ([server root URL]/api/v1).
- User Name: The user name for API authentication.
- API Key: The API Key. This will need to be created in M2MOne first, under your user profile. From your user profile, you can create, view, and reset the API Key. Copy this key into the Communicator type setting.
If there are multiple API user accounts or servers that you need to connect to, you can add additional communicator types. Give each one a distinctive name.
Client Setup
For any clients that will use Jasper, go to the Maintenance Tab and configure an Add-On Device:
Configure the following settings:
- Device Ref No: This should match the ICCID of the account, and is used to link the patriot client to the account registered in M2MOne. It must be filled out before commissioning or decommissioning the client.
- Communicator Type: Select a communicator type that you have created for Jasper (see previous section above for details).
Activating/Deactivating SIM cards
When commissioning or decommissioning a Patriot client that has the correct API details configured as above, a command will be sent to the Jasper API automatically, and a signal will be logged to the client history to indicate that this has completed successfully or not.
Client commissioning and decommissioning is controlled from the Maintenance tab of a client.
It is important to uncheck the system wide setting option Default Commission Date To Current Time. This is found under System Wide Settings > General Client Settings. If this option is turned on, clients are commissioned automatically as soon as they are created, rather than being a manual commissioning once the account is all set up and ready to go live.
Troubleshooting
API Error Codes
Error Code | HTTP Code | Description |
---|---|---|
10000001 | 401 | Invalid credentials. Control Center uses this error message when the API credentials are invalid or when the IP address is not within the allowed range. |
10000005 | 400 | Invalid status. |
10000008 | 400 | Your role does not have access to operator and customer custom fields. |
10000009 | 400 | Your role does not have access to account custom fields. |
10000010 | 400 | Your role does not have access to customer custom field. |
10000011 | 400 | One or more required fields are missing. |
10000012 | 400 | Invalid date format. |
10000015 | 400 | Invalid customer. |
10000023 | 400 | The JSON in the request is not well formed. Please ensure that commas, colons, braces etc. are formatted properly. |
10000024 | 400 | Invalid API Version. |
10000025 | 400 | Invalid Device ID. |
10000026 | 400 | Invalid modemID. |
10000028 | 400 | Invalid request. The request contained one or more unrecognised parameters. |
10000029 | 400 | This SIM may not be moved back to a Pre Activation status. |
10000030 | 400 | Your role does not have access to this API function. |
10000031 | 400 | Invalid Zone. |
20000001 | 404 | Resource not found - Invalid ICCID. |
30000001 | 500 | Unknown server error. |