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
(Lianja) Bluzone Get Project DetailsGet a project by its id For more information, see https://bluzone.io/portal/static/docs/index.html#_getprojectbyprojectid
// This example assumes the Chilkat API to have been previously unlocked. // See Global Unlock Sample for sample code. loHttp = createobject("CkHttp") // 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") loSbResponseBody = createobject("CkStringBuilder") llSuccess = loHttp.QuickGetSb("https://bluzone.io/portal/papis/v1/projects/YOUR_PROJECT_ID_HERE/",loSbResponseBody) if (llSuccess = .F.) then ? loHttp.LastErrorText release loHttp release loSbResponseBody return endif loJResp = createobject("CkJsonObject") loJResp.LoadSb(loSbResponseBody) loJResp.EmitCompact = .F. ? "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 return 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") llEnableLocusMaps = loJResp.BoolOf("enableLocusMaps") lcMapProviderType = loJResp.StringOf("mapProviderType") llEnableAdvancedPackets = loJResp.BoolOf("enableAdvancedPackets") lcEnabledPacketTypes = loJResp.StringOf("enabledPacketTypes") llEnableDataUnload = loJResp.BoolOf("enableDataUnload") llEnableScanConsumer = loJResp.BoolOf("enableScanConsumer") llEnablePolicyConsumer = loJResp.BoolOf("enablePolicyConsumer") llEnableLocationConsumer = loJResp.BoolOf("enableLocationConsumer") llEnableEmail = 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") llEnableStreamProducer = loJResp.BoolOf("enableStreamProducer") llEnableMetricStorage = 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.