# Get Upload Sessions

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Get Upload Sessions"}
>
</Heading>

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

Returns a list of all active upload sessions.

<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"}},{"description":"Specifies if the session is expired.","in":"query","name":"is_expired","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Specifies if the session is expired.","title":"Is Expired"}},{"description":"The number of entries to display. Leaving this field empty keeps the default, and max 10 results are returned.","in":"query","name":"limit","required":false,"schema":{"default":10,"description":"The number of entries to display. Leaving this field empty keeps the default, and max 10 results are returned.","maximum":100,"title":"Limit","type":"integer"}},{"description":"Enter an ID if you want to see all entries before this ID. To use this option, clear the `page_number` parameter first.","in":"query","name":"before","required":false,"schema":{"anyOf":[{"format":"uuid","type":"string"},{"type":"null"}],"description":"Enter an ID if you want to see all entries before this ID. To use this option, clear the `page_number` parameter first.","title":"Before"}},{"description":"Enter an ID if you want to see all entries after this ID. To use this option, clear the `page_number` parameter first.","in":"query","name":"after","required":false,"schema":{"anyOf":[{"format":"uuid","type":"string"},{"type":"null"}],"description":"Enter an ID if you want to see all entries after this ID. To use this option, clear the `page_number` parameter first.","title":"After"}},{"description":"The number of the page you want to see.","in":"query","name":"page_number","required":false,"schema":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"description":"The number of the page you want to see.","title":"Page Number"}},{"description":"The name of the field you want to sort by.","in":"query","name":"field","required":false,"schema":{"default":"created_at","description":"The name of the field you want to sort by.","enum":["created_at","expires_at","ingestion_status_reason","name","file_count","status","write_mode"],"title":"Field","type":"string"}},{"description":"Choose how you want to sort the results.","in":"query","name":"order","required":false,"schema":{"default":"DESC","description":"Choose how you want to sort the results.","enum":["ASC","DESC"],"title":"Order","type":"string"}}]}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={undefined}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"properties":{"created_at":{"description":"The time when the session was created.","format":"date-time","title":"Session Created At","type":"string"},"created_by":{"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","description":"The user who created the session."},"expires_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"The time when the session expires.","title":"Session Expires At"},"session_id":{"description":"Unique identifier of a session.","format":"uuid","title":"Session ID","type":"string"},"status":{"default":"OPEN","description":"The status of the upload session. The status can be 'OPEN' or 'CLOSED'.","title":"Session Status","enum":["OPEN","CLOSED","EXPIRED"],"type":"string"},"write_mode":{"default":"KEEP","description":"Determines how to handle files that already exist. You can KEEP the existing file, OVERWRITE it, or FAIL to ingest if a file with the same name is already in your workspace.","title":"Write Mode","enum":["KEEP","OVERWRITE","FAIL","TEMPORARY"],"type":"string"}},"required":["expires_at","created_by","created_at"],"title":"Session","type":"object"},"title":"Data","type":"array"},"has_more":{"description":"Indicates if there are more results to show.","title":"Has more results","type":"boolean"},"total":{"description":"The total number of results matching your query.","title":"Total number of results","type":"integer"}},"required":["data","has_more","total"],"title":"PaginatedResult[Session]","type":"object"}}},"description":"Your upload sessions."},"422":{"content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"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>
