obtaining [data] types
Is it possible in REST, to obtain the data type for a given
attribute.
In particular, I need to query the memory in order to find - if the
returned attribute is an integer.
Is it possible in REST, to obtain the data type for a given
attribute.
In particular, I need to query the memory in order to find - if the
returned attribute is an integer.
Support Staff 2 Posted by Jim Fleming on 09 Jun, 2011 08:41 PM
John, Not currently. I'll add as a feature request. Thanks.
Support Staff 3 Posted by Jim Fleming on 10 Jun, 2011 01:03 PM
John, Hold on a sec... there is a way to get the data type. Use the REST call:
ws/configs/{spaceName}?format=json
We need to add some of these undocumented APIs to our online documentation.
4 Posted by John Whelan on 10 Jun, 2011 07:25 PM
Jim - this worked great! Thanks!!
John Whelan closed this discussion on 10 Jun, 2011 07:25 PM.
John Whelan re-opened this discussion on 23 Jun, 2011 08:03 PM
5 Posted by John Whelan on 23 Jun, 2011 08:03 PM
Jim
When using this REST call, is it possible to get just the dataschema, or just the attributes. I am getting a net.sf.json.JSONException: Unterminated string Error - in which I can't seem to locate the root cause of.
Support Staff 6 Posted by Jim Fleming on 27 Jun, 2011 02:38 PM
John, Yes, you should also be able to do:
Where source is your dataschema name (same name as source).
7 Posted by John Whelan on 28 Jun, 2011 08:12 PM
Jim
The suggestions above didn't work for me.
Each resulted in an error.
Here is what I tried:
http://nash.ds.boeing.com:8080/configs/cas_67_space/castle
http://nash.ds.boeing.com:8080/configs/cas_67_space/castle.html
http://nash.ds.boeing.com:8080/ws/configs/cas_67_space/castle.html
http://nash.ds.boeing.com:8080/ws/configs/cas_67_space/castle.xml
http://nash.ds.boeing.com:8080/ws/configs/cas_67_space/{castle}
http://nash.ds.boeing.com:8080/ws/configs/cas_67_space/castle?forma...
http://nash.ds.boeing.com:8080/ws/configs/cas_67_space/castle
..?
Support Staff 8 Posted by Jim Fleming on 29 Jun, 2011 03:41 PM
John, I think you might need the word sources before your source name. e.g. http://nash.ds.boeing.com:8080/configs/cas_67_space/sources/castle, however, I don't think it will return the dataschema, just the source definition. I will log a feature enhancement to add the dataschema elements to the result. thanks.
Support Staff 9 Posted by Jim Fleming on 29 Jun, 2011 03:54 PM
John, Also, if you want a different format it is a url param, not an extension as I noted above. For example, .../sources/castle?format=json, not .../sources/castle.json. Sorry for the confusion.