Creating a new department with Rest API

Discussion in 'Developing, APIs and extending' started by Jeff Fields, Jul 16, 2012.

  1. Jeff Fields

    Jeff Fields New Member

    I have the syntax correct. I've been unable to create a new department.

    For testing on macbook, I've run:
    --
    curl "http://<hostname here>/api/index.php?e=/Base/Department/&title='hi'&app='tickets'&type='public'" -d "title='hi'&app='tickets'&type='public'&apikey=<somthing>&salt=<something>&signature=<something>"; echo ""
    --
    I've post the data in the post and in the URL just to make sure it gets through. No combination of app= and title= and type= has allowed me to create a department.

    Each time I receive the following:

    Invalid Module Specified. You can only create departments for tickets and livechat module.

    Please help! :)
     
  2. Jeff Fields

    Jeff Fields New Member

    Posting against /Core/Test/ results in the following:

    --

    POSTArray
    (
    [0] =>
    )
    Array
    (
    [title] => 'hi'
    [app] => 'tickets'
    [type] => 'public'
    [apikey] => dfgdf
    [salt] => dfgdfg
    [signature] => dfgdfg
    )
    --

    Shouldn't these be in POSTArray?
     
  3. Jeff Fields

    Jeff Fields New Member

    So the Rest API Documentation needs to be updated

    --
    POST /Base/Department/

    Create a department.
    Arguments

    Red = required
    NameDescription
    title The title of the department.
    app The app of the department should be associated with ('tickets' or 'livechat').
    type The accessibility level of the department ('public' or 'private').
    --
    Should be
    --
    POST /Base/Department/

    Create a department.
    Arguments

    Red = required
    NameDescription
    title The title of the department.
    module The module of the department should be associated with ('tickets' or 'livechat').
    type The accessibility level of the department ('public' or 'private').
    --
     

Share This Page