Open APIs

 View Only
  • 1.  Array value

    Posted Aug 08, 2023 03:48

    Hello All, 
    We have an attributes in our request like: 
    "valid_list": [1, 2, 3]

    - Is the array value supported by TMF APIs?
    - what if I want the value to be JSON Object?
    - Can I create a new value type in the TMF APIs? If Yes, then How?

    Thanks in advance.



    ------------------------------
    Waleed AbuQalben
    TO BE VERIFIED
    ------------------------------


  • 2.  RE: Array value

    TM Forum Member
    Posted Aug 08, 2023 05:53

    Hi Waleed

    Can you be a bit more specific? For the most part the TMF Open APIs have a fixed contract, and if an array of a particular type is needed it would be defined as part of the entity/resource schema.

    Specifically in catalog area (specification/inventory pattern) we have characteristics and characteristic specifications. In v5 APIs (soon to be released), we have strongly-typed characteristics, for example NumberArray (which matches your example). 



    ------------------------------
    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: Array value

    Posted Aug 08, 2023 07:40

    Sorry for the confusion,

    We are about to design an API that define a product like this:
    {
      "product_id" : 48,
      "name": "DataBundles",
      "sub_products": [
        {
          "tech_name": "100MB",
          "commercial" : "daily",
          "benefits": {
            "validity": 1,
            "onnet_min": 300,
            "onnet_sms": 300,
            "renewable": 0
          }
        }
      ],
      "eligibility": {
        "template_id": 1,
        "sub_products" : [
          {
            "name": "100MB",
            "rules": {
              "eligible_sc_list": [1, 2, 3],
              "eligible_sc_range": ["1300-1399"]
            }
          }
         ]
      } 
    }

    - As you can see the Product has Sub products, and each sub product has (benefits) which is JSON object for flexibility. (Second question).
    - each sub product has eligibility rules to check, may be a List or a range (First question).
    - for the third question: 
     what if I need to create a new type of attribute, or I want to extend an exist attribute, can I do that?


     



    ------------------------------
    Waleed AbuQalben
    TO BE VERIFIED
    ------------------------------



  • 4.  RE: Array value

    Posted Aug 08, 2023 08:59

    I have another question please. 
    what is the expected values for the (valueType) field?  
    "productCharacteristic": [
      {
        "name": "string",
        "valueType": "string",
        "value": "string",
        "@baseType": "string",
        "@schemaLocation": "string",
        "@type": "string"
      }
    ]




    ------------------------------
    Waleed AbuQalben
    TO BE VERIFIED
    ------------------------------



  • 5.  RE: Array value

    Posted Aug 09, 2023 02:45

    Any ideas? 
    @Jonathan Goldberg



    ------------------------------
    Waleed AbuQalben
    TO BE VERIFIED
    ------------------------------