The createRepository() GraphQL mutation may be used to create a new repository in LogScale.

For more information on creating a repository, see the Creating a Repository or View documentation page. You may also want to look at the Repositories & Views and Repositories pages for related information.

Syntax

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

graphql
createRepository(
     name: string!
     description: string
     retentionInMillis: long
     retentionInIngestSizeBytes: long
     retentionInStorageSizeBytes: long
     organizationId: string, 
     type: RepositoryType, 
     repositoryId: string, 
     dataType: RepositoryDataType,
     limitId: string
   ): CreateRepositoryMutation!

Regarding limitId, it's the limit to which the repository should be attached, only a cloud feature. If not specified, a default will be found and used.

Returned Datatypes

The returned datatype CreateRepositoryMutation has its own parameters. Below is a list of them along with their datatypes and a description of each:

Table: CreateRepositoryMutation

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: Sep 24, 2024
repositoryRepositoryyes The repository to create. See Repository.