diff --git a/go/apps/http_api_nostream/templates/http_api_nostream/edit_help.html b/go/apps/http_api_nostream/templates/http_api_nostream/edit_help.html index 4ae763ef9..da8ae9cdf 100644 --- a/go/apps/http_api_nostream/templates/http_api_nostream/edit_help.html +++ b/go/apps/http_api_nostream/templates/http_api_nostream/edit_help.html @@ -1,3 +1,37 @@ +

Examples

+ +

+ The examples below show how to send messages and fire metrics using + the curl command. The username + and password needed for authentication have been filled in + for you as follows: +

+ + + +

+ The URLs for sending messages and firing metrics contain + the conversation id (the string of letters and digits near + the end of the URL). This conversation's id is + {{ conversation.key }}. +

+ +

+ The password used is the saved value of the API token. If you + have modified the API token, you will have to save the change before the + examples include the new password. +

+ +

Example send

You can send messages via this conversation using an HTTP PUT request as follows:

@@ -24,23 +58,3 @@

Example metric firing

https://go.vumi.org/api/v1/go/http_api_nostream/{{ conversation.key }}/metrics.json \ -vvv - -

Notes

- -This example is based on the currently saved -configuration. If you change the API token, you'll need to update the -password used for the HTTP request. - - diff --git a/go/apps/http_api_nostream/tests/test_views.py b/go/apps/http_api_nostream/tests/test_views.py index 9526c612d..daeb25f14 100644 --- a/go/apps/http_api_nostream/tests/test_views.py +++ b/go/apps/http_api_nostream/tests/test_views.py @@ -236,8 +236,11 @@ def test_get_edit_view_help(self): " ", ])) self.assertContains(response, "\n".join([ - "
  • The value near the end of the URL is the unique identifier" - " for", - " the conversation. This conversation is %s.", - "
  • ", + "

    ", + " The URLs for sending messages and firing metrics contain", + " the conversation id (the string of letters and digits" + " near", + " the end of the URL). This conversation's id is", + " %s.", + "

    ", ]) % conversation.key)