Click or drag to resize
ListTypesControllerGet Method

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

Retrieves all list types for the logged in enterprise from the database.

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

Return Value

Type: IHttpActionResult
200 OK and the serialized list types will be returned, otherwise 400.
Remarks
The list types are formatted using XML or JSON depending on the client request. Call requires a valid login token. HTTP Method: GET
[Route("api/listtypes")]
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'}

docTypesUrl = baseUrl + '/listtypes'
r = requests.get(docTypesUrl, headers=tokenHeader)
r.raise_for_status()

with open('C:\\temp\\alldoctypes.txt', 'wb') as fd:
    for chunk in r.iter_content(16*1024):
        fd.write(chunk)
See Also