Skip to main content

Json api

Comments

5 comments

  • cPanelMichael
    Hello :) You could use the ZoneEdit API2 function:
    0
  • tasgray
    Hi there, Thanks for the quick response. I was able to answer my own question a few hours after I wrote this post. However, I ran into another issue which is the zoneedit command's inability to create SRV records. Is there any way of doing this using the API that you know of? Tas
    0
  • cPanelMichael
    Please review the following document and let us know if it helps answer your question: cPanel API 2 Functions - ZoneEdit::edit_zone_record - Developer Documentation - cPanel Documentation Thank you.
    0
  • tasgray
    [quote="cPanelMichael, post: 1622972">Please review the following document and let us know if it helps answer your question: Zone Record Parameters - SRV Record Thank you.
    Hi Michael, Yes that link is useful but I am pretty sure it will only work with WHM accounts unless I'm mistaken? To be clear, I need a way to add SRV records to cPanel accounts without the use of WHM. In other words, I need to interact with an API that works with cPanel accounts, not WHM. Hope that makes sense. Tas
    0
  • cPanelMichael
    Upon further testing, I verified it's not possible to add SRV records through cPanel. URL tested: http://hostname:2082/cpsess12345678/frontend/x3//json-api/cpanel?cpanel_jsonapi_apiversion=2&cpanel_jsonapi_module=ZoneEdit&cpanel_jsonapi_func=add_zone_record&domain=example.com&type=SRV&name=_service._protocol.example.com&priority=0&weight=0&port=1234&target=service.example.com
    Result: "You may only add A, CNAME, or TXT records"
    You may want to vote and add your feedback to this feature request: Allow Advanced Zone Editor To Add All Records That feature is for the advanced zone editor, but it's the same restriction that you see with the API. Thank you.
    0

Please sign in to leave a comment.