Troubleshooting Guide
Create List Field GUIDs for the Swimlane API
2 min
to use the swimlane api to create or update list fields in an application record you must first generate a globally unique identifier (guid) to add to the api put/post request here are two examples post or put requests to the /app//record endpoint for text or numeric list record field values post or put requests to the /app/ endpoint for creating/updating selection field definitions when swimlane saves a record with text or numeric list fields, it generates a guid for each of the values in the list, for example "values" { "$type" "system collections generic dictionary`2\[\[system string, system private corelib],\[system object, system private corelib]], system private corelib", "ail82" \[ { "$type" "core models record listitem`1\[\[system string]], core", "value" "1", "id" "5f2d4a05d1f737f282b679f6" }, { "$type" "core models record listitem`1\[\[system string]], core", "value" "2", "id" "5f2d4a07bc0744013faeb137" }, { "$type" "core models record listitem`1\[\[system string]], core", "value" "3", "id" "5f2d4a09b5051c345cc94842" } ], "ae5v9" \[ { "$type" "core models record listitem`1\[\[system double]], core", "value" 4, "id" "5f2d4a0de779783a09497131" }, { "$type" "core models record listitem`1\[\[system double]], core", "value" 5, "id" "5f2d4a0e8f92749bc9132b9b" }, { "$type" "core models record listitem`1\[\[system double]], core", "value" 6, "id" "5f2d4a0fb51a4e0cb7c88db0" } ] }, +> note the guid is the value listed as the id for each field you must provide these guids when creating or updating list types of record fields with the api to do so, use this python code to generate a guid a new guid must be generated for each field import time import binascii import os def random objectid() """returns a randomly generated mongodb objectid """ timestamp = '{0\ x}' format(int(time time())) rest = binascii b2a hex(os urandom(8)) decode('ascii') return timestamp + rest