{"action":"opened","issue":{"url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/1179","labels_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/1179/labels{/name}","comments_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/1179/comments","events_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/1179/events","html_url":"https://github.com/telefonicaid/fiware-orion/issues/1179","id":100982396,"number":1179,"title":"Getting/setting attribute values as text","user":{"login":"fgalan","id":1534240,"avatar_url":"https://avatars.githubusercontent.com/u/1534240?v=3","gravatar_id":"","url":"https://api.github.com/users/fgalan","html_url":"https://github.com/fgalan","followers_url":"https://api.github.com/users/fgalan/followers","following_url":"https://api.github.com/users/fgalan/following{/other_user}","gists_url":"https://api.github.com/users/fgalan/gists{/gist_id}","starred_url":"https://api.github.com/users/fgalan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fgalan/subscriptions","organizations_url":"https://api.github.com/users/fgalan/orgs","repos_url":"https://api.github.com/users/fgalan/repos","events_url":"https://api.github.com/users/fgalan/events{/privacy}","received_events_url":"https://api.github.com/users/fgalan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/telefonicaid/fiware-orion/labels/APIv2","name":"APIv2","color":"5319e7"},{"url":"https://api.github.com/repos/telefonicaid/fiware-orion/labels/backlog","name":"backlog","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/telefonicaid/fiware-orion/milestones/17","html_url":"https://github.com/telefonicaid/fiware-orion/milestones/0.24.0","labels_url":"https://api.github.com/repos/telefonicaid/fiware-orion/milestones/17/labels","id":1186920,"number":17,"title":"0.24.0","description":"","creator":{"login":"fgalan","id":1534240,"avatar_url":"https://avatars.githubusercontent.com/u/1534240?v=3","gravatar_id":"","url":"https://api.github.com/users/fgalan","html_url":"https://github.com/fgalan","followers_url":"https://api.github.com/users/fgalan/followers","following_url":"https://api.github.com/users/fgalan/following{/other_user}","gists_url":"https://api.github.com/users/fgalan/gists{/gist_id}","starred_url":"https://api.github.com/users/fgalan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fgalan/subscriptions","organizations_url":"https://api.github.com/users/fgalan/orgs","repos_url":"https://api.github.com/users/fgalan/repos","events_url":"https://api.github.com/users/fgalan/events{/privacy}","received_events_url":"https://api.github.com/users/fgalan/received_events","type":"User","site_admin":false},"open_issues":19,"closed_issues":52,"state":"open","created_at":"2015-06-30T11:19:04Z","updated_at":"2015-08-14T10:24:11Z","due_on":"2015-08-30T22:00:00Z","closed_at":null},"comments":0,"created_at":"2015-08-14T10:24:11Z","updated_at":"2015-08-14T10:24:11Z","closed_at":null,"body":"Getging an attribute value encoded as text:\r\n\r\n* Operation: GET /v2/entities/<entityId>/attrs/<attrName>/value\r\n* Text is returned when `text/plain` is in `Accept` with more priority than `application/json` (check Accept header rules in the HTTP specification) **or** \"options=text\" is used (no matter the Accept header).\r\n* Attribute values using number or booleans as native JSON type are translated to text at rendering time.\r\n\r\nSetting an attribute value encoded as text:\r\n\r\n* Operation: PUT /v2/entities/<entityId>/attrs/<attrName>/value\r\n* The payload is consiered as text if `Content-Type` is `text/plain`\r\n* The serviceRoutine dealing with this should apply an heuristic, so if the text is a valid number it will be passed as number to mongoBackend (the same will aply in the future for dates https://github.com/telefonicaid/fiware-orion/issues/1107, once gets implemented).\r\n\r\nRelated with (more broad): https://github.com/telefonicaid/fiware-orion/issues/1001"}}