• Tools
Tools
  • Tools
loading...
No Results
  • ActiveCampaign
  • AirDroid Business
    • Index
    • Batch Resolve Device and Group IDs by Name
    • Batch Resolve Device IDs by Name
    • Batch Resolve Group IDs by Name
    • Batch Get Devices by Device or Group IDs
    • Clear app data and cache
    • Create a group
    • Delete groups
    • Delete Provisioning Templates
    • Disable lost mode
    • Error codes
    • Enable lost mode
    • Field reference
    • Get average screen time
    • Get account activities
    • Get a Configuration
    • Get a device by name
    • Get a device app by name
    • Get a group
    • Get a group id by group name
    • Get a Provisioning Template
    • Get an activity log
    • Get all devices
    • Get all device apps
    • Get all devices with filter
    • Get Config File Deployment Status
    • Get device info push
    • Get device location report
    • Get device network connection history
    • Get device application usage duration
    • Get device application report
    • Get device online status report
    • Get device remote access report
    • Get data usage overview and trends
    • Get tag ids by tag names
    • Get top 10 apps by usage duration
    • Get top 10 data usage apps
    • Generate Device Owner Enrollment QR for Template
    • List Groups
    • List Policy and Kiosk Configurations
    • List Provisioning Templates
    • Lock a device
    • Move devices to a group
    • Open app to foreground
    • Power off a device
    • Reboot device
    • Remote operation
    • Search Groups
    • Set tags
    • Turn off device screen
    • Unenroll a device
    • Update a device name
    • Update a device remark
    • Update a group name
    • Update a group remark
  • Adalo
  • Appstore
  • Asana
  • AWS Lambda
  • AWS-S3
  • BambooHR
  • Bitbucket
  • Brevo
  • Clockify
  • Coda
  • ConvertKit
  • DingTalk
  • Discord
  • Discourse
  • Dropbox
  • Elasticsearch
  • Elastic Security
  • FeiShu
  • Firecrawl
  • Freshdesk
  • Freshservice
  • Freshworks CRM
  • Gerrit
  • Github
  • Gitlab
  • Google Ads
  • Google Analytics
  • Google Calendar
  • Google Developer
  • Google Docs
  • Google Drive
  • Google Gmail
  • Google Sheets
  • Grafana
  • Hacker News
  • HaloPSA
  • Harvest
  • Help Scout
  • Hubspot
  • Intercom
  • Jenkins
  • Jira
  • Kafka
  • Lemlist
  • Linear
  • Magento
  • MailChimp
  • Mautic
  • Metabase
  • Microsoft Excel
  • Microsoft OneDrive
  • Microsoft Outlook
  • Microsoft Sharepoint
  • Microsoft Teams
  • Microsoft To Do
  • monday.com
  • MySQL
  • Nextcloud
  • Notion
  • Odoo
  • Okta
  • OpenAI
  • Ortto
  • Paddle
  • PayPal
  • Pipedrive
  • PostgreSQL
  • PostHog
  • Qdrant
  • QuickBooks
  • Redis
  • Segment
  • SendGrid
  • ServiceNow
  • Shopify
  • Slack
  • Splunk
  • Spotify
  • Strapi
  • Stripe
  • System Tools
    • Code
    • CSV
    • Crypto
    • Data Shaping
    • Date & Time
    • Delay
    • Documents
    • QRCode
    • Search&Crawl
    • Text
    • Xml
  • Teambition
  • Telegram
  • Todoist
  • Trello
  • Twilio
  • Webflow
  • Wekan
  • Wikipedia
  • WooCommerce
  • WordPress
  • X
  • YouTube
  • Zammad
  • Zendesk
  • Zoho CRM
  • Zoom
  • Zulip
Home > Tools > AirDroid Business

Get a Provisioning Template

Tool Name: airdroid_business_provisioning_template_get

Risk Level: 🟢 Low Risk

Execution Mode: ⚡ Synchronous

Category: Provisioning Templates

Quick Start (Copy & Use)

Summary: Retrieve the full configuration of a single provisioning template (enrollment template) by ProvisioningId, including language/timezone presets, group/policy/WiFi associations, pre-installed apps, deployment code, and QR configuration code.

Prerequisites: ProvisioningId (positive integer ≥ 1) — obtain via List Provisioning Templates. A valid OAuth2 AccessToken configured in the GI node Credential.

