Availability

Page tree

Skip to end of metadata
Go to start of metadata

On this page

Related information for 6.3.0-SNAPSHOT

Actions

Action

Category

Description

Required parameters

Optional parameters

Output formats

1

addRoomMembers

Rooms

Add one or more members to a room.

room, name

 

 

2

createRoom

Rooms

Create a new room.

room

topic, owner, access, guestAccess

 

3

createUser

Users

Create a user. If a password is not provided, a random password will be used and the user will need to use the 'Forgot your password?' link.

name, email

title, userPassword, mentionName, timeZone, isAdmin

 

4

deleteRoom

Rooms

Delete a room by name or id.

room

 

 

5

deleteUserPhoto

Users

Delete a user's photo.

mentionName or email or name

 

 

6

deleteUser

Users

Delete a user by name or id. User can also be identified by email or mentionName.

mentionName or email or name

 

 

7

getClientInfo

Info

Get information about the this client tool.

 

outputFormat, file, append, encoding

1 - basic
2 - JVM

8

getEmoticonList

Emoticons

Get a list of emoticons matching regex filtering on emoticon name.

 

type, regex, limit, file, encoding

1 - basic
2 - detail

9

getEmoticon

Emoticons

Get information about an emoticon by name or id.

name

regex, file, encoding

 

10

getRoomHistoryList

Rooms

Get a list of messages for a room matching regex filtering base on message text. By default, the most recent 75 entries are returned unless dates are provided or limit is explicitly set. Selection considers most recent entries first. Default order descending by date (most recent first). Date filtering is available by start and/or end dates specified in the dateFormat or some special values like 'today', -1d, -10h. See the documentation for more details.

room

startDate, endDate, accending, regex, dateFormat, limit, file, encoding, append

 

11

getRoomList

Rooms

Get a list of room matching regex filtering on room name and other selection criteria.

 

regex, includePrivate, includeArchived, limit, file, encoding, append

1 - basic
999 - all

12

getRoomMemberList

Rooms

Get a list of members for a room matching regex filtering on user name or mention name.

room

regex, limit, file, encoding, append

 

13

getRoomParticipantList

Rooms

Get a list of participants for a room matching regex filtering on user name or mention name.

room

includeOffline, regex, limit, file, encoding, append

 

14

getRoom

Rooms

Get room information by name or id.

room

file, encoding

 

15

getServerInfo

Info

Get information about the HipChat server.

 

dateFormat, file, append, encoding

1 - basic
2 - detail

16

getUserHistoryList

Users

Get a list of recent messages (maximum 75) for a user matching regex filtering based on message text. Selection considers most recent entries first. Default order descending by date (most recent first).

name

accending, regex, dateFormat, limit, file, encoding, append

 

17

getUserList

Users

Get a list of users matching regex filtering criteria on user name or mention name.

 

limit, regex, includeGuests, includeDeleted, file, encoding, append

 

18

getUser

Users

Get user information.

mentionName or email or name

file, encoding

 

19

inviteUserToGroup

Users

Invite a user to join the group by the email address. Supply a unique name that the user will be known as within the group. HipChat sends an email to the user.

email, name

title, timeZone

 

20

inviteUsers

Users

Invite one more more users to a room. A reason message (limit 250 characters) can be included

room, name

message

 

21

removeRoomMembers

Rooms

Remove one or more members to a room.

room, name

 

 

22

renderRequest

Render

Render url based request. The response data modified by findReplace processing is returned.

request

requestParameters, file, encoding, findReplace, findReplaceRegex

 

23

runFromCsv

CSV

Run actions generated from a CSV file.

file

common, propertyFile, continue, quiet, simulate, clearFileBeforeAppend, encoding, findReplace, findReplaceRegex

 

24

runFromList

Run

Run actions for each entry in a list. When file is provided, each action in the file augmented by the common parameter will be run for each entry. Otherwise, just the action specified by the common parameter will be run. Available replacement variables are entry, entry2.

list

list2, file, common, continue, quiet, simulate, clearFileBeforeAppend, encoding, findReplace, findReplaceRegex

 

25

runFromRoomList

Rooms

