API Stability Long-Term

The unenrollLogCollectors() GraphQL mutation unenrolls or disables a log collector from Fleet Management.

graphql
unenrollLogCollectors(
      ids: [string!]
   ): [EnrolledCollector!]!

Below is an example of how this mutation field might be used:

Show:
graphql
mutation{
  unenrollLogCollectors(
    ids: "f7be-46e6-8b16-146fed05f7ce"
  ) 
  { id }
}
Example Responses
Show:
json
{
   "data" : null,
   "errors" : [
      {
         "errorCode" : "InstanceDoesNotExist",
         "isHumioUpdating" : false,
         "locations" : [
            {
               "column" : 11,
               "line" : 1
            }
         ],
         "message" : "Instance \"f7be-46e6-8b16-146fed05f7ce\" does not exist.",
         "path" : [
            "unenrollLogCollectors"
         ]
      }
   ],
   "extensions" : {
      "preview" : [
         {
            "name" : "unenrollLogCollectors",
            "reason" : "[PREVIEW: Under development]"
         }
      ]
   }
}

To use, first obtain the machine ID of each log collector. Use the searchFleet() query to get a list of machine IDs.

Returned Datatype

The returned datatype EnrolledCollector has a few of its own parameters. Below is a list of them:

Table: EnrolledCollector

ParameterTypeRequiredDefaultStabilityDescription
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column.
Table last updated: Sep 24, 2024
configIdstring  Short-TermThe unique identifier for the configuration used.
idstringyes Short-TermThe unique identifier for the enrolled LogCollector.
machineIdstringyes Short-TermThe unique machine identifier.

Example

To unenroll a particular Log Collector enter something like the following:

Show:
graphql
mutation{
  unenrollLogCollectors(
    ids: "f7be-46e6-8b16-146fed05f7ce"
  ) 
  { id }
}
Example Responses
Show:
json
{
   "data" : null,
   "errors" : [
      {
         "errorCode" : "InstanceDoesNotExist",
         "isHumioUpdating" : false,
         "locations" : [
            {
               "column" : 11,
               "line" : 1
            }
         ],
         "message" : "Instance \"f7be-46e6-8b16-146fed05f7ce\" does not exist.",
         "path" : [
            "unenrollLogCollectors"
         ]
      }
   ],
   "extensions" : {
      "preview" : [
         {
            "name" : "unenrollLogCollectors",
            "reason" : "[PREVIEW: Under development]"
         }
      ]
   }
}