API Stability Long-Term

The updatePackageFromZip() GraphQL mutation is used to update a package from a file provided in multipart/form-data (i.e., name=file) in a specified view.

For more information on packages, see the Packages documentation page.

Syntax

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

graphql
updatePackageFromZip(
      viewName: string!
      conflictResolutions: [ConflictResolutionConfiguration!]!
      queryOwnershipType: QueryOwnershipType
   ): BooleanResultType!

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

Show:
graphql
mutation {
  updatePackageFromZip(
       viewName: "humio",
       conflictResolutions: [ { entityType: Dashboard, 
                                entityName: "Errors",
                                conflictResolution: Ours },
                              { entityType: Dashboard, 
                                entityName: "Hosts",
                                conflictResolution: Ours }],
       queryOwnershipType: Organization
  )
  { result }
}
Example Responses
Show:
json
{
  "data": {
    "updatePackageFromZip": {
      "result": true
    }
  }
}

Given Datatypes

For ConflictResolutionConfiguration, there are a few parameters. Below is a list of them along with their a description of each:

Table: ConflictResolutionConfiguration

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 17, 2024
conflictResolutionMergeStrategyyes Long-TermHow conflicts are resolved. See MergeStrategy.
entityNamestringyes Long-TermThe name of the entity. The type, VersionedPackageSpecifier is a scalar.
entityTypeAssetTypeyes Long-TermThe type of entity. See AssetType.

QueryOwnershipType is an enumerated list of choices. Below is a list of them:

Table: QueryOwnershipType

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
Organizationboolean  Long-TermQueries run on behalf of the organization.
Userboolean  Long-TermQueries run on behalf of the user.

Returned Datatypes

BooleanResultType has a simple, boolean parameter. See the example above to understand better.

Table: BooleanResultType

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
resultsbooleanyes Long-TermWhether the mutation was performed.