{
    'worksets': {
        'get': ['get', '/rest/v1/workset'],
        'list': ['get', '/rest/v1/autocomplete?type=summary&flt=&limit=100'],
        'update': ['post', '/rest/v1/workset/:worksetId'],
        'costobjects': ['get', '/rest/v1/workset/:key/definition?filter=:filter&limit=25&parentKey=:parentKey'],
        'newId': ['put', '/rest/v1/workset'],
        'removeObject': ['delete', '/rest/v1/workset/:worksetId/costobject/:costobjectId'],
        'remove': ['delete', '/rest/v1/workset/:worksetId'],
        'addObject': ['put', '/rest/v1/workset/:worksetId/costobject/:costobjectId']
    },
    'workset': {
        'get': ['get', '/rest/v1/workset/:id'],
        'memberCostObject': ['get', '/rest/v1/workset/:id/member/costobject'],
        'memberResource': ['get', '/rest/v1/workset/:id/member/resource'],
        'scenario': ['get', '/rest/v1/workset/:id/scenario'],
        'children': ['get', '/rest/v1/workset/:id/children'],
        'authorizations': ['get', '/rest/v1/workset/:id/auth'],
        'toggleAuth': ['post', '/rest/v1/workset/:id/auth'],
        'newAuthId': ['put', '/rest/v1/workset/:id/auth'],
        'removeAuth': ['delete', '/rest/v1/workset/:id/auth/:authId'],
        'costobject': ['get', '/rest/v1/workset/:id/costobject'],
        'resource': ['get', '/rest/v1/workset/:id/resource'],
        'getRules': ['get', '/rest/v1/workset/:id/rules'],
        'setRules': ['post', '/rest/v1/workset/:id/rules'],
        'reports': ['get', '/rest/v1/report/workset/'],
        'budgets': ['get', '/rest/v1/workset/:id/budget'],
        'range': ['get', '/rest/v1/workset/:id/period']
        // 'scenario': ['get', '/rest/v1/workset/:id/scenario'] // ** NOT IMPLEMENTED **
    },
    'user': {
        'auth': ['get', '/rest/v1/user/auth'],
        'favorites': ['get', '/rest/v1/user/flag/'],
        'info': ['get', '/rest/v1/user'],
        'summary': ['get', '/rest/v1/user/summary']
    },
    'search': {
        'autocomplete': ['get', '/rest/v1/autocomplete?type=:type&flt=:flt&lim=:limit'],
        'autocompletep': ['get', '/rest/v1/autocomplete?type=:type&flt=:flt&lim=:limit&param=:param'],
        'advanced': ['post', '/rest/v1/search'],
        'lookup': ['get', '/rest/v1/autocomplete?type=summary&flt=:flt&limit=20']
    },
    'costobject': {
        'get': ['get', '/rest/v1/costobject/:id'],
        'overview': ['get', '/rest/v1/costobject/:id/overview'], // ** NOT IMPLEMENTED **
        'children': ['get', '/rest/v1/costobject/:id/children'],
        'budgets': ['get', '/rest/v1/costobject/:id/budget'],
        'range': ['get', '/rest/v1/costobject/:id/period'],
        'scenario': ['get', '/rest/v1/costobject/:id/scenario'], // ** NOT IMPLEMENTED **
        'tracking': ['get', '/rest/v1/costobject/:id/tracking'], // Used fort scenarios grid
        'reports': ['get', '/rest/v1/report/costobject/'],
        'forecast': {
            'grid': ['get', '/rest/v1/scenario/:scenario/expense'],
            'get': ['get', '/rest/v1/costobject/:id/detail/forecast'],
            'expense': ['get', '/rest/v1/costobject/:id/detail/forecast/expense'],
            'personnel': ['get', '/rest/v1/costobject/:id/detail/forecast/resource']
        },
        'budget': {
            'get': ['get', '/rest/v1/costobject/:id/detail/budget'],
            'expense': ['get', '/rest/v1/costobject/:id/detail/budget/expense'],
            'personnel': ['get', '/rest/v1/costobject/:id/detail/budget/resource']
        },
        'actual': {
            'get': ['get', '/rest/v1/costobject/:id/detail/actual'],
            'expense': ['get', '/rest/v1/costobject/:id/detail/actual/expense'],
            'personnel': ['get', '/rest/v1/costobject/:id/detail/actual/resource']
        },
        'commitment': {
            'get': ['get', '/rest/v1/costobject/:id/detail/commitment'],
            'expense': ['get', '/rest/v1/costobject/:id/detail/commitment/expense'],
            'personnel': ['get', '/rest/v1/costobject/:id/detail/commitment/resource']
        }
    },
    'people': {
        'grid': ['get', '/rest/v1/scenario/:scenario/resource']
    },
    'person': {
        'grid': ['get', '/rest/v1/person/:personId'],
        'overview': ['get', '/rest/v1/person/:id/overview?worksetKey=:worksetKey'],
        'reports': ['get', '/rest/v1/report/person/'],
        'range': ['get', '/rest/v1/person/:id/period'],
        'scenario': ['get', '/rest/v1/workset/:id/scenario'] // ** NOT IMPLEMENTED **
    },
    'app': {
        'heartbeat': ['get', '/rest/v1/application/heartbeat'],
        'glHier': ['get', '/rest/v1/costobject/glhierarchy'],
        'issues': ['get', '/rest/v1/application/issues?lim=:limit'],
        'flag': ['post', '/rest/v1/application/flag/:type/:id'], ///application/flag/COSTOBJECT/P6915500-001
        'issuesAll': ['get', '/rest/v1/application/issues?lim=everything']
    },
    //get comments by workset
    'comments': {
        //Get a single comment for a workset
        'get': ['get', '/rest/v1/comment/:id'],
        //Get all comments for a workset
        //params are worksetKey, resourceKey and type (WORKSET,COSTOB,
        'getAll': ['get', '/rest/v1/comment'],
        //new comment
        //params are worksetKey, resourceKey, type, title and comment
        'create': ['put', '/rest/v1/comment'],
        //edit existing comment
        //params are id, title and comment
        'edit': ['post', '/rest/v1/comment/:id'],
        //delete a comment by id
        'del': ['delete', '/rest/v1/comment/:id'],
        //number of comments
        'count': ['get', '/rest/v1/comment/count']
    },
    'settings': {
        'get': ['get', '/rest/v1/user/preference'],
        'getValues': ['get', '/rest/v1/user/preference?withOptions=true'],
        'update': ['post', '/rest/v1/user/preference/:ID'] //parameters are Id and value
    },
    'scenario': {
        'add': ['put', '/rest/v1/workset/:wid/scenario'],
        'update': ['post', '/rest/v1/scenario/:id'],
        'del': ['delete', '/rest/v1/scenario/:id'],
        'get': ['get', '/rest/v1/scenario/:id'],
        'lists': ['get', '/rest/v1/workset/:id/scenariolist'],
        'copy': {
            'objlist': ['get', '/rest/v1/scenario/:src/copy?scenarioDest=:dest'],
            'action': ['post', '/rest/v1/scenario/:src/copy?scenarioDest=:dest']
        },


        'lock': ['put', '/rest/v1/scenario/:scenarioId/lock'],

        'unlock': ['delete', '/rest/v1/scenario/:scenarioId/lock'],

        // ?costObjectKey, startDate, endDate
        'expense': {
            'updateCell': ['post', '/rest/v1/scenario/:scenario/expense/:expenseId?type=cell']
        },

        'import': {
            // scenarioSource, scenarioDest, costObjectKey, startDate, endDate, replace
            'expense': ['post', '/rest/v1/scenario/copy/expense'],

            // scenarioSource, scenarioDest, costObjectKey, startDate, endDate, replace
            'people': ['post', '/rest/v1/scenario/copy/resource']
        },

        'list': {
            'expense': ['get', '/rest/v1/scenario/:id/ledger/expense'],
            'people': ['get', '/rest/v1/scenario/:id/ledger/resource']
        },

        'ledger': {
            'expense': {
                // add params: (id)scenarioKey, costObjectKey
                // returns: speculationKey, line_item_key
                'add': ['put', '/rest/v1/scenario/:id/ledger/expense'],
                // update params: (id) scenarioKey,costObjectKey,levelId,lineItemKey,description,amount,startDate,endDate,budgetVersion
                // returns: Balance []
                'update': ['post', '/rest/v1/scenario/:id/ledger/expense'],
                // delete params: speculationKey, costObjectKey, startDate, endDate, budgetVersion
                // returns: Balance []
                'del': ['delete', '/rest/v1/scenario/:id/ledger/expense']
            },

            'people': {
                //add params: (id)scenarioKey, costObjectKey,personnelKey
                // returns: speculationKey
                'add': ['put', '/rest/v1/scenario/:id/ledger/resource'],
                //update params: (id)scenarioKey,distributionPercent, speculationKey,costObjectKey, levelId, personnelKey,
                //                appointmentSubtypeKey, startDate, endDate, budgetVersion
                // returns: Balance []
                'update': ['post', '/rest/v1/scenario/:id/ledger/resource'],
                //delete params: speculationKey, costObjectKey, startDate, endDate, budgetVersion
                // resturns: Balance []
                'del': ['delete', '/rest/v1/scenario/:id/ledger/resource']
            }
        },

        // autocomplete types: people, gl
        'tracking': ['get', '/rest/v1/costobject/:id/tracking'],

        'reports': ['get', '/rest/v1/report/scenario'],

        'lineItem': {
            'add': ['put', '/rest/v1/scenario/:scenario/expense/:expenseId/definition'],
            'update': ['post', '/rest/v1/scenario/:scenario/expense/:expenseId/definition/:definitionId'],
            'del': ['delete', '/rest/v1/scenario/:scenario/expense/:expenseId/definition/:definitionId']
        },

        'person': {
            'updateCell': ['post', '/rest/v1/scenario/:scenario/resource/:resourceId?type=cell'],
            'addPerson': ['put', '/rest/v1/scenario/:scenario/resource/:resourceId'],
            'createPerson': ['put', '/rest/v1/scenario/:scenario/resource/definition'],
            'deletePerson': ['delete', '/rest/v1/scenario/:scenario/resource/:resourceId?costObjectKey=:co&personGlKey=:pgl']
        }
    }
};
  • No labels