Merge pull request #12108 from edx/bderusha/api-status-notification
Email notification
This commit is contained in:
@@ -2882,3 +2882,5 @@ THEME_CACHE_TIMEOUT = 30 * 60
|
||||
# API access management
|
||||
API_ACCESS_MANAGER_EMAIL = 'api-access@example.com'
|
||||
API_ACCESS_FROM_EMAIL = 'api-requests@example.com'
|
||||
API_DOCUMENTATION_URL = 'http://edx.readthedocs.org/projects/edx-platform-api/en/latest/overview.html'
|
||||
AUTH_DOCUMENTATION_URL = 'http://edx.readthedocs.org/projects/edx-platform-api/en/latest/authentication.html'
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
## mako
|
||||
Dear ${name},
|
||||
|
||||
Your request for access to the ${platform_name} Course Catalog API has been approved. Sign in at ${api_management_url} using the same account you used to request API access to generate your API client credentials.
|
||||
|
||||
Notes:
|
||||
- ${platform_name} recommends that you bookmark the ${api_management_url} page for easy access.
|
||||
- For more information about how to use the API client credentials to authenticate your API request, see the OAuth 2.0 documentation at ${authentication_docs_url}.
|
||||
- For questions about using this API, see the documentation at ${api_docs_url} or contact ${support_email_address}.
|
||||
|
||||
Thanks!
|
||||
The ${platform_name} API team
|
||||
@@ -0,0 +1,6 @@
|
||||
## mako
|
||||
Dear ${name},
|
||||
|
||||
Your request for access to the ${platform_name} Course Catalog API has been denied. If you think this is an error, or for other questions about using this API, contact ${support_email_address}.
|
||||
|
||||
- The ${platform_name} API team
|
||||
@@ -0,0 +1,8 @@
|
||||
## mako
|
||||
We have received the following request to use the Course Catalog API. Go to ${approval_url} to approve the user.
|
||||
|
||||
Company name: ${api_request.company_name}
|
||||
Company contact: ${api_request.user.username}
|
||||
Company URL: ${api_request.website}
|
||||
Address: ${api_request.company_address}
|
||||
Reason for API usage: ${api_request.reason}
|
||||
@@ -1,8 +0,0 @@
|
||||
## mako
|
||||
We have received the following request to use the Course Discovery API. Please go to ${approval_url} to approve the user.
|
||||
|
||||
Company name: ${company_name}
|
||||
Company contact: ${username}
|
||||
Company URL: ${url}
|
||||
Address: ${company_address}
|
||||
Reason for API usage: ${reason}
|
||||
@@ -14,7 +14,7 @@ from django.utils.translation import ugettext as _
|
||||
|
||||
<h2 class="api-access-request-subheading">${_("API Access")}</h2>
|
||||
|
||||
<p class="api-tos-body">${_("To access the APIs, you will need to create an {platform_name} user account for your application (not for personal use). This account will provide you with access to our API request page at {request_url}. On that page, you must complete the API request form including a description of your proposed uses for the APIs. Any account and registration information that you provide to {platform_name} must be accurate and up to date, and you agree to inform us promptly of any changes. {platform_name} will review your API request form and, upon approval in {platform_name}'s sole discretion, will provide you with instructions for obtaining your API shared secret and client ID.").format(platform_name=settings.PLATFORM_NAME, request_url=reverse('api-request'))}</p>
|
||||
<p class="api-tos-body">${_("To access the APIs, you will need to create an {platform_name} user account for your application (not for personal use). This account will provide you with access to our API request page at {request_url}. On that page, you must complete the API request form including a description of your proposed uses for the APIs. Any account and registration information that you provide to {platform_name} must be accurate and up to date, and you agree to inform us promptly of any changes. {platform_name} will review your API request form and, upon approval in {platform_name}'s sole discretion, will provide you with instructions for obtaining your API shared secret and client ID.").format(platform_name=settings.PLATFORM_NAME, request_url=reverse('api_admin:api-request'))}</p>
|
||||
|
||||
<h2 class="api-access-request-subheading">${_("Permissible Use")}</h2>
|
||||
|
||||
|
||||
@@ -110,6 +110,9 @@ urlpatterns = (
|
||||
# TODO Namespace these!
|
||||
url(r'^course_modes/', include('course_modes.urls')),
|
||||
url(r'^verify_student/', include('verify_student.urls')),
|
||||
|
||||
# URLs for API access management
|
||||
url(r'^api-admin/', include('openedx.core.djangoapps.api_admin.urls', namespace='api_admin')),
|
||||
)
|
||||
|
||||
urlpatterns += (
|
||||
@@ -1000,8 +1003,3 @@ if settings.FEATURES.get('ENABLE_FINANCIAL_ASSISTANCE_FORM'):
|
||||
name='submit_financial_assistance_request'
|
||||
)
|
||||
)
|
||||
|
||||
# URLs for API access management
|
||||
urlpatterns += (
|
||||
url(r'^api-admin/', include('openedx.core.djangoapps.api_admin.urls')),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user