Error while create new article

  • 26 August 2014
  • 3 replies
  • 32 views

Hi,


I'm using api to create and edit articles.

I can create categories and folders but can not create a new Article 500 without having to return error details.


This doesn't work with the last version of FreshDesk, before July work correctly.


Url https://XXX.freshdesk.com/solution/categories/{CATEGORYID}/folders/{FOLDERID}/articles.json

 body of request:




{


  "solution_article": {


    "title": "test article",


    "status":1,


    "art_type":2,


    "description": "test article descr",


    "folder_id": 1000114217


  }


}





Can i do it?



This topic has been closed for comments

3 replies

Denis,


The body of the request needs to have tags:


{
  "solution_article" : {
    "title" : "test article",
    "status" : 1,
    "art_type" : 2,
    "description" : "test article descr",
    "folder_id" : 1000114217

  },
  "tags": {"name": "tag1,tag2"}
}


If you do not have tags, enter empty string:


{
  "solution_article" : {
    "title" : "test article",
    "status" : 1,
    "art_type" : 2,
    "description" : "test article descr",
    "folder_id" : 1000114217

  },
  "tags": {"name": ""}
}


This will be updated in our API documentation shortly.


The tag solution did not work for me.


I can GET an article, but no way to PUT or POST one, with or without the "tag" key, i get a 500.


curl -u APIKEY:X -H "Content-Type: application/json" -X POST "http://XXX.freshdesk.com/solution/categories/1000107784/folders/1000171789/articles.json" -d '{"solution_article":{"title":"Create a ticket","status":1,"art_type":2,"description":"Steps: Fill in the mandatory fields ...","folder_id":1000171789},"tags":{"name":"hihi"}}'


How can i make it work ?

Stephane,


I am able to successfully execute similar request in my domain. I will convert this discussion to a support request so that I can debug the issue you are facing in your domain.


Subhash.