API Stability Preview

The addCrossOrgViewConnections() GraphQL mutation is used to add a cross organization view connection.

Syntax

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

graphql
addCrossOrgViewConnections(
       input: AddCrossOrganizationViewConnectionFiltersInput!
    ): View!

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

Raw
graphql
mutation {
  addCrossOrgViewConnections(input:{
    name: "view1",
    connections: [
       { repoName: "child-org-repo",
         filter: "logLevel=ERROR",
         organizationId: "child-org-id" } ]
    } 
  ) 
  { id }
}
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 {
  addCrossOrgViewConnections(input:{
    name: \"view1\",
    connections: [
       { repoName: \"child-org-repo\",
         filter: \"logLevel=ERROR\",
         organizationId: \"child-org-id\" } ]
    } 
  ) 
  { id }
}"
}
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 {
  addCrossOrgViewConnections(input:{
    name: \"view1\",
    connections: [
       { repoName: \"child-org-repo\",
         filter: \"logLevel=ERROR\",
         organizationId: \"child-org-id\" } ]
    } 
  ) 
  { id }
}"
}
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 { ^
  addCrossOrgViewConnections(input:{ ^
    name: \"view1\", ^
    connections: [ ^
       { repoName: \"child-org-repo\", ^
         filter: \"logLevel=ERROR\", ^
         organizationId: \"child-org-id\" } ] ^
    }  ^
  )  ^
  { id } ^
}" ^
} '
Windows Powershell and curl
powershell
curl.exe -X POST 
    -H "Authorization: Bearer $TOKEN"
    -H "Content-Type: application/json"
    -d '{"query" : "mutation {
  addCrossOrgViewConnections(input:{
    name: \"view1\",
    connections: [
       { repoName: \"child-org-repo\",
         filter: \"logLevel=ERROR\",
         organizationId: \"child-org-id\" } ]
    } 
  ) 
  { id }
}"
}'
    "$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 {
  addCrossOrgViewConnections(input:{
    name: \"view1\",
    connections: [
       { repoName: \"child-org-repo\",
         filter: \"logLevel=ERROR\",
         organizationId: \"child-org-id\" } ]
    } 
  ) 
  { id }
}"
}';
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 {
  addCrossOrgViewConnections(input:{
    name: \"view1\",
    connections: [
       { repoName: \"child-org-repo\",
         filter: \"logLevel=ERROR\",
         organizationId: \"child-org-id\" } ]
    } 
  ) 
  { id }
}"
}'''

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 {
  addCrossOrgViewConnections(input:{
    name: \"view1\",
    connections: [
       { repoName: \"child-org-repo\",
         filter: \"logLevel=ERROR\",
         organizationId: \"child-org-id\" } ]
    } 
  ) 
  { id }
}"
}
);


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": {
    "addCrossOrgViewConnections": {
      "id": "view1"
    }
  }
}

Given Datatypes

For AddCrossOrganizationViewConnectionFiltersInput, there are a couple of parameters that may be given. Below is a list of them along with a description of each:

Table: AddCrossOrganizationViewConnectionFiltersInput

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: Feb 20, 2025
connections[CrossOrganizationViewConnectionInputModel]yes PreviewInformation on the cross organization view connection. See CrossOrganizationViewConnectionInputModel.
namestringyes PreviewThe name of the cross organization view connection.

Returned Datatypes

For View, there are a several parameters. Below is a list of them along with a description of each:

Table: View

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: Apr 2, 2025
actionmultipleyes Long-TermA saved action. The multiple datatype consists of (id: string): Action. The id is the unique identifier of the action. See Action.
actionsmultipleyes Long-TermA list of saved actions. The multiple datatype consists of (actionIds: [string]): [Action]. See Action.
aggregateAlertmultipleyes Long-TermA saved aggregate alert. The multiple datatype consists of (id: string): AggregateAlert. See aggregateAlert.
aggregateAlerts[aggregateAlert]yes Long-TermSaved aggregate alerts. See aggregateAlert.
alertmultipleyes Long-TermA saved alert. The multiple datatype consists of (id: string): Alert. See Alert.
alerts[Alert]yes Long-TermSaved alerts. See Alert.
allowedViewActions[ViewAction]yes Long-TermReturns the all actions the user is allowed to perform on the view. See ViewAction.
automaticSearchbooleanyes Long-TermWhether the search is executed automatically.
availablePackagesmultiple  Long-TermReturns a list of available packages that can be installed. The multiple datatype consists of (filter: string, tags: [PackageTag!], categories: [string]): [PackageRegistrySearchResultItem]. PackageTag is a scalar. See PackageRegistrySearchResultItem.
checkClusterConnections[ClusterConnectionStatus]yes Short-TermCheck all of this search domain's cluster connections. This is a preview and subject to change. See ClusterConnectionStatus.
clusterConnectionmultipleyes Short-TermA specific cluster connection. The multiple datatype consists of (id: string): ClusterConnection. See ClusterConnection.
clusterConnections[ClusterConnection]yes Short-TermThe search domain's cluster connections. See ClusterConnection.
connections[ViewConnection]yes Long-TermThe connections for the view. This is a preview and subject to change. See ViewConnection.
crossOrgConnections[CrossOrgViewConnection]yes Short-TermThe connections for the cross organization connections (see CrossOrgViewConnection Table).
dashboardmultipleyes Long-TermA saved dashboard. The multiple datatype consists of (id: string): Dashboard. See dashboard.
dashboards[dashboard]yes Long-TermSaved dashboards. See dashboard.
defaultQuerysavedQuery  Long-TermThe default saved query. See savedQuery.
deletedDatelong  Long-TermThe point in time the search domain was marked for deletion.
descriptionstring  Long-TermA description of the view.
fileFieldSearchmultipleyes Long-TermThe fields to search in a given file. The multiple datatype consists of (fileName: string, fieldName: string, prefixFilter: string, valueFilters: [FileFieldFilterType], fieldsToInclude: [string], maxEntries: integer): [DictionaryEntryType]. See FileFieldFilterType and DictionaryEntryType.
files[File]yes Long-TermA list of files used. See File.
filterAlertmultipleyes Long-TermA saved filter alert. The multiple datatype consists of (id: string): FilterAlert. See FilterAlert.
filterAlerts[FilterAlert]yes Long-TermSaved filter alerts. See FilterAlert.
groups[group]yes Long-TermGroups with assigned roles. See group.
hasPackageInstalledmultipleyes Long-TermDetermines whether package has been installed. The multiple datatype consists of (packageId: VersionedPackageSpecifier): boolean. VersionedPackageSpecifier is a scalar.
idstringyes Long-TermThe unique identifier of the view.
installedPackages[PackageInstallation]yes Long-TermList packages installed on a specific view or repository See PackageInstallation.
interactions[ViewInteraction]yes Long-TermAll interactions defined for the view. See ViewInteraction.
isActionAllowedmultipleyes Long-TermDetermines whether current user is allowed to perform the given action on the view. The multiple datatype consists of (action: ViewAction): boolean. See ViewAction.
isFederatedbooleanyes PreviewWhether the view is Federated. This is a preview and subject to change.
isStarredbooleanyes Long-TermWhether the view should be marked with a star.
nameRepoOrViewNameyes Long-TermThe name of the repository or view. RepoOrViewName is a scalar.
packageV2multipleyes Long-TermReturns a specific version of a package given a package version. The multiple datatype consists of (packageId: VersionedPackageSpecifier): Package2. VersionedPackageSpecifier is a scalar. See Package2.
packageVersionsmultipleyes Long-TermThe available versions of a package. This is a preview and may be moved to Package2. The multiple datatype consists of (packageId: UnversionedPackageSpecifier): [RegistryPackageVersionInfo]. UnversionedPackageSpecifier is a scalar. See RegistryPackageVersionInfo.
permanentlyDeletedAtlong  Long-TermThe point in time the search domain will not be restorable anymore.
recentQueriesV2[RecentQuery]yes Long-TermList of recent queries. See RecentQuery.
reposExcludedInSearchLimit[string]yes Long-TermRepositories not part of the search limitation.
resourcestringyes Short-TermThe resource identifier for the search domain.
savedQueries[savedQuery]yes Long-TermA list of saved queries. See savedQuery.
savedQuerymultipleyes Long-TermA saved query. The multiple datatype consists of (id: string): SavedQuery. See savedQuery.
scheduledReportmultipleyes Long-TermSaved scheduled report. The multiple datatype consists of (id: string): ScheduledReport. See ScheduledReport.
scheduledReports[ScheduledReport]yes Long-TermSaved scheduled reports See ScheduledReport.
scheduledSearchmultipleyes Long-TermA saved scheduled search. The multiple datatype consists of (id: string): ScheduledSearch. See ScheduledSearch.
scheduledSearches[ScheduledSearch]yes Long-TermSaved scheduled searches. See ScheduledSearch.
searchLimitedMslong  Long-TermSearch limit in milliseconds, by which searches are limited.
starredFields[string]yes Long-TermFields marked with a star.
tags[string]yes Long-TermAll tags from all datasources.
users[User]yes Long-TermUsers who have access. See User.
usersAndGroupsmultiple  Long-TermUsers or groups who have access. The multiple datatype consists of (search: string, skip: integer, limit: integer): UsersAndGroupsSearchResultSet. See UsersAndGroupsSearchResultSet.
usersV2multiple  PreviewSearch users with a given permission. The multiple datatype consists of (search: string, permissionFilter: Permission, skip: integer, limit: integer): Users!. See users.
viewerQueryPrefixstringyes Long-TermThe query prefix prepended to each search in the domain.