Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Vanilla API getting 500 internal server error when using POST method

bardockbardock New
edited January 2016 in Vanilla 2.0 - 2.8

i have followed this https://vanillaforums.org/discussion/27634/tutorial-setting-up-and-using-api-to-batch-create-discussions

and created a php token generating file , i generate new timestamp & token for each request.

While using postman (using the collections provided by developer) to make requests , I get 500 internal server error as response when making POST requests while GET requests get 200 Ok response and the query is successful .

I just need to create bulk categories and start some bulk threads in them , however i am stuck

edit:

this is a fresh install via softlacous in cpanel , is the problem due to this

Tagged:

Comments

  • Update:

    It is working fine now , the problem is with starting new categories , it seems i am not passing enough information in the post request to create new category .
    the default information being passed is { "Name": "testt", "UrlCode": "testt" }

    what more information needs to be passed to create a new category ?

  • Other than a session, Name is all that is required to be submitted.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • @hgtonight said:
    Other than a session, Name is all that is required to be submitted.

    I tried that . still getting 500 server error . I have successfully tested mostly every other query except this one.

  • What is the cause of the 500 server error? You will have to look at your server error logs to find out.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • bardockbardock New
    edited January 2016

    @hgtonight said:
    What is the cause of the 500 server error? You will have to look at your server error logs to find out.

    [26-Jan-2016 16:20:28 UTC] PHP Fatal error: Allowed memory size of 176160768 bytes exhausted (tried to allocate 77 bytes) in /home/username/public_html/domain/library/core/class.dispatcher.php on line 608

    this error is repeating everytime
    using namecheap shared hosting , all other queries seem to work. creating a new category is creating problem only

    128 M is the size limit

  • How many categories do you currently have?

    Can you temporarily increase the limit to 256M?

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • bardockbardock New
    edited January 2016

    @hgtonight said:
    How many categories do you currently have?

    Can you temporarily increase the limit to 256M?

    LOL

    i had increased limit to 512 MB that didn't work.(reverted back to default)

    then after reading your comment i deleted all but one category ( which can't be deleted)
    now it is working . i have created 6 categories now via api calls

Sign In or Register to comment.