Chilkat Online Tools

ERROR!

------------------- GenerateCode ----------------------
ImpliedContentType: 
---- begin chilkat script ----
// This example assumes the Chilkat API to have been previously unlocked.
// See {{-global_unlock:::Global Unlock Sample-}} for sample code.

new Http http;
ckbool success;

new JsonObject queryParams;
ignore = queryParams.UpdateString("email_template_id","{{email_template_id}}");

// Adds the "Authorization: Bearer {{api_key}}" header.
http.AuthToken = "{{api_key}}";


HttpResponse resp = http.QuickRequestParams("GET","https://rest.iad-01.braze.com/templates/email/info",queryParams);
if (http.LastMethodSuccess == ckfalse) {
    println http.LastErrorText;
    return;
}

println resp.StatusCode;
println resp.BodyStr;
delete resp;

---- end chilkat script ----

Powershell / Braze Endpoints / See Email Template Information

Back to Collection Items

Add-Type -Path "C:\chilkat\ChilkatDotNet47-9.5.0-x64\ChilkatDotNet47.dll"

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

$http = New-Object Chilkat.Http

$queryParams = New-Object Chilkat.JsonObject
$queryParams.UpdateString("email_template_id","{{email_template_id}}")

# Adds the "Authorization: Bearer {{api_key}}" header.
ERROR: Property not found: Http.AuthToken
Assignment type mismatch.  ExpressionType=string, atgType=ERROR:

ERROR: Entry not found: Http.QuickRequestParams
ERROR: CodeGen:
  emitNewObject:
    atgType: Http
    varName: http
  --emitNewObject
  emitNewObject:
    atgType: JsonObject
    varName: queryParams
  --emitNewObject
  failedToLoadClass: Http
  getApiProperty:
    Class not found
    className: Http
  --getApiProperty
  failedToLoadClass: Http
  failedToLoadClass: Http
  getApiProperty:
    Class not found
    className: Http
  --getApiProperty
--CodeGen

ERROR: Non-existent Chilkat method:  Http.QuickRequestParams
$resp = $http.QuickRequestParams("GET","https://rest.iad-01.braze.com/templates/email/info",$queryParams)
ERROR: Entry not found: Http.LastMethodSuccess
ERROR: CodeGen:
  emitNewObject:
    atgType: Http
    varName: http
  --emitNewObject
  emitNewObject:
    atgType: JsonObject
    varName: queryParams
  --emitNewObject
  failedToLoadClass: Http
  getApiProperty:
    Class not found
    className: Http
  --getApiProperty
  failedToLoadClass: Http
  failedToLoadClass: Http
  getApiProperty:
    Class not found
    className: Http
  --getApiProperty
  failedToLoadClass: Http
  failedToLoadClass: Http
  getApiProperty:
    Class not found
    className: Http
  --getApiProperty
--CodeGen

if ($http.LastMethodSuccess -eq $false) {
ERROR: Entry not found: Http.LastErrorText
ERROR: CodeGen:
  emitNewObject:
    atgType: Http
    varName: http
  --emitNewObject
  emitNewObject:
    atgType: JsonObject
    varName: queryParams
  --emitNewObject
  failedToLoadClass: Http
  getApiProperty:
    Class not found
    className: Http
  --getApiProperty
  failedToLoadClass: Http
  failedToLoadClass: Http
  getApiProperty:
    Class not found
    className: Http
  --getApiProperty
  failedToLoadClass: Http
  failedToLoadClass: Http
  getApiProperty:
    Class not found
    className: Http
  --getApiProperty
  failedToLoadClass: Http
  failedToLoadClass: Http
  getApiProperty:
    Class not found
    className: Http
  --getApiProperty
--CodeGen

    $($http.LastErrorText)
    exit
}

$($resp.StatusCode)
$($resp.BodyStr)

Curl Command

curl -G -d "email_template_id=%7B%7Bemail_template_id%7D%7D"
	-H "Authorization: Bearer {{api_key}}"
https://rest.iad-01.braze.com/templates/email/info

Postman Collection Item JSON

{
  "name": "See Email Template Information",
  "request": {
    "method": "GET",
    "header": [
      {
        "key": "Authorization",
        "value": "Bearer {{api_key}}",
        "type": "text"
      }
    ],
    "url": {
      "raw": "https://{{instance_url}}/templates/email/info?email_template_id={{email_template_id}}",
      "protocol": "https",
      "host": [
        "{{instance_url}}"
      ],
      "path": [
        "templates",
        "email",
        "info"
      ],
      "query": [
        {
          "key": "email_template_id",
          "value": "{{email_template_id}}",
          "description": "(Required) String\n\nYour email template's API Identifier."
        }
      ]
    },
    "description": "Use to get information on your email templates.\n\nUse the Template REST APIs to programmatically manage the email templates that you have stored on the Braze dashboard, on the Templates & Media page. Braze provides two endpoints for creating and updating your email templates.\n\n### Request Components\n- [Template Identifier](https://www.braze.com/docs/api/identifier_types/)"
  },
  "response": [
  ]
}