List Templates

List Templates.

HTTP Request

GET https://api.formapi.io/api/v1/templates

Authentication

You must send an Authorization header with the value Basic followed by base 64 encoded token_id:token_secret.

For example: Authorization: Basic dG9rZW5faWQ6dG9rZW5fc2VjcmV0Cg==

See the Authentication documentation for more information.

Example Code

var FormAPI = require("formapi");

var config = new FormAPI.Configuration();
config.apiTokenId = "FORMAPI_TOKEN_ID";
config.apiTokenSecret = "FORMAPI_TOKEN_SECRET";
client = new FormAPI.Client(config);

var opts = {
  query: "search by name",
  parent_folder_id: "fld_000000000000000002",
  page: 1,
  per_page: 10
};

client.listTemplates(opts, function(error, templates) {
  if (error) throw error;
  console.log(templates);
});
require 'form_api'

FormAPI.configure do |c|
  c.username  = ENV['FORMAPI_TOKEN_ID']
  c.password  = ENV['FORMAPI_TOKEN_SECRET']
end

formapi = FormAPI::Client.new

templates = formapi.list_templates(query: 'search by name', parent_folder_id: 'fld_000000000000000002', page: 1, per_page: 10)
puts templates
import form_api

client = form_api.Client()
client.api_client.configuration.username = "FORMAPI_TOKEN_ID"
client.api_client.configuration.password = "FORMAPI_TOKEN_SECRET"

templates = client.list_templates(page=1, per_page=10, query="search by name")
print(templates)
<?php
// This is a live example that you can run in the PHP interactive shell (php -a)
$formapi = new FormAPI\Client();
$formapi->getConfig()->setUsername('FORMAPI_TOKEN_ID');
$formapi->getConfig()->setPassword('FORMAPI_TOKEN_SECRET');

# Set $query to an empty string if you want to list all templates
$query = 'search by name'; # String | Search By Name
$parent_folder_id: "fld_000000000000000002";
$page = 1; // int | Default: 1
$per_page = 10; // int | Default: 50
$templates = $formapi->listTemplates($query, $parent_folder_id, $page, $per_page);
echo $templates;
using System;
using System.Diagnostics;
using FormApi.Client.Api;
using FormApi.Client.Client;
using FormApi.Client.Model;

namespace Example
{
    public class FormAPIExample
    {
        public void main()
        {
          Configuration.Default.Username = "FORMAPI_TOKEN_ID";
          Configuration.Default.Password = "FORMAPI_TOKEN_SECRET";

          var apiInstance = new PDFApi();
          string templateId = "tpl_000000000000000001";

          var query = "search by name";  
          var parentFolderId = "fld_000000000000000002";  
          var page = 2;  
          var perPage = 1;  

          var templates = apiInstance.ListTemplates(query, parentFolderId, page, perPage);
          Debug.WriteLine(templates);
        }
    }
}

results matching ""

    No results matching ""