Click or drag to resize
DocumentTemplateControllerGet Method

[This is preliminary documentation and is subject to change.]

Returns a new blank document instance of a given type. This is provided as a helper service to make the generation of new documents easier.

Namespace: WebServiceKit.Controllers
Assembly: WebServiceKit (in WebServiceKit.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public IHttpActionResult Get(
	Guid guid
)

Parameters

guid
Type: SystemGuid
Target document type guid.

Return Value

Type: IHttpActionResult
200 OK and the serialized document instance will be returned if the document type guid is found, otherwise 404.
Remarks
The document instance is formatted using XML or JSON depending on the client request. Call requires a valid login token. HTTP Method: GET
[Route("api/documenttemplate/{guid}")]
Examples
Python: (http://docs.python-requests.org/en/latest/)
baseUrl = 'http://webservices.mobileepiphany.com/api'
loginString = b'MyCompany:dev:dev:1234'
encodedLogin = base64.b64encode (loginString).decode("utf-8")
loginHeader = {'Authorization':'Login ' + encodedLogin}
loginUrl = baseUrl + '/login'

r = requests.get(loginUrl, headers=loginHeader)
r.raise_for_status()

loginToken = r.text.strip('"')
print('Login Token: ' + r.text)
tokenHeader = {'Authorization':'Token ' + loginToken, 'content-type': 'application/json'}

docTypeGuid = '95eb1b3d-8f03-4549-ad16-69ecbe92a65a'
docTemplateUrl = baseUrl + '/documenttemplate/' + docTypeGuid
r = requests.get(docTemplateUrl, headers=tokenHeader)
r.raise_for_status()

docTemplate = r.text
See Also