{"openapi":"3.0.3","info":{"title":"DAKSH API","version":"1.0","description":"Open REST API of DAKSH, the project management OS by Econstruct Design and Build Pvt Ltd. Use it to connect Autodesk Construction Cloud, SAP S/4HANA, Oracle Aconex, Primavera P6, Microsoft Project, ERP, BI and custom tools.\n\n**Authentication:** create an API key in the admin console (Admin → API keys) and send `Authorization: Bearer dk_…`. Keys are read, write or admin scoped and never exceed their owner’s role.\n\n**Dates** are ISO `yyyy-mm-dd` and follow the project’s working calendar. **Writes** are sealed into the project’s SHA-256 audit trail and appear live in open apps.\n\n**Webhooks:** subscribe in the admin console; each call carries `X-DAKSH-Event`, `X-DAKSH-Timestamp` and `X-DAKSH-Signature: sha256=HMAC(secret, timestamp + \".\" + body)`.","contact":{"name":"Econstruct Design and Build Pvt Ltd"}},"servers":[{"url":"https://daksh.e-construct.org/api/v1"}],"security":[{"bearer":[]}],"tags":[{"name":"Projects"},{"name":"Schedule"},{"name":"Registers"},{"name":"Files"},{"name":"Import and export"},{"name":"Webhooks"},{"name":"Connectors"}],"paths":{"/projects":{"get":{"tags":["Projects"],"summary":"List projects","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","default":100,"maximum":1000}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}},{"name":"updatedSince","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"q","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ProjectListItem"}},"page":{"$ref":"#/components/schemas/Page"}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"tags":["Projects"],"summary":"Create an empty project","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"start":{"type":"string","format":"date"},"week":{"type":"integer","description":"Working days per week: 5, 6 or 7"},"type":{"type":"string"},"client":{"type":"string"},"location":{"type":"string"},"ctype":{"type":"string","description":"Contract category, e.g. villa_esc, lumpsum, itemrate, epc"}},"required":["name"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"project":{"$ref":"#/components/schemas/Project"}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/projects/{id}":{"get":{"tags":["Projects"],"summary":"Project header, dates and summary","parameters":[{"name":"id","in":"path","required":true,"description":"DAKSH project id","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"patch":{"tags":["Projects"],"summary":"Change project details or the data date","parameters":[{"name":"id","in":"path","required":true,"description":"DAKSH project id","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"client":{"type":"string"},"location":{"type":"string"},"type":{"type":"string"},"dataDate":{"type":"string","format":"date","description":"Status (data) date"},"contractCategory":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/projects/{id}/activities":{"get":{"tags":["Schedule"],"summary":"List activities with computed dates and float","parameters":[{"name":"id","in":"path","required":true,"description":"DAKSH project id","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","default":100,"maximum":1000}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}},{"name":"status","in":"query","schema":{"type":"string","enum":["not_started","in_progress","completed"]}},{"name":"wbs","in":"query","schema":{"type":"string"}},{"name":"critical","in":"query","schema":{"type":"boolean"}},{"name":"q","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Activity"}},"page":{"$ref":"#/components/schemas/Page"}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"tags":["Schedule"],"summary":"Add an activity","parameters":[{"name":"id","in":"path","required":true,"description":"DAKSH project id","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"durationDays":{"type":"number"},"wbs":{"type":"string"},"responsible":{"type":"string"},"cost":{"type":"number"},"predecessors":{"type":"array","items":{"$ref":"#/components/schemas/Link"}}},"required":["name"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Activity"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/projects/{id}/activities/{act}":{"get":{"tags":["Schedule"],"summary":"One activity","parameters":[{"name":"id","in":"path","required":true,"description":"DAKSH project id","schema":{"type":"string"}},{"name":"act","in":"path","required":true,"description":"Activity ID (e.g. A140)","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Activity"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"patch":{"tags":["Schedule"],"summary":"Update progress or details of an activity","parameters":[{"name":"id","in":"path","required":true,"description":"DAKSH project id","schema":{"type":"string"}},{"name":"act","in":"path","required":true,"description":"Activity ID (e.g. A140)","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityPatch"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Activity"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"delete":{"tags":["Schedule"],"summary":"Delete an activity (its links are removed)","parameters":[{"name":"id","in":"path","required":true,"description":"DAKSH project id","schema":{"type":"string"}},{"name":"act","in":"path","required":true,"description":"Activity ID (e.g. A140)","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/projects/{id}/progress":{"post":{"tags":["Schedule"],"summary":"Bulk progress update (field apps, ERP, P6/MSP bridges)","parameters":[{"name":"id","in":"path","required":true,"description":"DAKSH project id","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"dataDate":{"type":"string","format":"date"},"activities":{"type":"array","items":{"allOf":[{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},{"$ref":"#/components/schemas/ActivityPatch"}]}}},"required":["activities"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"type":"integer"},"errors":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"error":{"type":"string"}}}}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/projects/{id}/relationships":{"get":{"tags":["Schedule"],"summary":"Logic links","parameters":[{"name":"id","in":"path","required":true,"description":"DAKSH project id","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","default":100,"maximum":1000}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Relationship"}},"page":{"$ref":"#/components/schemas/Page"}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/projects/{id}/wbs":{"get":{"tags":["Schedule"],"summary":"Work breakdown structure","parameters":[{"name":"id","in":"path","required":true,"description":"DAKSH project id","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","default":100,"maximum":1000}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Wbs"}},"page":{"$ref":"#/components/schemas/Page"}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/projects/{id}/tasks":{"get":{"tags":["Registers"],"summary":"Tasks","parameters":[{"name":"id","in":"path","required":true,"description":"DAKSH project id","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","default":100,"maximum":1000}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Task"}},"page":{"$ref":"#/components/schemas/Page"}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"tags":["Registers"],"summary":"Create a task","parameters":[{"name":"id","in":"path","required":true,"description":"DAKSH project id","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"status":{"type":"string","enum":["todo","doing","done"]},"priority":{"type":"integer","description":"1 (high) to 4"},"due":{"type":"string","format":"date"},"assignees":{"type":"array","items":{"type":"string"}},"activity":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"externalRef":{"type":"string","description":"Your system’s id, used to match later updates"}},"required":["title"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/projects/{id}/tasks/{task}":{"patch":{"tags":["Registers"],"summary":"Update a task (by DAKSH id or externalRef)","parameters":[{"name":"id","in":"path","required":true,"description":"DAKSH project id","schema":{"type":"string"}},{"name":"task","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"status":{"type":"string"},"due":{"type":"string","format":"date"},"priority":{"type":"integer"},"externalRef":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/projects/{id}/rfis":{"get":{"tags":["Registers"],"summary":"RFIs","parameters":[{"name":"id","in":"path","required":true,"description":"DAKSH project id","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","default":100,"maximum":1000}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Rfi"}},"page":{"$ref":"#/components/schemas/Page"}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"tags":["Registers"],"summary":"Raise an RFI","parameters":[{"name":"id","in":"path","required":true,"description":"DAKSH project id","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"subject":{"type":"string"},"to":{"type":"string"},"due":{"type":"string","format":"date"},"status":{"type":"string"},"externalRef":{"type":"string"}},"required":["subject"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Rfi"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/projects/{id}/rfis/{rfi}":{"patch":{"tags":["Registers"],"summary":"Update or answer an RFI","parameters":[{"name":"id","in":"path","required":true,"description":"DAKSH project id","schema":{"type":"string"}},{"name":"rfi","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"answer":{"type":"string"},"subject":{"type":"string"},"externalRef":{"type":"string"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Rfi"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/projects/{id}/documents":{"get":{"tags":["Registers"],"summary":"Documents in the CDE","parameters":[{"name":"id","in":"path","required":true,"description":"DAKSH project id","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","default":100,"maximum":1000}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Document"}},"page":{"$ref":"#/components/schemas/Page"}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"tags":["Registers"],"summary":"Register a document (optionally with an uploaded file)","parameters":[{"name":"id","in":"path","required":true,"description":"DAKSH project id","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"string"},"title":{"type":"string"},"type":{"type":"string","description":"DR drawing, M3 model, SP spec…"},"revision":{"type":"string"},"status":{"type":"string","description":"ISO 19650 suitability, e.g. S2"},"state":{"type":"string","enum":["wip","shared","published","archived"]},"assetId":{"type":"string","description":"From PUT /api/assets"},"url":{"type":"string","description":"Link to the file in another system"},"externalRef":{"type":"string"}},"required":["title"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Document"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/projects/{id}/correspondence":{"get":{"tags":["Registers"],"summary":"Communication trail (sealed)","parameters":[{"name":"id","in":"path","required":true,"description":"DAKSH project id","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","default":100,"maximum":1000}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Correspondence"}},"page":{"$ref":"#/components/schemas/Page"}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"tags":["Registers"],"summary":"File an email, letter or message into the sealed trail","parameters":[{"name":"id","in":"path","required":true,"description":"DAKSH project id","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"direction":{"type":"string","enum":["in","out","internal"]},"channel":{"type":"string","description":"email, letter, whatsapp, call, meeting, notice…"},"from":{"type":"string"},"to":{"type":"string"},"subject":{"type":"string"},"body":{"type":"string"},"reference":{"type":"string"},"needsReply":{"type":"boolean"},"replyBy":{"type":"string","format":"date"}},"required":["subject"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Correspondence"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/projects/{id}/photos":{"get":{"tags":["Registers"],"summary":"Site photos and videos","parameters":[{"name":"id","in":"path","required":true,"description":"DAKSH project id","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","default":100,"maximum":1000}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Photo"}},"page":{"$ref":"#/components/schemas/Page"}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"tags":["Registers"],"summary":"Add an uploaded photo or video to a daily report","parameters":[{"name":"id","in":"path","required":true,"description":"DAKSH project id","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"type":"string"},"date":{"type":"string","format":"date"},"caption":{"type":"string"},"activity":{"type":"string"},"sharedWithClient":{"type":"boolean"}},"required":["assetId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Photo"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/projects/{id}/daily-reports":{"get":{"tags":["Registers"],"summary":"Daily progress reports","parameters":[{"name":"id","in":"path","required":true,"description":"DAKSH project id","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","default":100,"maximum":1000}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DailyReport"}},"page":{"$ref":"#/components/schemas/Page"}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/projects/{id}/boq":{"get":{"tags":["Registers"],"summary":"Bill of quantities","parameters":[{"name":"id","in":"path","required":true,"description":"DAKSH project id","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","default":100,"maximum":1000}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/projects/{id}/risks":{"get":{"tags":["Registers"],"summary":"Risk register","parameters":[{"name":"id","in":"path","required":true,"description":"DAKSH project id","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","default":100,"maximum":1000}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/projects/{id}/escrow":{"get":{"tags":["Registers"],"summary":"Tri-party escrow: milestones and ledger (write scope)","parameters":[{"name":"id","in":"path","required":true,"description":"DAKSH project id","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/projects/{id}/audit-trail":{"get":{"tags":["Registers"],"summary":"Sealed audit trail with chain verification","parameters":[{"name":"id","in":"path","required":true,"description":"DAKSH project id","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","default":100,"maximum":1000}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/projects/{id}/export/{format}":{"get":{"tags":["Import and export"],"summary":"Export the schedule","parameters":[{"name":"id","in":"path","required":true,"description":"DAKSH project id","schema":{"type":"string"}},{"name":"format","in":"path","required":true,"schema":{"type":"string","enum":["xer","mspdi","p6xml","csv","json"]}}],"responses":{"200":{"description":"File","content":{"application/octet-stream":{}}}}}},"/projects/import":{"post":{"tags":["Import and export"],"summary":"Create a project from a P6 XER, P6 XML or MS Project XML file","parameters":[{"name":"filename","in":"query","schema":{"type":"string"}},{"name":"name","in":"query","schema":{"type":"string"}},{"name":"pick","in":"query","description":"XER with several projects: proj_id or short name","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/octet-stream":{},"text/plain":{},"application/xml":{}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"activities":{"type":"integer"}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/projects/{id}/import":{"post":{"tags":["Import and export"],"summary":"Update a project from a schedule file","parameters":[{"name":"id","in":"path","required":true,"description":"DAKSH project id","schema":{"type":"string"}},{"name":"mode","in":"query","schema":{"type":"string","enum":["progress","replace"],"default":"progress"}},{"name":"filename","in":"query","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/octet-stream":{}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/convert":{"post":{"tags":["Import and export"],"summary":"Convert between XER, P6 XML, MS Project XML, CSV and JSON","parameters":[{"name":"to","in":"query","required":true,"schema":{"type":"string","enum":["xer","mspdi","p6xml","csv","json"]}}],"requestBody":{"required":true,"content":{"application/octet-stream":{}}},"responses":{"200":{"description":"Converted file"}}}},"/webhooks":{"get":{"tags":["Webhooks"],"summary":"List webhooks (admin)","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"tags":["Webhooks"],"summary":"Subscribe a URL to events (admin)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"events":{"type":"array","items":{"type":"string","enum":["*","project.saved","activity.created","activity.deleted","activity.progress","trail.entry","rfi.created","rfi.updated","task.created","task.updated","document.created","dpr.submitted","escrow.released","connector.sync"]}}},"required":["url"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"secret":{"type":"string","description":"Shown once: use it to verify X-DAKSH-Signature"}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/connectors/kinds":{"get":{"tags":["Connectors"],"summary":"Available connectors and their settings","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/connectors":{"get":{"tags":["Connectors"],"summary":"Configured connectors (admin)","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}},"post":{"tags":["Connectors"],"summary":"Add a connector (admin)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["p6","acc","sap","aconex","msproject"]},"name":{"type":"string"},"config":{"type":"object"}},"required":["kind"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/connectors/{cid}/test":{"post":{"tags":["Connectors"],"summary":"Test the connection","parameters":[{"name":"cid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/connectors/{cid}/remote-projects":{"get":{"tags":["Connectors"],"summary":"Projects in the other system","parameters":[{"name":"cid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}},"/connectors/{cid}/sync":{"post":{"tags":["Connectors"],"summary":"Run a sync action","parameters":[{"name":"cid","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","description":"e.g. pull-schedule, push-progress, pull-issues, push-tasks, pull-rfis, pull-documents, pull-wbs, push-dates, pull-actual-costs, pull-mail, send-mail"},"project":{"type":"string","description":"DAKSH project id"},"remote":{"type":"string","description":"Project id in the other system"},"options":{"type":"object","properties":{"mode":{"type":"string","enum":["create","replace","progress"]},"dryRun":{"type":"boolean","description":"Show what would change without changing anything"}}}},"required":["action"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"runId":{"type":"string"},"status":{"type":"string"},"summary":{"type":"object"},"log":{"type":"array","items":{"type":"string"}}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"API key from the admin console: dk_xxxxxxxx_…"}},"responses":{"Error":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}}},"schemas":{"Page":{"type":"object","properties":{"limit":{"type":"integer"},"offset":{"type":"integer"},"total":{"type":"integer"},"next":{"type":"integer","nullable":true}}},"ProjectListItem":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"summary":{"type":"object"},"updatedAt":{"type":"string"},"updatedBy":{"type":"string"}}},"Project":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"contractCategory":{"type":"string"},"client":{"type":"string"},"location":{"type":"string"},"start":{"type":"string","format":"date"},"workingDaysPerWeek":{"type":"integer"},"holidays":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"name":{"type":"string"}}}},"dataDate":{"type":"string","format":"date"},"forecastFinish":{"type":"string","format":"date"},"deadline":{"type":"string","format":"date"},"activities":{"type":"integer"},"percentComplete":{"type":"number"},"contractValue":{"type":"number"},"updatedAt":{"type":"string"},"updatedBy":{"type":"string"},"scheduleErrors":{"type":"array","items":{"type":"string"}}}},"Link":{"type":"object","properties":{"id":{"type":"string","description":"Predecessor activity ID"},"type":{"type":"string","enum":["FS","SS","FF","SF"]},"lagDays":{"type":"number"}}},"Activity":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"wbs":{"type":"string"},"wbsName":{"type":"string"},"durationDays":{"type":"number"},"percentComplete":{"type":"number"},"status":{"type":"string","enum":["not_started","in_progress","completed"]},"start":{"type":"string","format":"date","description":"Early or actual start"},"finish":{"type":"string","format":"date","description":"Early or actual finish"},"actualStart":{"type":"string","format":"date"},"actualFinish":{"type":"string","format":"date"},"remainingDays":{"type":"number"},"totalFloatDays":{"type":"number"},"freeFloatDays":{"type":"number"},"critical":{"type":"boolean"},"responsible":{"type":"string"},"cost":{"type":"number"},"resourceUnitsPerDay":{"type":"number"},"milestone":{"type":"boolean"},"constraint":{"type":"object","properties":{"type":{"type":"string"},"date":{"type":"string","format":"date"}}},"predecessors":{"type":"array","items":{"$ref":"#/components/schemas/Link"}},"baselineStart":{"type":"string","format":"date"},"baselineFinish":{"type":"string","format":"date"}}},"ActivityPatch":{"type":"object","properties":{"percentComplete":{"type":"number","description":"0–100"},"actualStart":{"type":"string","format":"date"},"actualFinish":{"type":"string","format":"date"},"remainingDays":{"type":"number"},"name":{"type":"string"},"durationDays":{"type":"number"},"responsible":{"type":"string"},"cost":{"type":"number"},"predecessors":{"type":"array","items":{"$ref":"#/components/schemas/Link"}}}},"Relationship":{"type":"object","properties":{"predecessor":{"type":"string"},"successor":{"type":"string"},"type":{"type":"string"},"lagDays":{"type":"number"}}},"Wbs":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"parent":{"type":"string"},"activities":{"type":"integer"}}},"Task":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"status":{"type":"string"},"priority":{"type":"integer"},"due":{"type":"string","format":"date"},"assignees":{"type":"array","items":{"type":"string"}},"activity":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"source":{"type":"string"},"externalRef":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}}},"Rfi":{"type":"object","properties":{"id":{"type":"string"},"subject":{"type":"string"},"to":{"type":"string"},"status":{"type":"string"},"raised":{"type":"string","format":"date"},"due":{"type":"string","format":"date"},"answer":{"type":"string"},"externalRef":{"type":"string"}}},"Document":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"title":{"type":"string"},"type":{"type":"string"},"revision":{"type":"string"},"status":{"type":"string"},"state":{"type":"string"},"originator":{"type":"string"},"updatedAt":{"type":"string"},"files":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"}}}},"externalRef":{"type":"string"}}},"Correspondence":{"type":"object","properties":{"id":{"type":"string"},"at":{"type":"string"},"channel":{"type":"string"},"direction":{"type":"string"},"from":{"type":"string"},"to":{"type":"string"},"subject":{"type":"string"},"body":{"type":"string"},"reference":{"type":"string"},"status":{"type":"string"},"seal":{"type":"string","description":"SHA-256 seal from the audit trail"}}},"Photo":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"date":{"type":"string","format":"date"},"caption":{"type":"string"},"activity":{"type":"string"},"sharedWithClient":{"type":"boolean"},"url":{"type":"string"}}},"DailyReport":{"type":"object","properties":{"id":{"type":"string"},"date":{"type":"string","format":"date"},"status":{"type":"string"},"weather":{"type":"string"},"labour":{"type":"integer"},"work":{"type":"array","items":{"type":"object"}},"hindrances":{"type":"array","items":{"type":"object"}},"notes":{"type":"string"}}}}},"x-events":["project.saved","activity.created","activity.deleted","activity.progress","trail.entry","rfi.created","rfi.updated","task.created","task.updated","document.created","dpr.submitted","escrow.released","connector.sync"],"x-files":{"upload":"PUT /api/assets with the raw file as the body, Content-Type set to the file type and X-Filename to its name. Returns {id, url}. Files are served at /_blob/{id}."}}