Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Collections

Collections in Kinesis API are containers for related data within a project. They serve as the primary way to organize, structure, and access your API's data resources.

Understanding Collections

Collections in Kinesis API work similarly to tables in a traditional database or collections in document databases. Each collection:

  • Belongs to a specific project
  • Contains data records that conform to defined structures
  • Can be accessed via API endpoints

Collections are the building blocks for storing and organizing your application data in a logical, accessible manner.

Accessing Collections

Collections can be accessed in two ways:

  1. Via the Web Interface: Navigate to /web/project?id=[project_id] and view the collections listed for that project
  2. Via the API: Use the collections endpoints with appropriate authentication

Collection Management Interface

Project Page

The collection management interface within a project includes:

  • A list of all collections in the project
  • Tools for creating new collections
  • Access to individual collection settings and structures

Creating a Collection

To create a new collection:

  1. Navigate to a project page
  2. Click the "Create a New Collection" button
  3. Fill in the required information:
    • Name: A human-readable name for the collection
    • ID: A unique identifier (used in API paths and queries)
    • Description: An optional description of the collection's purpose
  4. Click "Create" to save the collection

Create Collection Modal

Collection ID Requirements

Collection IDs must:

  • Be unique within a project
  • Contain only lowercase letters, numbers, and underscores
  • Start with a letter
  • Be between 3 and 50 characters

Collection Details Page

Clicking on a collection name takes you to the collection details page, where you can:

  1. View and edit collection information
  2. Manage structures within the collection
  3. Manage custom structures
  4. Delete the collection if needed

Collection Page

Updating Collection Information

You can update a collection's information by:

  1. Clicking the appropriate edit button next to the collection detail
  2. Modifying the information in the modal that appears
  3. Saving your changes

Available updates include:

  • Changing the collection name
  • Modifying the collection description

Note that the collection ID cannot be changed after creation as it would break existing data references.

Managing Structures

Each collection contains structures that define the fields of data it can store. From the collection details page, you can:

  • Create new structures using the "Create New" button in the Structures section
  • Edit existing structures by clicking the edit icon
  • Delete structures when they're no longer needed

See the Structures documentation for more details on creating and managing structures.

Managing Custom Structures

Custom structures allow you to create complex, reusable data templates. From the collection details page, you can:

  • Create new custom structures
  • Navigate to existing custom structures to edit their components
  • Delete custom structures when they're no longer needed

See the Custom Structures documentation for more information.

Deleting a Collection

To delete a collection:

  1. Navigate to the collection details page
  2. Click the "Delete Collection" button
  3. Confirm the deletion in the modal that appears

⚠️ Warning: Deleting a collection permanently removes all its structures and associated data. This action cannot be undone.

Data Operations

Once you've set up a collection with appropriate structures, you can perform various operations on its data:

  • Create new records
  • Retrieve records through queries
  • Update existing records
  • Delete records

See the Data documentation for details on working with collection data.

Best Practices

For optimal collection management:

  1. Logical Organization: Group related data into collections
  2. Clear Naming: Use descriptive names and IDs that reflect the collection's purpose
  3. Documentation: Add thorough descriptions to help team members understand the collection's use
  4. Structure Planning: Design your structures carefully before adding significant amounts of data
  5. Regular Maintenance: Periodically review collections to ensure they remain relevant and well-organized
  • Projects - Information about project management
  • Structures - Defining data structures for collections
  • Custom Structures - Creating complex, reusable structures
  • Data - Working with collection data