Success Criteria: StatusCode == 200 and ErrorMessage == ""; the Provisioning object is non-empty.

What to Do Next: Use Provisioning.configuration_code / packapk_progress to decide whether Generate Device Owner Enrollment QR for Template can run; use deploy_code for Windows enrollment.

Minimal Request Example (recommended to copy directly):

{
  "ProvisioningId": 100
}

Minimal Response Example:

{
  "Provisioning": {
    "provisioning_id": 100,
    "owner_id": 10001,
    "account_id": 20001,
    "is_default": "No",
    "name": "Standard Template",
    "description": "Standard provisioning template for field devices",
    "default_language": "en",
    "default_timezone": "America/New_York",
    "release_type": "Group",
    "install_by_wifi": "Yes",
    "enable_system_apps": "No",
    "platform_type": "Android",
    "packapk_progress": "Package ready",
    "group_id": 123,
    "policy_id": 0,
    "wifi_id": 0,
    "group": {
      "id": 123,
      "name": "Field Devices",
      "owner_id": 10001,
      "create_date": "2024-01-01 00:00:00",
      "update_date": "2024-06-15 10:30:00",
      "is_default": "No",
      "deploy_code": "ABC123XYZ",
      "pid": 0,
      "remark": "Field devices group"
    },
    "deploy_code": "DEPLOY001",
    "install_apps": [],
    "configuration_code": "CONFIG001",
    "create_time": "2024-06-15 10:30:00",
    "update_time": "2024-12-01 14:20:00"
  },
  "Hint": "",
  "Retryable": false,
  "OriginalStatusCode": 200,
  "StatusCode": 200,
  "ErrorMessage": ""
}

> ⚠️ Value format: is_default, install_by_wifi, and enable_system_apps return "Yes" or "No" strings (not booleans). release_type returns Group or Policy, and platform_type returns values such as Android or Windows.

Recipes (Common Recipes)

Recipe 1: Inspect a Template's Full Settings

When to use: You have a ProvisioningId from List Provisioning Templates and need the full configuration (language, timezone, WiFi, group/policy association, pre-installed apps).

{
  "ProvisioningId": 17563
}

Recipe 2: Check QR Readiness Before Generating an Enrollment QR

When to use: Before calling Generate Device Owner Enrollment QR for Template, verify that configuration_code is available. Inspect platform_type, packapk_progress, and configuration_code in the response — the QR can only be generated when configuration_code is non-empty (Android templates with packapk_progress = "Package ready").

{
  "ProvisioningId": 100
}

Recipe 3: Verify Template Settings Before Modifying or Deleting

When to use: Confirm the template's name, is_default, and associations before a destructive action such as Delete Provisioning Templates (default templates cannot be deleted).

{
  "ProvisioningId": 17562
}

1. Overview

1.1 Description

Get the full configuration of a single provisioning template by ProvisioningId. A provisioning template is an enrollment template used to pre-configure device settings (language, timezone, WiFi, group or policy association, pre-installed apps) during device enrollment.

1.2 When to Use

  • Inspect a template's full settings: language, timezone, WiFi, group/policy association, pre-installed apps
  • Verify current settings before modifying them
  • Confirm template existence and QR readiness before generating a Device Owner enrollment QR

Don't use when: you don't have the ProvisioningId — call List Provisioning Templates first to obtain it.

1.3 Execution Mode and Response

This operation is synchronous and returns results immediately:

  • Provisioning: Template detail object (empty object {} when no matching record is found or the record does not belong to the current enterprise)
  • StatusCode / ErrorMessage / Hint / Retryable / OriginalStatusCode: Call status and error information

1.4 Prerequisites

Condition Description How to Check
Valid credential A valid OAuth2 AccessToken is required Configure AirDroid Business OAuth2 credential in the GI node
Template ID known ProvisioningId must be a positive integer ≥ 1 Obtain via List Provisioning Templates
Group access (group-based templates) The account must have access to the associated group Failure: Provisioning: {}, non-empty ErrorMessage / Hint
Configuration File read permission (policy-based templates) Required for release_type = Policy templates Failure: Provisioning: {}, non-empty ErrorMessage / Hint

1.5 Prerequisite Tools

Dependency Tool Purpose Necessity
List Provisioning Templates Obtain a valid ProvisioningId 🔴 Required (if ID unknown)

1.6 Differences from Similar Tools

