obtaining [data] types

John Whelan's Avatar

John Whelan

06 Jun, 2011 05:47 PM via web

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.

  1. Support Staff 2 Posted by Jim Fleming on 09 Jun, 2011 08:41 PM

    Jim Fleming's Avatar

    John, Not currently. I'll add as a feature request. Thanks.

  2. Support Staff 3 Posted by Jim Fleming on 10 Jun, 2011 01:03 PM

    Jim Fleming's Avatar

    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.

  3. 4 Posted by John Whelan on 10 Jun, 2011 07:25 PM

    John Whelan's Avatar

    Jim - this worked great! Thanks!!

  4. John Whelan closed this discussion on 10 Jun, 2011 07:25 PM.

  5. John Whelan re-opened this discussion on 23 Jun, 2011 08:03 PM

  6. 5 Posted by John Whelan on 23 Jun, 2011 08:03 PM

    John Whelan's Avatar

    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.

  7. Support Staff 6 Posted by Jim Fleming on 27 Jun, 2011 02:38 PM

    Jim Fleming's Avatar

    John, Yes, you should also be able to do:

    /configs/{space}/sources/{source} - config for a specific source as xml
    /configs/{space}/sources/{source}.xml - config for a specific source as xml
    /configs/{space}/sources/{source}.text - config for a specific source as text for easy diffing
    /configs/{space}/sources/{source}.html - config for a specific source as html for easy diffing
    

    Where source is your dataschema name (same name as source).

  8. 7 Posted by John Whelan on 28 Jun, 2011 08:12 PM

    John Whelan's Avatar
  9. Support Staff 8 Posted by Jim Fleming on 29 Jun, 2011 03:41 PM

    Jim Fleming's Avatar

    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.

  10. Support Staff 9 Posted by Jim Fleming on 29 Jun, 2011 03:54 PM

    Jim Fleming's Avatar

    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.

Reply to this discussion

Internal reply

Formatting help or Preview

Attached Files

You can attach files up to 10MB

What is 4 times four?

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.