Open APIs

Expand all | Collapse all

Is it allowed to have a pre-fix before "tmf-api" in the URI

  • 1.  Is it allowed to have a pre-fix before "tmf-api" in the URI

    TM Forum Member
    Posted 25 days ago

    Hi All,

     

    In Open API request and response payload we see href attribute – which denotes a string and it is a reference of a resource.

     

    For examples

    "href": "https://host:port/tmf-api/accountManagement/v2/partyAccount/4458",

    "href": "https://host:port/tmf-api/accountManagement/v2/billPresentationMedia/8800",

     

    Is it allowed to have a pre-fix before "tmf-api" in the URI – for example

     

    "href": "https://host:port/cx/industry/telecom/tmf-api/accountManagement/v2/partyAccount/4458",

    "href": "https://host:port/cx/industry/telecom/tmf-api/accountManagement/v2/billPresentationMedia/8800",

     

    Thanks,

    Javed

    ------------------------------
    syed javed
    Oracle Corporation
    ------------------------------


  • 2.  RE: Is it allowed to have a pre-fix before "tmf-api" in the URI

    TM Forum Member
    Posted 24 days ago
    The URLs in the specs are examples, illustrative not normative. The API Guidelines (which are normative) mention an API root, thus:

    Resource URIs SHOULD be formed according to the following base pattern:
    apiRoot points to the root path of collection of resources

    {apiRoot} /{resourcePath}


    apiRoot is not further defined in the guidelines document. So my understanding is that can certainly add prefixes to the URL.


    ------------------------------
    Jonathan Goldberg
    Amdocs Management Limited
    Any opinions and statements made by me on this forum are purely personal, and do not necessarily reflect the position of the TM Forum or my employer.
    ------------------------------



  • 3.  RE: Is it allowed to have a pre-fix before "tmf-api" in the URI

    TM Forum Member
    Posted 24 days ago
    thanks for the inputs.

    ------------------------------
    syed javed
    Oracle Corporation
    ------------------------------



  • 4.  RE: Is it allowed to have a pre-fix before "tmf-api" in the URI

    TM Forum Member
    Posted 23 days ago

    Hi Johathan,

    I am interested in diving into the next level for detail as we strive towards creating APIs that are TMForum compliant.  On resourcepath for this example:

    https://host:port/tmf-api/accountManagement/v2/partyAccount/4458

    is it:

    a) /partyAccount/4458  or

    b) /accountManagement/v2/partyAccount/4458



    Many thanks!

    Sajitha

    Oracle



    ------------------------------
    Sajitha Nair
    Oracle Corporation
    ------------------------------



  • 5.  RE: Is it allowed to have a pre-fix before "tmf-api" in the URI

    TM Forum Member
    Posted 23 days ago
    The authoritative place to go would be the Swagger file. The most recently published swagger for Account Management (TMF666, go to the Open API Table to download) includes the definition of the base path for all the URLs as:
    "basePath": "/tmf-api/accountManagement/v4/",

    i.e. tmf-api, the name of the API, and the version string.

    You append to this basePath the actual path for the individual resource and operation that you want to execute. So for your example, which is to GET a particular account by ID, you would have the partial URL:
    /tmf-api/accountManagement/v4/partyAccount/4458
    and prior to this you would have some root such as https://myapis.mycompanyname.com:8080/myapiroot
    so the full URL path might be something like:
    https://myapis.mycompanyname.com:8080/myapiroot/tmf-api/accountManagement/v4/partyAccount/4458

    Hope it helps

    ------------------------------
    Jonathan Goldberg
    Amdocs Management Limited
    Any opinions and statements made by me on this forum are purely personal, and do not necessarily reflect the position of the TM Forum or my employer.
    ------------------------------