Tool Use Case Key Difference
Get a Provisioning Template Full detail of one template Requires exact ProvisioningId; returns associations (group/policy/wifi objects), install_apps, deploy_code, configuration_code
List Provisioning Templates Browse/search templates Paginated summary list; use it to find the ProvisioningId
Generate Device Owner Enrollment QR for Template Produce an enrollment QR image Renders the template's configuration_code as a scannable QR

2. Inputs

2.1 Parameter List

Parameter Type Required Default Description
ProvisioningId number Yes - Provisioning template ID. Positive integer ≥ 1

2.2 Parameter Details

`ProvisioningId`

Provisioning template unique identifier.

  • Type: number
  • Required: Yes
  • Format: Positive integer greater than 0 (minimum value 1). Any other value returns StatusCode = -1 with ErrorMessage = "Invalid provisioning_id, must be a positive integer greater than 0."
  • Source: The provisioning_id field of items returned by List Provisioning Templates
  • How to fill in GI node:
    • Constant: Enter the numeric ID directly, e.g. 17563
    • Upstream reference: Use ProvisioningList[0].provisioning_id from a List Provisioning Templates node output
  • Example:
17563

2.3 Parameter Combination Logic

ProvisioningId is the only business input; there are no combination rules.

3. Outputs

3.1 Response Example

Success response: see the Quick Start minimal response example above.

Error response (template not found):

{
  "Provisioning": {},
  "Hint": "Provisioning template was not found; obtain provisioning_id via 'List Provisioning Templates' and retry.",
  "Retryable": false,
  "OriginalStatusCode": 200,
  "StatusCode": 200,
  "ErrorMessage": "Provisioning template not found."
}

Error response (invalid parameter):

{
  "Provisioning": {},
  "Hint": "Obtain provisioning_id via 'List Provisioning Templates', then provide a valid provisioning_id and retry.",
  "Retryable": false,
  "OriginalStatusCode": 0,
  "StatusCode": -1,
  "ErrorMessage": "Invalid provisioning_id, must be a positive integer greater than 0."
}

3.2 Field Descriptions

Field Path Type Description
Provisioning object Template detail object; empty object {} when no matching record is found or it does not belong to the current enterprise
Provisioning.provisioning_id number Provisioning template ID
Provisioning.owner_id number Enterprise owner account ID
Provisioning.account_id number Account ID
Provisioning.is_default string "Yes" = default template, "No" = normal template (compare as string, not boolean)
Provisioning.name string Template name
Provisioning.description string Template description
Provisioning.default_language string Default language setting
Provisioning.default_timezone string Default timezone setting
Provisioning.release_type string Association mode: Group (linked to a device group) or Policy (linked to a configuration policy)
Provisioning.install_by_wifi string "Yes" = app installation limited to WiFi, "No" = not limited (not boolean)
Provisioning.enable_system_apps string "Yes" / "No" — whether system apps are enabled (not boolean)
Provisioning.platform_type string Platform type (e.g. Android, Windows)
Provisioning.packapk_progress string APK packaging status for enrollment provisioning (see 3.3). May be omitted on non-Android templates
Provisioning.group_id number Associated group ID
Provisioning.policy_id number Associated policy ID; empty value is normalized to 0
Provisioning.wifi_id number Associated WiFi configuration ID; empty value is normalized to 0
Provisioning.group object Associated group details when release_type = Group (fields: id, name, owner_id, create_date, update_date, is_default ("Yes"/"No"), deploy_code, pid = parent group ID, remark)
Provisioning.policy object Associated policy details when release_type = Policy
Provisioning.wifi object Associated WiFi configuration details when wifi_id != 0
Provisioning.deploy_code string Deployment code for device enrollment
Provisioning.install_apps object-array Apps to install; may be empty. Item keys commonly include release_id, store_id, account_id, pkg_id, app_name, icon, version, app_type, type, limit_status. app_type and type are already converted to readable strings; limit_status is a readable string such as Available or Unavailable
Provisioning.configuration_code string Configuration code for the enrollment/provision QR. Empty string when APK packaging is not ready (see packapk_progress); Windows detail may also return an empty string
Provisioning.create_time string Template creation datetime
Provisioning.update_time string Template last update datetime
Hint string Next-action guidance on error; empty on success
Retryable boolean true = transient error (same params may succeed on retry); false = persistent error
OriginalStatusCode number Upstream HTTP status code; 0 = no upstream response (e.g. timeout)
StatusCode number 200 = completed (check ErrorMessage), -1 = parameter error, 500 = system/network/HTTP error
ErrorMessage string Empty string on success; failure reason otherwise

