Jump to content

Steve G

Hornbill Developer
  • Content Count

    452
  • Joined

  • Last visited

  • Days Won

    20

Steve G last won the day on April 30

Steve G had the most liked content!

Community Reputation

124 Excellent

About Steve G

  • Rank
    Senior Member

Profile Information

  • Gender
    Male
  • Location
    Hull, UK

Contact Methods

  • Website URL
    https://www.hornbill.com

Recent Profile Visitors

2,154 profile views
  1. Hi @chriscorcoran, The only ways I can replicate this error are: If the channel is only allowed to be posted to by moderators, and the user who you created the keysafe key with is not a moderator (usually Team Managers); If the user who you created the keysafe key with is not a member of the Team. So I think it must be one of those scenarios? Forbidden would suggest a permissions issue, so I would check for either of the above... Cheers, Steve
  2. What's Fixed Cloud Automations for Jira and Jira Cloud - fixed errors when creating Issues without Versions being provided.
  3. What's New Cloud Automations for GOV.UK Notify - Send and check the status of SMS messages, letters and emails via the GOV.UK Notify service. See the Hornbill wiki for more information.
  4. Hi @Mark den Elzen, The 404 error you are seeing suggests that the script has been able to communicate with Hornbill, but can't find the specific endpoint. This is possibly down to the instance ID provided to the script - could you double-check that please (and note, it is case-sensitive). Thanks, Steve
  5. @Martyn Houghton, I'll add it to the list and let you know once we've had chance to take a look. Cheers, Steve
  6. What's New ITOM Content Pack - Windows Management package. A collection of automation tasks for managing Services, Processes, Environment Variables and PowerShell Script Execution Policies on Windows machines. See the Hornbill Wiki for more information.
  7. Hi @Will J Douglas, The current Teams integration doesn't support adding mentions. That particular feature was not added as there's no nice way of doing it due to complications in the API that Microsoft provide to perform this task - it's not as straightforward as @ mentioning someone I'm afraid. With your requirement, would the mentions be hard-coded into the body input parameter? So they wouldn't be dynamic and driven by a field in the Request? If so, then we may be able to provide something like the attached, and give you an additional input parameter for you to define the IDs for the users you are mentioning in 1 & 2: It's not an elegant solution, but probably the best we could do while we wait for Microsoft to push the API out of beta, hopefully with better support for mentions... Thanks, Steve
  8. What's New Cloud Automations for SalesForce - Create, Read, Update and Delete SalesForce Contracts.
  9. Hi @Martyn Houghton, The Hornbill Python API Library has been updated on Github to support complex input parameters. Here's an example of its use: from xmlmc import XmlmcService from xmlmc import XmlmcHelper xmlmc = XmlmcService("yourinstanceid") xmlmc.set_api_key("yourapikey") xmlmc.add_param("application", "com.hornbill.servicemanager") xmlmc.add_param("entity", "Requests") elem = xmlmc.add_param("primaryEntityData") childElem = elem.add_child("record") childElem.add_child("h_pk_reference", "IN00013316") childElem.add_child("h_summary", "This is the summary, as set by my Python script") json_string = xmlmc.invoke("data", "entityUpdateRecord") if XmlmcHelper.is_call_success(json_string): auditTransactionId = XmlmcHelper.get_param_value(json_string, "params/auditTransactionId") print(auditTransactionId) else: print(XmlmcHelper.get_error_message(json_string)) Cheers, Steve
  10. Hi @Martyn Houghton, I've just had a look at the Python API Library, and it appears that it doesn't support complex parameters - which makes it pretty useless I'll add a re-write of that to the list, but for the time being I've knocked up a very basic example of how you can call that API in Python without the XMLMC module (or indeed XML at all), using a small function to make the call using the requests module: # entityUpdateRecord.py # This script is an example of how to call a Hornbill API in Python import requests import sys apiKey = 'apikey' # This is the (case sensitive) API key to use to authenticate the API calls against the Hornbill instance instanceId = 'instanceid' # This is the (case sensitive) ID of your Hornbill instance # Get API endpoint from the instanceId URL = 'https://files.hornbill.com/instances/{instanceId}/zoneinfo'.format(instanceId=instanceId) try: endpoint = requests.get(url = URL).json()["zoneinfo"]["endpoint"] except requests.exceptions.RequestException as e: sys.exit('Unexpected response when attempting to retrieve Hornbill Zone Information: ' + e) # Define a function to make API calls def invokeXmlmc(service, method, params): xmlmcEndpoint = endpoint + "xmlmc/{service}/?method={method}" URL = xmlmcEndpoint.format(service=service, method=method) headers = { 'Content-type': 'application/json', 'Accept': 'application/json', 'Authorization': 'ESP-APIKEY ' + apiKey } data = { 'methodCall':{ '@service':service, '@method':method, 'params':params } } try: response = requests.post(url=URL, json=data, headers=headers) if 200 >= response.status_code <= 299: return response.json() else: return { '@status': False, 'state': { 'error': 'Unexpected status returned from call to {service}::{method}: {statusCode}'.format(service=service, method=method, statusCode=response.status_code) } } except requests.exceptions.RequestException as e: return { '@status': False, 'state': { 'error': 'Unexpected response from call to {service}::{method}: {errorString}'.format(service=service, method=method, errorString=e) } } # Build API Params object in JSON paramsJson = { 'application': 'com.hornbill.servicemanager', 'entity': 'Requests', 'primaryEntityData': { 'record': { 'h_pk_reference': 'IN00013316', 'h_summary': 'This is the summary, as set by my Python script' } } } # Make API Call apiResponse = invokeXmlmc('data', 'entityUpdateRecord', paramsJson) if apiResponse['@status'] != True: sys.exit(apiResponse['state']['error']) # Print the response to show it worked print(apiResponse) Hope that helps, let me know if you need any of it explaining. Cheers, Steve
  11. Whats New Cloud Automation Integration for SolarWinds Service Desk. Create, Update, Read or Comment On Changes, Incidents and Problems within SolarWinds Service Desk instances. See the Hornbill wiki for more information.
  12. HI @Steven Cotterell, I've given this a whirl and am struggling to replicate your issue Could you export and send me your workflow definition, and I'll see if I can spot what's going on... Thanks, Steve
  13. Hi @Jamie Talbot, This error would generally mean the Google Drive token in the keysafe key does not have permissions to talk to the APIs required to read the list of spreadsheets. There should be a more descriptive error message in the browser console, if you press F12 in your browser you will be taken to the console to check the actual error. Thanks, Steve
  14. HI @Jamie Talbot, If you want to create a new row in a Google Sheets spreadsheet, you should use the Append integration, as the Update integration is for updating existing rows in a sheet. For your use case, the Update node, and Cell Data parameter, should be configured as so, where the first Cell Value contains the request reference, and the second Cell Value contains the request summary. Let me know if you need any more information. Thanks, Steve
  15. Hi @Giuseppe Iannacone, Sure, if you send your log and config file to me I'll give them a once-over. I'll send you my email address in a personal message. Thanks, Steve
×
×
  • Create New...