API Documentation - How to find out max field length? | Community
Skip to main content
New Participant
September 13, 2021
Question

API Documentation - How to find out max field length?

  • September 13, 2021
  • 2 replies
  • 2637 views

Hello,

I'm consuming the REST API for various integrations in in some cases have to store data locally. I'd like to have my DB schema match the max lengths of Marketo data but am having issues finding how to determine the max field length of various data fields returned via the API. Can anyone suggest and approach or resource to assist here?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

SanfordWhiteman
New Participant
September 13, 2021

The actual field limits aren’t what the Describe Lead API indicates, though it’s a start (no string is shorter that what Describe returns, at least). Unfortunately, the doc Floyd linked to isn’t completely accurate either.

 

I’ve written a few blog posts about “Marketo field limits in the real world” (you can search for that) but never had a chance to write about each and every system field + datatype. Your best bet is to use NCLOB/NVARCHAR(MAX) for strings, BigInt for scores/integers (even though they’ve recently shrunk back to Int, to my dismay) and Float64 for float/currency (even though they’re actually Float32, at some point they’re gonna have to expand so you should be prepared).

xceledAuthor
New Participant
September 14, 2021

Thank you @sanfordwhiteman for the information, I wish they would use swagger to document the response model field limits. 

 

I'm not just storing lead data, also other types, so my need is generic across any API that returns a response payload. E.g. Email subject length, folder name length, email description length.

SanfordWhiteman
New Participant
September 14, 2021

Thank you @sanfordwhiteman for the information, I wish they would use swagger to document the response model field limits.

Wouldn’t really help if they’re not accurate! Anything that’s abstracted/manually typed instead of lifted directly from the schema can have errors. (And, historically, has.)

 


I'm not just storing lead data, also other types, so my need is generic across any API that returns a response payload. E.g. Email subject length, folder name length, email description length.

Asset names are NVARCHAR(255).

Employee
September 13, 2021