3.3 Status Code / Enum Value Mapping

Field Value Meaning
packapk_progress "Not packaged yet" APK not packaged yet; configuration_code typically empty
packapk_progress "Repackaging required" Template changed; needs repackaging
packapk_progress "Packaging in progress" Packaging is running
packapk_progress "Package ready" Package ready; configuration_code typically available
packapk_progress "Package verification failed" Packaging failed verification
packapk_progress "Packaging timeout" Packaging timed out
release_type "Group" / "Policy" Template is associated to a device group / configuration policy
is_default, install_by_wifi, enable_system_apps "Yes" / "No" String flags, not booleans

4. Examples

4.1 Basic Example: Get a Template by ID

Request Parameters:

{
  "ProvisioningId": 100
}

Response: see the Quick Start minimal response example.

4.2 Advanced Example: Check QR Readiness

Request Parameters:

{
  "ProvisioningId": 100
}

Decision logic on the response:

  • platform_type == "Windows" → no enrollment QR; use deploy_code instead
  • platform_type == "Android" and packapk_progress != "Package ready" → wait and re-check; configuration_code will be empty
  • configuration_code non-empty → safe to call Generate Device Owner Enrollment QR for Template

4.3 Error Example: Invalid ProvisioningId

Request Parameters (error — zero is not allowed):

{
  "ProvisioningId": 0
}

Response:

{
  "Provisioning": {},
  "Hint": "Obtain provisioning_id via 'List Provisioning Templates', then provide a valid provisioning_id and retry.",
  "Retryable": false,
  "OriginalStatusCode": 0,
  "StatusCode": -1,
  "ErrorMessage": "Invalid provisioning_id, must be a positive integer greater than 0."
}

5. Error Handling

5.1 AB Three-Layer Error Codes

StatusCode Meaning Use Case Agent Response
-1 Parameter validation error Invalid ProvisioningId (not a positive integer) or empty/invalid access token ❌ Do not retry; fix parameters or Credential
200 Business success or business error HTTP request succeeded; check ErrorMessage Empty ErrorMessage = success; non-empty = business error (see Hint)
500 Network / HTTP / request exception Timeout, connection failure, rate limit (HTTP 429), or any non-200 upstream HTTP status Check Retryable: retry only when true

This Action's StatusCode semantics: upstream HTTP errors (including 4xx such as 401/403/404) are returned as StatusCode = 500 with ErrorMessage = "HTTP error: ..." and Retryable = false (only HTTP 500/502/503/504 set Retryable = true; HTTP 429 also maps to 500 with Retryable = true). Use OriginalStatusCode to see the real HTTP code — do not blind-retry on StatusCode = 500.

5.2 Common Errors

StatusCode ErrorMessage / Hint (typical) Cause Fix
-1 Invalid provisioning_id, must be a positive integer greater than 0. Bad ProvisioningId Obtain a valid ID via List Provisioning Templates
-1 access_token is invalid. Credential not configured or token empty Configure AirDroid Business OAuth2 Credential
200 Non-empty ErrorMessage; Provisioning is {}; Hint mentions template not found Template does not exist or id not visible to this account Obtain provisioning_id via List Provisioning Templates and retry
200 Non-empty ErrorMessage; Provisioning is {}; Hint mentions group access No access to the group associated with this template Use a provisioning_id visible to this account in List Provisioning Templates
200 Non-empty ErrorMessage; Provisioning is {}; Hint mentions Configuration File / permission Role lacks Configuration File read access (policy-based templates) Contact your administrator or use a group-based template
200 Non-empty ErrorMessage; Hint mentions re-authorize / access_token Token expired/invalid Refresh the OAuth2 access_token, then retry
500 Rate limited. Please retry after a few seconds. HTTP 429 or upstream rate limit Wait 10-30 seconds and retry once
500 Request timeout after 60 seconds. Request timeout Retry once; contact support if persistent

5.3 Agent Self-Healing Decision Table

Condition Handling Strategy
StatusCode == 200 and ErrorMessage == "" Success — read Provisioning
StatusCode == 200 and ErrorMessage != "" Business error — follow Hint; do not retry when Retryable == false
StatusCode == -1 Fix input parameters or Credential, then retry
StatusCode == 500 and Retryable == true Retry up to 2 times (5-second interval)
StatusCode == 500 and Retryable == false Check OriginalStatusCode; fix auth/parameters instead of retrying

