Skip to content

Commit b71873d

Browse files
Merge pull request #363 from tcet-opensource/252-apidoc-for-organization
[Added] made apidoc for organization
2 parents 9b04609 + fc93dc6 commit b71873d

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
@@ -666,6 +666,53 @@
666666
* attainment as per Bloom's Taxanomy (L1-L6).
667667
*/
668668

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+
669716
// ------------------------------------------------------------------------------------------
670717
// Paper.
671718
// ------------------------------------------------------------------------------------------
@@ -1104,6 +1151,21 @@
11041151
* @apiError (Error 500) DatabaseError Error message if there was an error during the deletion.
11051152
*/
11061153

1154+
/**
1155+
* @api {post} /organization/update/:organizationId Update Organisation
1156+
* @apiName UpdateOrganization
1157+
* @apiGroup Organization
1158+
*
1159+
* @apiBody {String} organizationId The ID of the Organization document to update
1160+
* @apiBody {ObjectId} [parent] Id of the parent of the organization
1161+
* @apiBody {Date} [startDate] starting date of the organization
1162+
* @apiBody {String} [name] name of the organization
1163+
* @apiBody {ObjectId} [accreditations] accreditation Id of the organization
1164+
*
1165+
* @apiSuccess {String} res organization updated
1166+
* @apiError (Error 500) Error while inserting in DB
1167+
*/
1168+
11071169
/**
11081170
* @api {delete} /activity/delete/:activity Delete Activity.
11091171
* @apiName DeleteActivity

0 commit comments

Comments
 (0)