Run an action for each room matching regex filtering on room name and other selection criteria.

 

regex, includePrivate, includeArchived, limit, common, continue, simulate, clearFileBeforeAppend, findReplace, findReplaceRegex, file, encoding

 

26

runFromSql

Run

Run actions generated by SQL provided by the sql parameter, a file, or standard input

sql or file or standard input

common, driver, database, host, port, url, dbUser, dbPassword, propertyFile, continue, simulate, clearFileBeforeAppend, encoding, findReplace, findReplaceRegex

 

27

run

Run

Run actions from a file or standard input.

file or standard input

common, continue, simulate, clearFileBeforeAppend, encoding, findReplace, findReplaceRegex

 

28

sendMessage

Messages

Send message to a room by name or id. File contents are appended to the message. Messages are limited to 1000 characters - longer messages will be automatically sent as a file.

room, message or file

autoSplit, encoding

 

29

sendMessagesFromFile

Messages

Send message to a room for each line of a file that matches the regex parameters. When regex filtering is used, the replace parameter can optionally be used to modify the line based on capture groups before being sent. By default the entire file is processed and then the action ends. If a positive timeout values is provided, processing will wait and process newly appended lines until the timeout period has been exceeded. If timeout is set to -1, processing continues until the command processor is forced to end.

room, file

regex, replace, timeout, blockStartRegex, excludeRegex, autoSplit, encoding

 

30

sendNotification

Notifications

Send notification to a room by name or id. File contents are appended to the message. Messages are limited to 10000 characters - longer messages will be automatically sent as a file.

room, message or file

messageFormat, color, notify, encoding

 

31

sendNotificationsFromFile

Notifications

Send notification to a room for each line of a file that matches the regex parameters. When regex filtering is used, the replace parameter can optionally be used to modify the line based on capture groups before being sent. By default the entire file is processed and then the action ends. If a positive timeout values is provided, processing will wait and process newly appended lines until the timeout period has been exceeded. If timeout is set to -1, processing continues until the command processor is forced to end.

room, file

regex, replace, messageFormat, color, notify, timeout, blockStartRegex, excludeRegex, encoding

 

32

sendPrivateMessage

Messages

Send message to a specific user by name. File contents are appended to the message. Messages are limited to 10000 characters - longer messages will be automatically sent as a file.

mentionName or email or name, message or file

messageFormat, notify, encoding

 

33

sendPrivateMessagesFromFile

Messages

Send message to a user for each line of a file that matches the regex parameters. When regex filtering is used, the replace parameter can optionally be used to modify the line based on capture groups before being sent. By default the entire file is processed and then the action ends. If a positive timeout values is provided, processing will wait and process newly appended lines until the timeout period has been exceeded. If timeout is set to -1, processing continues until the command processor is forced to end.

name, file

regex, replace, messageFormat, timeout, blockStartRegex, excludeRegex, encoding

 

34

shareFileWithUser

Messages

Share a file with a user.

mentionName or email or name, file

message, fileName

 

35

shareFile

Messages

Share a file with a room.

room, file

message, fileName

 

36

shareLinkWithUser

Messages

Share a link with a user.

mentionName or email or name, link

message

 

37

shareLink

Messages

Share a link with a room.

room, link

message

 

38

updateRoom

Rooms

Update an existing room.

room

name, topic, owner, access, guestAccess, disableGuestAccess, archive, unarchive

 

39

updateUserPhoto

Users

Update user photo. File should be a recognized image file with proper extension like: png, jpeg

mentionName or email or name, file

 

 

40

updateUser

Users

Updates information for an existing user. Guest users cannot be udpated.

mentionName or email or name

newName, newEmail, newMentionName, title, userPassword, timeZone, isAdmin, isNotAdmin

 

Parameter Tips

Common parameters

A few common parameters are available that are not specifically listed for each action: verbose, debug, quiet.

