Summary

The setChildSizeInParentOrgForOrganization() mutation sets the capacity size of the calling organization within the customer ID (CID) of its parent organization for a specified product type. The result is reflected in the childSizeInParentOrg field of the returned OrganizationCapacity object. Provide the productType argument to identify which product type's capacity to update; supply childSizeInParentOrg to set the size value, or omit it to clear the value.

This mutation is available on a preview basis. The mutation is currently a stub and does not persist the value.

Syntax

graphql
setChildSizeInParentOrgForOrganization(
      productType: String!,
      childSizeInParentOrg: Long
   ): OrganizationCapacity!

Provide productType (required) — a string identifying the product type whose capacity to update, for example falconComplete or main. Supply childSizeInParentOrg (optional) to set the size of this organization within the parent organization's CID for that product type; omit it or pass null to clear the value.

Returns a non-nullable OrganizationCapacity! object. See the Returned Values section for available fields.

Example

Raw
graphql
mutation {
  setChildSizeInParentOrgForOrganization(
    productType: "main",
    childSizeInParentOrg: 500
  ) {
    productType
    childSizeInParentOrg
    parentOrganizationId
  }
}
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 {
  setChildSizeInParentOrgForOrganization(
    productType: \"main\",
    childSizeInParentOrg: 500
  ) {
    productType
    childSizeInParentOrg
    parentOrganizationId
  }
}"
}
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 {
  setChildSizeInParentOrgForOrganization(
    productType: \"main\",
    childSizeInParentOrg: 500
  ) {
    productType
    childSizeInParentOrg
    parentOrganizationId
  }
}"
}
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 { ^
  setChildSizeInParentOrgForOrganization( ^
    productType: \"main\", ^
    childSizeInParentOrg: 500 ^
  ) { ^
    productType ^
    childSizeInParentOrg ^
    parentOrganizationId ^
  } ^
}" ^
} '
Windows Powershell and curl
powershell
curl.exe -X POST 
    -H "Authorization: Bearer $TOKEN"
    -H "Content-Type: application/json"
    -d '{"query" : "mutation {
  setChildSizeInParentOrgForOrganization(
    productType: \"main\",
    childSizeInParentOrg: 500
  ) {
    productType
    childSizeInParentOrg
    parentOrganizationId
  }
}"
}'
    "$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 {
  setChildSizeInParentOrgForOrganization(
    productType: \"main\",
    childSizeInParentOrg: 500
  ) {
    productType
    childSizeInParentOrg
    parentOrganizationId
  }
}";
$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 {
  setChildSizeInParentOrgForOrganization(
    productType: \"main\",
    childSizeInParentOrg: 500
  ) {
    productType
    childSizeInParentOrg
    parentOrganizationId
  }
}"
}'''

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 {
  setChildSizeInParentOrgForOrganization(
    productType: \"main\",
    childSizeInParentOrg: 500
  ) {
    productType
    childSizeInParentOrg
    parentOrganizationId
  }
}"
}
);


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": {
    "setChildSizeInParentOrgForOrganization": {
      "productType": "main",
      "childSizeInParentOrg": 500,
      "parentOrganizationId": "org-parent-abc123"
    }
  }
}

Input Parameters

Provide productType to identify the product type. Supply childSizeInParentOrg to set the size, or omit it to clear the existing value.

Table: Input Parameters and Datatypes

Parameter Type Required Default Description
This table contains all input parameters for this mutation.
childSizeInParentOrg Long     The capacity size of this organization within its parent organization's CID for the specified product type. Omit or pass null to clear the value.
productType String! yes   The product type whose capacity to update, for example falconComplete or main.

Returned Values

Returns a non-nullable OrganizationCapacity! object reflecting the capacity state after the update. The childSizeInParentOrg field contains the value set by this mutation.

Table: OrganizationCapacity Datatype

ParameterTypeRequiredDefaultStabilityAvailabilityDescription
childSizeInParentOrgLong  Previewavailable in 1.266 onlyThe size of this organization within the CID of its parent organization for this product type
cidSizeLong  Previewavailable 1.265 to 1.266The CID size for this organization and product type
organizationSizeInPoolLongyes Previewadded in 1.267The size of this organization within the pool for this product type
ownerOrganizationIdString  Previewavailable in 1.265 onlyThe organization holding the CID size for this organization and product type, if cidSize is not set here
parentOrganizationIdString  Previewavailable in 1.266 onlyThe parent organization holding the CID size for this organization and product type, if cidSize is not set here
poolNameStringyes Previewadded in 1.267The name of the pool the organization is part of for this product type
poolSizeLongyes Previewadded in 1.267The size of the pool for this product type
productTypeStringyes Previewadded in 1.265The product type this capacity applies to, e.g. 'falconComplete' or 'main'
summedOrganizationSizesInPoolLongyes Previewadded in 1.267The sum of the sizes of all organizations in the pool for this product type