device/1), the X-EM7-Implemented-methods header will contain "GET,POST,PUT,DELETE", because a specific device resource supports all available methods. If you perform a GET request on a specific device (e.g. For example, if you perform a GET request on the /device resource index, X-EM7-Implemented-methods will contain "GET,POST", the two methods supported by /device. This header is intended to provide information on the actions that can be performed on a given resource. A comma-delimited list of methods that are supported by the requested resource. In addition to HTTP status codes, every response from the API includes headers that provide additional details about the result of a request: Indicates that the requested resource is a placeholder for future use. The X-EM7-Status-Message header may contain more information. Indicates that a general error has occurred with the request that is not described by another status code. Indicates that the content-type provided in a PUT or POST request is not supported. Indicates that the accept header included in the request does not allow an XML or JSON response. For example, the DELETE method cannot be used on a ticket resource. Indicates that the method used in the request is not permitted with the specified resource. Indicates that there is no resource at the URI specified in the request. Indicates that the credentials provided for authentication were valid, but the user is not permitted to access the resource. Indicates invalid credentials were provided for authentication. Indicates that the XML or JSON posted with the request contained bad syntax or was missing required fields. The "Location" header will contain the URI for the preferred means of fetching the resource. If a response has a 303 See Other status code, a "Location" header will be included in the response. Indicates that the request is not the preferred means of fetching the resource. The "Location" header will contain the URI of your request with the default required options or filters included. If a response has a 302 Found status code, a "Location" header will be included in the response. Indicates that the request did not include required options or filters. For example, a GET request was made for an interface (the sub-resource) for a device (the main resource), but the interface ID in the URI is associated with a different device than the device ID used in the URI. Indicates that the request was made on a sub-resource, but the sub-resource ID used in the request URI does not match a sub-resource associated with the main resource. This response is typical when a file is uploaded via a PUT request. Indicates the request was successful but the API returned no content. Indicates the request was accepted for processing.
201 Created is not used when a resource is updated. Indicates that a new resource was created. Indicates that the request was valid and the transaction executed normally. Every response from the API will have one of the following status codes in the header: The API uses standard HTTP status codes to indicate the general result of a request. If a resource allows the DELETE method, a successful DELETE request will remove the corresponding entry in the ScienceLogic Database. The result of a PUT request will be consistent if the request is repeated.ĭELETE removes resources. Unlike POST, PUT will replace an entire resource. The URI for the new resource is based on the unique ID for the resource. The system creates a unique ID for the new resource. For example, to create a ticket, you would POST JSON or XML data to the following URI:
#Sciencelogic em7 api update#
The API will update only the attributes specified in the request. If POST is used to update a resource, not all attributes of the resource need to be specified. For example, to update a ticket with ID "1", you would POST JSON or XML data to the following URI: