API Documentation - How to find out max field length?

xceled
Level 2

API Documentation - How to find out max field length?

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?

4 REPLIES 4
Floyd_Alvares2
Level 8

Re: API Documentation - How to find out max field length?

SanfordWhiteman
Level 10 - Community Moderator

Re: API Documentation - How to find out max field length?

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).

xceled
Level 2

Re: API Documentation - How to find out max field length?

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
Level 10 - Community Moderator

Re: API Documentation - How to find out max field length?


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).