Skip to content

Latest commit

 

History

History
156 lines (105 loc) · 4.01 KB

MessagesApi.md

File metadata and controls

156 lines (105 loc) · 4.01 KB

graylog.MessagesApi

All URIs are relative to http://log.ano.yumimobi.com/api

Method HTTP request Description
analyze GET /messages/{index}/analyze Analyze a message string
parse POST /messages/parse Parse a raw message
search GET /messages/{index}/{messageId} Get a single message.

analyze

MessageTokens analyze(index, string)

Analyze a message string

Returns what tokens/terms a message string (message or full_message) is split to.

Example

import time
import graylog
from graylog.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = graylog.MessagesApi()
index = graylog.Object() # Object | The index the message containing the string is stored in.
string = graylog.Object() # Object | The string to analyze.

try: 
    # Analyze a message string
    api_response = api_instance.analyze(index, string)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling MessagesApi->analyze: %s\n" % e

Parameters

Name Type Description Notes
index Object The index the message containing the string is stored in.
string Object The string to analyze.

Return type

MessageTokens

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

parse

ResultMessage parse(json_body)

Parse a raw message

Example

import time
import graylog
from graylog.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = graylog.MessagesApi()
json_body = graylog.MessageParseRequest() # MessageParseRequest | 

try: 
    # Parse a raw message
    api_response = api_instance.parse(json_body)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling MessagesApi->parse: %s\n" % e

Parameters

Name Type Description Notes
json_body MessageParseRequest

Return type

ResultMessage

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

search

ResultMessage search(index, message_id)

Get a single message.

Example

import time
import graylog
from graylog.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = graylog.MessagesApi()
index = graylog.Object() # Object | The index this message is stored in.
message_id = graylog.Object() # Object | 

try: 
    # Get a single message.
    api_response = api_instance.search(index, message_id)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling MessagesApi->search: %s\n" % e

Parameters

Name Type Description Notes
index Object The index this message is stored in.
message_id Object

Return type

ResultMessage

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]