Chilkat Examples

ChilkatHOME.NET Core C#Android™AutoItCC#C++Chilkat2-PythonCkPythonClassic ASPDataFlexDelphi ActiveXDelphi DLLGoJavaLianjaMono C#Node.jsObjective-CPHP ActiveXPHP ExtensionPerlPowerBuilderPowerShellPureBasicRubySQL ServerSwift 2Swift 3,4,5...TclUnicode CUnicode C++VB.NETVBScriptVisual Basic 6.0Visual FoxProXojo Plugin

PowerBuilder Web API Examples

Primary Categories

ABN AMRO
AWS Secrets Manager
AWS Security Token Service
AWS Translate
Activix CRM
Adyen
Alibaba Cloud OSS
Amazon Cognito
Amazon DynamoDB
Amazon MWS
Amazon Pay
Amazon Rekognition
Amazon SP-API
Amazon Voice ID
Aruba Fatturazione
Azure Maps
Azure Monitor
Azure OAuth2
Azure Storage Accounts
Backblaze S3
Banco Inter
Belgian eHealth Platform
Bitfinex v2 REST
Bluzone
BrickLink
Bunny CDN
CallRail
CardConnect
Cerved
ClickBank
Clickatell
Cloudfare
Constant Contact
DocuSign
Duo Auth MFA
ETrade
Ecwid
Egypt ITIDA
Egypt eReceipt
Etsy
Facebook
Faire
Frame.io
GeoOp
GetHarvest
Global Payments
Google People
Google Search Console
Google Translate
Google Vision
Hungary NAV Invoicing
IBM Text to Speech
Ibanity
IntakeQ
JCC Cyprus
Jira
Lightspeed
MYOB
Magento
Mailgun
Malaysia MyInvois

Mastercard
MedTunnel
MercadoLibre
MessageMedia
Microsoft Calendar
Microsoft Group
Microsoft Tasks and Plans
Microsoft Teams
Moody's
Okta OAuth/OIDC
OneLogin OIDC
OneNote
OpenAI ChatGPT
PRODA
PayPal
Paynow.pl
Peoplevox
Populi
QuickBooks
Rabobank
Refinitiv
Royal Mail OBA
SCiS Schools Catalogue
SII Chile
SMSAPI
SOAP finkok.com
Salesforce
SendGrid
Shippo
Shopify
Shopware
Shopware 6
SimpleTexting
Square
Stripe
SugarCRM
TicketBAI
TikTok Shop
Trello
Twilio
Twitter API v2
Twitter v1
UPS
UniPin
VoiceBase
Vonage
WaTrend
Walmart v3
Wasabi
WhatsApp
WiX
WooCommerce
WordPress
Xero
Yahoo Mail
Yapily
Yousign
ZATCA
Zendesk
Zoom
_Miscellaneous_
eBay
effectconnect
hacienda.go.cr

 

 

 

(PowerBuilder) Azure List Storage Accounts

Demonstrates how to list Azure storage accounts.

Chilkat ActiveX Downloads

ActiveX for 32-bit and 64-bit Windows

integer li_rc
oleobject loo_Http
oleobject loo_JsonToken
integer li_Success
string ls_Url
string ls_JsonResp
oleobject loo_Json
integer i
integer li_Count_i
string ls_SkuName
string ls_SkuTier
string ls_Kind
string ls_Id
string ls_Name
string ls_V_type
string ls_Location
string ls_PropertiesNetworkAclsBypass
string ls_PropertiesNetworkAclsDefaultAction
integer li_PropertiesSupportsHttpsTrafficOnly
integer li_PropertiesEncryptionServicesFileEnabled
string ls_PropertiesEncryptionServicesFileLastEnabledTime
integer li_PropertiesEncryptionServicesBlobEnabled
string ls_PropertiesEncryptionServicesBlobLastEnabledTime
string ls_PropertiesEncryptionKeySource
string ls_PropertiesProvisioningState
string ls_PropertiesCreationTime
string ls_PropertiesPrimaryEndpointsBlob
string ls_PropertiesPrimaryEndpointsQueue
string ls_PropertiesPrimaryEndpointsTable
string ls_PropertiesPrimaryEndpointsFile
string ls_PropertiesPrimaryLocation
string ls_PropertiesStatusOfPrimary

// This example requires the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.

loo_Http = create oleobject
// Use "Chilkat_9_5_0.Http" for versions of Chilkat < 10.0.0
li_rc = loo_Http.ConnectToNewObject("Chilkat.Http")
if li_rc < 0 then
    destroy loo_Http
    MessageBox("Error","Connecting to COM object failed")
    return
end if

// Load an OAuth2 access token previously fetched by this example:  Get Azure OAuth2 Access Token
loo_JsonToken = create oleobject
// Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
li_rc = loo_JsonToken.ConnectToNewObject("Chilkat.JsonObject")

li_Success = loo_JsonToken.LoadFile("qa_data/tokens/azureToken.json")
// Assuming success..
loo_Http.AuthToken = loo_JsonToken.StringOf("access_token")
Write-Debug "AuthToken: " + loo_Http.AuthToken

loo_Http.Accept = "application/json"

ls_Url = "https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Storage/storageAccounts?api-version=2018-11-01"

ls_JsonResp = loo_Http.QuickGetStr(ls_Url)
if loo_Http.LastMethodSuccess <> 1 then
    Write-Debug loo_Http.LastErrorText
    destroy loo_Http
    destroy loo_JsonToken
    return
