# Manage segments and processing tasks

Create, update, enable, switch, or delete segments in knowledge-base data sources, and query, reconcile, and reprocess data-processing tasks. This page does not add data sources or maintain semantic entries.

## Prerequisites

Prepare credentials that can access the target workspace and IDs for the target knowledge base and data source. For service endpoints, authentication, and general request formats, see [Make your first AI Studio API call](https://omnifabric.cloudsigma.com/docs/developer/quickstart/index.html.md).

Before starting, confirm that the data source was added to the knowledge base. The specific input needed for segments, versions, and processing tasks is defined by the corresponding action pages.

## Call sequence

1. First [list data-processing tasks](https://omnifabric.cloudsigma.com/docs/reference/api/ai-studio/resource-center/knowledge-bases/list-data-processing-jobs.html.md) to understand processing tasks for the target data source.
2. To maintain content manually, create, import, or update segments, and retain segment or version IDs.
3. Use enable, disable, or switch-current-version actions to make a target segment version the currently usable version.
4. To reprocess data, submit a reconcile or re-vectorize action, then list processing tasks again to confirm the result.

## API operations

### Manage segments and versions

| Task | Use it when |
| --- | --- |
| [Create a segment](https://omnifabric.cloudsigma.com/docs/reference/api/ai-studio/resource-center/knowledge-bases/create-segment.html.md) | You identified the data source and segment content. |
| [Import initial segments](https://omnifabric.cloudsigma.com/docs/reference/api/ai-studio/resource-center/knowledge-bases/import-initial-segments.html.md) | Import a set of initial segments. |
| [Update a segment](https://omnifabric.cloudsigma.com/docs/reference/api/ai-studio/resource-center/knowledge-bases/update-segment.html.md) | You have a target segment ID and need to modify content or configuration. |
| [Enable or disable a segment](https://omnifabric.cloudsigma.com/docs/reference/api/ai-studio/resource-center/knowledge-bases/set-segment-enabled.html.md) | Change whether a segment participates in current use. |
| [Switch the current segment version](https://omnifabric.cloudsigma.com/docs/reference/api/ai-studio/resource-center/knowledge-bases/set-current-segment-version.html.md) | Specify the segment version currently in use. |
| [Delete a segment](https://omnifabric.cloudsigma.com/docs/reference/api/ai-studio/resource-center/knowledge-bases/delete-segment.html.md) | Confirm impact and conditions on the action page before deletion. |

### Process and reprocess data

| Task | Use it when |
| --- | --- |
| [Query data-processing tasks](https://omnifabric.cloudsigma.com/docs/reference/api/ai-studio/resource-center/knowledge-bases/list-data-processing-jobs.html.md) | View processing tasks and confirm later results. |
| [Reconcile data-processing tasks](https://omnifabric.cloudsigma.com/docs/reference/api/ai-studio/resource-center/knowledge-bases/reconcile-data-processing-jobs.html.md) | Reconcile processing tasks for a target data source. |
| [Re-vectorize data](https://omnifabric.cloudsigma.com/docs/reference/api/ai-studio/resource-center/knowledge-bases/revectorize-data-source.html.md) | Re-vectorize the target data source. |

## Confirm the result

After submitting a reconcile or re-vectorize action, use [List data-processing tasks](https://omnifabric.cloudsigma.com/docs/reference/api/ai-studio/resource-center/knowledge-bases/list-data-processing-jobs.html.md) to view the target task. After segment changes, use the result instructions on the corresponding action page to confirm the current version and enabled state.

## Limitations and notes

Deleting or disabling a segment, or switching the current version, changes segment results used later. Confirm impact and conditions on the corresponding action page before proceeding.

## Next steps

- [Manage data sources and documents](https://omnifabric.cloudsigma.com/docs/developer/api/ai-studio/knowledge-bases/data-sources-documents.html.md)
- [Manage semantic entries](https://omnifabric.cloudsigma.com/docs/developer/api/ai-studio/knowledge-bases/semantic-entries.html.md)
