Skip to main content

When I attempt to create a solution article from URL using the Article creation API, I get the following errors: 

 "description": "Validation failed",

    "errors": r

        {

            "field": "title",

            "message": "This field cannot be empty",

            "code": "missing_field"

        },

        {

            "field": "description",

            "message": "This field cannot be empty",

            "code": "missing_field"

        },

        {

            "field": "folder_id",

            "message": "This field cannot be empty",

            "code": "missing_field"

        },

        {

            "field": "status",

            "message": "This field cannot be empty",

            "code": "missing_field"

        }

    ]

I have all of these values set in the API call.  I have tried all sorts of formatting to make sure that the values are the correct type as well.  I am using postman currently, but I have also tried just running this in powershell with the same result.  I am sure that there is something that I am missing, but I cannot figure out what it is.

Has anyone seen something like this and been able to get around it?

Thanks!

Hello @Justin_M, can you share with us the endpoint you are calling to “create a solution article”, and the JSON body you are passing in your POST request? We don’t need the actual values for the fields but it will help us troubleshoot your issue. Thanks!


Thank you for the response.  Here is an example of what I am sending over: 

curl -L -X POST 
"https://tcompany].freshservice.com/api/v2/solutions/articles?title="article test"&description="This is an API test article"&folder_id=efolder_id]&status=1" -H "Content-Type: application/json" -H "Authorization: Basic iAPI key]"

Edit: Wanted to clarify that I am using the freshservice domain and not our vanity URL


@Justin_M have you tried formatting your curl request as suggested in the Freshservice API documentation?

https://api.freshservice.com/v2/#create_solution_article


I am trying that now, I ran into some issues with curl.exe being unhappy with the curly brackets and then an issue with the title being picked up as a domain.  I am going to poke around a little more and will circle back once I can get around those issues.

 

Thank you for the help!


Following your suggestion, I was able to get rid of that error, and now I am getting a 403 forbidden, but only when attempting to POST.

I will mark this as resolved, and I will hunt down the other issue and open another topic if needed at that time.

Thank you for taking the time!


Following your suggestion, I was able to get rid of that error, and now I am getting a 403 forbidden, but only when attempting to POST.

I will mark this as resolved, and I will hunt down the other issue and open another topic if needed at that time.

Thank you for taking the time!

No problem! Glad you are making progress. For the 403 Forbidden error, you need to make sure the API key you are passing has the right privileges to create solution articles


Reply