Skip to content

Commit

Permalink
Merge pull request #12 from f5devcentral/class4-api
Browse files Browse the repository at this point in the history
curl
  • Loading branch information
MattDierick authored Nov 8, 2023
2 parents 89770ca + 550d86d commit e51175d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
Binary file modified docs/class4/module1/.DS_Store
Binary file not shown.
18 changes: 12 additions & 6 deletions docs/class4/module1/lab3/lab3.rst
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
Test your modern API application protection
===========================================

#. Open Postman
#. If you have curl on your machine, go to the next step. Else, connect with SSH or WEBSSH to the Jumphost machine
#. Run the below calls

#. GET /api/adjectives
#. GET /api/animals
#. GET /api/locations
.. code-block:: bash
curl -H "Content-Type: application/json;charset=UTF-8" http://sentence-re-$$makeId$$.workshop.emea.f5se.com/api/adjectives
curl -H "Content-Type: application/json;charset=UTF-8" http://sentence-re-$$makeId$$.workshop.emea.f5se.com/api/animals
curl -H "Content-Type: application/json;charset=UTF-8" http://sentence-re-$$makeId$$.workshop.emea.f5se.com/api/locations
.. note:: The 3 calls are successful because there are defined in the OAS file (method + endpoint)

#. Now, run the below call

#. GET /api/colors
.. code-block:: bash
curl -H "Content-Type: application/json;charset=UTF-8" http://sentence-re-$$makeId$$.workshop.emea.f5se.com/api/colors
.. note:: This call is denied because not part of the OAS file

Expand All @@ -26,4 +31,5 @@ Check the logs
.. note:: Scroll and search for API events

.. image:: ../pictures/api-protect-event.png
:align: center
:align: center

0 comments on commit e51175d

Please sign in to comment.