end if

Write-Debug "Response Status Code: " + string(loo_Http.LastStatus)

loo_Json = create oleobject
// Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
li_rc = loo_Json.ConnectToNewObject("Chilkat.JsonObject")

loo_Json.Load(ls_JsonResp)
loo_Json.EmitCompact = 0
Write-Debug loo_Json.Emit()

if loo_Http.LastStatus <> 200 then
    Write-Debug "Failed."
    destroy loo_Http
    destroy loo_JsonToken
    destroy loo_Json
    return
end if

// Sample output...
// (See the parsing code below..)
// 
// Use this online tool to generate parsing code from sample JSON: 
// Generate Parsing Code from JSON

// {
//   "value": [
//     {
//       "sku": {
//         "name": "Standard_LRS",
//         "tier": "Standard"
//       },
//       "kind": "Storage",
//       "id": "/subscriptions/6c42643b-ebef-45e0-b917-b3583b84a57f/resourceGroups/gchilkat/providers/Microsoft.Storage/storageAccounts/chilkat",
//       "name": "chilkat",
//       "type": "Microsoft.Storage/storageAccounts",
//       "location": "eastus",
//       "tags": {},
//       "properties": {
//         "networkAcls": {
//           "bypass": "AzureServices",
//           "virtualNetworkRules": [
//           ],
//           "ipRules": [
//           ],
//           "defaultAction": "Allow"
//         },
//         "supportsHttpsTrafficOnly": true,
//         "encryption": {
//           "services": {
//             "file": {
//               "enabled": true,
//               "lastEnabledTime": "2017-12-28T11:02:10.6840887Z"
//             },
//             "blob": {
//               "enabled": true,
//               "lastEnabledTime": "2017-12-28T11:02:10.6840887Z"
//             }
//           },
//           "keySource": "Microsoft.Storage"
//         },
//         "provisioningState": "Succeeded",
//         "creationTime": "2016-04-18T22:57:36.5377065Z",
//         "primaryEndpoints": {
//           "blob": "https://chilkat.blob.core.windows.net/",
//           "queue": "https://chilkat.queue.core.windows.net/",
//           "table": "https://chilkat.table.core.windows.net/",
//           "file": "https://chilkat.file.core.windows.net/"
//         },
//         "primaryLocation": "eastus",
//         "statusOfPrimary": "available"
//       }
//     }
//   ]
// }
// 

i = 0
li_Count_i = loo_Json.SizeOfArray("value")
do while i < li_Count_i
    loo_Json.I = i
    ls_SkuName = loo_Json.StringOf("value[i].sku.name")
    ls_SkuTier = loo_Json.StringOf("value[i].sku.tier")
    ls_Kind = loo_Json.StringOf("value[i].kind")
    ls_Id = loo_Json.StringOf("value[i].id")
    ls_Name = loo_Json.StringOf("value[i].name")
    ls_V_type = loo_Json.StringOf("value[i].type")
    ls_Location = loo_Json.StringOf("value[i].location")
    ls_PropertiesNetworkAclsBypass = loo_Json.StringOf("value[i].properties.networkAcls.bypass")
    ls_PropertiesNetworkAclsDefaultAction = loo_Json.StringOf("value[i].properties.networkAcls.defaultAction")
    li_PropertiesSupportsHttpsTrafficOnly = loo_Json.BoolOf("value[i].properties.supportsHttpsTrafficOnly")
    li_PropertiesEncryptionServicesFileEnabled = loo_Json.BoolOf("value[i].properties.encryption.services.file.enabled")
    ls_PropertiesEncryptionServicesFileLastEnabledTime = loo_Json.StringOf("value[i].properties.encryption.services.file.lastEnabledTime")
    li_PropertiesEncryptionServicesBlobEnabled = loo_Json.BoolOf("value[i].properties.encryption.services.blob.enabled")
    ls_PropertiesEncryptionServicesBlobLastEnabledTime = loo_Json.StringOf("value[i].properties.encryption.services.blob.lastEnabledTime")
    ls_PropertiesEncryptionKeySource = loo_Json.StringOf("value[i].properties.encryption.keySource")
    ls_PropertiesProvisioningState = loo_Json.StringOf("value[i].properties.provisioningState")
    ls_PropertiesCreationTime = loo_Json.StringOf("value[i].properties.creationTime")
    ls_PropertiesPrimaryEndpointsBlob = loo_Json.StringOf("value[i].properties.primaryEndpoints.blob")
    ls_PropertiesPrimaryEndpointsQueue = loo_Json.StringOf("value[i].properties.primaryEndpoints.queue")
    ls_PropertiesPrimaryEndpointsTable = loo_Json.StringOf("value[i].properties.primaryEndpoints.table")
    ls_PropertiesPrimaryEndpointsFile = loo_Json.StringOf("value[i].properties.primaryEndpoints.file")
    ls_PropertiesPrimaryLocation = loo_Json.StringOf("value[i].properties.primaryLocation")
    ls_PropertiesStatusOfPrimary = loo_Json.StringOf("value[i].properties.statusOfPrimary")
    i = i + 1
loop


destroy loo_Http
destroy loo_JsonToken
destroy loo_Json

 

© 2000-2024 Chilkat Software, Inc. All Rights Reserved.