MBS FileMaker Plugin Example Databases

CURL FMS Admin API

All examples are included with download of MBS FileMaker Plugin.

CURL FMS Admin API.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts15
Value Lists0
Custom Functions0
Custom Menus33
File Options
Default custom menu set[Standard FileMaker Menus]
When opening file
Minimum allowed version12.0
Login usingAccount Name; Account= Admin
Allow user to save passwordOff
Require iOS passcodeOff
Switch to layoutOff
Hide all toolbarsOff
Script triggers
OnFirstWindowOpenOff
OnLastWindowCloseOff
OnWindowOpenOff
OnWindowCloseOff
OnFileAVPlayerChangeOff
Thumbnail Settings
Generate ThumbnailsOn; Temporary

 

Tables

Table Name
Statistics
Occurrences in Relationship Graph
CURL Test
8 fields defined, 1 record
CURL Test

Fields

Table Name: CURL Test - 8 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
ResultNormal, TextAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
      TextNormal, TextAuto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          debugNormal, TextAuto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
              URLNormal, TextAuto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
              • Indexing: None
              • Automatically create indexes as needed
              • Index Language: German
                      ServerNormal, TextAuto-Enter:
                      • Allow editing
                      Validation:
                      • Only during data entry
                      Storage:
                      • Global
                      • Repetitions: 1
                      • Index Language: German
                          UsernameNormal, TextAuto-Enter:
                          • Allow editing
                          Validation:
                          • Only during data entry
                          Storage:
                          • Global
                          • Repetitions: 1
                          • Index Language: German
                              PasswordNormal, TextAuto-Enter:
                              • Allow editing
                              Validation:
                              • Only during data entry
                              Storage:
                              • Global
                              • Repetitions: 1
                              • Index Language: German
                                  SessionNormal, TextAuto-Enter:
                                  • Allow editing
                                  Validation:
                                  • Only during data entry
                                  Storage:
                                  • Global
                                  • Repetitions: 1
                                  • Index Language: German

                                      Layout Objects: CURL Test

                                      Regular Fields

                                      Field Name: CURL Test::Result
                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                      • Top: 76 pt
                                      • Left: 133 pt
                                      • Bottom: 90 pt
                                      • Right: 386 pt
                                      • Anchoring: Left, Top
                                      Field Format:
                                      • Edit Box
                                      Field Behavior:
                                      • Allow field to be entered: In Find mode, In Browse mode
                                      • Touch keyboard type: System Default
                                      • Go to next field using: Tab key
                                      Yes

                                      Field Name: CURL Test::Text
                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                      • Top: 94 pt
                                      • Left: 133 pt
                                      • Bottom: 373 pt
                                      • Right: 386 pt
                                      • Anchoring: Left, Top
                                      Field Format:
                                      • Edit Box
                                      Field Behavior:
                                      • Allow field to be entered: In Find mode, In Browse mode
                                      • Touch keyboard type: System Default
                                      • Go to next field using: Tab key
                                      Yes

                                      Field Name: CURL Test::debug
                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                      • Top: 77 pt
                                      • Left: 450 pt
                                      • Bottom: 373 pt
                                      • Right: 763 pt
                                      • Anchoring: Left, Top
                                      Field Format:
                                      • Edit Box
                                      Field Behavior:
                                      • Allow field to be entered: In Find mode, In Browse mode
                                      • Touch keyboard type: System Default
                                      • Go to next field using: Tab key
                                      Yes

                                      Field Name: CURL Test::Server
                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                      • Top: 7 pt
                                      • Left: 64 pt
                                      • Bottom: 21 pt
                                      • Right: 317 pt
                                      • Anchoring: Left, Top
                                      Field Format:
                                      • Edit Box
                                      Field Behavior:
                                      • Allow field to be entered: In Find mode, In Browse mode
                                      • Touch keyboard type: Default for Data Type
                                      • Go to next field using: Tab key
                                      No

                                      Field Name: CURL Test::Username
                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                      • Top: 9 pt
                                      • Left: 404 pt
                                      • Bottom: 23 pt
                                      • Right: 657 pt
                                      • Anchoring: Left, Top
                                      Field Format:
                                      • Edit Box
                                      Field Behavior:
                                      • Allow field to be entered: In Find mode, In Browse mode
                                      • Touch keyboard type: Default for Data Type
                                      • Go to next field using: Tab key
                                      No

                                      Field Name: CURL Test::Password
                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                      • Top: 27 pt
                                      • Left: 404 pt
                                      • Bottom: 41 pt
                                      • Right: 657 pt
                                      • Anchoring: Left, Top
                                      Field Format:
                                      • Edit Box
                                      Field Behavior:
                                      • Allow field to be entered: In Find mode, In Browse mode
                                      • Touch keyboard type: Default for Data Type
                                      • Go to next field using: Tab key
                                      No

                                      Field Name: CURL Test::Session
                                      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                      • Top: 394 pt
                                      • Left: 133 pt
                                      • Bottom: 408 pt
                                      • Right: 386 pt
                                      • Anchoring: Left, Top
                                      Field Format:
                                      • Edit Box
                                      Field Behavior:
                                      • Allow field to be entered: In Find mode, In Browse mode
                                      • Touch keyboard type: Default for Data Type
                                      • Go to next field using: Tab key
                                      No

                                      Group Buttons

                                      Button PropertiesCoordinatesScript/Script Step
                                        Type:
                                      • Text: Trace on
                                        Additional Properties:
                                      • Change to hand cursor over button
                                      • Rectangular
                                      • Top: 348 pt
                                      • Left: 0 pt
                                      • Bottom: 373 pt
                                      • Right: 112 pt
                                      • Anchoring: Left, Top
                                      Set Variable [ $result; Value:MBS("Trace") ]

                                      Buttons

                                      Button PropertiesCoordinatesScript/Script Step
                                        Type:
                                      • Text: Login
                                      • Top: 64 pt
                                      • Left: 775 pt
                                      • Bottom: 89 pt
                                      • Right: 915 pt
                                      • Anchoring: Left, Top
                                      Perform Script [ “Login” ]

                                      Scripts:


                                      Button PropertiesCoordinatesScript/Script Step
                                        Type:
                                      • Text: Logout
                                      • Top: 94 pt
                                      • Left: 775 pt
                                      • Bottom: 119 pt
                                      • Right: 915 pt
                                      • Anchoring: Left, Top
                                      Perform Script [ “Logout” ]

                                      Scripts:


                                      Button PropertiesCoordinatesScript/Script Step
                                        Type:
                                      • Text: Get Server Status
                                      • Top: 124 pt
                                      • Left: 775 pt
                                      • Bottom: 149 pt
                                      • Right: 915 pt
                                      • Anchoring: Left, Top
                                      Perform Script [ “Get Server Status” ]

                                      Scripts:


                                      Button PropertiesCoordinatesScript/Script Step
                                        Type:
                                      • Text: Start Server
                                      • Top: 154 pt
                                      • Left: 775 pt
                                      • Bottom: 179 pt
                                      • Right: 915 pt
                                      • Anchoring: Left, Top
                                      Perform Script [ “Start Server” ]

                                      Scripts:


                                      Button PropertiesCoordinatesScript/Script Step
                                        Type:
                                      • Text: Stop Server
                                      • Top: 184 pt
                                      • Left: 775 pt
                                      • Bottom: 209 pt
                                      • Right: 915 pt
                                      • Anchoring: Left, Top
                                      Perform Script [ “Stop Server” ]

                                      Scripts:


                                      Button PropertiesCoordinatesScript/Script Step
                                        Type:
                                      • Text: Get General Config
                                      • Top: 214 pt
                                      • Left: 775 pt
                                      • Bottom: 239 pt
                                      • Right: 915 pt
                                      • Anchoring: Left, Top
                                      Perform Script [ “Get Server General Configuration” ]

                                      Scripts:


                                      Button PropertiesCoordinatesScript/Script Step
                                        Type:
                                      • Text: Get Security Config
                                      • Top: 244 pt
                                      • Left: 775 pt
                                      • Bottom: 269 pt
                                      • Right: 915 pt
                                      • Anchoring: Left, Top
                                      Perform Script [ “Get Server Security Configuration” ]

                                      Scripts:


                                      Button PropertiesCoordinatesScript/Script Step
                                        Type:
                                      • Text: List Databases
                                      • Top: 274 pt
                                      • Left: 775 pt
                                      • Bottom: 299 pt
                                      • Right: 915 pt
                                      • Anchoring: Left, Top
                                      Perform Script [ “List Databases” ]

                                      Scripts:


                                      Button PropertiesCoordinatesScript/Script Step
                                        Type:
                                      • Text: List Schedules
                                      • Top: 304 pt
                                      • Left: 775 pt
                                      • Bottom: 329 pt
                                      • Right: 915 pt
                                      • Anchoring: Left, Top
                                      Perform Script [ “List Schedules” ]

                                      Scripts:


                                      Button PropertiesCoordinatesScript/Script Step
                                        Type:
                                      • Text: Get PHP Config
                                      • Top: 334 pt
                                      • Left: 775 pt
                                      • Bottom: 359 pt
                                      • Right: 915 pt
                                      • Anchoring: Left, Top
                                      Perform Script [ “Get Server PHP Configuration” ]

                                      Scripts:


                                      Script Hierarchy

                                      Authentication
                                      Login
                                      Logout
                                      Database Server
                                      Get Server Status
                                      Start Server
                                      Stop Server
                                      Get Server General Configuration
                                      Get Server Security Configuration
                                      Databases
                                      List Databases
                                      Schedules
                                      List Schedules
                                      PHP
                                      Get Server PHP Configuration
                                      Enable PHP
                                      Disable PHP
                                      Clients
                                      Send Message to client
                                      Disconnect Client
                                      Clear

                                      Script NameClear
                                      Run script with full access privilegesOff
                                      Include In MenuYes
                                      Layouts that use this script
                                        Scripts that use this script
                                          Script Definition
                                          Script Steps
                                          • Set Field [ CURL Test::Result; "" ]
                                          • Set Field [ CURL Test::Text; "" ]
                                          • Set Field [ CURL Test::Session; "" ]
                                          • Set Field [ CURL Test::debug; "" ]
                                          Fields used in this script
                                          Scripts used in this script
                                            Layouts used in this script
                                              Tables used in this script
                                              Table occurrences used by this script
                                              Custom Functions used by this script
                                                Custom menu set used by this script

                                                  Authentication

                                                  Parent Folder: [Authentication]Next Script: [Logout]
                                                  Script NameLogin
                                                  Run script with full access privilegesOff
                                                  Include In MenuYes
                                                  Layouts that use this script
                                                  Scripts that use this script
                                                    Script Definition
                                                    Script Steps
                                                    Fields used in this script
                                                    Scripts used in this script
                                                      Layouts used in this script
                                                        Tables used in this script
                                                        Table occurrences used by this script
                                                        Custom Functions used by this script
                                                          Custom menu set used by this script

                                                            Previous Script: [Login]Parent Folder: [Authentication]
                                                            Script NameLogout
                                                            Run script with full access privilegesOff
                                                            Include In MenuYes
                                                            Layouts that use this script
                                                            Scripts that use this script
                                                              Script Definition
                                                              Script Steps
                                                              • #Start new session
                                                              • Set Variable [ $curl; Value:MBS("CURL.New") ]
                                                              • #Set URL to load (HTTP, HTTPS, FTP, FTPS, SFTP, etc.)
                                                              • Set Variable [ $result; Value:MBS("CURL.SetOptionURL"; $curl; "https://" & CURL Test::Server & "/fmi/admin/api/v1/user/logout") ]
                                                              • Set Variable [ $result; Value:MBS("CURL.SetOptionHTTPHeader"; $curl; "Expect: "; "Content-Type: application/json"; "Content-Length: 0"; "Authorization: Bearer " & CURL Test::Session) ]
                                                              • Set Variable [ $result; Value:MBS("CURL.SetOptionPostFields"; $curl; "") ]
                                                              • #RUN now
                                                              • Set Field [ CURL Test::Result; MBS("CURL.Perform"; $curl) ]
                                                              • #Check result
                                                              • Set Field [ CURL Test::Text; MBS("CURL.GetResultAsText"; $curl; "UTF8") ]
                                                              • Set Field [ CURL Test::debug; MBS("CURL.GetDebugAsText"; $curl) ]
                                                              • Set Field [ CURL Test::Session; "" ]
                                                              • #Cleanup
                                                              • Set Variable [ $result; Value:MBS("CURL.Cleanup"; $curl) ]
                                                              Fields used in this script
                                                              Scripts used in this script
                                                                Layouts used in this script
                                                                  Tables used in this script
                                                                  Table occurrences used by this script
                                                                  Custom Functions used by this script
                                                                    Custom menu set used by this script

                                                                      Database Server

                                                                      Parent Folder: [Database Server]Next Script: [Start Server]
                                                                      Script NameGet Server Status
                                                                      Run script with full access privilegesOff
                                                                      Include In MenuYes
                                                                      Layouts that use this script
                                                                      Scripts that use this script
                                                                        Script Definition
                                                                        Script Steps
                                                                        • #Start new session
                                                                        • Set Variable [ $curl; Value:MBS("CURL.New") ]
                                                                        • #Set URL to load (HTTP, HTTPS, FTP, FTPS, SFTP, etc.)
                                                                        • Set Variable [ $result; Value:MBS("CURL.SetOptionURL"; $curl; "https://" & CURL Test::Server & "/fmi/admin/api/v1/server/status") ]
                                                                        • Set Variable [ $result; Value:MBS("CURL.SetOptionHTTPHeader"; $curl; "Expect: "; "Authorization: Bearer " & CURL Test::Session) ]
                                                                        • #RUN now
                                                                        • Set Field [ CURL Test::Result; MBS("CURL.Perform"; $curl) ]
                                                                        • #Check result
                                                                        • Set Field [ CURL Test::Text; MBS("CURL.GetResultAsText"; $curl; "UTF8") ]
                                                                        • Set Field [ CURL Test::debug; MBS("CURL.GetDebugAsText"; $curl) ]
                                                                        • #Cleanup
                                                                        • Set Variable [ $result; Value:MBS("CURL.Cleanup"; $curl) ]
                                                                        Fields used in this script
                                                                        Scripts used in this script
                                                                          Layouts used in this script
                                                                            Tables used in this script
                                                                            Table occurrences used by this script
                                                                            Custom Functions used by this script
                                                                              Custom menu set used by this script

                                                                                Previous Script: [Get Server Status]Parent Folder: [Database Server]Next Script: [Stop Server]
                                                                                Script NameStart Server
                                                                                Run script with full access privilegesOff
                                                                                Include In MenuYes
                                                                                Layouts that use this script
                                                                                Scripts that use this script
                                                                                  Script Definition
                                                                                  Script Steps
                                                                                  • #Start new session
                                                                                  • Set Variable [ $curl; Value:MBS("CURL.New") ]
                                                                                  • #Set URL to load (HTTP, HTTPS, FTP, FTPS, SFTP, etc.)
                                                                                  • Set Variable [ $result; Value:MBS("CURL.SetOptionURL"; $curl; "https://" & CURL Test::Server & "/fmi/admin/api/v1/server/status") ]
                                                                                  • Set Variable [ $result; Value:MBS("CURL.SetOptionHTTPHeader"; $curl; "Expect: "; "Authorization: Bearer " & CURL Test::Session; "Content-Type: application/json") ]
                                                                                  • Set Variable [ $result; Value:MBS("CURL.SetInputText"; $curl; "{\"running\": true}"; "UTF-8") ]
                                                                                  • Set Variable [ $result; Value:MBS("CURL.SetOptionPUT"; $curl; 1) ]
                                                                                  • #RUN now
                                                                                  • Set Field [ CURL Test::Result; MBS("CURL.Perform"; $curl) ]
                                                                                  • #Check result
                                                                                  • Set Field [ CURL Test::Text; MBS("CURL.GetResultAsText"; $curl; "UTF8") ]
                                                                                  • Set Field [ CURL Test::debug; MBS("CURL.GetDebugAsText"; $curl) ]
                                                                                  • #Cleanup
                                                                                  • Set Variable [ $result; Value:MBS("CURL.Cleanup"; $curl) ]
                                                                                  Fields used in this script
                                                                                  Scripts used in this script
                                                                                    Layouts used in this script
                                                                                      Tables used in this script
                                                                                      Table occurrences used by this script
                                                                                      Custom Functions used by this script
                                                                                        Custom menu set used by this script

                                                                                          Previous Script: [Start Server]Parent Folder: [Database Server]Next Script: [Get Server General Configuration]
                                                                                          Script NameStop Server
                                                                                          Run script with full access privilegesOff
                                                                                          Include In MenuYes
                                                                                          Layouts that use this script
                                                                                          Scripts that use this script
                                                                                            Script Definition
                                                                                            Script Steps
                                                                                            • #Start new session
                                                                                            • Set Variable [ $curl; Value:MBS("CURL.New") ]
                                                                                            • #Set URL to load (HTTP, HTTPS, FTP, FTPS, SFTP, etc.)
                                                                                            • Set Variable [ $result; Value:MBS("CURL.SetOptionURL"; $curl; "https://" & CURL Test::Server & "/fmi/admin/api/v1/server/status") ]
                                                                                            • Set Variable [ $result; Value:MBS("CURL.SetOptionHTTPHeader"; $curl; "Expect: "; "Authorization: Bearer " & CURL Test::Session; "Content-Type: application/json") ]
                                                                                            • Set Variable [ $result; Value:MBS("CURL.SetInputText"; $curl; "{\"running\": false}"; "UTF-8") ]
                                                                                            • Set Variable [ $result; Value:MBS("CURL.SetOptionPUT"; $curl; 1) ]
                                                                                            • #RUN now
                                                                                            • Set Field [ CURL Test::Result; MBS("CURL.Perform"; $curl) ]
                                                                                            • #Check result
                                                                                            • Set Field [ CURL Test::Text; MBS("CURL.GetResultAsText"; $curl; "UTF8") ]
                                                                                            • Set Field [ CURL Test::debug; MBS("CURL.GetDebugAsText"; $curl) ]
                                                                                            • #Cleanup
                                                                                            • Set Variable [ $result; Value:MBS("CURL.Cleanup"; $curl) ]
                                                                                            Fields used in this script
                                                                                            Scripts used in this script
                                                                                              Layouts used in this script
                                                                                                Tables used in this script
                                                                                                Table occurrences used by this script
                                                                                                Custom Functions used by this script
                                                                                                  Custom menu set used by this script

                                                                                                    Previous Script: [Stop Server]Parent Folder: [Database Server]Next Script: [Get Server Security Configuration]
                                                                                                    Script NameGet Server General Configuration
                                                                                                    Run script with full access privilegesOff
                                                                                                    Include In MenuYes
                                                                                                    Layouts that use this script
                                                                                                    Scripts that use this script
                                                                                                      Script Definition
                                                                                                      Script Steps
                                                                                                      • #Start new session
                                                                                                      • Set Variable [ $curl; Value:MBS("CURL.New") ]
                                                                                                      • #Set URL to load (HTTP, HTTPS, FTP, FTPS, SFTP, etc.)
                                                                                                      • Set Variable [ $result; Value:MBS("CURL.SetOptionURL"; $curl; "https://" & CURL Test::Server & "/fmi/admin/api/v1/server/config/general") ]
                                                                                                      • Set Variable [ $result; Value:MBS("CURL.SetOptionHTTPHeader"; $curl; "Expect: "; "Authorization: Bearer " & CURL Test::Session) ]
                                                                                                      • #RUN now
                                                                                                      • Set Field [ CURL Test::Result; MBS("CURL.Perform"; $curl) ]
                                                                                                      • #Check result
                                                                                                      • Set Field [ CURL Test::Text; MBS("CURL.GetResultAsText"; $curl; "UTF8") ]
                                                                                                      • Set Field [ CURL Test::debug; MBS("CURL.GetDebugAsText"; $curl) ]
                                                                                                      • #Cleanup
                                                                                                      • Set Variable [ $result; Value:MBS("CURL.Cleanup"; $curl) ]
                                                                                                      Fields used in this script
                                                                                                      Scripts used in this script
                                                                                                        Layouts used in this script
                                                                                                          Tables used in this script
                                                                                                          Table occurrences used by this script
                                                                                                          Custom Functions used by this script
                                                                                                            Custom menu set used by this script

                                                                                                              Previous Script: [Get Server General Configuration]Parent Folder: [Database Server]
                                                                                                              Script NameGet Server Security Configuration
                                                                                                              Run script with full access privilegesOff
                                                                                                              Include In MenuYes
                                                                                                              Layouts that use this script
                                                                                                              Scripts that use this script
                                                                                                                Script Definition
                                                                                                                Script Steps
                                                                                                                • #Start new session
                                                                                                                • Set Variable [ $curl; Value:MBS("CURL.New") ]
                                                                                                                • #Set URL to load (HTTP, HTTPS, FTP, FTPS, SFTP, etc.)
                                                                                                                • Set Variable [ $result; Value:MBS("CURL.SetOptionURL"; $curl; "https://" & CURL Test::Server & "/fmi/admin/api/v1/server/config/security") ]
                                                                                                                • Set Variable [ $result; Value:MBS("CURL.SetOptionHTTPHeader"; $curl; "Expect: "; "Authorization: Bearer " & CURL Test::Session) ]
                                                                                                                • #RUN now
                                                                                                                • Set Field [ CURL Test::Result; MBS("CURL.Perform"; $curl) ]
                                                                                                                • #Check result
                                                                                                                • Set Field [ CURL Test::Text; MBS("CURL.GetResultAsText"; $curl; "UTF8") ]
                                                                                                                • Set Field [ CURL Test::debug; MBS("CURL.GetDebugAsText"; $curl) ]
                                                                                                                • #Cleanup
                                                                                                                • Set Variable [ $result; Value:MBS("CURL.Cleanup"; $curl) ]
                                                                                                                Fields used in this script
                                                                                                                Scripts used in this script
                                                                                                                  Layouts used in this script
                                                                                                                    Tables used in this script
                                                                                                                    Table occurrences used by this script
                                                                                                                    Custom Functions used by this script
                                                                                                                      Custom menu set used by this script

                                                                                                                        Databases

                                                                                                                        Parent Folder: [Databases]
                                                                                                                        Script NameList Databases
                                                                                                                        Run script with full access privilegesOff
                                                                                                                        Include In MenuYes
                                                                                                                        Layouts that use this script
                                                                                                                        Scripts that use this script
                                                                                                                          Script Definition
                                                                                                                          Script Steps
                                                                                                                          • #Start new session
                                                                                                                          • Set Variable [ $curl; Value:MBS("CURL.New") ]
                                                                                                                          • #Set URL to load (HTTP, HTTPS, FTP, FTPS, SFTP, etc.)
                                                                                                                          • Set Variable [ $result; Value:MBS("CURL.SetOptionURL"; $curl; "https://" & CURL Test::Server & "/fmi/admin/api/v1/databases") ]
                                                                                                                          • Set Variable [ $result; Value:MBS("CURL.SetOptionHTTPHeader"; $curl; "Expect: "; "Authorization: Bearer " & CURL Test::Session) ]
                                                                                                                          • #RUN now
                                                                                                                          • Set Field [ CURL Test::Result; MBS("CURL.Perform"; $curl) ]
                                                                                                                          • #Check result
                                                                                                                          • Set Field [ CURL Test::Text; MBS("CURL.GetResultAsText"; $curl; "UTF8") ]
                                                                                                                          • Set Field [ CURL Test::debug; MBS("CURL.GetDebugAsText"; $curl) ]
                                                                                                                          • #Cleanup
                                                                                                                          • Set Variable [ $result; Value:MBS("CURL.Cleanup"; $curl) ]
                                                                                                                          Fields used in this script
                                                                                                                          Scripts used in this script
                                                                                                                            Layouts used in this script
                                                                                                                              Tables used in this script
                                                                                                                              Table occurrences used by this script
                                                                                                                              Custom Functions used by this script
                                                                                                                                Custom menu set used by this script

                                                                                                                                  Schedules

                                                                                                                                  Parent Folder: [Schedules]
                                                                                                                                  Script NameList Schedules
                                                                                                                                  Run script with full access privilegesOff
                                                                                                                                  Include In MenuYes
                                                                                                                                  Layouts that use this script
                                                                                                                                  Scripts that use this script
                                                                                                                                    Script Definition
                                                                                                                                    Script Steps
                                                                                                                                    • #Start new session
                                                                                                                                    • Set Variable [ $curl; Value:MBS("CURL.New") ]
                                                                                                                                    • #Set URL to load (HTTP, HTTPS, FTP, FTPS, SFTP, etc.)
                                                                                                                                    • Set Variable [ $result; Value:MBS("CURL.SetOptionURL"; $curl; "https://" & CURL Test::Server & "/fmi/admin/api/v1/schedules") ]
                                                                                                                                    • Set Variable [ $result; Value:MBS("CURL.SetOptionHTTPHeader"; $curl; "Expect: "; "Authorization: Bearer " & CURL Test::Session) ]
                                                                                                                                    • #RUN now
                                                                                                                                    • Set Field [ CURL Test::Result; MBS("CURL.Perform"; $curl) ]
                                                                                                                                    • #Check result
                                                                                                                                    • Set Field [ CURL Test::Text; MBS("CURL.GetResultAsText"; $curl; "UTF8") ]
                                                                                                                                    • Set Field [ CURL Test::debug; MBS("CURL.GetDebugAsText"; $curl) ]
                                                                                                                                    • #Cleanup
                                                                                                                                    • Set Variable [ $result; Value:MBS("CURL.Cleanup"; $curl) ]
                                                                                                                                    Fields used in this script
                                                                                                                                    Scripts used in this script
                                                                                                                                      Layouts used in this script
                                                                                                                                        Tables used in this script
                                                                                                                                        Table occurrences used by this script
                                                                                                                                        Custom Functions used by this script
                                                                                                                                          Custom menu set used by this script

                                                                                                                                            PHP

                                                                                                                                            Parent Folder: [PHP]Next Script: [Enable PHP]
                                                                                                                                            Script NameGet Server PHP Configuration
                                                                                                                                            Run script with full access privilegesOff
                                                                                                                                            Include In MenuYes
                                                                                                                                            Layouts that use this script
                                                                                                                                            Scripts that use this script
                                                                                                                                              Script Definition
                                                                                                                                              Script Steps
                                                                                                                                              • #Start new session
                                                                                                                                              • Set Variable [ $curl; Value:MBS("CURL.New") ]
                                                                                                                                              • #Set URL to load (HTTP, HTTPS, FTP, FTPS, SFTP, etc.)
                                                                                                                                              • Set Variable [ $result; Value:MBS("CURL.SetOptionURL"; $curl; "https://" & CURL Test::Server & "/fmi/admin/api/v1/php/config") ]
                                                                                                                                              • Set Variable [ $result; Value:MBS("CURL.SetOptionHTTPHeader"; $curl; "Expect: "; "Authorization: Bearer " & CURL Test::Session) ]
                                                                                                                                              • #RUN now
                                                                                                                                              • Set Field [ CURL Test::Result; MBS("CURL.Perform"; $curl) ]
                                                                                                                                              • #Check result
                                                                                                                                              • Set Field [ CURL Test::Text; MBS("CURL.GetResultAsText"; $curl; "UTF8") ]
                                                                                                                                              • Set Field [ CURL Test::debug; MBS("CURL.GetDebugAsText"; $curl) ]
                                                                                                                                              • #Cleanup
                                                                                                                                              • Set Variable [ $result; Value:MBS("CURL.Cleanup"; $curl) ]
                                                                                                                                              Fields used in this script
                                                                                                                                              Scripts used in this script
                                                                                                                                                Layouts used in this script
                                                                                                                                                  Tables used in this script
                                                                                                                                                  Table occurrences used by this script
                                                                                                                                                  Custom Functions used by this script
                                                                                                                                                    Custom menu set used by this script

                                                                                                                                                      Previous Script: [Get Server PHP Configuration]Parent Folder: [PHP]Next Script: [Disable PHP]
                                                                                                                                                      Script NameEnable PHP
                                                                                                                                                      Run script with full access privilegesOff
                                                                                                                                                      Include In MenuYes
                                                                                                                                                      Layouts that use this script
                                                                                                                                                        Scripts that use this script
                                                                                                                                                          Script Definition
                                                                                                                                                          Script Steps
                                                                                                                                                          • #Start new session
                                                                                                                                                          • Set Variable [ $curl; Value:MBS("CURL.New") ]
                                                                                                                                                          • #Set URL to load (HTTP, HTTPS, FTP, FTPS, SFTP, etc.)
                                                                                                                                                          • Set Variable [ $result; Value:MBS("CURL.SetOptionURL"; $curl; "https://" & CURL Test::Server & "/fmi/admin/api/v1/php/config") ]
                                                                                                                                                          • Set Variable [ $result; Value:MBS("CURL.SetOptionHTTPHeader"; $curl; "Expect: "; "Authorization: Bearer " & CURL Test::Session; "Content-Type: application/json") ]
                                                                                                                                                          • Set Variable [ $result; Value:MBS("CURL.SetInputText"; $curl; "{\"enabled\": true}"; "UTF-8") ]
                                                                                                                                                          • Set Variable [ $result; Value:MBS("CURL.SetOptionUpload"; $curl; 1) ]
                                                                                                                                                          • Set Variable [ $result; Value:MBS("CURL.SetOptionCustomRequest"; $curl; "PATCH") ]
                                                                                                                                                          • #RUN now
                                                                                                                                                          • Set Field [ CURL Test::Result; MBS("CURL.Perform"; $curl) ]
                                                                                                                                                          • #Check result
                                                                                                                                                          • Set Field [ CURL Test::Text; MBS("CURL.GetResultAsText"; $curl; "UTF8") ]
                                                                                                                                                          • Set Field [ CURL Test::debug; MBS("CURL.GetDebugAsText"; $curl) ]
                                                                                                                                                          • #Cleanup
                                                                                                                                                          • Set Variable [ $result; Value:MBS("CURL.Cleanup"; $curl) ]
                                                                                                                                                          Fields used in this script
                                                                                                                                                          Scripts used in this script
                                                                                                                                                            Layouts used in this script
                                                                                                                                                              Tables used in this script
                                                                                                                                                              Table occurrences used by this script
                                                                                                                                                              Custom Functions used by this script
                                                                                                                                                                Custom menu set used by this script

                                                                                                                                                                  Previous Script: [Enable PHP]Parent Folder: [PHP]
                                                                                                                                                                  Script NameDisable PHP
                                                                                                                                                                  Run script with full access privilegesOff
                                                                                                                                                                  Include In MenuYes
                                                                                                                                                                  Layouts that use this script
                                                                                                                                                                    Scripts that use this script
                                                                                                                                                                      Script Definition
                                                                                                                                                                      Script Steps
                                                                                                                                                                      • #Start new session
                                                                                                                                                                      • Set Variable [ $curl; Value:MBS("CURL.New") ]
                                                                                                                                                                      • #Set URL to load (HTTP, HTTPS, FTP, FTPS, SFTP, etc.)
                                                                                                                                                                      • Set Variable [ $result; Value:MBS("CURL.SetOptionURL"; $curl; "https://" & CURL Test::Server & "/fmi/admin/api/v1/php/config") ]
                                                                                                                                                                      • Set Variable [ $result; Value:MBS("CURL.SetOptionHTTPHeader"; $curl; "Expect: "; "Authorization: Bearer " & CURL Test::Session; "Content-Type: application/json") ]
                                                                                                                                                                      • Set Variable [ $result; Value:MBS("CURL.SetInputText"; $curl; "{\"enabled\": false}"; "UTF-8") ]
                                                                                                                                                                      • Set Variable [ $result; Value:MBS("CURL.SetOptionUpload"; $curl; 1) ]
                                                                                                                                                                      • Set Variable [ $result; Value:MBS("CURL.SetOptionCustomRequest"; $curl; "PATCH") ]
                                                                                                                                                                      • #RUN now
                                                                                                                                                                      • Set Field [ CURL Test::Result; MBS("CURL.Perform"; $curl) ]
                                                                                                                                                                      • #Check result
                                                                                                                                                                      • Set Field [ CURL Test::Text; MBS("CURL.GetResultAsText"; $curl; "UTF8") ]
                                                                                                                                                                      • Set Field [ CURL Test::debug; MBS("CURL.GetDebugAsText"; $curl) ]
                                                                                                                                                                      • #Cleanup
                                                                                                                                                                      • Set Variable [ $result; Value:MBS("CURL.Cleanup"; $curl) ]
                                                                                                                                                                      Fields used in this script
                                                                                                                                                                      Scripts used in this script
                                                                                                                                                                        Layouts used in this script
                                                                                                                                                                          Tables used in this script
                                                                                                                                                                          Table occurrences used by this script
                                                                                                                                                                          Custom Functions used by this script
                                                                                                                                                                            Custom menu set used by this script

                                                                                                                                                                              Clients

                                                                                                                                                                              Parent Folder: [Clients]Next Script: [Disconnect Client]
                                                                                                                                                                              Script NameSend Message to client
                                                                                                                                                                              Run script with full access privilegesOff
                                                                                                                                                                              Include In MenuYes
                                                                                                                                                                              Layouts that use this script
                                                                                                                                                                                Scripts that use this script
                                                                                                                                                                                  Script Definition
                                                                                                                                                                                  Script Steps
                                                                                                                                                                                  • #Get client ID from Database List
                                                                                                                                                                                  • Set Variable [ $clientID; Value:8 ]
                                                                                                                                                                                  • #Start new session
                                                                                                                                                                                  • Set Variable [ $curl; Value:MBS("CURL.New") ]
                                                                                                                                                                                  • #Set URL to load (HTTP, HTTPS, FTP, FTPS, SFTP, etc.)
                                                                                                                                                                                  • Set Variable [ $result; Value:MBS("CURL.SetOptionURL"; $curl; "https://" & CURL Test::Server & "/fmi/admin/api/v1/clients/" & $clientID & "/message") ]
                                                                                                                                                                                  • Set Variable [ $result; Value:MBS("CURL.SetOptionHTTPHeader"; $curl; "Expect: "; "Authorization: Bearer " & CURL Test::Session; "Content-Type: application/json") ]
                                                                                                                                                                                  • Set Variable [ $json; Value:MBS( "JSON.AddStringToObject"; "{}"; "message"; "Hello World" ) ]
                                                                                                                                                                                  • Set Variable [ $result; Value:MBS("CURL.SetOptionPostFields"; $curl; $json) ]
                                                                                                                                                                                  • #RUN now
                                                                                                                                                                                  • Set Field [ CURL Test::Result; MBS("CURL.Perform"; $curl) ]
                                                                                                                                                                                  • #Check result
                                                                                                                                                                                  • Set Field [ CURL Test::Text; MBS("CURL.GetResultAsText"; $curl; "UTF8") ]
                                                                                                                                                                                  • Set Field [ CURL Test::debug; MBS("CURL.GetDebugAsText"; $curl) ]
                                                                                                                                                                                  • #Cleanup
                                                                                                                                                                                  • Set Variable [ $result; Value:MBS("CURL.Cleanup"; $curl) ]
                                                                                                                                                                                  Fields used in this script
                                                                                                                                                                                  Scripts used in this script
                                                                                                                                                                                    Layouts used in this script
                                                                                                                                                                                      Tables used in this script
                                                                                                                                                                                      Table occurrences used by this script
                                                                                                                                                                                      Custom Functions used by this script
                                                                                                                                                                                        Custom menu set used by this script

                                                                                                                                                                                          Previous Script: [Send Message to client]Parent Folder: [Clients]
                                                                                                                                                                                          Script NameDisconnect Client
                                                                                                                                                                                          Run script with full access privilegesOff
                                                                                                                                                                                          Include In MenuYes
                                                                                                                                                                                          Layouts that use this script
                                                                                                                                                                                            Scripts that use this script
                                                                                                                                                                                              Script Definition
                                                                                                                                                                                              Script Steps
                                                                                                                                                                                              • #Get client ID from Database List
                                                                                                                                                                                              • Set Variable [ $clientID; Value:8 ]
                                                                                                                                                                                              • #Start new session
                                                                                                                                                                                              • Set Variable [ $curl; Value:MBS("CURL.New") ]
                                                                                                                                                                                              • #Set URL to load (HTTP, HTTPS, FTP, FTPS, SFTP, etc.)
                                                                                                                                                                                              • Set Variable [ $result; Value:MBS("CURL.SetOptionURL"; $curl; "https://" & CURL Test::Server & "/fmi/admin/api/v1/clients/" & $clientID & "/disconnect") ]
                                                                                                                                                                                              • Set Variable [ $result; Value:MBS("CURL.SetOptionHTTPHeader"; $curl; "Expect: "; "Authorization: Bearer " & CURL Test::Session; "Content-Type: application/json") ]
                                                                                                                                                                                              • Set Variable [ $json; Value:MBS( "JSON.AddStringToObject"; "{}"; "message"; "Goodbye" ) ]
                                                                                                                                                                                              • Set Variable [ $json; Value:MBS( "JSON.AddNumberToObject"; $json; "gracetime"; 10 ) ]
                                                                                                                                                                                              • Set Variable [ $result; Value:MBS("CURL.SetInputText"; $curl; $json; "UTF-8") ]
                                                                                                                                                                                              • Set Variable [ $result; Value:MBS("CURL.SetOptionPut"; $curl; 1) ]
                                                                                                                                                                                              • #RUN now
                                                                                                                                                                                              • Set Field [ CURL Test::Result; MBS("CURL.Perform"; $curl) ]
                                                                                                                                                                                              • #Check result
                                                                                                                                                                                              • Set Field [ CURL Test::Text; MBS("CURL.GetResultAsText"; $curl; "UTF8") ]
                                                                                                                                                                                              • Set Field [ CURL Test::debug; MBS("CURL.GetDebugAsText"; $curl) ]
                                                                                                                                                                                              • #Cleanup
                                                                                                                                                                                              • Set Variable [ $result; Value:MBS("CURL.Cleanup"; $curl) ]
                                                                                                                                                                                              Fields used in this script
                                                                                                                                                                                              Scripts used in this script
                                                                                                                                                                                                Layouts used in this script
                                                                                                                                                                                                  Tables used in this script
                                                                                                                                                                                                  Table occurrences used by this script
                                                                                                                                                                                                  Custom Functions used by this script
                                                                                                                                                                                                    Custom menu set used by this script

                                                                                                                                                                                                      Download example: CURL FMS Admin API

                                                                                                                                                                                                      Used functions:




                                                                                                                                                                                                      Links
                                                                                                                                                                                                      MBS Xojo Plugins