6. Best Practices

6.1 Performance Optimization

  • Read operation; response size is bounded by the single template's configuration. No pagination is involved.
  • Cache the ProvisioningId from List Provisioning Templates rather than re-listing before every detail call.

6.2 Security Considerations

🟢 Read operation: No destructive side effects. Note that deploy_code and configuration_code are enrollment secrets — anyone with them can enroll devices into your organization, so avoid exposing them in logs or messages unnecessarily.

6.3 Idempotency

Idempotency: Naturally idempotent. Read-only; multiple calls with the same ProvisioningId return the same result (unless the template is modified in between).

7. Related Tools

7.1 Prerequisite Tools

Tool Name Purpose
List Provisioning Templates Obtain the ProvisioningId (field provisioning_id)

7.2 Follow-up Tools

Tool Name Purpose
Generate Device Owner Enrollment QR for Template Render the template's configuration_code as an enrollment QR (check packapk_progress first)
Delete Provisioning Templates Delete templates after verifying is_default and associations

7.3 Similar Tool Comparison

Tool Use Case Difference
Get a Provisioning Template Single template full detail Requires exact ID; returns associations and deployment codes
List Provisioning Templates Browse / search / sort templates Paginated summary; no group/policy/wifi detail objects, install_apps, or configuration_code

8. Tool Chains

8.1 Find a Template and Inspect Its Configuration

Scenario: You know part of the template name and need its full settings.

Tool Chain:

List Provisioning Templates → Get a Provisioning Template

Steps:

  1. Call List Provisioning Templates with Name = "Standard" to find matching templates
  2. Take ProvisioningList[0].provisioning_id
  3. Call Get a Provisioning Template with that ID and inspect the full configuration

8.2 Verify QR Readiness Then Generate the Enrollment QR

Scenario: Produce a Device Owner enrollment QR for an Android template.

Tool Chain:

Get a Provisioning Template → Generate Device Owner Enrollment QR for Template

Steps:

  1. Call Get a Provisioning Template and check platform_type, packapk_progress, configuration_code
  2. If packapk_progress == "Package ready" and configuration_code is non-empty, call Generate Device Owner Enrollment QR for Template with the same ProvisioningId

Appendix Reference:

  • Field Reference: ./Field Reference.md
  • Error Code Quick Reference: ./Error Codes.md
Updated on: Jul 17, 2026
Was This Page Helpful?
Prev Get a group id by group name
Next Get an activity log
Discussion

Leave a Reply. Cancel reply

Your email address will not be published. Required fields are marked*

Product-related questions?Contact Our Support Team to Get a Quick Solution>
On this page
  • Quick Start (Copy & Use)
  • Recipes (Common Recipes)
    • Recipe 1: Inspect a Template's Full Settings
    • Recipe 2: Check QR Readiness Before Generating an Enrollment QR
    • Recipe 3: Verify Template Settings Before Modifying or Deleting
  • 1. Overview
    • 1.1 Description
    • 1.2 When to Use
    • 1.3 Execution Mode and Response
    • 1.4 Prerequisites
    • 1.5 Prerequisite Tools
    • 1.6 Differences from Similar Tools
  • 2. Inputs
    • 2.1 Parameter List
    • 2.2 Parameter Details
    • 2.3 Parameter Combination Logic
  • 3. Outputs
    • 3.1 Response Example
    • 3.2 Field Descriptions
    • 3.3 Status Code / Enum Value Mapping
  • 4. Examples
    • 4.1 Basic Example: Get a Template by ID
    • 4.2 Advanced Example: Check QR Readiness
    • 4.3 Error Example: Invalid ProvisioningId
  • 5. Error Handling
    • 5.1 AB Three-Layer Error Codes
    • 5.2 Common Errors
    • 5.3 Agent Self-Healing Decision Table
  • 6. Best Practices
    • 6.1 Performance Optimization
    • 6.2 Security Considerations
    • 6.3 Idempotency
  • 7. Related Tools
    • 7.1 Prerequisite Tools
    • 7.2 Follow-up Tools
    • 7.3 Similar Tool Comparison
  • 8. Tool Chains
    • 8.1 Find a Template and Inspect Its Configuration
    • 8.2 Verify QR Readiness Then Generate the Enrollment QR
loading...
No Results