Security Requirements and Controls
API Stability Short-Term

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!

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

Show:
graphql
mutation {
  createRepository(
        name: "my-repository",
        description: "My Repository",
        type: PERSONAL,
        dataType: ANYDATA
      )
  { repository { id } }
}
Example Responses
Show:
json
{
  "data": {
    "createRepository": {
      "repository": {
        "id": "my-repository"
      }
    }
  }
}

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.

Given Datatypes

RepositoryType, is an enumerated list of repository types. They're listed below:

Table: RepositoryType

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: Mar 14, 2025
DEFAULTboolean  Long-TermWhether repository type is a default one.
MANAGEDboolean  Long-TermWhether repository type is managed.
PERSONALboolean  Long-TermWhether repository type is personal.
SYSTEMboolean  Long-TermWhether repository type is a system repository.
TRIALboolean  Long-TermWhether repository type is for a trial account.

RepositoryDataType, is an enumerated list of repository data types. They're listed below:

Table: RepositoryDataType

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: Sep 16, 2024
ANYDATAboolean  Short-TermWhether repository data is unrestricted to a particular type.
FALCONboolean  Short-TermWhether repository data is restricted to Falcon.

Returned Datatypes

The returned datatype CreateRepositoryMutation has a few parameters. Below is a list of them along with a description of each:

Table: CreateRepositoryMutation

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