Tetra Chromeleon Agent Update Sequence Command
The following procedure shows how to programmatically notify the Tetra Chromeleon Agent that updates have occurred for one or more Sequences by using the Sequence Update command and the Tetra Data Platform (TDP) Command Service.
Prerequisites
To run the Sequence Update command, you must have the following:
- A running Tetra Chromeleon Agent v2.2.x or higher installed and configured with its queue enabled.
- A valid JSON Web Token (JWT) for the service user running the command. To create a JWT, see Generate a JWT for a Service User.
- Your TDP organization's slug (ORG SLUG). To find your org slug, see View Organization Details.
- Access to a tool that will allow you to run REST API calls, such as curl or Postman.
Step 1: Verify That the Agent Can Receive Commands
To allow the Agent to securely receive and run commands from the TDP, do the following:
- From the Tetra Chromeleon Agent Management Console, in the left navigation menu, under Menu, choose Configuration.
- Verify that the Receive Commands toggle is set to Yes (the default value).
For more information, see Enter TDP Connection Settings in the Tetra Chromeleon Agent Installation Guide.
Step 2: Run the Sequence Update Command
To run the Tetra Chromeleon Agent Sequence Update command, do the following:
- Create a valid Create Command in your code editor by using the following Sequence Update Command Example code snippet.
- Copy and run the updated command by using a tool that will allow you to run REST API calls, such as curl or Postman.
After the Agent receives the Update Sequence command, it does the following:
- Connects to Chromeleon and authenticates by using the configured credentials
- For each sequence URL in the payload, the Agent does the following:
- Retrieves the sequence information from Chromeleon
- Updates the sequence information in the Agent's database and triggers any necessary actions (for example, regenerating injections)
- Raises events for successful or failed sequence updates
For an example response, see the Command Response section.
Command Structure
The Sequence Update command uses the following structure:
{
"targetId": "7659ef3a-95e9-4e4c-9742-eaf18e4a8af8",
"action": "TetraScience.Agent.chromeleon.SequenceUpdate",
"expiresAt": "2023-12-31T23:58:43.749Z",
"payload": {
"sequenceUrls": [
"chrom://localhost/ChromeleonLocal/Sequences/Sequence1",
"chrom://localhost/ChromeleonLocal/Sequences/Sequence2"
]
}
}
Sequence Update Command Example
IMPORTANT
You must enter values for the following variables:
- For
POST
, enterhttps://api.tetrascience.com/v1/commands
- For
ts-auth-token
, enter your service user's JWT.- For
x-org-slug
, enter your organization's slug.- Make sure that you enter a valid request body that includes all of the Required fields listed in the Request Body Data Fields table.
curl --location --request POST 'https://api.tetrascience.com/v1/commands' \
--header 'ts-auth-token: <JWT Token>' \
--header 'x-org-slug: <Your Org Slug>' \
--header 'Content-Type: application/json' \
--data-raw '{
"targetId": "<Agent ID>",
"action": "TetraScience.Agent.chromeleon.SequenceUpdate",
"expiresAt": "2025-12-31T23:58:43.749Z",
"payload": {
"sequenceUrls": [
"chrom://localhost/ChromeleonLocal/Sequences/Sequence1",
"chrom://localhost/ChromeleonLocal/Sequences/Sequence2"
]
}
}'
Request Body Data Fields
Field | Description | Example |
---|---|---|
targetId | (Required) The ID of the Tetra Chromeleon Agent that receives the command | 7659ef3a-95e9-4e4c-9742-eaf18e4a8af8 |
action | (Required) Command name (this field is a constant varible) | TetraScience.Agent.chromeleon.SequenceUpdate |
expiresAt | (Required) Command expiration date in ISO-8601 format | 2023-12-31T23:58:43.749Z |
payload.sequenceUrls | (Required) Array of Chromeleon sequence URLs which have been updated | For an example "payload" , see the Sequence Update Command Example. |
Command Response
The command response includes a message with the number of sequences processed.
Example Response
{
"message": "Processed 2 sequences: 2 successfully and 0 with errors."
}
Troubleshooting
The Tetra Chromeleon Agent will send a FAILURE
status back to the TDP after it receives a Sequence Update Command under any of the following conditions:
Potential Issue | Resolution |
---|---|
The command is expired. | Update the request body's "expiresAt" value. |
Sequence URLs that aren't valid | Update the request payload's payload.sequenceUrls so that it matches the sequence URLs that are configured in Chromeleon. |
Authentication failures | For ts-auth-token , make sure that you enter a valid service user JWT. For x-org-slug , make sure that you enter a valid organization slug. |
Network connectivity issues | Verify that you've configured the Agent's data connection with the TDP correctly. For instructions, see Step 4: Configure the Data Connection in the Tetra Chromeleon Agent Installation Guide (v2.2.x). |
"Failed to Fetch Injection" error | Register the CM7RE.ocx component in Chromeleon on the Agent host server by running the following command from the Agent's local Windows Command Prompt as an administrator:regsvr32 c:\Program Files (x86)\Thermo\Chromeleon\bin\CM7RE.ocx |
Updated 6 days ago