You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've create a bulk of data w. the data generator and imported into an omh mongo db. But when trying to access the data (e.g. via Postman), I can't access it -- the server returns 404 (not found).
So - what is going wrong here???? (I've tried to run the resource server in DEBUG mode, but no useful information is provided as why the data point isn't found).
The text was updated successfully, but these errors were encountered:
I bumped into the same error, with the help of Robo3T I discovered several differences between the imported data and the data inserted through Postman. For example if the generated data object doesn't have an _id key, Mongo will generate one for it when it is imported. After importing a single datapoint to Mongo it will have _id key at the beginning (with a value of ObjectId, generated by Mongo) and an id key at the end of the object generated by the data-generator. So changing the id key to _id in the output.json will prevent mongo to generate an ObjectId and it will use the String id defined in the generated JSON file. There were other differences too, for example the structure of the version and the acquisition_provenance is different too.
Data object in mongo after inserting it through Postman:
I changed these parts in the output file, than imported it to Mongo and all the generated data is now returned by Postman, but check the username also! The generated datapoint are only available if you log in with a username test-generated instead of the default testUser.
I've create a bulk of data w. the data generator and imported into an omh mongo db. But when trying to access the data (e.g. via Postman), I can't access it -- the server returns 404 (not found).
Here are some details.
I've generated an output file with an entry like
{"header":{"id":"6ffbd2cc-bcb0-409d-81de-b91f6c76262f","creation_date_time":"2014-01-02T11:22:45Z","acquisition_provenance":{"source_name":"generator","source_creation_date_time":"2014-01-02T11:21:45Z","modality":"sensed"},"user_id":"testUser","schema_id":{"namespace":"omh","name":"body-weight","version":"1.0"}},"body":{"effective_time_frame":{"date_time":"2014-01-02T11:21:45Z"},"body_weight":{"unit":"kg","value":55.035651929937025}},"id":"6ffbd2cc-bcb0-409d-81de-b91f6c76262f"}
When importing it into Mongo, this looks like this
{ "_id" : ObjectId("5a30ebf34274071d0820b73a"), "header" : { "id" : "6ffbd2cc-bcb0-409d-81de-b91f6c76262f", "creation_date_time" : "2014-01-02T11:22:45Z", "acquisition_provenance" : { "source_name" : "generator", "source_creation_date_time" : "2014-01-02T11:21:45Z", "modality" : "sensed" }, "user_id" : "testUser", "schema_id" : { "namespace" : "omh", "name" : "body-weight", "version" : "1.0" } }, "body" : { "effective_time_frame" : { "date_time" : "2014-01-02T11:21:45Z" }, "body_weight" : { "unit" : "kg", "value" : 55.035651929937025 } }, "id" : "6ffbd2cc-bcb0-409d-81de-b91f6c76262f" }
When I try to acces this data point via Postman using;
http://{{resourceServer.host}}:{{resourceServer.port}}/v{{apiVersion}}/dataPoints/6ffbd2cc-bcb0-409d-81de-b91f6c76262f
I get an
404 - Not Found
If I try to get at it via the schema name, like
http://{{resourceServer.host}}:{{resourceServer.port}}/v{{apiVersion}}/dataPoints?schema_namespace=omh&schema_name=body-weight&schema_version=1.0
I get
200 - OK
, but with an empty list.So - what is going wrong here???? (I've tried to run the resource server in DEBUG mode, but no useful information is provided as why the data point isn't found).
The text was updated successfully, but these errors were encountered: