Skip to content

Get Object Command (Spider)

Randy Guck edited this page Sep 26, 2014 · 3 revisions

[Table of Contents](https://github.com/dell-oss/Doradus/wiki/Spider Databases: Table-of-Contents) | [Previous](https://github.com/dell-oss/Doradus/wiki/Object Update Commands (Spider)) | [Next](https://github.com/dell-oss/Doradus/wiki/Object Query-Commands (Spider))
Spider REST Commands: Get Object Command


All fields of a single object can be fetched with a GET request using the application name, table name, and ID of the desired object:

GET /{application}/{table}/{ID}

The object’s ID should not be quoted, but it must be URL-encoded. If the specified object is not found, a 404 Not Found response is returned. Otherwise, all scalar and link fields of the object are returned as a 200 OK response. Leaf fields are qualified within their owning group fields. For example:

GET /Msgs/Person/UdjrbyhvF%2FfPGV6fT4fewg%3D%3D

The response message is the same used for Add Batch and Update Batch commands. MV scalar and link fields with a single value are returned without the enclosing add group. For example in XML:

<doc>
	<field name="Name">Damien Munro</field>
	<field name="DirectReports">
		<add>
			<value>+/0sWHX9YiVnWYT+kqwxig==</value>
			<value>0iaYNVln92Blc0HFxyMMOA==</value>
			<value>aZcnXyb1AJj1OLO92drpjA==</value>
			<value>let9N7as5W/N+9Lib0woKQ==</value>
			<value>qBbk9tqZ5sF+/1x/xsC9JA==</value>
			<value>tIlJFIruDFOoStlzzB9vag==</value>
			<value>zqd7seWR5a+78JRKc8ztDQ==</value>
		</add>
	</field>
	<field name="Manager">VTuT6K8SlRMnNtdscYDwLQ==</field>
	<field name="FirstName">Damien</field>
	<field name="LastName">Munro</field>
	<field name="_ID">UdjrbyhvF/fPGV6fT4fewg==</field>
	<field name="Location">
	<field name="Department">Management-Sales</field>
	<field name="Office">Melbourne</field>
	</field>
</doc>

In JSON, the same response is:

{"doc": {
	"Name": "Damien Munro",
	"DirectReports": {
		"add": [
			"+/0sWHX9YiVnWYT+kqwxig==",
			"0iaYNVln92Blc0HFxyMMOA==",
			"aZcnXyb1AJj1OLO92drpjA==",
			"let9N7as5W/N+9Lib0woKQ==",
			"qBbk9tqZ5sF+/1x/xsC9JA==",
			"tIlJFIruDFOoStlzzB9vag==",
			"zqd7seWR5a+78JRKc8ztDQ=="
		]
	},
	"Manager": "VTuT6K8SlRMnNtdscYDwLQ==",
	"FirstName": "Damien",
	"LastName": "Munro",
	"_ID": "UdjrbyhvF/fPGV6fT4fewg==",
	"Location": {
		"Department": "Management-Sales",
		"Office": "Melbourne"
	}
}}
Clone this wiki locally