MediaWiki API result

This is the HTML representation of the JSON format. HTML is good for debugging, but is unsuitable for application use.

Specify the format parameter to change the output format. To see the non-HTML representation of the JSON format, set format=json.

See the complete documentation, or the API help for more information.

{
    "warnings": {
        "query": {
            "*": "Formatting of continuation data has changed. To receive raw query-continue data, use the 'rawcontinue' parameter. To silence this warning, pass an empty string for 'continue' in the initial query."
        }
    },
    "batchcomplete": "",
    "continue": {
        "gapcontinue": "Reasoner_by_property",
        "continue": "gapcontinue||"
    },
    "query": {
        "pages": {
            "125": {
                "pageid": 125,
                "ns": 0,
                "title": "Reasoner Increment, Decrement, Set",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "First this only works for numeric fields like integer or double\nwhen user set a supported property that is double or integer of a type of thing he has to check the check box for atomic updates.\nThen this only works for reasoner for each by property action updates\n\nOn the right side user will be able to select from set, increment or decrement;\nthen there is an entry box to enter a numeric value on how much you want decrement or increment or set is just to set a fix value\n\nFor example Field to update is Temp max that initially was 2 then user select increment then enter 2 then user runs reasoner\non temp max the result will be 4\n\n[[File:ScreenShotDecIncSet2016-03-11.png|1150px|thumbnail|center]]"
                    }
                ]
            },
            "124": {
                "pageid": 124,
                "ns": 0,
                "title": "Reasoner by Resource",
                "revisions": [
                    {
                        "contentformat": "text/x-wiki",
                        "contentmodel": "wikitext",
                        "*": "[[File:ReasonerByResource.png|1150px|thumbnail|center]]\n\n===Reasoner For each ===\n\n[[File:ReasonerForEachByResourceCreate.png|1150px|thumbnail|center]]\n\n====Create====\n\n# MainMenu/Activities/Reasoner\n# Click create\n# Select For Each Thing \n# Enter a Name\n# Once The Reasoner editor is open\n# Enter Description\n# Select the observer\n# Select Topic from where you are getting the observation\n# Select Action Create, \n# Dialog Box for create will be open Select by recurso\n# Select type of thing you want to create\n# Enter a label to identify the action\n# On right side click on action\n# Select on right side new fields and user can see he can write the info using javascript\n#: Example:\n#: <syntaxhighlight lang=\"javascript\">\nfunction(newthing,observation,thing,summary){   \n    newthing._name =\"Entity77\"+ new Date().getTime().toString();\n    newthing.DoubleData = observation.ObsDoubleData; \n    newthing.description =\"Testing Create by recurso\";        \n}\n</syntaxhighlight>\n#:{{Note|There are required fields if user does not enter them the reasoner wont run}}\n# Run reasoner\n\nExpected\n\nFor each thing returned by observer system will create a new thing\n\n====Update ====\n\nSame steps as Create\n\n<syntaxhighlight lang=\"javascript\">\nfunction(updatething,observation,thing){   \n    updatedthing.description =\"Bless be the ones who serve others. They are the ones who find heaven on earth.\";\n    updatedthing.CityPopulation = 123000123;\n}\n</syntaxhighlight> \n\nExpected\nThe system will update each thing returned by the observer\n\n====Send Notification ====\n\nsame as for each send notification by properties\n\n==== Delete ====\n\nsame as for each Delete by properties\n\n====Send Observations ====\n\n<syntaxhighlight lang=\"javascript\">\nfunction(newobservation,observation,thing){   \n    newobservation._name = \"SendObserRecurso\"+ new Date().getTime().toString();\n    newobservation.topic = observation.topic;   (Required field)\n    newobservation.producer = observation.producer;  (Required field)\n}\n</syntaxhighlight>\n\n{{Note|There are required fields if user does not enter them the reasoner wont run}}\n\n====Schedule Send Observation ====\n\nThe same as send observation user just need to specify Initiation Date and time, occurrence and frequency\n\n{{Note|\n:Occurrence 0 must enter frequency like; sec, mins, hours etc If user for example enters frequency days that means observation will be send every day forever Starting on the Start date and Time\n:Occurrence 1 frequency will be ignore. The system will send that schedule observation on the Start Date and Time only once\n:Occurrence 2 or more must enter frequency. The system will send the observation according to frequency and Start Date and Time}}\n\n<syntaxhighlight lang=\"javascript\">\nfunction(newobservation,observation,thing){   \n    newobservation._name = \"SendObserRecurso\"+ new Date().getTime().toString();\n    newobservation.topic = observation.topic;   (Required field)\n    newobservation.producer = observation.producer;  (Required field)\n}\n</syntaxhighlight>\n\n{{Note|There are required fields if user does not enter them the reasoner wont run.}}\n\nExpected\n\nFor each thing returned by the observer the system will schedule to send a new observation\n\n===Reasoner At Least One ===\n\n====Create ====\n\n# MainMenu/Activities/Reasoner\n# Click create\n# Select At least one thing\n# Enter a Name\n# Once The Reasoner editor is open\n# Enter Description\n# Select the observer\n# Select Topic from where you are getting the observation\n# Select Action Create, \n# Dialog Box for create will be open Select by recurso\n# Select type of thing you want to create\n# Enter a label to identify the action\n# On right side click on action\n# Select on right side new fields and user can see he can write the info using javascript\n#: Example:\n#: <syntaxhighlight lang=\"javascript\">\nfunction(newthing,observation,thing){   \n    newthing._name =\"Entity55\";\n    newthing.DoubleData = observation.ObsDoubleData; \n    newthing.description =\"Testing Reasoner At least One Create by recurso\";\n}\n</syntaxhighlight>\n#:{{Note|There are required fields if user does not enter them the reasoner wont run.}}\n# Run reasoner\n\n\nExpected\nIf Observer return at least one thing the system will create a new thing if observer does not return thing system won't create the new thing\n\n====Send Notifications ====\n\nsame as send Notification by properties\n\n====Send Observations ====\n\n<syntaxhighlight lang=\"javascript\">\nfunction(newobservation,observation,thing){ \n    newobservation._name = \"SendObserRecurso333\"; (Mandatory Field)\n    newobservation.topic = observation.topic;  (Mandatory Field)\n    newobservation.producer = observation.producer;  (Mandatory Field)\n}\n</syntaxhighlight>\n\n====Schedule Send Observations ====\nThe same as send observation user just need to specify Initiation Date and time, occurrence and frequency\n\n{{Note|\n:Occurrence 0 must enter frequency like; sec, mins, hours etc If user for example enters frequency days that means observation will be send every day forever Starting on the Start date and Time\n:Occurrence 1 frequency will be ignore. The system will send that schedule observation on the Start Date and Time only once\n:Occurrence 2 or more must enter frequency. The system will send the observation according to frequency and Start Date and Time}}\n\n<syntaxhighlight lang=\"javascript\">\nfunction(newobservation,observation){ \n    newobservation.producer = \"Copertino\";\t\n}\n</syntaxhighlight>\n\nExpected\n\nIf Observer return at least one thing the system will Schedule to send a new Observation\n\n===Reasoner Only Observations ===\n\n==== Create ====\n\n<syntaxhighlight lang=\"javascript\">\nfunction(newthing,observation){ \n    newthing._name =\"EntityObsOnlyRecurso\";\n    newthing.DoubleData = observation.ObsDoubleData; \n    newthing.description =\"Testing Reasoner Obs Only Create by recurso\";\n}\n</syntaxhighlight>\n\nExpected\n\nIf the run of Observer is positive the system will Create a New thing\n\n====Send Notifications ====\n\nsame as send notification by properties\n\n====Send Observations ====\n\n<syntaxhighlight lang=\"javascript\">\nfunction(newobservation,observation){ \n    newobservation._name = \"SendObserRecursoObsOnly\";\n    newobservation.topic = observation.topic;  (Mandatory field)\n    newobservation.producer = observation.producer;  (Mandatory field)\n}\n</syntaxhighlight>\n\nExpected\n\nIf the run of Observer is positive the system will Send the observation\n\n====Schedule Send Observations ====\n\nThe same as send observation on Action select schedule observations user just need to specify Initiation Date and time, occurrence and frequency\n\n{{Note|\n:Occurrence 0 must enter frequency like; sec, mins, hours etc If user for example enters frequency days that means observation will be send every day forever Starting on the Start date and Time\n:Occurrence 1 frequency will be ignore. The system will send that schedule observation on the Start Date and Time only once\n:Occurrence 2 or more must enter frequency. The system will send the observation according to frequency and Start Date and Time}}\n\n<syntaxhighlight lang=\"javascript\">\nfunction(newobservation,observation){ \n    newobservation._name = \"ScheduleSendObserRecursoObsOnly\";\n    newobservation.topic = observation.topic;  \n    newobservation.producer = observation.producer; \n}\n</syntaxhighlight>\n\nExpected\n\nIf the run of Observer is positive the system will Send the observation\n according to the schedule\n\n===Reasoner Absence of things ===\n\n====Create ====\n\n<syntaxhighlight lang=\"javascript\">\nfunction(newthing,observation){ \n    newthing._name =\"EntityDoNotReturnRecurso111\";\n    newthing.DoubleData = observation.ObsDoubleData; \n    newthing.description =\"Testing Reasoner Do not return entity Create by recurso\";\n}\n</syntaxhighlight>\n\nExpected\n\nIf Observer do not return a thing the system will create a new thing\n\n====Send Notifications ====\n\n====Send Observations ====\n\n<syntaxhighlight lang=\"javascript\">\nfunction(newobservation,observation){ \n    newobservation._name = \"SendObserRecursoNoEntity\";\n    newobservation.topic = observation.topic;  \n    newobservation.producer = observation.producer; \n}\n</syntaxhighlight>\n\nExpected\n\nIf Observer do not return a thing the system will Send Observation\n\n====Schedule Send Observations ====\n\n<syntaxhighlight lang=\"javascript\">\nfunction(newobservation,observation){ \n    newobservation._name = \"ScheduleSendObserRecursoNoEntity\";\n    newobservation.topic = observation.topic;  \n    newobservation.producer = observation.producer;       \n}\n</syntaxhighlight>\n\nExpected\n\nIf Observer do not return a thing the system will Schedule and send observation according to schedule"
                    }
                ]
            }
        }
    }
}