Tips

  • Use single dash for single letter parameters - example: -v
  • Use double dash for multi-letter parameters - example: --help
  • When parameters are specified, most need a value - example: --action addPage
  • Some parameters are flags (boolean) and must not be followed by a value - example: --verbose
  • Parameter names are case sensitive, but, action values are not - example: --userid is invalid but --action addpage is equivalent to --action addPage
  • Some parameters become required once a specific action is chosen. This is indicated in the help text for each action.
  • Some parameters have both short (one letter) and long (more than one letter) parameter names - example: -a or --action are the same
  • Some parameters have default values, if so, they are indicated in the help text - example: (default: automation)
  • Some parameters are required - indicated by (...) in the help text - example: (-a|--action) <action>
  • Some parameters are optional - indicated by [...] in the help text - example: [(-f|--file) <file>]
  • Values that have more than one word must be enclosed by double quotes - example: --title "this is my title"
  • Quoting rules in commands can vary by environment (sad), here are the techniques that may work in your environment:
    • Many environments: embedded double quotes within a double quoted string can be escaped by doubling the double quote - example: –common "-a addComment --comment ""This is an example of a double quoted string inside a double quote"" "
    • Some environments may need different escaping: embedded double quotes within a double quoted string can be escaped with a \ - example: –common "-a addComment --comment \"This is an example of a double quoted string inside a double quote\" "
    • Run CLI Actions usage: embedded double quotes within a double quoted string can be escaped by doubling the double quote (first example above)
    • A single quote sometimes can used in place of a double quote - example: –common '-a addComment --comment "This is an example of a double quoted string inside a double quote" '
  • Some parameters allow entry of a comma separated list of values, values containing a comma must be enclosed in single quotes - example: --custom "'first:a,b,c', second:x". Embedded single quotes within a quoted string must be doubled
  • Some text fields support the automatic conversion of " \n " (blanks are significant) to be replaced with a new line character - example: --description "A multi-line text field: \n # line 1 \n # line 2"
  • To get help for a specific action (release 5.5 and above), type the action followed by --help - example: --action getProjectList --help

Special parameter

Some special characters are difficult to deal with or make action text very complicated. This is because they have special meaning in either the OS command line handling, the tool's command line parsing, or the tool's use of separators (like comma or colon separated lists). As a convenience to avoid some of these nasty situations, a special parameter was implemented to allow alternate characters to be used instead of (or in addition to) the problematic characters within parameter values. The choice of what special characters to use depends on the content so that you do not have conflicts with intended content. The special parameter works by the user providing a order specific alternate character. The alternative character is replaced with the real character after all other parsing occurs. It is implemented for many action parameters that are problematic in this area. Not all situations are covered, but, that will improve as other use cases are identified.

PositionCharacterCharacter nameSuggested alternateUsage
1,comma Some parameters use comma separated lists.
2:colon#Some parameters use colon separated values.
3@at sign  
4'single quote Used in separated lists to cover cases where content contains separator.
5"double quote~Parameters containing blanks.

A blank in any position is ignored (no alternate provided).

Example: –special " #  ~" provides alternates for colon and double quote. 
         --common "--findReplace ~something to find containing a : (colon)#replacement~"  

Character Set

User and password values should be in the ISO-8859-1 character set. Non standard characters will result in an authorization error similar to: User is not authorized to perform the request.

 

Parameters

Parameter

Short

Value

Description

1

accending

 

(error)

Order history in date accending order (earliest first).

2

access

 

(tick)

Room access setting. Valid values are: public, private (default: public)

3

action

a

(tick)

 

4

afterSql

 

(tick)

SQL to run after a successful action. Limited to specific actions at this time.

5

append

 

(error)

For some actions using the file parameter, append will append output to the existing file.

6

archive

 

(error)

Archive the room.

7

autoSplit

 

(error)

Automatically attempt to split messages that exceed HipChat's maximum message length. Messages with lines within the length limit qualify for auto splitting.

8

autoWait

 

(error)

HipChat limits the rate of requests it will handle in a period of time. Use this switch to automatically handle rate limit failures and retry. The action may take a few minutes to complete. Do not use this switch in performance critical contexts like JIRA post functions or Confluence renderings.

9

blockStartRegex

 

(tick)

Regular expression for determining the start of a block of lines for sendMessagesFromFile. A line matching this regex will indicate the end of a previous block and the start of a new block of lines. A special value of @log will provide standard handling of Atlassian default style log files including exceptions.

