# Get template GET https://hublinks.io/rest/accounts/{account_id}/templates/{template_id} Get template by ID (requires `group`). Reference: https://api.hublinks.io/api-reference/templates/get-template ## OpenAPI Specification ```yaml openapi: 3.1.0 info: title: collection version: 1.0.0 paths: /rest/accounts/{account_id}/templates/{template_id}: get: operationId: get-template summary: Get template description: Get template by ID (requires `group`). tags: - subpackage_templates parameters: - name: account_id in: path required: true schema: type: string - name: template_id in: path required: true schema: type: string - name: group in: query required: false schema: type: string - name: X-API-KEY in: header required: true schema: type: string responses: '200': description: Response with status 200 content: application/json: schema: $ref: '#/components/schemas/Templates_Get template_Response_200' '400': description: Bad Request content: application/json: schema: $ref: >- #/components/schemas/GetRestAccountsAccount_cd855c2bb1cc72097238TemplatesTemplate_test_123RequestBadRequestError '401': description: Unauthorized content: application/json: schema: $ref: >- #/components/schemas/GetRestAccountsAccount_cd855c2bb1cc72097238TemplatesTemplate_test_123RequestUnauthorizedError servers: - url: https://hublinks.io components: schemas: RestAccountsAccountIdTemplatesTemplateIdGetResponsesContentApplicationJsonSchemaTemplateWorkflowEdgesItemsStyle: type: object properties: opacity: type: integer required: - opacity title: >- RestAccountsAccountIdTemplatesTemplateIdGetResponsesContentApplicationJsonSchemaTemplateWorkflowEdgesItemsStyle RestAccountsAccountIdTemplatesTemplateIdGetResponsesContentApplicationJsonSchemaTemplateWorkflowEdgesItems: type: object properties: id: type: string type: type: string style: $ref: >- #/components/schemas/RestAccountsAccountIdTemplatesTemplateIdGetResponsesContentApplicationJsonSchemaTemplateWorkflowEdgesItemsStyle source: type: string target: type: string selectable: type: boolean required: - id - type - style - source - target - selectable title: >- RestAccountsAccountIdTemplatesTemplateIdGetResponsesContentApplicationJsonSchemaTemplateWorkflowEdgesItems RestAccountsAccountIdTemplatesTemplateIdGetResponsesContentApplicationJsonSchemaTemplateWorkflowNodesItemsData: type: object properties: icon: type: string title: type: string required: - icon - title title: >- RestAccountsAccountIdTemplatesTemplateIdGetResponsesContentApplicationJsonSchemaTemplateWorkflowNodesItemsData RestAccountsAccountIdTemplatesTemplateIdGetResponsesContentApplicationJsonSchemaTemplateWorkflowNodesItemsStyle: type: object properties: opacity: type: integer required: - opacity title: >- RestAccountsAccountIdTemplatesTemplateIdGetResponsesContentApplicationJsonSchemaTemplateWorkflowNodesItemsStyle RestAccountsAccountIdTemplatesTemplateIdGetResponsesContentApplicationJsonSchemaTemplateWorkflowNodesItemsMeasured: type: object properties: width: type: integer height: type: integer required: - width - height title: >- RestAccountsAccountIdTemplatesTemplateIdGetResponsesContentApplicationJsonSchemaTemplateWorkflowNodesItemsMeasured RestAccountsAccountIdTemplatesTemplateIdGetResponsesContentApplicationJsonSchemaTemplateWorkflowNodesItemsPosition: type: object properties: x: type: integer 'y': type: integer required: - x - 'y' title: >- RestAccountsAccountIdTemplatesTemplateIdGetResponsesContentApplicationJsonSchemaTemplateWorkflowNodesItemsPosition RestAccountsAccountIdTemplatesTemplateIdGetResponsesContentApplicationJsonSchemaTemplateWorkflowNodesItems: type: object properties: id: type: string data: $ref: >- #/components/schemas/RestAccountsAccountIdTemplatesTemplateIdGetResponsesContentApplicationJsonSchemaTemplateWorkflowNodesItemsData type: type: string style: $ref: >- #/components/schemas/RestAccountsAccountIdTemplatesTemplateIdGetResponsesContentApplicationJsonSchemaTemplateWorkflowNodesItemsStyle measured: $ref: >- #/components/schemas/RestAccountsAccountIdTemplatesTemplateIdGetResponsesContentApplicationJsonSchemaTemplateWorkflowNodesItemsMeasured position: $ref: >- #/components/schemas/RestAccountsAccountIdTemplatesTemplateIdGetResponsesContentApplicationJsonSchemaTemplateWorkflowNodesItemsPosition selected: type: boolean required: - id - data - type - style - measured - position - selected title: >- RestAccountsAccountIdTemplatesTemplateIdGetResponsesContentApplicationJsonSchemaTemplateWorkflowNodesItems RestAccountsAccountIdTemplatesTemplateIdGetResponsesContentApplicationJsonSchemaTemplateWorkflow: type: object properties: edges: type: array items: $ref: >- #/components/schemas/RestAccountsAccountIdTemplatesTemplateIdGetResponsesContentApplicationJsonSchemaTemplateWorkflowEdgesItems nodes: type: array items: $ref: >- #/components/schemas/RestAccountsAccountIdTemplatesTemplateIdGetResponsesContentApplicationJsonSchemaTemplateWorkflowNodesItems required: - edges - nodes title: >- RestAccountsAccountIdTemplatesTemplateIdGetResponsesContentApplicationJsonSchemaTemplateWorkflow RestAccountsAccountIdTemplatesTemplateIdGetResponsesContentApplicationJsonSchemaTemplate: type: object properties: name: type: string group: type: string workflow: $ref: >- #/components/schemas/RestAccountsAccountIdTemplatesTemplateIdGetResponsesContentApplicationJsonSchemaTemplateWorkflow account_id: type: string created_at: type: integer updated_at: type: integer description: type: string template_id: type: string required: - name - group - workflow - account_id - created_at - updated_at - description - template_id title: >- RestAccountsAccountIdTemplatesTemplateIdGetResponsesContentApplicationJsonSchemaTemplate Templates_Get template_Response_200: type: object properties: success: type: boolean template: $ref: >- #/components/schemas/RestAccountsAccountIdTemplatesTemplateIdGetResponsesContentApplicationJsonSchemaTemplate required: - success - template title: Templates_Get template_Response_200 GetRestAccountsAccount_cd855c2bb1cc72097238TemplatesTemplate_test_123RequestBadRequestError: type: object properties: error: type: string message: type: string required: - error - message title: >- GetRestAccountsAccount_cd855c2bb1cc72097238TemplatesTemplate_test_123RequestBadRequestError GetRestAccountsAccount_cd855c2bb1cc72097238TemplatesTemplate_test_123RequestUnauthorizedError: type: object properties: error: type: string message: type: string required: - error - message title: >- GetRestAccountsAccount_cd855c2bb1cc72097238TemplatesTemplate_test_123RequestUnauthorizedError securitySchemes: apiKeyAuth: type: apiKey in: header name: X-API-KEY ``` ## SDK Code Examples ```python Templates_Get template_example import requests url = "https://hublinks.io/rest/accounts/account_id/templates/template_id" querystring = {"group":"account_abc_workflows"} headers = {"X-API-KEY": ""} response = requests.get(url, headers=headers, params=querystring) print(response.json()) ``` ```javascript Templates_Get template_example const url = 'https://hublinks.io/rest/accounts/account_id/templates/template_id?group=account_abc_workflows'; const options = {method: 'GET', headers: {'X-API-KEY': ''}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Templates_Get template_example package main import ( "fmt" "net/http" "io" ) func main() { url := "https://hublinks.io/rest/accounts/account_id/templates/template_id?group=account_abc_workflows" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("X-API-KEY", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Templates_Get template_example require 'uri' require 'net/http' url = URI("https://hublinks.io/rest/accounts/account_id/templates/template_id?group=account_abc_workflows") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["X-API-KEY"] = '' response = http.request(request) puts response.read_body ``` ```java Templates_Get template_example import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://hublinks.io/rest/accounts/account_id/templates/template_id?group=account_abc_workflows") .header("X-API-KEY", "") .asString(); ``` ```php Templates_Get template_example request('GET', 'https://hublinks.io/rest/accounts/account_id/templates/template_id?group=account_abc_workflows', [ 'headers' => [ 'X-API-KEY' => '', ], ]); echo $response->getBody(); ``` ```csharp Templates_Get template_example using RestSharp; var client = new RestClient("https://hublinks.io/rest/accounts/account_id/templates/template_id?group=account_abc_workflows"); var request = new RestRequest(Method.GET); request.AddHeader("X-API-KEY", ""); IRestResponse response = client.Execute(request); ``` ```swift Templates_Get template_example import Foundation let headers = ["X-API-KEY": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://hublinks.io/rest/accounts/account_id/templates/template_id?group=account_abc_workflows")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```