acceptTermsAndConditions()

The acceptTermsAndConditions() GraphQL mutation field is used by the client to accept LogScale's Terms and Conditions, without providing any additional information.

For more information, see the Terms and Conditions page on CrowdStrike's site.

Syntax

Below is the syntax for the acceptTermsAndConditions() mutation field:

graphql
acceptTermsAndConditions: Account!

There's no input, per se. You just execute the mutation field and it, along with authenication behind the scenes, is enough. You can stipulate return parameters to get information on the account, though. They're listed in the Returned Datatypes section on this page.

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

Raw
graphql
mutation {
  acceptTermsAndConditions
     {company, username, enabledFeaturesForAccount}
}
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 {
  acceptTermsAndConditions
     {company, username, enabledFeaturesForAccount}
}"
}
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 {
  acceptTermsAndConditions
     {company, username, enabledFeaturesForAccount}
}"
}
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 { ^
  acceptTermsAndConditions ^
     {company, username, enabledFeaturesForAccount} ^
}" ^
} '
Windows Powershell and curl
powershell
curl.exe -X POST 
    -H "Authorization: Bearer $TOKEN"
    -H "Content-Type: application/json"
    -d '{"query" : "mutation {
  acceptTermsAndConditions
     {company, username, enabledFeaturesForAccount}
}"
}'
    "$YOUR_LOGSCALE_URL/graphql"
Perl
perl
#!/usr/bin/perl

use HTTP::Request;
use LWP;

my $INGEST_TOKEN = "TOKEN";

my $uri = '$YOUR_LOGSCALE_URL/graphql';

my $json = '{"query" : "mutation {
  acceptTermsAndConditions
     {company, username, enabledFeaturesForAccount}
}"
}';
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 {
  acceptTermsAndConditions
     {company, username, enabledFeaturesForAccount}
}"
}'''

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 {
  acceptTermsAndConditions
     {company, username, enabledFeaturesForAccount}
}"
}
);


const options = {
  hostname: '$YOUR_LOGSCALE_URL/graphql',
  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": {
    "acceptTermsAndConditions": {
      "company": "Company",
      "username": "bob@company.com",
      "enabledFeaturesForAccount": [
        "CookieAuthServerSide",
        "DefaultRolesForGroups",
        "FieldAliasing",
        "FleetCollectorDebugLogging",
        "FleetCollectorMetrics",
        "FleetEphemeralHosts",
        "FleetRemoteUpdates",
        "InternalSubmissionRouting",
        "LiveTables",
        "LogAverageUsage",
        "MacosInstallerForLogCollector",
        "OrganizationSecurityPolicies",
        "PermissionTokens",
        "PreMergeMiniSegments",
        "QueryBacktrackingLimit",
        "WriteNewSegmentFileFormat"
      ]
    }
  }
}

Returned Datatypes

For Account, there are several parameters. Below is a list of them and a description of each:

Table: Account

ParameterTypeRequiredDefaultDescription
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: Nov 12, 2024
announcementNotification  Any announcements for the account. See Notification.
canCreateCloudTrialRepobooleanyes Whether the account may create a cloud trial repository.
canCreateRepobooleanyes Whether the account can create a repository.
companystring  The name of the company for the account.
countryCodestring  The two-letter ISO 3166-1 Alpha-2 code for the country of residence (e.g., us).
createdAtdatetimeyes The data and time the account was created.
currentOrganizationOrganizationyes Information on the Organization. See Organization.
enabledFeaturesForAccount[FeatureFlag]yes Features that are enabled for the account. See FeatureFlag.
emailstring  The account's email address for communications from LogScale.
externalGroupSynchronizationbooleanyes Whether there is group synchronization.
externalPermissionsbooleanyes Whether permissions are managed externally.
fieldConfigurationsmultipleyes The name of the view, as well as fields and how to configure them. The multiple datatype consists of (viewName: string): [FieldConfiguration]. See FieldConfiguration.
firstNamestring  The user's actual first name (e.g., Bob). Don't use with fullName.
fullNamestring  The user's full name (e.g., Bob Smith). Don't use if using other name parameters.
idstringyes The unique identifier for the account.
isCloudProAccountbooleanyes Whether the account is a cloud professional account.
isOrganizationRootbooleanyes Whether the organization is granted root access.
isRootbooleanyes Whether the account is granted root access.
lastNamestring  The user's actual last name or family name (e.g., Smith). Don't use with fullName.
notificationsV2multipleyes Notifications for account. The multiple datatype consists of (typeFilter: [NotificationTypes], orderBy: OrderBy, skip: integer, limit: integer): NotificationsResultSet. See NotificationTypes and NotificationsResultSet. This is a preview and subject to change. New sorting and filtering options might be added.
phoneNumberstring  The telephone number for LogScale to use for telephone text messages.
picturestring  File name of an image file for the account.
settingsUserSettingsyes Various default settings for user accounts. See UserSettings.
stateCodestring  The two-letter, ISO 3166-2 country sub-division code for the state of residence (e.g., ny).
tokenPersonalUserToken  The personal user token table for the account. See PersonalUserToken.
usernamestringyes The user name for the account.