•   about 8 years ago

Example of passing parameters to 'tickets'

card.services('helpdesk').request('tickets'[, options])

Can you give me an example of how to format options.
For me specifically, page, per_page, priority, and search

Thanks!

  • 8 comments

  •   •   about 8 years ago

    Also

    card.services('helpdesk').request('comment:create', ticket_id, attributes)

    for attributes. Thanks so much.

  • Manager   •   about 8 years ago

    Here is a good example with paging params: developers.spiceworks.com/documentation/cloud-apps/api-basics#paging

    Here are some good examples searching for tickets: developers.spiceworks.com/documentation/cloud-apps/api-basics#paging

  • Manager   •   about 8 years ago

    Try something like this for passing attributes to 'comment:create':

    ```js
    var card = new SW.Card();
    card.services('helpdesk').request('comment:create', 2, {
    body: 'This is a new comment on ticket 2!',
    public: false
    });
    ```
    This call would create a private comment (for IT pros only) on the ticket with ID number 2.

  •   •   about 8 years ago

    Awesome. Thanks.

  •   •   about 8 years ago

    I'm having trouble debugging. Do I need to restart the dev desktop each time I make a change to the code?

    card.services('helpdesk').request('comment:create', 55, {
    body: 'Comment added',
    public: true
    }).then(function(data){
    $('body').append('COMMENT RESULT:' + 'posted' + '');
    });

    not working.

  •   •   about 8 years ago

    I think it's the browser that your dev desktop uses caches the secondary pages, and there is no way to reload the page as you internalize the frame. Refresh only refreshes the main index.html

  •   •   about 8 years ago

    FYI - Okay, not sure if the desktop dev app performs like the full app, but there is a javascript ajax issue in the way you handles frames. I worked around it, so no issue for me, but for future reference.

  • Manager   •   about 8 years ago

    Hi Clyde,

    You shouldn't have to restart the Developer Edition when you make code changes to your app.

    I'm not sure what you mean by the browser that we use, you can connect to the Developer Edition using whatever web browser you like. If you are having issues with caching the javascript files for your app, try doing a hard refresh that clears the browser cache.

    What were the ajax issues you ran into? I want to make sure that we get any issues fixed.

    Thanks,
    Mike

Comments are closed.