POST /config/event_sources/log_source_management/log_source_types/{id}

Updates a log source type by ID.

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. This is only editable for custom log source types.
  • protocol_types - Array - The protocols that can be used for the log source type. All protocol ids must exist, list cannot be empty. This is only editable for custom log source types.
  • default_protocol_id - Long - The protocol option that should be the default solution for this log source type.
  • log_source_extension_id - Long - The log source extension that is associated with the log source type. If specified, this must correspond to an existing log source extension. This field can have a value of 'null', which will remove the extension on this log source type.
Table 1. POST /config/event_sources/log_source_management/log_source_types/{id} resource details
MIME Type

application/json

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

id

path

Required

Number (Integer)

text/plain

The ID of the log source type to update.

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/{id} request body details
Parameter Data Type MIME Type Description Sample

log_source_type_data

Object

application/json

The updated log source type data. Any field not provided will be ignored.

{ "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/{id} response codes
HTTP Response Code Unique Code Description

200

The log source type was updated successfully.

404

1010

The requested log source type cannot be found.

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

1020

An error occurred while attempting to update the log source.

Response Description

The updated 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"
}