Thursday, 31 October 2013

The new REST API in soapgateQ! 5 is nearly complete...

In a previous posting we showed a few sample REST calls related to reading views and folders from a Notes database. In the meantime we completed most view, folder and document related operations. The REST call can now also provide the parameters as a single JSON construct:

    "jsonparam": {
        "OPERATION": "dbviewentries",
        "SRVNAME": "flexdomino/flex2domino",
        "DBNAME": "flex/flexdemo.nsf",
        "VIEWNAME": "books.flat"
    }
}


    "jsonparam": {
        "OPERATION": "dbcolumnx",
        "SRVNAME": "flexdomino/flex2domino",
        "DBNAME": "flex/flexdemo.nsf",
        "VIEWNAME": "books.flat",
        "COLFIELDS": [
            "1",
            "2",
            "3",
            "4",
            "5",
            "Book_Genre"
        ],
        "RETUNID": true
    }
}


    "jsonparam": {
        "OPERATION": "dbreaddocfields",
        "SRVNAME": "flexdomino/flex2domino",
        "DBNAME": "flex/flexdemo.nsf",
        "DOCUNID": "8F0C446A37709450C1257C2900371615",
        "FIELDS": [
            "Book_Summary",
            "Book_Cover",
            "Book_Price",
            "Book_Genre",
            "Book_Year",
            "Book_Author",
            "Book_Title"
        ]
    }
}


    "jsonparam": {
        "OPERATION": "dbsavedocfields",
        "SRVNAME": "flexdomino/flex2domino",
        "DBNAME": "flex/flexdemo.nsf",
        "DOCUNID": "",
        "FORM": "Book",        
        "FIELDS": [
            "Book_Summary",
            "Book_Cover",
            "Book_Price",
            "Book_Genre",
            "Book_Year",
            "Book_Author",
            "Book_Title"
        ],
        "TYPES": [
            1280,
            25,
            768,
            1280,
            1280,
            1280,
            1280
        ],
        "VALUES": [
            "New Summary",
            "(See attached file: warren.JPG)<\/i><\/body><\/html>\n\n\n
warren-479601236.JPG<\/a><\/td><\/tr>\n<\/table>\n",

            99.99,
            "IT",
            "2013",
            "John Smith",
            "soapgate Q! RESTful services"
        ],
        "READFIELDS": [
            "Book_Price",
            "Book_Genre",
            "Book_Year",
            "Book_Author",
            "Book_Title"
        ]
    }

}

No comments:

Post a Comment