The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

API backward compatibility in v54?

Discussion in 'cPanel Developers' started by Aleksey Korolev, Feb 27, 2016.

  1. Aleksey Korolev

    Aleksey Korolev Registered

    Joined:
    Jan 22, 2016
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Minsk
    cPanel Access Level:
    Website Owner
    Hi,

    I'm having issues with response format from WHM API version 1 in new version 54 of WHM/CPanel.

    Such functions as sslissue and generatessl (WHM API 1 Functions - generatessl - Software Development Kit - cPanel Documentation) now return fields groupped in metadata and data objects e.g. for generatessl:
    'metadata' => {
    'version' => 1,
    'reason' => 'Key, Certificate, and CSR generated OK',
    'command' => 'generatessl',
    'result' => 1
    },
    'data' => {
    ...
    }

    Before v54 result of operation was returns as {results}->{status}, now it is {metadata}->{result}.
    Does this mean broken backward compatibility or there's anything else that could affect return format?
    Thank you.
     
  2. cPDavidN

    cPDavidN cPanel Developer
    Staff Member

    Joined:
    Mar 19, 2013
    Messages:
    42
    Likes Received:
    3
    Trophy Points:
    8
    cPanel Access Level:
    DataCenter Provider
    Hi Aleksey,

    I just used the 'generatessl' API call on 11.52 and 11.54, and the results were structured the same as far as I could tell. I could see the operation succeeded based on {metadata}->{result} in both cases. Could you give more details about how you're making the API call?

    There are SSL-related calls in all 5 cPanel & WHM APIs, and the cPanel APIs will return data in a different structure, but the WHM APIs should not be changing.

    David Nielson
    cPanel Developer
     
Loading...

Share This Page