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

SQL Server 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

 

 

 

(SQL Server) Bluzone Get Project Details

Get a project by its id

For more information, see https://bluzone.io/portal/static/docs/index.html#_getprojectbyprojectid

Chilkat ActiveX Downloads

ActiveX for 32-bit and 64-bit Windows

-- Important: See this note about string length limitations for strings returned by sp_OAMethod calls.
--
CREATE PROCEDURE ChilkatSample
AS
BEGIN
    DECLARE @hr int
    -- Important: Do not use nvarchar(max).  See the warning about using nvarchar(max).
    DECLARE @sTmp0 nvarchar(4000)
    -- This example assumes the Chilkat API to have been previously unlocked.
    -- See Global Unlock Sample for sample code.

    DECLARE @http int
    -- Use "Chilkat_9_5_0.Http" for versions of Chilkat < 10.0.0
    EXEC @hr = sp_OACreate 'Chilkat.Http', @http OUT
    IF @hr <> 0
    BEGIN
        PRINT 'Failed to create ActiveX component'
        RETURN
    END

    DECLARE @success int

    -- 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'

    EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'bzid', 'YOUR_API_KEY_HERE'

    DECLARE @sbResponseBody int
    -- Use "Chilkat_9_5_0.StringBuilder" for versions of Chilkat < 10.0.0
    EXEC @hr = sp_OACreate 'Chilkat.StringBuilder', @sbResponseBody OUT

    EXEC sp_OAMethod @http, 'QuickGetSb', @success OUT, 'https://bluzone.io/portal/papis/v1/projects/YOUR_PROJECT_ID_HERE/', @sbResponseBody
    IF @success = 0
      BEGIN
        EXEC sp_OAGetProperty @http, 'LastErrorText', @sTmp0 OUT
        PRINT @sTmp0
        EXEC @hr = sp_OADestroy @http
        EXEC @hr = sp_OADestroy @sbResponseBody
        RETURN
      END

    DECLARE @jResp int
    -- Use "Chilkat_9_5_0.JsonObject" for versions of Chilkat < 10.0.0
    EXEC @hr = sp_OACreate 'Chilkat.JsonObject', @jResp OUT

    EXEC sp_OAMethod @jResp, 'LoadSb', @success OUT, @sbResponseBody
    EXEC sp_OASetProperty @jResp, 'EmitCompact', 0


    PRINT 'Response Body:'
    EXEC sp_OAMethod @jResp, 'Emit', @sTmp0 OUT
    PRINT @sTmp0

    DECLARE @respStatusCode int
    EXEC sp_OAGetProperty @http, 'LastStatus', @respStatusCode OUT

    PRINT 'Response Status Code = ' + @respStatusCode
    IF @respStatusCode >= 400
      BEGIN

        PRINT 'Response Header:'
        EXEC sp_OAGetProperty @http, 'LastHeader', @sTmp0 OUT
        PRINT @sTmp0

        PRINT 'Failed.'
        EXEC @hr = sp_OADestroy @http
        EXEC @hr = sp_OADestroy @sbResponseBody
        EXEC @hr = sp_OADestroy @jResp
        RETURN
      END

    -- 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

    DECLARE @projectId int

    DECLARE @name nvarchar(4000)

    DECLARE @description nvarchar(4000)

    DECLARE @status nvarchar(4000)

    DECLARE @ownerUsername nvarchar(4000)

    DECLARE @ownerEmailAddress nvarchar(4000)

    DECLARE @defaultUuidValue nvarchar(4000)

    DECLARE @enableLocusMaps int

    DECLARE @mapProviderType nvarchar(4000)

    DECLARE @enableAdvancedPackets int

    DECLARE @enabledPacketTypes nvarchar(4000)

    DECLARE @enableDataUnload int

    DECLARE @enableScanConsumer int

    DECLARE @enablePolicyConsumer int

    DECLARE @enableLocationConsumer int

    DECLARE @enableEmail int

    DECLARE @firmwareUpdateStrategy nvarchar(4000)

    DECLARE @deviceJobConcurrency int

    DECLARE @mapProviderApiKey nvarchar(4000)

    DECLARE @wakeupUuid nvarchar(4000)

    DECLARE @reportTimezone nvarchar(4000)

    DECLARE @language nvarchar(4000)

    DECLARE @blufiHostnameNaming nvarchar(4000)

    DECLARE @dateCreated int

    DECLARE @dateUpdated int

    DECLARE @enableStreamProducer int

    DECLARE @enableMetricStorage int

    DECLARE @i int

    DECLARE @count_i int

    EXEC sp_OAMethod @jResp, 'IntOf', @projectId OUT, 'projectId'
    EXEC sp_OAMethod @jResp, 'StringOf', @name OUT, 'name'
    EXEC sp_OAMethod @jResp, 'StringOf', @description OUT, 'description'
    EXEC sp_OAMethod @jResp, 'StringOf', @status OUT, 'status'
    EXEC sp_OAMethod @jResp, 'StringOf', @ownerUsername OUT, 'owner.username'
    EXEC sp_OAMethod @jResp, 'StringOf', @ownerEmailAddress OUT, 'owner.emailAddress'
    EXEC sp_OAMethod @jResp, 'StringOf', @defaultUuidValue OUT, 'defaultUuidValue'
    EXEC sp_OAMethod @jResp, 'BoolOf', @enableLocusMaps OUT, 'enableLocusMaps'
    EXEC sp_OAMethod @jResp, 'StringOf', @mapProviderType OUT, 'mapProviderType'
    EXEC sp_OAMethod @jResp, 'BoolOf', @enableAdvancedPackets OUT, 'enableAdvancedPackets'
    EXEC sp_OAMethod @jResp, 'StringOf', @enabledPacketTypes OUT, 'enabledPacketTypes'
    EXEC sp_OAMethod @jResp, 'BoolOf', @enableDataUnload OUT, 'enableDataUnload'
    EXEC sp_OAMethod @jResp, 'BoolOf', @enableScanConsumer OUT, 'enableScanConsumer'
    EXEC sp_OAMethod @jResp, 'BoolOf', @enablePolicyConsumer OUT, 'enablePolicyConsumer'
    EXEC sp_OAMethod @jResp, 'BoolOf', @enableLocationConsumer OUT, 'enableLocationConsumer'
    EXEC sp_OAMethod @jResp, 'BoolOf', @enableEmail OUT, 'enableEmail'
    EXEC sp_OAMethod @jResp, 'StringOf', @firmwareUpdateStrategy OUT, 'firmwareUpdateStrategy'
    EXEC sp_OAMethod @jResp, 'IntOf', @deviceJobConcurrency OUT, 'deviceJobConcurrency'
    EXEC sp_OAMethod @jResp, 'StringOf', @mapProviderApiKey OUT, 'mapProviderApiKey'
    EXEC sp_OAMethod @jResp, 'StringOf', @wakeupUuid OUT, 'wakeupUuid'
    EXEC sp_OAMethod @jResp, 'StringOf', @reportTimezone OUT, 'reportTimezone'
    EXEC sp_OAMethod @jResp, 'StringOf', @language OUT, 'language'
    EXEC sp_OAMethod @jResp, 'StringOf', @blufiHostnameNaming OUT, 'blufiHostnameNaming'
    EXEC sp_OAMethod @jResp, 'IntOf', @dateCreated OUT, 'dateCreated'
    EXEC sp_OAMethod @jResp, 'IntOf', @dateUpdated OUT, 'dateUpdated'
    EXEC sp_OAMethod @jResp, 'BoolOf', @enableStreamProducer OUT, 'enableStreamProducer'
    EXEC sp_OAMethod @jResp, 'BoolOf', @enableMetricStorage OUT, 'enableMetricStorage'
    SELECT @i = 0
    EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'reportEmailList'
    WHILE @i < @count_i
      BEGIN
        EXEC sp_OASetProperty @jResp, 'I', @i
        SELECT @i = @i + 1
      END

    EXEC @hr = sp_OADestroy @http
    EXEC @hr = sp_OADestroy @sbResponseBody
    EXEC @hr = sp_OADestroy @jResp


END
GO

 

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