Table of Contents
Overview
This document provides an overview of the GraphQL API for managing bundles within a project. It includes the available queries and mutations, as well as the types used in the API.
Schemas
Query
bundle
Fetches a specific bundle by its ID.
Arguments:
id: String!
- The unique identifier of the bundle. REQUIRED
Returns:
Example:
query { bundle(id: "bundle-10004-9e93307c-12ab-4a6a-9119-e427f0f1e04e") { id name projectId startDate releaseDate versionId description archived children { componentVersionId } released } }
bundles
Fetches all bundles for a given project.
Arguments:
projectId: String!
- The unique identifier of the project. REQUIRED
Returns:
[Bundle] - An array of bundles.
Example:
query { bundles(projectId: "10000") { id name projectId startDate releaseDate versionId description archived children { componentVersionId } released } }
bundlesWithinDateRange
Fetches all bundles within a specified date range for a given project.
Arguments:
startDate: String!
- The start date of the range. REQUIREDendDate: String!
- The end date of the range. REQUIREDprojectId: String!
- The unique identifier of the project. REQUIRED
Returns:
[Bundle] - An array of bundles.
Example:
query { bundlesWithinDateRange( startDate: "2024-01-01" endDate: "2024-12-31" projectId: "10000" ) { id name projectId startDate releaseDate versionId description archived children { componentVersionId } released } }
Mutation
saveBundle
Saves a new bundle or updates an existing one.
Arguments:
newBundle:
InputBundle! - The input data for the bundle. REQUIREDoldBundleId: String
- The unique identifier of the existing bundle to update.
Returns:
Bundle - The saved or updated bundle.
Example:
mutation { saveBundle( newBundle: { id: "bundle-10004-9e93307c-12ab-4a6a-9119-e427f0f1e04e", name: "New Bundle", projectId: "proj123", startDate: "2024-01-01", releaseDate: "2024-06-01", versionId: "v1.0", archived: false, description: "Initial bundle", children: [{ componentVersionId: "compVersion-10000-10000-10000" }], released: true }, oldBundleId: "bundle-10004-9e93307c-12ab-4a6a-9119-e427f0f1e04e" ) { id name projectId startDate releaseDate versionId description archived children { componentVersionId } released } }
addComponentVersionToBundle
Adds a component version to an existing bundle.
Arguments:
bundle:
SaveCVBundleInput! - The bundle data. REQUIREDnewComponentVersionId: String!
- The ID of the new component version to add. REQUIREDoldComponentVersionId: String
- The ID of the old component version to replace.
Returns:
Bundle - The updated bundle.
Example:
mutation { addComponentVersionToBundle( bundle: { id: "bundle-10004-9e93307c-12ab-4a6a-9119-e427f0f1e04e", name: "Updated Bundle", projectId: "proj123", startDate: "2024-01-01", releaseDate: "2024-06-01", versionId: "v1.0", archived: false, children: [{ componentVersionId: "compVersion-10000-10000-10000" }], released: true }, newComponentVersionId: "compVersion-10001-10001-10001", oldComponentVersionId: "compVersion-10000-10000-10000" ) { id name projectId startDate releaseDate versionId description archived children { componentVersionId } released } }
deleteBundle
Deletes a specific bundle by its ID.
Arguments:
id: String!
- The unique identifier of the bundle. REQUIRED
Returns:
String!
- A message indicating the result of the deletion.
Example:
mutation { deleteBundle(id: "bundle-10004-9e93307c-12ab-4a6a-9119-e427f0f1e04e") }
deleteCVFromBundle
Deletes a component version from a bundle.
Arguments:
bundleId: String!
- The unique identifier of the bundle. REQUIREDcomponentVersionId: String!
- The unique identifier of the component version to delete. REQUIRED
Returns:
String!
- A message indicating the result of the deletion.
Example:
mutation { deleteCVFromBundle( bundleId: "bundle-10004-9e93307c-12ab-4a6a-9119-e427f0f1e04e", componentVersionId: "compVersion-10000-10000-10000" ) }
Types
Bundle
Represents a bundle within a project.
Fields:
id: String!
- The unique identifier of the bundle.name: String!
- The name of the bundle.projectId: String!
- The unique identifier of the project.startDate: Int!
- The start date of the bundle as a timestamp.releaseDate: Int!
- The release date of the bundle as a timestamp.versionId: String
- The version identifier of the bundle.description: String
- A description of the bundle.archived: Boolean!
- Indicates if the bundle is archived.children:
[ComponentVersionBundle] - The component versions included in the bundle.released: Boolean!
- Indicates if the bundle is released.
SavedBundle
Represents a saved bundle within a project.
Fields:
id: String!
- The unique identifier of the bundle.name: String!
- The name of the bundle.projectId: String!
- The unique identifier of the project.startDate: String
- The start date of the bundle.releaseDate: String
- The release date of the bundle.versionId: String
- The version identifier of the bundle.archived: Boolean!
- Indicates if the bundle is archived.children:
[ComponentVersionBundle] - The component versions included in the bundle.released: Boolean!
- Indicates if the bundle is
released.
ComponentVersionBundle
Represents a component version within a bundle.
Fields:
componentVersionId: String!
- The unique identifier of the component version.
InputBundle
Input type for saving or updating a bundle.
Fields:
id: String
- The unique identifier of the bundle.name: String!
- The name of the bundle. REQUIREDprojectId: String!
- The unique identifier of the project. REQUIREDarchived: Boolean!
- Indicates if the bundle is archived. REQUIREDreleased: Boolean!
- Indicates if the bundle is released. REQUIREDstartDate: String
- The start date of the bundle.releaseDate: String
- The release date of the bundle.versionId: String
- The version identifier of the bundledescription: String
- A description of the bundle.children:
[ComponentVersionBundleInput] - The component versions included in the bundle.
SaveCVBundleInput
Input type for adding a component version to a bundle.
Fields:
id: String!
- The unique identifier of the bundle. REQUIREDname: String!
- The name of the bundle. REQUIREDprojectId: String!
- The unique identifier of the project.REQUIREDreleased: Boolean!
- Indicates if the bundle is released. REQUIREDarchived: Boolean!
- Indicates if the bundle is archived. REQUIREDstartDate: String
- The start date of the bundle.releaseDate: String
- The release date of the bundle.versionId: String
- The version identifier of the bundle.children:
[ComponentVersionUIInput]- The component versions included in the bundle.
ComponentVersionUIInput
Input type for specifying a component version within a bundle.
Fields:
projectId: String!
- The unique identifier of the project. REQUIREDversionId: String!
- The unique identifier of the version. REQUIREDcomponentId: String!
- The unique identifier of the component. REQUIRED
ComponentVersionBundleInput
Input type for specifying a component version within a bundle.
Fields:
componentVersionId: String!
- The unique identifier of the component version. REQUIRED