Menu

Getting Error while using REST API

Help
ajit
2021-06-09
2021-06-16
  • ajit

    ajit - 2021-06-09

    Hi Tomas,

    Need some help with REST API.

    When i am trying to enroll a cert using REST API i get the below error:-

    curl -X POST "https://ejbca01.p11.abc.in03.aaa.com/ejbca/ejbca-rest-api/v1/certificate/pkcs10enroll"

    {"error_code":415,"error_message":"RESTEASY003065: Cannot consume content type"}

    Please help.

    Thanks in advance.

     
    • J

      J - 2021-06-16

      Try adding something like --header 'Content-Type: application/json'.

      Since this is a POST, you are probably missing a --data-binary '{...}' param as well with the actual data you want to send to the API endpoint.

      /J

       

Log in to post a comment.