application.create

Description

object application.create(object/array **applications**)

This method allows to create new applications.

This method is only available to Admin and Super admin user types. Permissions to call the method can be revoked in user role settings. See User roles for more information.

Parameters

(object/array) Applications to create.

The method accepts applications with the standard application properties.

Return values

(object) Returns an object containing the IDs of the created applications under the applicationids property. The order of the returned IDs matches the order of the passed applications.

Examples

Creating an application

Create an application to store SNMP items.

Request:

  1. {
  2. "jsonrpc": "2.0",
  3. "method": "application.create",
  4. "params": {
  5. "name": "SNMP Items",
  6. "hostid": "10050"
  7. },
  8. "auth": "038e1d7b1735c6a5436ee9eae095879e",
  9. "id": 1
  10. }

Response:

  1. {
  2. "jsonrpc": "2.0",
  3. "result": {
  4. "applicationids": [
  5. "356"
  6. ]
  7. },
  8. "id": 1
  9. }

Source

CApplication::create() in ui/include/classes/api/services/CApplication.php.