def update_item(name, id_, field=None, value=None, postdata=None):
    '''
    Update an item. Either a field and a value, or a chunk of POST data, may be
    used, but not both.

    CLI Example:

    .. code-block:: bash

        salt myminion rallydev.update_<item name> <item id> field=<field> value=<value>
        salt myminion rallydev.update_<item name> <item id> postdata=<post data>
    '''

    if field and value:
        if postdata:
            raise SaltInvocationError('Either a field and a value, or a chunk '
                'of POST data, may be specified, but not both.')
        postdata = {name.title(): {field: value}}

    if postdata is None:
        raise SaltInvocationError('Either a field and a value, or a chunk of '
            'POST data must be specified.')

    status, result = _query(
        action=name,
        command=id_,
        method='POST',
        data=salt.utils.json.dumps(postdata),
    )
    return result
Update an item. Either a field and a value, or a chunk of POST data, may be
    used, but not both.

    CLI Example:

    .. code-block:: bash

        salt myminion rallydev.update_<item name> <item id> field=<field> value=<value>
        salt myminion rallydev.update_<item name> <item id> postdata=<post data>