Skip to content

Commit 75aa9ec

Browse files
committed
[Added] added apidoc for organization
1 parent 81132e9 commit 75aa9ec

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

_apidoc.js

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -665,3 +665,65 @@
665665
* @apiSuccess {String[]} module.cognitiveLevels Array of cognitive levels of
666666
* attainment as per Bloom's Taxanomy (L1-L6).
667667
*/
668+
669+
//-----------------------------------------------------------------------------
670+
//Organization
671+
//-----------------------------------------------------------------------------
672+
673+
/**
674+
* @api {get} /organization/list Get Organisation List
675+
* @apiName GetOrganizationList
676+
* @apiGroup Organization
677+
*
678+
* @apiQuery [parent] Id of the parent of the organization
679+
* @apiQuery [startDate] starting date of the organization
680+
* @apiQuery [name] name of the organization
681+
* @apiQuery [accreditations] accreditation Id of the organization
682+
*
683+
* @apiSuccess {Orgaization[]} res array of filtered organization Doc
684+
* @apiSuccess {ObjectId} organization.parent Id of the parent of the organization
685+
* @apiSuccess {Date} organization.startDate starting date of the organization
686+
* @apiSuccess {String} organization.name name of the organization
687+
* @apiSuccess {ObjectId} organization.accreditations accreditation Id of the organization
688+
*/
689+
690+
/**
691+
* @api {post} /organization/add Add Organisation
692+
* @apiName AddOrganization
693+
* @apiGroup Organization
694+
*
695+
* @apiBody {ObjectId} [parent] Id of the parent of the organization
696+
* @apiBody {Date} [startDate] starting date of the organization
697+
* @apiBody {String} [name] name of the organization
698+
* @apiBody {ObjectId} [accreditations] accreditation Id of the organization
699+
*
700+
* @apiSuccess {String} res added organization
701+
* @apiError (Error 500) Error while inserting in DB
702+
*/
703+
704+
/**
705+
* @api {delete} /organization/delete/:organizationId Delete Organization
706+
* @apiName DeleteOrganization
707+
* @apiGroup Organization
708+
*
709+
* @apiParam {String} organizationId The ID of the Organization document to delete.
710+
*
711+
* @apiSuccess {String} res Success message indicating the deletion.
712+
*
713+
* @apiError (Error 500) DatabaseError Error message if there was an error during the deletion.
714+
*/
715+
716+
/**
717+
* @api {post} /organization/update/:organizationId Update Organisation
718+
* @apiName UpdateOrganization
719+
* @apiGroup Organization
720+
*
721+
* @apiBody {String} organizationId The ID of the Organization document to update
722+
* @apiBody {ObjectId} [parent] Id of the parent of the organization
723+
* @apiBody {Date} [startDate] starting date of the organization
724+
* @apiBody {String} [name] name of the organization
725+
* @apiBody {ObjectId} [accreditations] accreditation Id of the organization
726+
*
727+
* @apiSuccess {String} res organization updated
728+
* @apiError (Error 500) Error while inserting in DB
729+
*/

0 commit comments

Comments
 (0)