rtm.php¶
Remote Ticket Management module for interacting with Jira tickets, including adding comments, searching tickets, and managing credentials.
rtm/add_comment¶
Adds a new comment to an existing ticket. Supports text messages and file attachments.
HTTP method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: add_comment |
| token | ✅ | string | Authorization token for API access. |
| file | ❌ | array<string> | Uploaded file for attachment to the comment. |
| ticket_id | ✅ | integer | Unique identifier of the ticket to which the comment is added. |
Request example
Success response example
rtm/create_credentials¶
Creates new Jira credentials for a user.
HTTP method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: create_credentials |
| token | ✅ | string | Authorization token. |
| credentials_email | ✅ | string | Email address for the Jira credentials. |
| credentials_name | ✅ | string | Name or identifier for the Jira credentials. |
| credentials_password | ✅ | string | Password for the Jira credentials. |
| ✅ | string | The email address associated with the credentials. | |
| jira_name | ✅ | string | The username for Jira authentication. |
| jira_password | ✅ | string | The password used for Jira authentication. |
Request example
curl -s "https://invapi.hostkey.com/rtm.php" -X POST \
--data "action=create_credentials" \
--data "token=VALUE" \
--data "credentials_email=VALUE" \
--data "credentials_name=VALUE" \
--data "credentials_password=VALUE" \
--data "email=VALUE" \
--data "jira_name=VALUE" \
--data "jira_password=VALUE"
Success response example
rtm/download_file¶
Downloads a specific file attachment from a ticket as a binary stream.
HTTP method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: download_file |
| token | ✅ | string | Authorization token. |
| ticket_id | ✅ | string | The unique identifier of the ticket for which to retrieve data. |
| file_hash | ❌ | string | A specific hash used to identify and download a particular file attachment. |
Request example
rtm/download_image¶
Downloads an attachment from a ticket as a base64 encoded string.
HTTP method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: download_image |
| token | ✅ | string | Authorization token. |
| ticket_id | ✅ | string | Unique identifier of the ticket to retrieve data from. |
| file_hash | ❌ | string | Specific hash used to identify and download a particular file attachment. |
Request example
Success response example
rtm/get_ticket_by_id¶
Retrieves detailed information about a specific ticket, including its data and associated comments.
HTTP method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: get_ticket_by_id |
| token | ✅ | string | Authorization token for API access. |
| ticket_id | ✅ | integer | The unique identifier of the ticket to retrieve. |
| comments_from | ❌ | integer | The starting index for comment pagination. |
| comments_limit | ❌ | integer | Maximum number of comments to return in the response. |
Request example
Success response example
{
"result": "OK",
"action": "get_ticket_by_id",
"ticket": {
"issueId": 12345,
"issueKey": "RTM-101",
"createdDate": 1704067200,
"summary": "Issue with server connectivity",
"description": "<p>The server is not responding to pings.</p>",
"status": "open",
"statusDate": 1704070800
},
"comments": [
{
"id": 98765,
"body": "I have checked the logs and everything seems fine.",
"author": "John Doe",
"created": 1704074400
}
],
"total": 1,
"size": 1,
"start": 0,
"limit": 10,
"isLastPage": true
}
rtm/get_tickets¶
Returns a list of tickets with pagination support. Supports filtering by status and offset/limit.
HTTP method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: get_tickets |
| token | ✅ | string | Authorization token for API access. |
| tickets_status | ❌ | string | Filter tickets by their current status. |
| tickets_from | ❌ | integer | The offset for pagination starting from which records to return. |
| tickets_limit | ❌ | integer | The maximum number of tickets to return in one request. |
| requestStatus | ❌ | string | The status of the ticket to filter by. |
Request example
Success response example
rtm/open_ticket¶
Creates a new support ticket in Jira with an optional diagnostic report and file attachment.
HTTP method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: open_ticket |
| token | ✅ | string | Authorization token for API access. |
| summary | ✅ | string | Summary of the support ticket. |
| message | ✅ | string | Detailed description or message for the support ticket. |
| server_diagnostics_server_ids[] | ❌ | array<integer> | List of server IDs to include in the diagnostic report. |
| file | ❌ | string | Uploaded file for attachment to the ticket. |
| server_diagnostics_server_ids | ❌ | array<integer> | List of server IDs used for generating diagnostics reports. |
| server_ids | ❌ | array<integer> | List of server IDs used for generating diagnostics reports. |
Request example
Success response example
rtm/search_term¶
Searches for tickets using a provided search term. Results are filtered based on user permissions and pagination settings.
HTTP method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: search_term |
| token | ✅ | string | Authorization token for API access. |
| tickets_from | ❌ | integer | The starting index for ticket pagination. |
| tickets_limit | ❌ | integer | Maximum number of tickets to return in the search results. |
Request example
Success response example
rtm/search_ticket¶
Retrieves detailed information about a specific ticket using its identifier.
HTTP method: POST
Parameters:
| Parameter | Required | Type | Description |
|---|---|---|---|
| action | ✅ | string | Method identifier: search_ticket |
| token | ✅ | string | Authorization token for API access. |
| ticket_id | ✅ | integer | The unique identifier of the ticket to search for. |
Request example