Projects
Returns all projects owned by the authenticated user, scoped by RLS to the caller's tenant. The list is unordered; clients should sort by created_at if display order matters.
BearerAuthAuthorizationBearer <token>JWT access token. Obtain via POST /v1/auth/login.
Successful Response
application/json- response
[index: integer]?curl -X GET 'https://api.aisc.sa/v1/projects'[ { "created_at": "2019-08-24T14:15:22Z", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string" }]Creates a new project (container for uploaded drawings) owned by the authenticated user. The project name must be 1-200 characters. Returns the new project row with its UUID; pass this id to POST /v1/projects/{project_id}/documents to begin uploading drawings.
BearerAuthAuthorizationBearer <token>JWT access token. Obtain via POST /v1/auth/login.
application/json- body
name*Name1 <= length <= 200Successful Response
application/json- response
created_at*Created Atdate-timeid*Iduuidname*Namecurl -X POST 'https://api.aisc.sa/v1/projects' \ -H 'Content-Type: application/json' \ -d '{ "name": "string"}'{ "created_at": "2019-08-24T14:15:22Z", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string"}Mints a presigned S3 PUT URL so the client can upload a drawing file directly to S3 without transiting the API. The returned document_id and upload_url are valid for 15 minutes. After the PUT completes, call POST .../documents/{document_id}/complete to register the document row. Returns 404 if the project is not found or the caller does not own it.
BearerAuthAuthorizationBearer <token>JWT access token. Obtain via POST /v1/auth/login.
project_id*Project Iduuidapplication/json- body
content_md5?string|nullcontent_type?string|nulloriginal_filename*Original Filename1 <= length <= 300Successful Response
application/json- response
document_id*Document Iduuids3_key*S3 Keyupload_url*Upload Urlcurl -X POST 'https://api.aisc.sa/v1/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/documents' \ -H 'Content-Type: application/json' \ -d '{ "original_filename": "string"}'{ "document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6", "s3_key": "string", "upload_url": "string"}Presigned GET URL for a previously stored artifact. 404 when the artifact does not exist (HeadObject), so a caller can probe cheaply and fall back to recomputing.
BearerAuthAuthorizationBearer <token>JWT access token. Obtain via POST /v1/auth/login.
project_id*Project Iduuiddocument_id*Document Iduuidname*NameSuccessful Response
application/json- response
s3_key*S3 Keyurl*Urlcurl -X GET 'https://api.aisc.sa/v1/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08/artifacts/string'{ "s3_key": "string", "url": "string"}Mints a presigned S3 PUT URL for a derived artifact (e.g. the viewer projection) stored beside the document. The name should carry the producer's pipeline version (projection.v64.bin) so stale artifacts are never read after an upgrade. 404 when the document is not the caller's.
BearerAuthAuthorizationBearer <token>JWT access token. Obtain via POST /v1/auth/login.
project_id*Project Iduuiddocument_id*Document Iduuidname*NameSuccessful Response
application/json- response
s3_key*S3 Keyurl*Urlcurl -X POST 'https://api.aisc.sa/v1/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08/artifacts/string'{ "s3_key": "string", "url": "string"}Verifies that the client's PUT to upload_url succeeded, computes the SHA-256 hash of the uploaded object, enforces the per-user storage quota, and inserts the project_documents row. Idempotent: retrying an already-completed document_id returns the existing row. Returns 409 if the object has not been uploaded yet; 413 if it exceeds the 200 MB limit; 402 if the storage quota or PAYG ceiling is exhausted.
BearerAuthAuthorizationBearer <token>JWT access token. Obtain via POST /v1/auth/login.
project_id*Project Iduuiddocument_id*Document Iduuidapplication/json- body
original_filename*Original Filename1 <= length <= 300Successful Response
application/json- response
document_id*Document Iduuidfile_hash*File Hashoriginal_filename*Original Filenames3_key*S3 Keysize_bytes*Size Bytescurl -X POST 'https://api.aisc.sa/v1/projects/497f6eca-6276-4993-bfeb-53cbbbba6f08/documents/497f6eca-6276-4993-bfeb-53cbbbba6f08/complete' \ -H 'Content-Type: application/json' \ -d '{ "original_filename": "string"}'{ "document_id": "b792e8ae-2cb4-4209-85b9-32be4c2fcdd6", "file_hash": "string", "original_filename": "string", "s3_key": "string", "size_bytes": 0}