Chilkat HOME .NET Core C# Android™ AutoIt C C# C++ Chilkat2-Python CkPython Classic ASP DataFlex Delphi ActiveX Delphi DLL Go Java Lianja Mono C# Node.js Objective-C PHP ActiveX PHP Extension Perl PowerBuilder PowerShell PureBasic Ruby SQL Server Swift 2 Swift 3,4,5... Tcl Unicode C Unicode C++ VB.NET VBScript Visual Basic 6.0 Visual FoxPro Xojo Plugin
(Visual FoxPro) Bluzone Get Project DetailsGet a project by its id For more information, see https://bluzone.io/portal/static/docs/index.html#_getprojectbyprojectid
LOCAL loHttp LOCAL lnSuccess LOCAL loSbResponseBody LOCAL loJResp LOCAL lnRespStatusCode LOCAL lnProjectId LOCAL lcName LOCAL lcDescription LOCAL lcStatus LOCAL lcOwnerUsername LOCAL lcOwnerEmailAddress LOCAL lcDefaultUuidValue LOCAL lnEnableLocusMaps LOCAL lcMapProviderType LOCAL lnEnableAdvancedPackets LOCAL lcEnabledPacketTypes LOCAL lnEnableDataUnload LOCAL lnEnableScanConsumer LOCAL lnEnablePolicyConsumer LOCAL lnEnableLocationConsumer LOCAL lnEnableEmail LOCAL lcFirmwareUpdateStrategy LOCAL lnDeviceJobConcurrency LOCAL lcMapProviderApiKey LOCAL lcWakeupUuid LOCAL lcReportTimezone LOCAL lcLanguage LOCAL lcBlufiHostnameNaming LOCAL lnDateCreated LOCAL lnDateUpdated LOCAL lnEnableStreamProducer LOCAL lnEnableMetricStorage LOCAL i LOCAL lnCount_i * This example assumes the Chilkat API to have been previously unlocked. * See Global Unlock Sample for sample code. * For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.Http') loHttp = CreateObject('Chilkat.Http') * Implements the following CURL command: * curl -X GET \ * https://bluzone.io/portal/papis/v1/projects/YOUR_PROJECT_ID_HERE/ \ * -H 'bzid: YOUR_API_KEY_HERE' loHttp.SetRequestHeader("bzid","YOUR_API_KEY_HERE") * For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.StringBuilder') loSbResponseBody = CreateObject('Chilkat.StringBuilder') lnSuccess = loHttp.QuickGetSb("https://bluzone.io/portal/papis/v1/projects/YOUR_PROJECT_ID_HERE/",loSbResponseBody) IF (lnSuccess = 0) THEN ? loHttp.LastErrorText RELEASE loHttp RELEASE loSbResponseBody CANCEL ENDIF * For versions of Chilkat < 10.0.0, use CreateObject('Chilkat_9_5_0.JsonObject') loJResp = CreateObject('Chilkat.JsonObject') loJResp.LoadSb(loSbResponseBody) loJResp.EmitCompact = 0 ? "Response Body:" ? loJResp.Emit() lnRespStatusCode = loHttp.LastStatus ? "Response Status Code = " + STR(lnRespStatusCode) IF (lnRespStatusCode >= 400) THEN ? "Response Header:" ? loHttp.LastHeader ? "Failed." RELEASE loHttp RELEASE loSbResponseBody RELEASE loJResp CANCEL ENDIF * Sample JSON response: * { * "projectId": 36845, * "name": "My Project", * "description": "Default Project for admin@chilkatsoft.com, created on Thu Jun 06 17:18:11 GMT 2019.", * "status": null, * "owner": { * "username": "admin@chilkatsoft.com", * "emailAddress": null * }, * "defaultUuidValue": "1b4b243c-59aa-405f-90b5-0c434cac1345", * "enableLocusMaps": false, * "mapProviderType": "GOOGLE", * "enableAdvancedPackets": false, * "enabledPacketTypes": "sBv2", * "enableDataUnload": false, * "enableScanConsumer": false, * "enablePolicyConsumer": false, * "enableLocationConsumer": false, * "enableEmail": true, * "firmwareUpdateStrategy": "MANUAL", * "deviceJobConcurrency": -1, * "mapProviderApiKey": null, * "wakeupUuid": null, * "reportEmailList": [ * ], * "reportTimezone": "Etc/GMT", * "language": "en", * "blufiHostnameNaming": "DEFAULT", * "dateCreated": 1559841491000, * "dateUpdated": 1559841491000, * "enableStreamProducer": true, * "enableMetricStorage": true * } * Sample code for parsing the JSON response... * Use the following online tool to generate parsing code from sample JSON: * Generate Parsing Code from JSON lnProjectId = loJResp.IntOf("projectId") lcName = loJResp.StringOf("name") lcDescription = loJResp.StringOf("description") lcStatus = loJResp.StringOf("status") lcOwnerUsername = loJResp.StringOf("owner.username") lcOwnerEmailAddress = loJResp.StringOf("owner.emailAddress") lcDefaultUuidValue = loJResp.StringOf("defaultUuidValue") lnEnableLocusMaps = loJResp.BoolOf("enableLocusMaps") lcMapProviderType = loJResp.StringOf("mapProviderType") lnEnableAdvancedPackets = loJResp.BoolOf("enableAdvancedPackets") lcEnabledPacketTypes = loJResp.StringOf("enabledPacketTypes") lnEnableDataUnload = loJResp.BoolOf("enableDataUnload") lnEnableScanConsumer = loJResp.BoolOf("enableScanConsumer") lnEnablePolicyConsumer = loJResp.BoolOf("enablePolicyConsumer") lnEnableLocationConsumer = loJResp.BoolOf("enableLocationConsumer") lnEnableEmail = loJResp.BoolOf("enableEmail") lcFirmwareUpdateStrategy = loJResp.StringOf("firmwareUpdateStrategy") lnDeviceJobConcurrency = loJResp.IntOf("deviceJobConcurrency") lcMapProviderApiKey = loJResp.StringOf("mapProviderApiKey") lcWakeupUuid = loJResp.StringOf("wakeupUuid") lcReportTimezone = loJResp.StringOf("reportTimezone") lcLanguage = loJResp.StringOf("language") lcBlufiHostnameNaming = loJResp.StringOf("blufiHostnameNaming") lnDateCreated = loJResp.IntOf("dateCreated") lnDateUpdated = loJResp.IntOf("dateUpdated") lnEnableStreamProducer = loJResp.BoolOf("enableStreamProducer") lnEnableMetricStorage = loJResp.BoolOf("enableMetricStorage") i = 0 lnCount_i = loJResp.SizeOfArray("reportEmailList") DO WHILE i < lnCount_i loJResp.I = i i = i + 1 ENDDO RELEASE loHttp RELEASE loSbResponseBody RELEASE loJResp |
© 2000-2024 Chilkat Software, Inc. All Rights Reserved.