# Import Query Set

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Import Query Set"}
>
</Heading>

<MethodEndpoint
  method={"post"}
  path={"/api/v2/workspaces/{workspace_id}/query_sets/import"}
  context={"endpoint"}
>
  
</MethodEndpoint>

Imports a query set into deepset Cloud.

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

<ParamsDetails
  parameters={[{"in":"path","name":"workspace_id","required":true,"schema":{"format":"uuid","title":"Workspace ID","type":"string"}}]}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"format":"binary","title":"File","type":"string"}},"required":["file"],"title":"Body_import_query_set_api_v2_workspaces__workspace_id__query_sets_import_post","type":"object"}}},"required":true}}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"200":{"content":{"application/json":{"schema":{"properties":{"created_at":{"description":"Timestamp of when the query set was created.","format":"date-time","title":"Created at","type":"string"},"created_by":{"properties":{"family_name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Family name of a user.","title":"Family name"},"given_name":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Given name of a user.","title":"Given name"},"user_id":{"format":"uuid","title":"User Id","type":"string"}},"required":["user_id"],"title":"Oauth User","type":"object","description":"The user who created the query set."},"name":{"description":"Name of the query set.","title":"Name","type":"string"},"query_set_id":{"description":"Query set ID.","format":"uuid","title":"Query set ID","type":"string"}},"required":["query_set_id","name","created_by","created_at"],"title":"QuerySet","type":"object"}}},"description":"Returns the ID of the imported query set."},"400":{"description":"The CSV file has wrong encoding or doesn't contain the required column 'query'. Upload a valid UTF-8 encoded CSV file."},"409":{"description":"Change the name of this query set and upload it again. An query set with this name already exists in your workspace."},"415":{"description":"Upload a valid CSV file as the query set. Currently, we only support the CSV format for query sets."},"422":{"content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"}}},"description":"Validation Error"}}}
>
  
</StatusCodes>
