{"openapi":"3.1.0","info":{"title":"Quick Reference Guide API","description":"API for managing and distributing area content, tracking processing status, and handling user bookmarks.","version":"1.0.0"},"paths":{"/api/v1/get_area_list":{"get":{"tags":["Version 1","Online Content API","Offline Content API"],"summary":"List available area items","description":"Returns all area items currently available, including their names and versions.\n\n        Notes:\n        - Results are unordered; clients should sort if needed.","operationId":"getAreaList","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Area"},"type":"array","title":"Response Getarealist"}}}},"500":{"description":"Error retrieving area list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/get_specific_area_version":{"get":{"tags":["Version 1","Offline Content API"],"summary":"Get area bundle with download URL","description":"Returns the complete area bundle metadata along with a time-limited SAS URL for downloading\n         the bundle ZIP file. The URL typically expires within 1 hour.\n\n            Notes:\n            - The response includes both bundle metadata (name, version, files list) and a download URL.\n            - The URL is read-only and cannot be used to overwrite areas.\n            - If the URL has expired, request a new one.\n            - Ensure clients follow redirects (HTTP 302) if the blob service issues them.","operationId":"getSpecificAreaVersion","parameters":[{"name":"area_name","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Area bundle name","title":"Area Name"},"description":"Area bundle name"},{"name":"version","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Version number must be positive","title":"Version"},"description":"Version number must be positive"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AreaBundle"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Area or version not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error retrieving area bundle.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/get_latest_version":{"get":{"tags":["Version 1","Offline Content API"],"summary":"Get latest area version with download URL","description":"Returns the latest version of an area bundle with its download URL.","operationId":"getLatestVersion","parameters":[{"name":"area_name","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Area bundle name","title":"Area Name"},"description":"Area bundle name"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AreaBundle"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Area not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error retrieving area.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/get_upload_area_url":{"get":{"tags":["Version 1","Area Management"],"summary":"Get area upload URL","description":"Returns a time-limited SAS URL for uploading an area ZIP file to blob storage. The SAS token typically expires within 1 hour.\n\n            Notes:\n            - Upload a single ZIP file containing the bundle files and metadata.\n            - The filename of the zip will be used as the area name.\n            - The SAS grants write permissions only; list/read may be restricted.\n            - If the SAS token expires during upload, request a fresh token and retry.","operationId":"getUploadAreaUrl","parameters":[{"name":"filename","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":255,"description":"Filename for upload (will become area name)","title":"Filename"},"description":"Filename for upload (will become area name)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SasUrl"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error generating url for upload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/get_upload_processing_status":{"get":{"tags":["Version 1","Area Management"],"summary":"Get upload processing status","description":"Returns the current processing status for the specified file (e.g., PROCESSING, UPLOADING, COMPLETE).\n\n    Notes:\n    - Status transitions are asynchronous and may take several minutes.\n    - Poll responsibly; recommend 5–15s intervals to avoid throttling.\n    - A 404 indicates no status yet recorded for the filename.","operationId":"getUploadProcessingStatus","parameters":[{"name":"task_filename","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Filename to check processing status for","title":"Task Filename"},"description":"Filename to check processing status for"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessingTask"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No Status Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error retrieving status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/get_content_access_token":{"get":{"tags":["Version 1","Online Content API"],"summary":"Get access token for content","description":"Returns the access token and URLs for accessing content directly online.","operationId":"getContentAccessToken","parameters":[{"name":"area_name","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Area name to get access token for","title":"Area Name"},"description":"Area name to get access token for"},{"name":"version","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Version number to get access token for","title":"Version"},"description":"Version number to get access token for"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SasUrl"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Area not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error retrieving access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/get_area_bundle_information":{"get":{"tags":["Version 1","Online Content API","Offline Content API"],"summary":"Get file information for an area","description":"Returns a list of file entries for the specified area, including file paths, hashes, and sizes. Does not include download URL just metadata.","operationId":"getAreaBundleInformation","parameters":[{"name":"area_name","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Area name to get bundle information for","title":"Area Name"},"description":"Area name to get bundle information for"},{"name":"version","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Optional version number (defaults to latest)","title":"Version"},"description":"Optional version number (defaults to latest)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AreaBundle"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Area not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error retrieving access token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/get_area_delta":{"get":{"tags":["Version 1","Offline Content API"],"summary":"Get area delta with download URL","description":"Compares two versions of an area bundle and returns the differences (added, removed, changed files)\n         along with a time-limited SAS URL for downloading the delta package.\n\n        Notes:\n        - The response includes delta metadata (file differences) and a download URL for the delta ZIP.\n        - The URL typically expires within 1 hour.\n        - Useful for incremental updates where clients only need changed files.","operationId":"getAreaDelta","parameters":[{"name":"area_name","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Area bundle name","title":"Area Name"},"description":"Area bundle name"},{"name":"old_version","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Starting version for comparison","title":"Old Version"},"description":"Starting version for comparison"},{"name":"new_version","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Target version for comparison","title":"New Version"},"description":"Target version for comparison"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AreaBundleDelta"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Area or version not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error retrieving area differences.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/delete_area":{"delete":{"tags":["Version 1","Area Management"],"summary":"Delete an area and all its versions","description":"Deletes all versions of an area bundle.","operationId":"deleteArea","parameters":[{"name":"area_name","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Area bundle name to delete","title":"Area Name"},"description":"Area bundle name to delete"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Area Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/delete_area_version":{"delete":{"tags":["Version 1","Area Management"],"summary":"Delete an area's specific version","description":"Deletes a specific version of an area bundle.","operationId":"deleteAreaVersion","parameters":[{"name":"area_name","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Area bundle name","title":"Area Name"},"description":"Area bundle name"},{"name":"version","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Version number to delete","title":"Version"},"description":"Version number to delete"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Area version not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/get_user_info":{"get":{"tags":["Version 1","User Management"],"summary":"Get user information","description":"Returns user information based on the provided EDIPI.","operationId":"getUserInfo","parameters":[{"name":"edipi","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"EDIPI of the user to retrieve information for","title":"Edipi"},"description":"EDIPI of the user to retrieve information for"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error retrieving user information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/get_bookmarks":{"get":{"tags":["Version 1","Bookmark Management"],"summary":"Get user bookmarks","description":"Returns a list of bookmarks for the specified user based on their EDIPI.","operationId":"getBookmarks","parameters":[{"name":"edipi","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"EDIPI of the user to retrieve bookmarks for","title":"Edipi"},"description":"EDIPI of the user to retrieve bookmarks for"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Bookmark"},"title":"Response Getbookmarks"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Bookmark or User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error retrieving bookmarks","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v1/save_bookmark":{"post":{"tags":["Version 1","Bookmark Management"],"summary":"Save a user bookmark","description":"Saves a bookmark for a user based on the provided bookmark information.","operationId":"saveBookmark","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Bookmark"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error saving bookmark","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/delete_bookmark":{"delete":{"tags":["Version 1","Bookmark Management"],"summary":"Delete a user bookmark","description":"Deletes a bookmark for a user based on the provided EDIPI and bookmark name.","operationId":"deleteBookmark","parameters":[{"name":"edipi","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"EDIPI of the user to delete bookmark for","title":"Edipi"},"description":"EDIPI of the user to delete bookmark for"},{"name":"name","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Name of the bookmark to delete","title":"Name"},"description":"Name of the bookmark to delete"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Bookmark or User not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error deleting bookmark","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"Area":{"properties":{"name":{"type":"string","title":"Name of area","description":"Name of the area.","examples":["Area Name"]},"version":{"type":"string","title":"Version","description":"Version of the area in string format.","examples":["1.0.0"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description of the area.","examples":["Description of the area"]},"config":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Config","description":"Additional configuration for the area."}},"type":"object","required":["name","version"],"title":"Area","description":"Area model."},"AreaBundle":{"properties":{"area":{"$ref":"#/components/schemas/Area","description":"Area details."},"files":{"items":{"$ref":"#/components/schemas/FileEntry"},"type":"array","title":"List of paths including filenames","description":"List of paths including filenames","examples":[[{"file_hash":"abc123def456","path":"src/main.py","size":1024},{"file_hash":"xyz789uvw012","path":"README.md","size":2048}]]},"sas_url":{"anyOf":[{"$ref":"#/components/schemas/SasUrl"},{"type":"null"}],"title":"SAS URL","description":"SAS URL details if available"}},"type":"object","required":["area"],"title":"AreaBundle","description":"Represents a version of an area bundle."},"AreaBundleDelta":{"properties":{"area":{"$ref":"#/components/schemas/Area","description":"Area details."},"added":{"items":{"$ref":"#/components/schemas/FileEntry"},"type":"array","title":"Added files","description":"Files added.","examples":[[{"file_hash":"abc123def456","path":"src/new_feature.py","size":512}]]},"removed":{"items":{"$ref":"#/components/schemas/FileEntry"},"type":"array","title":"Removed files","description":"Files removed.","examples":[[{"file_hash":"xyz789uvw012","path":"src/deprecated.py","size":1024}]]},"changed":{"items":{"$ref":"#/components/schemas/FileEntry"},"type":"array","title":"Changed files","description":"Files changed.","examples":[[{"file_hash":"newHash123456","path":"src/main.py","size":2048}]]},"sas_url":{"anyOf":[{"$ref":"#/components/schemas/SasUrl"},{"type":"null"}],"title":"SAS URL","description":"SAS URL details if available"}},"type":"object","required":["area"],"title":"AreaBundleDelta","description":"Represents the differences between two area bundles."},"Bookmark":{"properties":{"edipi":{"type":"string","title":"EDIPI","description":"Electronic Data Interchange Personal Identifier of the user.","examples":["1234567890"]},"name":{"type":"string","title":"Bookmark Name","description":"Name of the bookmark.","examples":["My Bookmark"]},"nav_info":{"type":"string","title":"Navigation Info","description":"Navigation info of the bookmark.","examples":["Info1"]},"area_name":{"type":"string","title":"Area Name","description":"Area name of the bookmark.","examples":["Area1"]}},"type":"object","required":["edipi","name","nav_info","area_name"],"title":"Bookmark","description":"Bookmark model."},"ErrorResponse":{"properties":{"success":{"type":"boolean","title":"success_flag","description":"Indicates if the operation was successful","examples":[true,false]},"code":{"type":"integer","title":"Error Code","description":"Error code","examples":[400,500]},"error":{"type":"string","title":"Error Message","description":"Error message","examples":["Some error message"]},"details":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error details","description":"Additional error details","examples":["Stacktrace"]}},"type":"object","required":["success","code","error"],"title":"ErrorResponse","description":"Error response model."},"FileEntry":{"properties":{"path":{"type":"string","title":"Path","description":"Path including filename of the file","examples":["/path/to/file"]},"file_hash":{"type":"string","title":"File Hash","description":"File hash of the file","examples":["ABCD1234"]},"size":{"type":"integer","title":"Size","description":"File size in bytes","examples":[8]},"sas_url":{"anyOf":[{"$ref":"#/components/schemas/SasUrl"},{"type":"null"}],"title":"SAS URL","description":"SAS URL details if available"}},"type":"object","required":["path","file_hash","size"],"title":"FileEntry","description":"Represents a file entry in a module bundle."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ProcessingStatus":{"type":"string","enum":["processing","downloading","uploading","extracting","complete","error","pending","unknown","not_found"],"title":"ProcessingStatus","description":"Enum representing the various processing statuses for module."},"ProcessingTask":{"properties":{"filename":{"type":"string","title":"File Name","description":"Name of the file being processed","examples":["module.zip"]},"status":{"$ref":"#/components/schemas/ProcessingStatus","title":"Processing Status","description":"Current processing status of the task","examples":["pending","processing","complete"]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Message","description":"Additional information about the current status","examples":["Processing started","Error: Invalid file format"]}},"type":"object","required":["filename","status"],"title":"ProcessingTask","description":"ProcessingTask model."},"SasUrl":{"properties":{"sas_url":{"type":"string","minLength":1,"format":"uri","title":"SAS URL for upload or download","description":"Url to upload or download to","examples":["https://account.blob.core.windows.net/container/file?sv=2021&sig=abc123"]},"sas_token":{"type":"string","minLength":8,"title":"SAS Token for access","description":"SAS Token for access"},"start_time":{"type":"string","format":"date-time","title":"Start time","description":"Start time for access"},"expire_time":{"type":"string","format":"date-time","title":"Expire time","description":"Expire time for access"}},"type":"object","required":["sas_url","sas_token","start_time","expire_time"],"title":"SasUrl","description":"SAS URL model."},"User":{"properties":{"first_name":{"type":"string","title":"First Name","description":"First name of the user.","examples":["John"]},"last_name":{"type":"string","title":"Last Name","description":"Last name of the user.","examples":["Doe"]},"email":{"type":"string","title":"Email","description":"Email address of the user.","examples":["john.doe@email.com"]},"edipi":{"type":"string","title":"EDIPI","description":"Electronic Data Interchange Personal Identifier.","examples":["1234567890"]},"role":{"type":"string","title":"Role","description":"Role of the user in the system.","examples":["Admin"]},"offline_token":{"type":"string","title":"Offline Token","description":"Token used for offline authentication."},"offline_token_expiry":{"type":"string","format":"date-time","title":"Offline Token Expiry","description":"Expiration time for the offline token."},"offline_lasted_used":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Offline Last Used","description":"The last time the offline token was used."}},"type":"object","required":["first_name","last_name","email","edipi","role"],"title":"User","description":"User model."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"tags":[{"name":"Online Content API","description":"Endpoints for accessing content directly online without downloading."},{"name":"Offline Content API","description":"Endpoints for downloading content bundles and deltas for offline use."},{"name":"Area Management","description":"Endpoints for managing area bundles, including uploads and deletions."},{"name":"User Management","description":"Endpoints for retrieving user information based on EDIPI."},{"name":"Bookmark Management","description":"Endpoints for managing user bookmarks, including retrieval, saving, and deletion."},{"name":"Version 1","description":"Version 1 of the API endpoints."}]}