POST /config/event_sources/log_source_management/log_source_types

Create a new custom log source type. Log source types do not need to be deployed.

The following fields can be provided in the body of this request, all other log source type fields will be ignored:
  • name - String - The name of the log source type. Cannot be empty. Must be 241 characters or less. Must not have been used before.
  • protocol_types - Array - The optional protocols that can be used for the log source type. All protocol ids must exist, list cannot be empty. If this field is not provided, all protocols will be available for this log source type.
  • default_protocol_id - Long - The protocol option that should be the default solution for this log source type.
  • log_source_extension_id - Long - The optional log source extension that is associated with the log source type. If specified, this must correspond to an existing log source extension.
Table 1. POST /config/event_sources/log_source_management/log_source_types resource details
MIME Type

application/json

Table 2. POST /config/event_sources/log_source_management/log_source_types request parameter details
Parameter Type Optionality Data Type MIME Type Description

fields

header

Optional

String

text/plain

Optional - Use this parameter to specify which fields you would like to get back in the response. Fields that are not named are excluded. Specify subfields in brackets and multiple fields in the same object are separated by commas.

Table 3. POST /config/event_sources/log_source_management/log_source_types request body details
Parameter Data Type MIME Type Description Sample

log_source_data

Object

application/json

The new log source type data.

{ "default_protocol_id": 42, "log_source_extension_id": 42, "name": "String", "protocol_types": [ { "protocol_id": 42 } ] }

Table 4. POST /config/event_sources/log_source_management/log_source_types response codes
HTTP Response Code Unique Code Description

201

The log source type was created successfully.

422

1001

The provided name is already in use.

422

1002

The provided name is empty.

422

1003

The provided name exceeds 241 characters.

422

1004

The provided protocol_types array is empty.

422

1005

The protocol_id for each ProtocolMapping in the protocol_types array must correspond to an existing protocol type.

422

1006

The provided log_source_extension_id does not correspond to an existing log source extension.

500

1100

An error occurred while attempting to create the log source.

Response Description

The newly created log source type which will have the following fields:
  • id - Integer - The ID of the log source type.
  • name - String - The unique name of the log source type. The name is not localized.
  • internal - Boolean - The condition is set to 'true' if the log source type is an internal log source type (for example, System Notification, SIM Audit, Asset Profiler, and so on) for which log sources cannot be created, edited, or deleted. If this is a user configurable log source type, the condition is set to 'false'.
  • custom - Boolean - The condition is set to 'true' if this is a custom log source type; otherwise, the condition is set to 'false'.
  • protocol_types - Array - The full list of supported protocol types for the log source type. Ensure that every log source type links to at least one protocol type. Each item in this array is a ProtocolMapping structure, defining both the ID of the protocol type and a Boolean that indicates whether the protocol is documented/fully supported for this log source type.
  • default_protocol_id - Long - The ID of the default protocol type for this log source type. The ID must correspond to an existing protocol type. See the Protocol Type API (/api/config/event_sources/log_source_management/protocol_types/).
  • log_source_extension_id - Long - The log source extension that is associated with the log source type. The ID must correspond to an existing log source extension or be set to 'null'. See the Log Source Extension API (/api/config/event_sources/log_source_management/log_source_extensions/).
  • supported_language_ids - Array - The IDs of the languages supported by this log source type. Each ID must correspond to an existing log source language. See the Log Source Language API (/api/config/event_sources/log_source_management/log_source_languages/). All non-custom log source types link to at least one language. Because languages are irrelevant for custom log source types, this field is 'null' for custom types.
  • version - String - The log source type plugin version.

Response Sample


{
    "custom": true,
    "default_protocol_id": 42,
    "id": 42,
    "internal": true,
    "log_source_extension_id": 42,
    "name": "String",
    "protocol_types": [
        {
            "documented": true,
            "protocol_id": 42
        }
    ],
    "supported_language_ids": [
        42
    ],
    "version": "String"
}