Skip to content

Commit

Permalink
Merge pull request #298 from edx/sameen/ENT-8717
Browse files Browse the repository at this point in the history
feat: expose assignment remind api on Gateway
  • Loading branch information
sameenfatima78 committed May 8, 2024
2 parents 7840b8e + 4740d22 commit e1988d2
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 6 deletions.
5 changes: 4 additions & 1 deletion scripts/aws/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
help="Location of Studio for authoring request routing")
parser.add_argument('--license-manager-host', required=True,
help="Location of License Manager IDA for request routing")
parser.add_argument('--enterprise-access-host', required=True,
help="Location of Enterprise Access IDA for request routing")

cli_args = parser.parse_args()
integration_settings = {
Expand All @@ -62,7 +64,8 @@
'registrar_host': cli_args.registrar_host,
'enterprise_catalog_host': cli_args.enterprise_catalog_host,
'authoring_host': cli_args.authoring_host,
'license_manager_host': cli_args.license_manager_host
'license_manager_host': cli_args.license_manager_host,
'enterprise_access_host': cli_args.enterprise_access_host
}
stage_settings = {
'log_level': cli_args.log_level,
Expand Down
11 changes: 8 additions & 3 deletions swagger/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ paths:
"/catalog/v1/catalogs/{id}/courses":
$ref: "https://raw.githubusercontent.com/edx/course-discovery/b5c52c8/api.yaml#/endpoints/v1/catalogCourses"

# Enterprise Access IDA
"/enterprise-access/v1/assignment-configurations/{assignment_configuration_uuid}/admin/assignments/cancel/":
$ref: "https://raw.githubusercontent.com/openedx/enterprise-access/31185ee/api.yaml#/endpoints/v1/learnerContentAssignmentCancelRequest"


# Enterprise IDA
"/enterprise/v1/enterprise-catalogs":
Expand All @@ -65,6 +63,12 @@ paths:
$ref: "https://raw.githubusercontent.com/edx/license-manager/b9e9ec9/api.yaml#/endpoints/v1/revokeLicenses"
"/enterprise/v1/bulk-license-enrollment":
$ref: "https://raw.githubusercontent.com/edx/license-manager/b9e9ec9/api.yaml#/endpoints/v1/bulkLicenseEnrollment"
# Enterprise Access IDA
# These are served from the enterprise-access IDA, but we surface them with the rest of the enterprise endpoints
"/enterprise/v1/assignment-configurations/{assignment_configuration_uuid}/admin/assignments/cancel/":
$ref: "https://raw.githubusercontent.com/openedx/enterprise-access/747d8b9/api.yaml#/endpoints/v1/learnerContentAssignmentCancelRequest"
"/enterprise/v1/assignment-configurations/{assignment_configuration_uuid}/admin/assignments/remind/":
$ref: "https://raw.githubusercontent.com/openedx/enterprise-access/747d8b9/api.yaml#/endpoints/v1/learnerContentAssignmentRemindRequest"
# Enterprise Catalog IDA
# These are served from the enterprise catalog IDA, but we surface them with the rest of the enterprise endpoints
"/enterprise/v2/enterprise-catalogs":
Expand Down Expand Up @@ -233,3 +237,4 @@ x-edx-api-vendors:
- "enterprise_catalog_host"
- "authoring_host"
- "license_manager_host"
- "enterprise_access_host"
24 changes: 22 additions & 2 deletions tests/test_enterprise_access.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

- test:
- name: 'Assignment configuration cancel endpoint returns HTTP 200'
- url: '/enterprise-access/v1/assignment-configurations/9101d3de36156cba/admin/assignments/cancel/'
- url: '/enterprise/v1/assignment-configurations/9101d3de36156cba/admin/assignments/cancel/'
- method: 'POST'
- headers: { 'Authorization': 'aeiou', 'Content-Type': 'application/json' }
- body: >
Expand All @@ -17,6 +17,26 @@

- test:
- name: 'GET rejected without authorization'
- url: '/enterprise-access/v1/assignment-configurations/0123456789abcdefg/admin/assignments/cancel/'
- url: '/enterprise/v1/assignment-configurations/0123456789abcdefg/admin/assignments/cancel/'
- method: 'POST'
- expected_status: [400]

- test:
- name: 'Assignment configuration remind endpoint returns HTTP 200'
- url: '/enterprise/v1/assignment-configurations/9101d3de36156cba/admin/assignments/remind/'
- method: 'POST'
- headers: { 'Authorization': 'aeiou', 'Content-Type': 'application/json' }
- body: >
[
{
"assignment_uuids": ["01234567-89ab-cdef-0123-456789abcdef", "abcdef01-2345-6789-abcd-ef0123456789"]
}
]
- expected_status: [200]

- test:
- name: 'GET rejected without authorization'
- url: '/enterprise/v1/assignment-configurations/0123456789abcdefg/admin/assignments/remind/'
- method: 'POST'
- expected_status: [400]

0 comments on commit e1988d2

Please sign in to comment.