10

clearFileBeforeAppend

 

(error)

For run actions, this option will automatically clear an existing file on the first append requested.

11

color

 

(tick)

Background color of a message. Default is yellow.

12

colour

 

(tick)

Background colour of a message. Default is yellow.

13

columns

 

(tick)

Column selection and ordering when action generates CSV output. A comma separated list of column numbers (1-based) or column names (case insensitive). Only columns provided by the selected outputFormat are available for selection. Invalid columns will be ignored.

14

comment

 

(tick)

Comment text.

15

common

 

(tick)

Common parameter string added to all run actions.

16

connectionTimeout

 

(tick)

Allow overriding environment settings for connect and read timeouts on URL connections. In milliseconds, 0 means infinite.

17

continue

 

(error)

Continue processing even after errors are encountered for run actions. Also used for some action to ignore certain errors like not found errors on remove actions.

18

cookies

 

(tick)

Name of file to restore and persist cookies across invocations of CLI actions. Can be used to provide Data Center session affinity for actions using REST APIs.

19

database

 

(tick)

Database name is required for SQL actions.

20

dateFormat

 

(tick)

Format string for dates in Java SimpleDateFormat. Default for output is client date format. Default for date parsing is lenient starting with client date format and then some other standard formats based on JSON date format.

21

dateFormat2

 

(tick)

Alternate format string for dates in Java SimpleDateFormat. Use specific (may be ignored), but normally used for date only fields to avoid longer dateFormat based output. Some uses default to yyyy-MM-dd.

22

dbCreateTable

 

(error)

Database table needs to be created before adding rows.

23

dbJar

 

(tick)

By default, lib/jdbc is used to automatically load database drivers. Otherwise you can specify a specific file or url reference for the database driver jar. Example /jdbcDrivers/postgresql-9.3-1102.jdbc41.jar or

https://jdbc.postgresql.org/download/postgresql-9.3-1102.jdbc41.jar

24

dbPassword

 

(tick)

Database user password. Defaults to password.

25

dbTable

 

(tick)

Database table name when creating or updating a database from list output.

26

dbTableKeys

 

(tick)

Comma separated list of column names used to access existing rows for update. Normally this defines a primary key set for the table.

27

dbUser

 

(tick)

Database user name. Defaults to user.

28

debug

 

(error)

Requests detail debug output. Optional for all actions.

29

disableGuestAccess

 

(error)

Disallow access to the room by non-users.

30

driver

 

(tick)

JDBC driver class or predefined value: postgresql, mysql, mssql, oracle, or db2400. Required for SQL actions.

31

email

 

(tick)

User email. Email can be used to uniquely identify a user.

32

encoding

 

(tick)

Character encoding (character set) for text based file content - must be an encoding supported by your JAVA platform.

33

endDate

 

(tick)

Latest date for history entries. Default to now.

34

excludeRegex

 

(tick)

Regular expression for determining if a individual line should be excluded when using sendMessagesFromFile. This excludes any matching line from being sent whether it is part of a block or not. It has no impact on block determination, other block lines will not be excluded. Exclude takes precendence over include filtering.

35

file

f

(tick)

Path to file based content or result output. Use - for standard input.

36

fileName

 

(tick)

Name of file when shared. Defaults to the name of the file represented by the file parameter.

37

findReplace

 

(tick)

Find and replace text. Comma separated list of colon separated pairs. Single quote values containing a delimiter. Embedded quotes must be escaped.

38

findReplaceRegex

 

(tick)

Find and replace text with a regular expression. Comma separated list of colon separated pairs. Single quote values containing a delimiter. Embedded quotes must be doubled.

39

guestAccess

 

(error)

Allow access to the room by non-users via a guest URL.

40

help

 

(error)

Prints this help message.

41

host

 

(tick)

Database host server for SQL actions. Not used if url is provided. Defaults to localhost if not provided.

42

includeArchived

 

(error)

Include archived rooms in the list.

43

includeDeleted

 

(error)

Include deleted users in the list.

44

includeGuests

 

(error)

Include guests in the list.

