{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Action target template",
  "type": "object",
  "properties": {
    "name": {
      "description": "A name to identify the action target template. **Remark**: Name is unique in the organization.",
      "type": "string"
    },
    "organizationId": {
      "description": "The organization to link the event source template",
      "type": "integer"
    },
    "public": {
      "description": "Make the action target template available to everybody.",
      "type": "boolean"
    },
    "configuration": {
      "description": "Providing a schema aims to help the WUI for configuration.",
      "type": "object",
      "properties": {
        "schema": {
          "description": "A valid JSON Schema.",
          "type": "object"
        },
        "url": {
          "description": "The configuration URL.",
          "type": "string"
        },
        "token": {
          "description": "JSON Web Token to be authenticated when contacting the configuration URL.",
          "type": "string"
        }
      },
      "required": [
        "schema",
        "url"
      ]
    },
    "configurationUi": {
      "description": "Provide the configuration for the dynamic UI.",
      "type": "object",
      "properties": {
        "schemaForm": {
          "description": "Valid form schema accordingly to: http://schemaform.io",
          "type": "array"
        }
      }
    },
    "target": {
      "description": "The target configuration.",
      "type": "object",
      "properties": {
        "url": {
          "description": "The action target URL.",
          "type": "string"
        },
        "token": {
          "description": "JSON Web Token to be authenticated when contacting the action target URL.",
          "type": "string"
        }
      },
      "required": [
        "url"
      ]
    }
  },
  "required": [
    "name",
    "organizationId",
    "target"
  ]
}