Parameter | Required/Optional | Description |
---|---|---|
api_version | Required | A string that matches the API version this document is for. |
source_association_key | Required | A key generated by TeamForge EventQ that links incoming work items with the appropriate source server. |
Example: "source_association_key": "6t5qM5AuLLWLkmqFJeKp" | ||
workitem_settings | Required | The work item data. |
Field | Required/Optional | Description |
---|---|---|
created_by | Optional | A string containing the username of the person who submitted the work item. |
updated_by | Optional | A string containing the username of the person performing the update. |
id | Required | A string to uniquely identify the work item. |
event_time | Required | A string containing a timestamp in UTC timezone and RFC 3339 format. |
summary | Required | A string to summarize the work item. |
description | Optional | A longer string that can be used to further describe the work item. |
status_id | Required | A string to uniquely identify the status. This value must match the identifier within the work item configuration message. |
tracker_id | Required | A string to uniquely identify the tracker. This value must match the identifier within the work item configuration message. |
closed | Optional | A boolean for the open or closed state of the work item. True if the work item is closed. |
deleted | Optional | A boolean for the deleted state of the work item. True if the work item has been deleted. |
priority | Optional | A string containing the priority of the work item. |
assigned_to | Optional | A string containing the username of the person who is assigned to the work item. |
creation_time | Optional | A string containing a timestamp in UTC timezone and RFC 3339 format. The time the item was first created in the source system. |
tags | Optional | An array of strings containing the tags, or labels, for this work item. |
The following code examples are Copyright 2020 CollabNet, Inc., licensed under the Apache License, Version 2.0 (the "License"); you may not use this code except in compliance with the License. You may obtain a copy of the License at [http://www.apache.org/licenses/LICENSE-2.0]
{ "api_version": "1", "source_association_key" : "150e8951-19e1-4066-8b74-601026dd6cde", "work_item": { "created_by": "admin", "updated_by": "username", "summary": "title", "id": "KDA-59", "description": "description", "status_id": "10001", "event_time": "2014-03-12T20:47:41.295Z", "closed": false, "deleted": false, "tracker_id": "10200-2", "priority": "Major", "assigned_to": "admin", "creation_time": "2014-03-29T00:26:20.091Z", "tags": [ "Tag1", "Tag2", "Tag3" ] } }
require 'amqp' QUEUE = 'eventq.work_items' WORK_ITEM = ' { "api_version": "1", "source_association_key" : "150e8951-19e1-4066-8b74-601026dd6cde", "work_item": { "created_by": "admin", "updated_by": "admin", "summary": "title", "id": "KDA-59", "description": "description", "status_id": "10001", "event_time": "2014-03-12T20:47:41.295Z", "closed": false, "deleted": false, "tracker_id": "10200-2", "priority": "Major", "assigned_to": "admin", "creation_time": "2014-03-29T00:26:20.091Z", "tags": [ "Tag1", "Tag2", "Tag3" ] } }' # Event loop EventMachine.run do connection = AMQP.connect('amqp://guest:guest@example-mq') # Set up our RabbitMQ information channel = AMQP::Channel.new(connection) queue = channel.queue(QUEUE, :auto_delete => false, durable: true) exchange = channel.direct('') # Publish the work item and exit the loop exchange.publish WORK_ITEM, :routing_key => queue.name do connection.disconnect {EventMachine.stop} end end