{"docs":{"name":"XRAS Rules API","info":"\n\u003cp\u003eEach HTTP request must have the following request headers set:\u003c/p\u003e\n\n\u003cpre\u003eXA-ALLOCATIONS-PROCESS: name\nXA-API-KEY:             api-key\nXA-USER:                username\nXA-PERMISSIONS:         optional, permission level if admin. only option Allocations Process Manager\u003c/pre\u003e\n","copyright":null,"doc_url":"/apidoc/1.0","api_url":"/api","resources":{"actions":{"doc_url":"/apidoc/1.0/actions","api_url":"/api","name":"Actions","short_description":null,"full_description":null,"version":"1.0","formats":null,"metadata":null,"methods":[{"doc_url":"/apidoc/1.0/actions/validate","name":"validate","apis":[{"api_url":"/api/v1/actions/:action_id/validate","http_method":"GET","short_description":"Validate that all required fields for the given action have data.","deprecated":null}],"formats":null,"full_description":"","errors":[],"params":[],"examples":["Normal failed response \n    {\n       \"message\": \"\",\n       \"result\":\n       {\n           \"validation\": \"failed\",\n           \"errors\":\n           [\n               \"Title is a required field\"\n           ]\n       }\n    }\n\nNormal successful response\n\n\n    {\n       \"message\": \"\",\n       \"result\":\n       {\n           \"validation\": \"successful\",\n           \"errors\":\n           []\n       }\n    }\n\n\n\n\nAn unknown action\n\n{\n  \"message\": \"Couldn't find Action with action_id=45\",\n  \"result\": null\n}"],"metadata":null,"see":[],"headers":[],"show":true},{"doc_url":"/apidoc/1.0/actions/required_documents","name":"required_documents","apis":[{"api_url":"/api/v1/actions/:action_id/required_documents","http_method":"GET","short_description":"Validate that all required fields for the given action have data.","deprecated":null}],"formats":null,"full_description":"","errors":[],"params":[],"examples":["Normal response\n{\n  \"result\": [\n    {\n      \"documentTypeId\": 2,\n      \"documentType\": \"PI CV\",\n      \"displayDocumentType\": \"PI CV (2 pages limit)\",\n      \"hardPageLimit\": 2,\n      \"allowMany\": false,\n      \"requirementMet\": false,\n      \"message\": \"There must be a PI CV document for each PI.\"\n    }\n  ],\n  \"message\": \"successful\"\n}\n"],"metadata":null,"see":[],"headers":[],"show":true}],"headers":null,"deprecated":null},"notifications":{"doc_url":"/apidoc/1.0/notifications","api_url":"/api","name":"Notifications","short_description":null,"full_description":null,"version":"1.0","formats":null,"metadata":null,"methods":[{"doc_url":"/apidoc/1.0/notifications/action_finalized","name":"action_finalized","apis":[{"api_url":"/api/v1/notifications/actions/:action_id/action_finalized","http_method":"POST","short_description":"Send notifications when an Action Finalized event happens","deprecated":null}],"formats":null,"full_description":"","errors":[],"params":[],"examples":["POST /notifications/actions/5/action_finalized\nSUCCESS\n{\n   \"message\": \"\",\n   \"result\":\n   {\n       \"action_notification_ids\" = [ 912, 913, 914]\n   }\n}\n\n\nFAILURE\n{\n   \"message\": \"Error: Action with action_id: 5 is not in state Submitted\",\n   \"result\": null\n}"],"metadata":null,"see":[],"headers":[],"show":true},{"doc_url":"/apidoc/1.0/notifications/action_approved","name":"action_approved","apis":[{"api_url":"/api/v1/notifications/actions/:action_id/action_approved","http_method":"POST","short_description":"Send notifications when an Action Approved event happens","deprecated":null}],"formats":null,"full_description":"","errors":[],"params":[],"examples":["POST /notifications/actions/5/action_approved\nSUCCESS\n{\n   \"message\": \"\",\n   \"result\":\n   {\n       \"action_notification_ids\" = [ 912, 913, 914]\n   }\n}\n\n\nFAILURE\n{\n   \"message\": \"Error: Action with action_id: 5 is not in state Approved\",\n   \"result\": null\n}"],"metadata":null,"see":[],"headers":[],"show":true},{"doc_url":"/apidoc/1.0/notifications/action_rejected","name":"action_rejected","apis":[{"api_url":"/api/v1/notifications/actions/:action_id/action_rejected","http_method":"POST","short_description":"Send notifications when an Action Rejected event happens","deprecated":null}],"formats":null,"full_description":"","errors":[],"params":[],"examples":["POST /notifications/actions/5/action_rejected\nSUCCESS\n{\n   \"message\": \"\",\n   \"result\":\n   {\n       \"action_notification_ids\" = [ 912, 913, 914]\n   }\n}\n\n\nFAILURE\n{\n   \"message\": \"Error: Action with action_id: 5 is not in state Rejected\",\n   \"result\": null\n}"],"metadata":null,"see":[],"headers":[],"show":true},{"doc_url":"/apidoc/1.0/notifications/conflict_reported","name":"conflict_reported","apis":[{"api_url":"/api/v1/notifications/request_conflicts/:request_conflict_id/conflict_reported","http_method":"POST","short_description":"Send notifications when a Review is submitted","deprecated":null}],"formats":null,"full_description":"","errors":[],"params":[],"examples":["POST /notifications/reviews/5/review_submitted\nSUCCESS - when all the reviews are completed\n{\n   \"message\": \"\",\n   \"result\":\n   {\n       \"action_notification_ids\" = [ 912, 913, 914]\n   }\n}\n\nSUCCESS - when all the reviews are not complete and hence no notifications need to be sent\n{\n   \"message\": \"\",\n   \"result\":\n   {\n       \"action_notification_ids\" = []\n   }\n}\n\n\nFAILURE\n{\n   \"message\": \"Error: Review with action_review_id=5 does not exist\",\n   \"result\": null\n}"],"metadata":null,"see":[],"headers":[],"show":true},{"doc_url":"/apidoc/1.0/notifications/reviewer_assigned","name":"reviewer_assigned","apis":[{"api_url":"/api/v1/notifications/reviews/:action_assigned_reviewer_id/reviewer_assigned","http_method":"POST","short_description":"Send notifications when a Reviewer is assigned","deprecated":null}],"formats":null,"full_description":"","errors":[],"params":[],"examples":["POST /notifications/reviews/5/reviewer_assigned\nSUCCESS\n{\n   \"message\": \"\",\n   \"result\":\n   {\n       \"action_notification_ids\" = [ 912, 913, 914]\n   }\n}\n\n\nFAILURE\n{\n   \"message\": \"Error: ActionAssignedReviewer with action_assigned_reviewer_id=5 does not exist\",\n   \"result\": null\n}"],"metadata":null,"see":[],"headers":[],"show":true},{"doc_url":"/apidoc/1.0/notifications/reviewer_notify","name":"reviewer_notify","apis":[{"api_url":"/api/v1/notifications/reviews/:action_id/reviewer_notify","http_method":"POST","short_description":"Send notifications to all reviewers that are assigned to an action","deprecated":null}],"formats":null,"full_description":"","errors":[],"params":[],"examples":["POST /notifications/reviews/5/reviewer_notify\nSUCCESS\n{\n   \"message\": \"\",\n   \"result\":\n   {\n       \"action_notification_ids\" = [ 912, 913, 914]\n   }\n}\n\n\nFAILURE\n{\n   \"message\": \"Error: Review with action_id=5 does not exist\",\n   \"result\": null\n}"],"metadata":null,"see":[],"headers":[],"show":true}],"headers":null,"deprecated":null},"opportunities":{"doc_url":"/apidoc/1.0/opportunities","api_url":"/api","name":"Opportunities","short_description":null,"full_description":null,"version":"1.0","formats":null,"metadata":null,"methods":[{"doc_url":"/apidoc/1.0/opportunities/index","name":"index","apis":[{"api_url":"/api/v1/opportunities","http_method":"GET","short_description":"List of current and upcoming opportunities.  Includes new and renewal request permission info for user","deprecated":null}],"formats":null,"full_description":"","errors":[],"params":[],"examples":["{\n  \"message\": \"\",\n  \"result\": {\n    \"opportunities\": [\n      {\n        \"opportunityId\": 530280,\n        \"canSubmitNewRequest\": false,\n        \"noAvailableActionsReason\": \"\",\n        \"availableActionRequests\": [\n          {\n            \"requestId\": 1159507,\n            \"requestNumber\": \"MCA93S020\",\n            \"actionType\": \"Renewal\",\n            \"actionTypeId\": 3\n          }\n        ]\n      },\n      {\n        \"opportunityId\": 530273,\n        \"canSubmitNewRequest\": true,\n        \"noAvailableActionsReason\": [],\n        \"availableActionRequests\": []\n      },\n      {\n        \"opportunityId\": 530277,\n        \"canSubmitNewRequest\": true,\n        \"noAvailableActionsReason\": [],\n        \"availableActionRequests\": []\n      },\n      {\n        \"opportunityId\": 530253,\n        \"canSubmitNewRequest\": true,\n        \"noAvailableActionsReason\": [],\n        \"availableActionRequests\": []\n      },\n      {\n        \"opportunityId\": 530271,\n        \"canSubmitNewRequest\": true,\n        \"noAvailableActionsReason\": [],\n        \"availableActionRequests\": []\n      }\n    ]\n  }\n}"],"metadata":null,"see":[],"headers":[],"show":true},{"doc_url":"/apidoc/1.0/opportunities/list","name":"list","apis":[{"api_url":"/api/v1/opportunities/list/:opportunity_ids","http_method":"GET","short_description":"Return the details for requested opportunities.  Ids should be comma separated.  Includes new and renewal request permission info for user","deprecated":null}],"formats":null,"full_description":"","errors":[],"params":[],"examples":["{\n  \"message\": \"\",\n  \"result\": {\n    \"opportunities\": [\n      {\n        \"opportunityId\": 530280,\n        \"canSubmitNewRequest\": false,\n        \"noAvailableActionsReason\": \"\",\n        \"availableActionRequests\": [\n          {\n            \"requestId\": 1159507,\n            \"requestNumber\": \"MCA93S020\",\n            \"actionType\": \"Renewal\",\n            \"actionTypeId\": 3\n          }\n        ]\n      },\n      {\n        \"opportunityId\": 530273,\n        \"canSubmitNewRequest\": true,\n        \"noAvailableActionsReason\": [],\n        \"availableActionRequests\": []\n      },\n      {\n        \"opportunityId\": 530277,\n        \"canSubmitNewRequest\": true,\n        \"noAvailableActionsReason\": [],\n        \"availableActionRequests\": []\n      },\n      {\n        \"opportunityId\": 530253,\n        \"canSubmitNewRequest\": true,\n        \"noAvailableActionsReason\": [],\n        \"availableActionRequests\": []\n      },\n      {\n        \"opportunityId\": 530271,\n        \"canSubmitNewRequest\": true,\n        \"noAvailableActionsReason\": [],\n        \"availableActionRequests\": []\n      }\n    ]\n  }\n}"],"metadata":null,"see":[],"headers":[],"show":true},{"doc_url":"/apidoc/1.0/opportunities/show","name":"show","apis":[{"api_url":"/api/v1/opportunities/:opportunity_id","http_method":"GET","short_description":"Return the details for the opportunity.  Includes new and renewal request permission info for user","deprecated":null}],"formats":null,"full_description":"","errors":[],"params":[],"examples":["\n\n{\n   \"message\": \"\",\n   \"result\":\n   {\n       \"opportunity\":\n       {\n           \"opportunityId\": 530280,\n           \"canSubmitNewRequest\": false,\n           \"noAvailableActionsReason\": \"\",\n           \"availableActionRequests\":\n           [\n               {\n                   \"requestId\": 1159507,\n                   \"requestNumber\": \"MCA93S020\",\n                   \"actionType\": \"Renewal\",\n                   \"actionTypeId\": 3\n               }\n           ]\n       }\n   }\n}\n\n"],"metadata":null,"see":[],"headers":[],"show":true}],"headers":null,"deprecated":null},"requests":{"doc_url":"/apidoc/1.0/requests","api_url":"/api","name":"Requests","short_description":null,"full_description":null,"version":"1.0","formats":null,"metadata":null,"methods":[{"doc_url":"/apidoc/1.0/requests/index","name":"index","apis":[{"api_url":"/api/v1/requests","http_method":"GET","short_description":"List the requests that the user is a PI, CoPI, or Allocation Manager on.  The requests include which actions and operations can be performed on the request and which operations can be performed on existing actions","deprecated":null}],"formats":null,"full_description":"","errors":[],"params":[],"examples":["{\n  \"message\": \"\",\n  \"result\": {\n    \"requests\": [\n      {\n        \"requestId\": 1159507,\n        \"allowedOperations\": [],\n        \"allowedActions\": [\n          \"Supplement\",\n          \"Transfer\"\n        ],\n        \"existingActions\": [\n          {\n            \"actionId\": 17645,\n            \"actionType\": \"Advance\",\n            \"allowedOperations\": [\n              \"Edit\",\n              \"Delete\"\n            ],\n            \"reviewsViewable\": false\n          },\n          {\n            \"actionId\": 12653,\n            \"actionType\": \"Renewal\",\n            \"allowedOperations\": [],\n            \"reviewsViewable\": true\n          }\n        ]\n      }\n    ]\n  }\n}"],"metadata":null,"see":[],"headers":[],"show":true},{"doc_url":"/apidoc/1.0/requests/show","name":"show","apis":[{"api_url":"/api/v1/requests/:request_id","http_method":"GET","short_description":"Return the request if the user is a PI, CoPI, or Allocation Manager.  The request includes which actions and operations can be performed on the request and which operations can be performed on existing actions","deprecated":null}],"formats":null,"full_description":"","errors":[],"params":[],"examples":["\n\n{\n   \"message\": \"\",\n   \"result\":\n   {\n       \"request\":\n       {\n           \"requestId\": 1159507,\n           \"allowedOperations\":\n           [\n           ],\n           \"allowedActions\":\n           [\n               \"Supplement\",\n               \"Transfer\"\n           ],\n           \"existingActions\":\n           [\n               {\n                   \"actionId\": 17666,\n                   \"actionType\": \"Advance\",\n                   \"allowedOperations\":\n                   [\n                   ],\n                   \"reviewsViewable\": false\n               },\n               {\n                   \"actionId\": 12653,\n                   \"actionType\": \"Renewal\",\n                   \"allowedOperations\":\n                   [\n                   ],\n                   \"reviewsViewable\": true\n               }\n           ]\n       }\n   }\n}\n\n"],"metadata":null,"see":[],"headers":[],"show":true},{"doc_url":"/apidoc/1.0/requests/generate_request_number","name":"generate_request_number","apis":[{"api_url":"/api/v1/requests/:request_id/generate_request_number","http_method":"GET","short_description":"Return a request number for this request.  The request number is reserved so that future calls can not get the same request number.  The rules engine updates the request_master table with the request number.  If the request already has an assigned request number then the existing request number is returned","deprecated":null}],"formats":null,"full_description":"","errors":[],"params":[],"examples":["Successful\n\n    {\n       \"message\": \"\",\n       \"result\":\n       {\n           \"requestNumber\": \"DMS140015\"\n       }\n    }\n\n\nRequest not found\n\n\n\n    {\n       \"message\": \"Couldn't find Request with request_id=345\",\n       \"result\": null\n    }\n\n    \n\n"],"metadata":null,"see":[],"headers":[],"show":true},{"doc_url":"/apidoc/1.0/requests/new_request_number","name":"new_request_number","apis":[{"api_url":"/api/v1/requests/:request_id/new_request_number","http_method":"POST","short_description":"Generate a new request number based on this request.  The returned request number is always new even if the request already has an assigned request number. The request_masters table is not updated by this end point","deprecated":null}],"formats":null,"full_description":"","errors":[],"params":[],"examples":["Successful\n\n    {\n       \"message\": \"\",\n       \"result\":\n       {\n           \"requestNumber\": \"DMS140015\"\n       }\n    }\n\n\nRequest not found\n\n\n\n    {\n       \"message\": \"Couldn't find Request with request_id=345\",\n       \"result\": null\n    }\n\n    \n\n"],"metadata":null,"see":[],"headers":[],"show":true}],"headers":null,"deprecated":null},"resources":{"doc_url":"/apidoc/1.0/resources","api_url":"/api","name":"Resources","short_description":null,"full_description":null,"version":"1.0","formats":null,"metadata":null,"methods":[{"doc_url":"/apidoc/1.0/resources/resource_updated","name":"resource_updated","apis":[{"api_url":"/api/v1/resources/update","http_method":"post","short_description":"Create a new or updated resource","deprecated":null}],"formats":null,"full_description":"","errors":[],"params":[],"examples":["{\n  \"message\": \"\",\n  \"result\": {\n    \"requests\": [\n      {\n        \"requestId\": 1159507,\n        \"allowedOperations\": [],\n        \"allowedActions\": [\n          \"Supplement\",\n          \"Transfer\"\n        ],\n        \"existingActions\": [\n          {\n            \"actionId\": 17645,\n            \"actionType\": \"Advance\",\n            \"allowedOperations\": [\n              \"Edit\",\n              \"Delete\"\n            ],\n            \"reviewsViewable\": false\n          },\n          {\n            \"actionId\": 12653,\n            \"actionType\": \"Renewal\",\n            \"allowedOperations\": [],\n            \"reviewsViewable\": true\n          }\n        ]\n      }\n    ]\n  }\n}"],"metadata":null,"see":[],"headers":[],"show":true}],"headers":null,"deprecated":null},"rules":{"doc_url":"/apidoc/1.0/rules","api_url":"/api","name":"Rules","short_description":null,"full_description":null,"version":"1.0","formats":null,"metadata":null,"methods":[{"doc_url":"/apidoc/1.0/rules/clone","name":"clone","apis":[{"api_url":"/api/v1/rules/allocation_types/:new_allocation_type_id/clone/:existing_allocation_type_id","http_method":"POST","short_description":"Clone the rules for one allocation type into a new allocation type.","deprecated":null}],"formats":null,"full_description":"","errors":[],"params":[],"examples":[],"metadata":null,"see":[],"headers":[],"show":true}],"headers":null,"deprecated":null}}}}