Summary

The blockIngest() mutation pauses data ingestion into a specific repository for a set duration, up to one year. Use this mutation during maintenance windows, parser changes, or other operations where incoming data must stop temporarily. Blocking ingest does not apply to system repositories.

Syntax

graphql
blockIngest(
      repositoryName: String!, seconds: Int!
   ): BlockIngestMutation!

Provide the repository name and the block duration in seconds. Both parameters are required. The mutation returns a non-null BlockIngestMutation object containing repository details. See the Input Parameters section for argument descriptions and the Returned Values section for the return type fields.

Example

Raw
graphql
mutation {
  blockIngest(repositoryName: "our-server", seconds: 10)
  {repository {timeOfLatestIngest, ingestBlock} }
}
Mac OS or Linux (curl)
shell
curl -v -X POST $YOUR_LOGSCALE_URL/graphql \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d @- << EOF
{"query" : "mutation {
  blockIngest(repositoryName: \"our-server\", seconds: 10)
  {repository {timeOfLatestIngest, ingestBlock} }
}"
}
EOF
Mac OS or Linux (curl) One-line
shell
curl -v -X POST $YOUR_LOGSCALE_URL/graphql \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d @- << EOF
{"query" : "mutation {
  blockIngest(repositoryName: \"our-server\", seconds: 10)
  {repository {timeOfLatestIngest, ingestBlock} }
}"
}
EOF
Windows Cmd and curl
shell
curl -v -X POST $YOUR_LOGSCALE_URL/graphql ^
    -H "Authorization: Bearer $TOKEN" ^
    -H "Content-Type: application/json" ^
    -d @'{"query" : "mutation { ^
  blockIngest(repositoryName: \"our-server\", seconds: 10) ^
  {repository {timeOfLatestIngest, ingestBlock} } ^
}" ^
} '
Windows Powershell and curl
powershell
curl.exe -X POST 
    -H "Authorization: Bearer $TOKEN"
    -H "Content-Type: application/json"
    -d '{"query" : "mutation {
  blockIngest(repositoryName: \"our-server\", seconds: 10)
  {repository {timeOfLatestIngest, ingestBlock} }
}"
}'
    "$YOUR_LOGSCALE_URL/graphql"
Perl
perl
#!/usr/bin/perl

use HTTP::Request;
use LWP;

my $TOKEN = "TOKEN";

my $uri = '$YOUR_LOGSCALE_URL/graphql';

my $query = "mutation {
  blockIngest(repositoryName: \"our-server\", seconds: 10)
  {repository {timeOfLatestIngest, ingestBlock} }
}";
$query =~ s/\n/ /g;
my $json = sprintf('{"query" : "%s"}',$query);
my $req = HTTP::Request->new("POST", $uri );

$req->header("Authorization" => "Bearer $TOKEN");
$req->header("Content-Type" => "application/json");

$req->content( $json );

my $lwp = LWP::UserAgent->new;

my $result = $lwp->request( $req );

print $result->{"_content"},"\n";
Python
python
#! /usr/local/bin/python3

import requests

url = '$YOUR_LOGSCALE_URL/graphql'
mydata = r'''{"query" : "mutation {
  blockIngest(repositoryName: \"our-server\", seconds: 10)
  {repository {timeOfLatestIngest, ingestBlock} }
}"
}'''

resp = requests.post(url,
                     data = mydata,
                     headers = {
   "Authorization" : "Bearer $TOKEN",
   "Content-Type" : "application/json"
}
)

print(resp.text)
Node.js
javascript
const https = require('https');

const data = JSON.stringify(
    {"query" : "mutation {
  blockIngest(repositoryName: \"our-server\", seconds: 10)
  {repository {timeOfLatestIngest, ingestBlock} }
}"
}
);


const options = {
  hostname: '$YOUR_LOGSCALE_URL',
  path: 'graphql',
  port: 443,
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Content-Length': data.length,
    Authorization: 'BEARER ' + process.env.TOKEN,
    'User-Agent': 'Node',
  },
};

const req = https.request(options, (res) => {
  let data = '';
  console.log(`statusCode: ${res.statusCode}`);

  res.on('data', (d) => {
    data += d;
  });
  res.on('end', () => {
    console.log(JSON.parse(data).data);
  });
});

req.on('error', (error) => {
  console.error(error);
});

req.write(data);
req.end();
Example Responses
Success (HTTP Response Code 200 OK)
json
{
  "data": {
    "blockIngest": {
      "repository": {
        "timeOfLatestIngest": "2026-11-14T06:34:16.311Z",
        "ingestBlock": "2026-11-15T06:35:05.947Z"
      }
    }
  }
}

Input Parameters

Provide the repository name and the number of seconds to block ingestion. Calculate the duration in seconds for the desired block period — for example, 3600 seconds for one hour. The following table describes each parameter.

Table: Input Parameters and Datatypes

Parameter Type Required Default Description
This table includes all input parameters for this mutation.
repositoryName string yes   The name of the repository to pause ingesting. System repositories cannot be blocked.
seconds integer yes   The duration to block ingestion, in seconds. The maximum value is one year in seconds.

Returned Values

The mutation returns a BlockIngestMutation! object. Request fields such as repository.ingestBlock and repository.timeOfLatestIngest to confirm the block is in effect and to see when ingestion resumes.

Table: BlockIngestMutation Datatype

ParameterTypeRequiredDefaultStabilityAvailabilityDescription
repositoryRepositoryyes Short-Term  

The BlockIngestMutation type includes a repository field that returns the full Repository datatype. The following table describes the fields available on that sub-type.