Skip to content

Commit

Permalink
feat: added enterprise access public api
Browse files Browse the repository at this point in the history
  • Loading branch information
zamanafzal committed Apr 30, 2024
1 parent 1eb6aaa commit 5ff34ad
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
4 changes: 4 additions & 0 deletions swagger/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ 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":
$ref: "https://raw.githubusercontent.com/edx/edx-enterprise/260055b/api.yaml#/endpoints/v1/enterpriseCustomerCatalogs"
Expand Down
1 change: 1 addition & 0 deletions tests/test_all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
- import: 'tests/test_oauth.yaml'
- import: 'tests/test_catalog.yaml'
- import: 'tests/test_enterprise.yaml'
- import: 'tests/test_enterprise_access.yaml'
22 changes: 22 additions & 0 deletions tests/test_enterprise_access.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
- config:
- testset: 'Enterprise Access API'

- test:
- name: 'Assignment configuration cancel endpoint returns HTTP 200'
- url: '/enterprise-access/v1/assignment-configurations/9101d3de36156cba/admin/assignments/cancel/'
- 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-access/v1/assignment-configurations/0123456789abcdefg/admin/assignments/cancel/'
- method: 'POST'
- expected_status: [400]

0 comments on commit 5ff34ad

Please sign in to comment.