Model object update service

The model object update service resource creates, updates, or deletes model objects passed to the server in JSON or XML format.

Description

Use the model object update service to update or delete an existing model object, or to add a new model object. In each case, the target of the operation is the object specified in the body of the request, in JSON or XML format.

URL

scheme//hostname:port/rest/model/ModelObject
where:
scheme
The scheme of the URL (either HTTP: or HTTPS:).
hostname
The TCP/IP hostname or numeric IP address of the TADDM server.
port
The TCP/IP port on the TADDM server for the type of connection you are using (9430 for HTTP, or 9431 for HTTPS).

HTTP methods

POST
Creates or deletes a model object, depending on the value of the delete parameter. The object to be created or deleted must be specified in the body of the HTTP request in JSON or XML format. (The server automatically detects the format of the input data.) Specify only one primary object; arrays of objects are not supported.

If you use this method to create a new object, the specified object must not already exist in the TADDM database. (The POST method cannot be used to update an existing object.)

If you use this method to delete an existing object, only the GUID is required in the input data. However, the entire object can also be specified. No error is returned if the specified object does not exist.

PUT
Updates an existing object or creates a new object. The new object data must be specified in the body of the HTTP request in either JSON or XML format. Specify only one primary object; arrays of objects are not supported.

If the specified object already exists, it is updated with the new data. If the object does not exist, it is created.

If you are updating an existing object, you can improve performance by including only the GUID and the fields required for the update, instead of the entire object. For example, an update to the description of an OperatingSystem object might include the following data:
[{"description":"Validated on February 4","_class":"Linux","guid":"347EE
64E4FA93139A581757EC7F3ED2D"}]
Any object attributes not specified in the update data are left unchanged.

Parameters

delete={true|false}
Indicates whether the specified model object should be deleted. Use the HTTP POST method and delete=true to delete an object.
feed={json|xml}

The format to use for the returned data. Specify json or xml. This parameter is optional.

If you do not specify the feed parameter, the server uses the format specified by the HTTP Accept header (application/json or application/xml). If this header is not specified, the results are returned in JSON format.

mssGuid=value
The GUID value of the management software system (MSS) associated with the object. This parameter is optional.

Returns

If the request is successful, the server returns HTTP return code 200.

The following example deletes the model object specified by the input data:
http://example.com:9430/rest/model/ModelObject?delete=true