Obtaining Information About Objects

Description

The API provides the ability to obtain information about particular objects. This method retrieves all fields of a particular objects from the database.

HTTP method

GET

API URL
http://www.example.com/api/v2/object/<oid>
URL parameters
Parameter Description

oid

Object identifier. For more information, see Identification of Objects in Alloy Navigator Express.

NOTE: This HTTP request can not be used to query objects that belong in the Software Catalog and Stock Room sections of the product. You can however use the method illustrated in Retrieving Objects (GET).

Response Format

The server returns field values of the requested object in the Items array.

{

	"success": true,

	"errorCode": 0,

	"errorText": "",

	"responseObject": {

		"Items": [

		{

			"name": "<field name>",

			"caption": "<field caption(Label)>",

			"value": "<field value>"

		},

		//...

		]

	}

}
Property Description Format

Items

List of retrieved data fields with values.

Array

name

Field name.

String

caption

Field caption.

String

value

Field value.

String

In case of an invalid request the server returns an error message. The following errors may appear:

Error message Description

Authorization has been denied for this request.

The Authorization header is missing, or the token has expired.

You do not have enough permissions to access this item.

The user is not authorized to view the requested object.

Object <OID> not found.

There is no record with such object identifier.

Example 1

Here is an example of how you can query the Ticket T000002.

Request:

(GET) http://www.example.com/api/v2/object/T000002

Response:

{

	"success": true,

	"errorCode": 0,

	"errorText": "",

	"responseObject": {

		"Items": [

		{

			"name": "Ticket",

			"caption": "Ticket",

			"value": "T000002"

		},

		{

			"name": "Description",

			"caption": "Description",

			"value": "<p>The Titan server needs to be backed up 

				 before the 14th floor move.<p>"

		},

		{

			"name": "Completed_Date",

			"caption": "Completed Date",

			"value": "2016-08-12T14:56:31+03:00"

		},

		{

			"name": "Due_Date",

			"caption": "Due Date",

			"value": "2016-03-13T08:51:37+03:00"

		},

		{

			"name": "Start_Date",

			"caption": "Start Date",

			"value": null

		},

		{

			"name": "Submit_Date",

			"caption": "Submit Date",

			"value": "2016-03-13T08:51:37+03:00"

		},

		{

			"name": "Summary",

			"caption": "Summary",

			"value": "Backup Titan server prior to move"

		},

		{

			"name": "Assignee",

			"caption": "Assignee",

			"value": "Maxwell Newcomb"

		},

		//...

		]

	}

}
Example 2

Here is an example of how you can obtain the information about an object of the Purchase Order Items class, which has no OID.

Note that in this case you need to identify the object by the database record ID. For details on obtaining the ID, seeRetrieving Objects (GET).

Request:

(GET) http://www.example.com/api/v2/object/{EB6D7E24-59CA-4532-B365-451724A7B880}

Response:

{

	"success": true,

	"errorCode": 0,

	"errorText": "",

	"responseObject": {

		"Items": [

		{

			"name": "Line",

			"caption": "Line",

			"value": "1"

		},

		{

			"name": "Description",

			"caption": "Description",

			"value": "Dell Dimension 3000"

		},

		//...

		{

			"name": "PO_Status",

			"caption": "PO Status",

			"value": "Received"

		}

		]

	}

}