# Create Index

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Create Index"}
>
</Heading>

<MethodEndpoint
  method={"post"}
  path={"/api/v1/workspaces/{workspace_name}/indexes"}
  context={"endpoint"}
>
  
</MethodEndpoint>

Creates a new pipeline index.

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
  children={"Request"}
>
</Heading>

<ParamsDetails
  parameters={[{"description":"Type the name of the workspace.","in":"path","name":"workspace_name","required":true,"schema":{"description":"Type the name of the workspace.","title":"Workspace Name","type":"string"}}]}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={{"content":{"application/json":{"schema":{"properties":{"config_yaml":{"description":"Config YAML of the pipeline index.","title":"Pipeline Index Config YAML","type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Description of the pipeline index.","title":"Pipeline Index Description"},"name":{"description":"Name of the pipeline index.","minLength":1,"title":"Pipeline Index Name","type":"string"}},"required":["name","config_yaml"],"title":"CreatePipelineIndexRequest","type":"object"}}},"required":true}}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"201":{"content":{"application/json":{"schema":{"properties":{"config_yaml":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Config YAML of the pipeline index.","title":"Pipeline Index Config YAML"},"created_at":{"description":"Timestamp when the pipeline index was created.","format":"date-time","title":"Created At","type":"string"},"created_by":{"anyOf":[{"properties":{"family_name":{"description":"Family name of a user.","title":"Family name","type":"string"},"given_name":{"description":"Given name of a user.","title":"Given name","type":"string"},"user_id":{"description":"Unique identifier of a user.","format":"uuid","title":"User ID","type":"string"}},"required":["given_name","family_name","user_id"],"title":"Oauth User","type":"object"},{"type":"null"}],"description":"ID of the user who created the pipeline index.","title":"Created By User ID"},"deployed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Timestamp when the pipeline index was deployed.","title":"Pipeline Index Deployed At"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Description of the pipeline index.","title":"Pipeline Index Description"},"desired_status":{"description":"The desired status of the pipeline index.","title":"Pipeline Index Desired Status","enum":["DEPLOYED","UNDEPLOYED"],"type":"string"},"file_name_prefix_filter":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated prefix pattern filter (e.g. 'prefix1*,prefix2'). A prefix pattern to filter which files are indexed by this pipeline index. Only files whose names match the prefix will be indexed. Use the pattern like 'myprefix*' to match all files starting with 'myprefix'. Set to null to disable filtering and index all files.","title":"File Name Prefix Filter"},"gpu_enabled":{"description":"Indicates whether GPU acceleration is enabled for the pipeline index. When enabled, the pipeline can use GPU resources for faster processing. If the pipeline doesn't require GPUs, it will run on CPU regardless of this setting.","readOnly":true,"title":"GPU Enabled","type":"boolean"},"last_edited_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Timestamp when the pipeline index was last edited.","title":"Last Edited At"},"last_edited_by":{"anyOf":[{"properties":{"family_name":{"description":"Family name of a user.","title":"Family name","type":"string"},"given_name":{"description":"Given name of a user.","title":"Given name","type":"string"},"user_id":{"description":"Unique identifier of a user.","format":"uuid","title":"User ID","type":"string"}},"required":["given_name","family_name","user_id"],"title":"Oauth User","type":"object"},{"type":"null"}],"description":"ID of the user who last edited the pipeline index.","title":"Last Edited By User ID"},"max_index_replica_count":{"description":"Maximum number of replicas allowed for the pipeline index.","title":"Maximum Index Replica Count","type":"integer"},"name":{"description":"Name of the pipeline index.","title":"Pipeline Index Name","type":"string"},"pipeline_index_id":{"description":"Unique identifier of the pipeline index.","format":"uuid","title":"Pipeline Index ID","type":"string"},"settings":{"additionalProperties":true,"default":{},"description":"Settings for the pipeline index.","title":"Pipeline Index Settings","type":"object"},"status":{"description":"Indexing status of the pipeline index.","title":"Pipeline Index Indexing","properties":{"failed_file_count":{"description":"Files that failed to be indexed.","title":"Failed Files","type":"integer"},"indexed_file_count":{"description":"Files that were successfully indexed.","title":"Indexed Files","type":"integer"},"indexed_no_documents_file_count":{"description":"The number of files that were indexed but didn't create documents.","title":"Indexed Files with No Documents.","type":"integer"},"pending_file_count":{"description":"The number of files pending to be indexed.","title":"Pending Files","type":"integer"},"total_file_count":{"description":"The total number of files assigned to a pipeline.","title":"Total Files","type":"integer"}},"required":["indexed_no_documents_file_count","indexed_file_count","pending_file_count","failed_file_count","total_file_count"],"type":"object"},"updated_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Timestamp when the pipeline index was last updated.","title":"Updated At"},"workspace_id":{"description":"Workspace ID of the pipeline index.","format":"uuid","title":"Pipeline Index Workspace ID","type":"string"}},"required":["pipeline_index_id","name","config_yaml","workspace_id","desired_status","deployed_at","last_edited_at","max_index_replica_count","created_at","updated_at","created_by","last_edited_by","status","gpu_enabled"],"title":"PipelineIndex","type":"object"}}},"description":"Successful Response"},"402":{"description":"You've reached the maximum number of indexes for your organization. Delete an existing index to create a new one."},"409":{"description":"An index with this name already exists in your workspace. Choose a unique name for your index."},"422":{"description":"Invalid request body or invalid index configuration."}}}
>
  
</StatusCodes>