45

includeOffline

 

(error)

Include users with offline status in the list.

46

includePrivate

 

(error)

Include private rooms in the list.

47

isAdmin

 

(error)

Set user to be an administrator.

48

isNotAdmin

 

(error)

Set user to not be an administrator. Default for created users.

49

limit

 

(tick)

Maximum number of entries to return. (default: 2147483647)

50

link

 

(tick)

An absolute link to share.

51

list

 

(tick)

Comma separated list of entries to populate the entry replacement variable on runFromList. Single quote values containing a delimiter. Embedded quotes must be doubled.

52

list2

 

(tick)

Comma separated list of entries to populate the entry2 replacement variable on runFromList. Single quote values containing a delimiter. Embedded quotes must be doubled.

53

mentionName

 

(tick)

Mention name for a user.

54

message

 

(tick)

A text (default) or html message. Message length is limited to 10000 characters.

55

messageFormat

 

(tick)

Format of the message. Valid values are: text, html. Default is text.

56

mimeType

 

(tick)

File mime type if you want to override automatic determination by file extension.

57

name

 

(tick)

Entity name. In most cases, an entity's numeric id can be a substitute for a name. Example: user, room, or emoticon name. Room and user names are restricted to 50 characters or less.

58

newEmail

 

(tick)

New email address for updating a user.

59

newMentionName

 

(tick)

New mention name for updating a user.

60

newName

 

(tick)

New entity name for an update.

61

notify

 

(error)

Whether a message should trigger a user notification respecting recipient's notification preferences.

62

options

 

(tick)

Comma separated list of support, experimental, or other client or action specific options.

63

outputFormat

 

(tick)

Specify output format for an action. (default: 1)

64

owner

 

(tick)

Room owner by name or id.

65

port

 

(tick)

Database host port for SQL actions. Optional, defaults to database default. Not used if url is provided.

66

propertyFile

 

(tick)

Property file with database parameters, field mappings, or client specific information.

67

quiet

 

(error)

Limit some output messages. Optional for all actions.

68

reference

 

(tick)

Reference to a replacement key value used to remember an action specific value like issue key or similar so it can be referenced later.Each action that allows this parameter will specify what value is being set for the reference replacement key.

69

regex

 

(tick)

Regular expression for including matching content. For example, used to subset lists of rooms.

70

replace

 

(error)

Replace existing entity on add, create, or similar actions.

71

replacement

 

(tick)

Replacement string when matching content with a regular expression. Use $1 and similar for capture groups.

72

request

 

(tick)

URL fragment for a request.

73

requestParameters

 

(tick)

URL request parameters or post data.

74

room

 

(tick)

Room name or id.

75

server

s

(tick)

Server URL. Normally the base URL of the server and the same as how the server is accessed from a browser.

76

simulate

 

(error)

Simulate running actions. Log the action that would be taken.

77

special

 

(tick)

Ordered list of alternate characters for comma ( , ), colon ( : ), at ( @ ), quote ( ' ), and double quote ( " ) characters used for specialized processing of some specific parameters.

78

sql

 

(tick)

SQL select statement used to generate a run script.

79

startDate

 

(tick)

Earliest date to get history data. Default is recent to get the most recent 75 entries.

80

timeZone

 

(tick)

User timeZone. See

https://bobswift.atlassian.net/wiki/x/noIbBg

.

81

timeout

 

(tick)

Seconds to wait looking for lines to be appended to a file. Use -1 for infinite wait. (default: 0)

82

title

 

(tick)

Job title for a user.

83

token

t

(tick)

Authentication token for remote access. Obtain the 40 character token by logging in to HipChat and going to 'Account Settings' then 'API access'.

84

topic

 

(tick)

Room topic.

85

type

 

(tick)

Emoticon type. Valid values are: all, global, group. Default is all.

86

unarchive

 

(error)

Unarchive the room.

87

url

 

(tick)

Action specific setting. Example: Database access url for SQL actions. Optional when host is provided.

88

userPassword

 

(tick)

User password for user management actions.

89

verbose

v

(error)

Requests verbose output to help with problem determination. Optional for all actions.

  • No labels