Project

General

Profile

Format de description des web-services

Voir #14174

{

  "<slug-service1>": {

    "type": "family",
    "label": "..." 
    "baseuri": "/...",

    "endpoints": {

      "<slug-endpoint1>": {

        "label": "...",
        "description": "...",
        "endpoint": "create",
        "method": "GET",
        "type": "datasource",        # optionnel ?

        "params": {
          "<varname1>": {
            "label": "...",
            "type": "string",
            "example": "..." 
          },
          "<varname2>": {
            "label": "...",
            "type": "datetime",
            "example": "..." 
          }
        },

        "payload": {
          "<varname1>": {
            "label": "...",
            "type": "float",
            "example": "..." 
          },
          "<varname2>": {
            "label": "...",
            "type": "list",
            "example": "..." 
          },
          "__root__": {             # si le payload est un dictionnaire de type "bien connu" dans Publik, tel que formdata
            "label": "...",
            "type": "formdata",
            "example": "..." 
          }
        },

        "result": {
          "<varname1>": {
            "label": "...",
            "type": "integer",
            "example": "..." 
          },
          "<varname2>": {
            "label": "...",
            "type": "dict",
            "example": "..." 
          }
        },

        "status": {
          "0": "ok",
          "1": "bad parameters" 
        },

        "triggers": {
          "<slug-trigger1>": "...label...",
          "<slug-trigger2>": "...label..." 
        }

      },
      "<slug-endpoint2>": {
      }
  },

  "<slug-service2>": {
  }
}

Also available in: PDF HTML TXT