- URL:
- https://<root>/services/<serviceName>/sharedTemplates/templates
- Methods:
- GET
- Required Capability:
- Requires the Query capability
- Version Introduced:
- 11.3
Description
The templates resource provides access to the full definition of a template or set of templates (including the contents of the definition column). Note that a field with a default may not be included in the template definition if the default matches the field or subtype default value. In this case, clients can get the appropriate default from the layers field or subtype definition.
Request parameters
| Parameter | Details | 
|---|---|
| 
 (Required) | The template IDs of specific shared templates to be included in the response. Syntax Example  | 
| 
 | The output spatial reference of the geometries for preset templates. Only preset templates have geometries in their definition. If  | 
| 
 | The response format. The default format is  Values:  | 
Example usage
The following is a sample request URL used to access the templates resource, which will return preset template 117:
https://organization.example.com/<context>/rest/services/MyService/FeatureServer/sharedTemplates/templates?ids=[117]JSON Response syntax
{
  "templates": [
    <template1>,
    <template2>,
    <template3>,
    <template4>
  ]
}JSON Response examples
Example one
The sample response below demonstrates returning the feature templates 44 and 45:
{
  "templates": [
    {
      "templateId": 44,
      "globalId": "{79B8CDB2-65F5-4A4C-8120-6A18CBE0A4D2}",
      "name": "Template Defaults",
      "defaultTool": "{AF2DBF8F-280E-44DB-8860-E399D0B30CF1}",
      "type": "feature",
      "layerId": 17,
      "subtype": null,
      "description": "",
      "tag": "Line",
      "visible": true,
      "hash": "{AF629092-0F03-382E-037A-05937FCF3CA8}",
      "thumbnail": "iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAArElEQVR4nOXQMQ3CAAAF0StcwoAcPMACwVJFsSACG+CArRQDHdiacG+86edLnMRJnMRJnMRJnMRJnMRJnMRJnMRJnMRJnMRJnMRJnMRJnMRJnMRJnMRJnMRJnEvxNt8Pn4mRP7LZMp6H0+OnA6b38Bp2MwUuxev++AQuBEicxEmcxEmcxEmcxEmcxEmcxEmcxEmcxEmcxEmcxEmcxEmcxEmcxEmcxEmcaw9Y2xedjw22KuNMvgAAAABJRU5ErkJggg==",
      "status": "protected",
      "userIdentity": "owner2",
      "definition": {
        "defaultValues": {
          "ADATE": 1705622400000,
          "ADOUBLE": 9.9,
          "ATEXT": "Gate"
          "excludedTools": [
            "{28C04532-3DAF-4D3D-B7BE-A589C9C9A03E}",
            "{09C6F589-A3CE-48AB-81BC-46965C58F264}",
            "{6F0ED2CC-C099-4895-BD7E-BEEC2F78ADBF}",
            "{E00209DD-05C5-4424-BE62-51581F9F811D}",
            "{5664CAE4-C7DE-432A-9933-9586BC15ED39}"
          ],
          "toolOptions": {
            "{AF2DBF8F-280E-44DB-8860-E399D0B30CF1}": {
              "DENSIFYISCHECKED": false,
              "DENSIFYLINEARUNIT": 9002,
              "DENSIFYSAMPLEDISTANCE": 10
            }
          }
        }
      }
    },
    {
      "templateId": 45,
      "globalId": "{BBCABE47-A498-4E15-8D38-4F59C0EF1ACF}",
      "name": "Fence",
      "defaultTool": "{AF2DBF8F-280E-44DB-8860-E399D0B30CF1}",
      "type": "feature",
      "layerId": 17,
      "subtype": null,
      "description": "",
      "tag": "Line",
      "visible": true,
      "hash": "{26EA13C2-36C2-8A5A-5570-A22752C3E221}",
      "thumbnail": "iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAArElEQVR4nOXQoQ3CAAAF0StcSAjj1KJBsRNrMUTXgA1AQVmgAteEe/LUz5c4iZM4iZM4iZM4iZM4iZM4iZM4iZM4iZM4iZM4iZM4iZM4iZM4iZM4iZM4iZM4l+J0m8f3Zr7yR7af4Tqeh+mnA17D87FjT4FL8Xg63IELARIncRIncRIncRIncRIncRIncRIncRIncRIncRIncRIncRIncRIncRIncRLn2gPW9gXXag2ljGFxhgAAAABJRU5ErkJggg==",
      "status": "protected",
      "userIdentity": "owner2",
      "definition": {
        "defaultValues": {
          "ATEXT": "Fence"
        },
        "excludedTools": [
          "{28C04532-3DAF-4D3D-B7BE-A589C9C9A03E}",
          "{09C6F589-A3CE-48AB-81BC-46965C58F264}",
          "{6F0ED2CC-C099-4895-BD7E-BEEC2F78ADBF}",
          "{E00209DD-05C5-4424-BE62-51581F9F811D}",
          "{5664CAE4-C7DE-432A-9933-9586BC15ED39}"
        ]
      }
    }
  ]
}Example two
The sample response below demonstrates returning the group template 116:
{
  "templates": [
    {
      "templateId": 116,
      "globalId": "{BAC21D62-9F2B-40D0-8E2F-F488C602AFE4}",
      "name": "Radial",
      "defaultTool": "{A947BA80-1C29-4BCD-8672-1963B7B9DDE0}",
      "type": "group",
      "layerId": 12,
      "subtype": null,
      "description": "",
      "tag": "Point; Group",
      "visible": true,
      "hash": "{FF990F90-C73C-A092-7C68-1082607F9B43}",
      "thumbnail": "iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAA7EAAAOxAGVKw4bAAABCElEQVR4nOXVMUpDQRRG4VMcFISAhY3pbNyA2LuAZBvZhvtwG3EXkg24gNjYBYRYyYQIWUGeeL7uTfPm/vfOjMRJnMRJnMRJnMRJnMRJnMRJnMRJnMRJnMRJnMRJnMRJnMRJnMRJnMRJnMQ58f9XwBxYA5taAOvL+WxxdX/D1/vn8367ewWWlQBWo/j56vHwcf10x/blbbHf7pbHafj3AcxH509d3M7Yb3cPlQDWY+xH5399f+wO6+feiExjM878GPvR+VH88Q7YlC7B5TjzJ2OfewU4Fn72sf9LAUxO4iRO4iRO4iRO4iRO4iRO4iRO4iRO4iRO4iRO4iRO4iRO4iRO4px6A1P7AW5JN6tqrws9AAAAAElFTkSuQmCC,
      "status": "protected",
      "userIdentity": "owner1",
      "definition": {
        "basePart": {
        "CREATEUNIQUE": 0,
        "templateGlobalId": "{A6162009-36EC-4838-8F8F-41D467AC246F}",
        "templateId": 24,
        "type": "esri_editing_transformation_pointAtBeginningOfRadial"
        },
        "excludedTools": [
          "{C5C42E29-44DA-4A1C-8688-E02C07535BC3}",
          "{2A8B3331-5238-4025-972E-452A69535B06}",
          "{28C04532-3DAF-4D3D-B7BE-A589C9C9A03E}",
          "{6CF59352-8E14-402C-8F4C-ED72647F5E42}",
          "{BCCF295A-9C64-4ADC-903E-62D827C10EF7}",
          "{A5F4DB5F-4A6B-29BD-1F32-9D81BF262C76}",
          "{93CE7077-F09E-455E-ADE7-B7413CDDC393}",
          "{09C6F589-A3CE-48AB-81BC-46965C58F264}",
          "{AF2DBF8F-280E-44DB-8860-E399D0B30CF1}",
          "{E22F7D98-007D-427C-8282-13704F7C84C3}",
          "{0A7C16B9-1CFD-467F-8ECE-6BA376192431}",
          "{285EC4BB-60A8-7184-2088-5BEE2149F2A4}",
          "{6F0ED2CC-C099-4895-BD7E-BEEC2F78ADBF}",
          "{7D3E17CF-30DD-4593-9BD8-0B2B8770F52A}",
          "{E00209DD-05C5-4424-BE62-51581F9F811D}",
          "{5664CAE4-C7DE-432A-9933-9586BC15ED39}"
        ],
        "parts": [
          {
            "templateGlobalId": "{79B8CDB2-65F5-4A4C-8120-6A18CBE0A4D2}",
            "templateId": 44,
            "type": "esri_editing_transformation_radialLines"
          },
          {
            "templateGlobalId": "{DF6534B7-DE7C-425B-8B08-4DB789A39A01}",
            "templateId": 26,
            "type": "esri_editing_transformation_pointAtEndOfLine"
          }
        ]
      }
    }
  ]
}Example three
The sample response below demonstrates returning the preset template 117:
{
  "templates": [
    {
      "templateId": 117,
      "globalId": "{765F2D8C-90DC-491E-B304-2F85174118DB}",
      "name": "PS- point tool",
      "defaultTool": "{2A8B3331-5238-4025-972E-452A69535B06}",
      "type": "preset",
      "layerId": 13,
      "subtype": null,
      "description": "",
      "tag": "Preset; Group",
      "visible": true,
      "hash": "{768F1212-E45E-1407-4CD0-0FE95AFD3A59}",
      "thumbnail": "iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAA9UlEQVR4nOXVQW1DMRQF0VkMChMIgCLIvqERhUVphEdKIwBCwDgqR79SSyC/6pydvbH93rUtcRIncRIncRIncRIncRIncRIncRIncRIncRIncRIncRIncRIncRIncRInce68/hkYwA241wpwG2O8Hw4HHo/Hx5zzEzhVCnBeh79cLs/B8Xjker2+zzlPWxr+fQHG6vyviTGYc75VCnBbsV+d/zbnfM6/eiOyj/u68yv2W+fZ3oB76RE8rTv/I/a5X4Dt4C+P/V8qwO4kTuIkTuIkTuIkTuIkTuIkTuIkTuIkTuIkTuIkTuIkTuIkTuIkzr03sLcvZAo3LMuyQYQAAAAASUVORK5CYII=",
      "status": "protected",
      "userIdentity": "creator1",
      "definition": {
      "features": [
        {
          "geometry": {
            "hasZ": true,
            "rings": [
              [
                [
                  -13046230.191,
                  4036729.9367000015,
                  null
                ],
                [
                  -13046230.214,
                  4036729.938199997,
                  null
                ],
                [
                  -13046227.136599999,
                  4036740.1467000024,
                  null
                ],
                [
                  -13046231.229899999,
                  4036737.3237999978,
                  null
                ],
                [
                  -13046230.8493,
                  4036736.772,
                  null
                ],
                [
                  -13046230.179499999,
                  4036729.9371000009,
                  null
                ],
                [
                  -13046230.191,
                  4036729.9367000015,
                  null
                ]
              ]
            ]
          },
          "templateGlobalId": "{76326950-3A09-4626-B1E5-FB276602878E}",
          "templateId": 7
        },
        {
          "geometry": {
            "hasZ": true,
            "rings": [
              [
                [
                  -13046204.553100001,
                  4036729.9367000015,
                  null
                ],
                [
                  -13046204.5646,
                  4036729.9371000009,
                  null
                ],
                [
                  -13046199.967,
                  4036736.0188999997,
                  null
                ],
                [
                  -13046199.9266,
                  4036735.8681999968,
                  null
                ],
                [
                  -13046204.553100001,
                  4036729.9367000015,
                  null
                ]
              ]
            ]
          },
          "templateGlobalId": "{90190FDC-96F3-44A0-94EC-B1E157A4AA2D}",
          "templateId": 8
        },
        {
          "geometry": {
            "hasZ": true,
            "paths": [
              [
                [
                  -13046224.3662,
                  4036696.0847000034,
                  null
                ],
                [
                  -13046224.3622,
                  4036696.0847000034,
                  null
                ]
              ]
            ]
          },
          "templateGlobalId": "{21000E34-5E7B-43A7-AAD3-58A7A08D2AE2}",
          "templateId": 22
        },
        {
          "geometry": {
            "x": -13046216.6728,
            "y": 4036739.435999997,
            "z": 0
          },
          "templateGlobalId": "{08A82488-C5E7-4FE8-B373-5E68722202FE}",
          "templateId": 32
        },
        {
          "geometry": {
            "x": -13046216.6728,
            "y": 4036692.3555999996,
            "z": 0
          },
          "templateGlobalId": "{4DC1CC66-BD4B-4CCF-81DC-5CAA830E9A6E}",
          "templateId": 33
        },
        {
          "geometry": {
            "hasZ": true,
            "points": [
              [
                -13046230.191,
                4036730.1130999999,
                0
              ],
              [
                -13046204.553100001,
                4036730.1130999999,
                0
              ],
              [
                -13046204.553100001,
                4036699.633100003,
                0
              ],
              [
                -13046230.191,
                4036699.633100003,
                0
              ]
            ]
          },
          "templateGlobalId": "{B6E18AF7-56DD-4625-9986-E2E781091D16}",
          "templateId": 38
        },
        {
          "geometry": {
            "hasZ": true,
              "paths": [
                [
                  [
                    -13046230.191,
                    4036701.1570999997,
                    0
                  ],
                  [
                    -13046204.553100001,
                    4036701.1570999997,
                    0
                  ]
                ]
              ]
            },
            "templateGlobalId": "{F6C1F563-C740-4E26-90BC-78E5922B10A3}",
            "templateId": 71
          },
          {
            "templateGlobalId": "{677D110B-7FA2-4E8E-8BF2-917FAF7615B3}",
            "templateId": 114
          }
        ],
        "origin": {
          "x": -13046217.0478,
          "y": 4036718.878700003,
          "z": 0
        }
      }
    }
  ]
}