I’m having some trouble updating (and creating) Labels through the API. Theoretically, it should be easier to Create, rather than to Update, so I’ve put a sample HTTP request below that seems like it should work for creating, but unfortunately, does not. Also note that the “Create attribute” API documentation (not the “Update attribute”) documentation does not provide any information about how to include the Label data in the Settings.
In the array of Label objects, if I don’t include an “id” key and value, it gives an error “Labels should be arrays with id, name and color keys”, but if I do include an “id” key, it gives an error “Invalid data “” supplied to “label” attribute: Data “’’” is not an array supplied to App\Item\Types\Label class.”
Anyone know how to Create/Update Label fields in Infinity?
`
POST /api/v2/workspaces/{WORKSPACE-ID}/boards/{BOARD-ID}/attributes HTTP/1.1
Authorization: Bearer {PERSONNAL-ACCESS-TOKEN}
Content-Type: application/json
Accept: application/json
Host: app.startinfinity.com
Connection: close
User-Agent: Paw/3.4.0 (Macintosh; OS X/11.7.1) GCDHTTPRequest
Content-Length: 165
{“name”:“Test Attr”,“type”:“label”,“default_data”:"",“settings”:{“labels”:[{“name”:“Test Name”,“color”:"#B3EC8D"}],“multiple”:true,“allowNew”:true,“allowEmpty”:true}}
`