-
Notifications
You must be signed in to change notification settings - Fork 0
Formation API
Liam Boudadi edited this page Feb 5, 2025
·
19 revisions
GET / (gets all in-memory formation details)
None
http code content-type response 200json[{"id": .., "name": .., "description": ..}, ...]
curl -X GET -H "Content-Type: application/json" http://localhost:8080/formations
GET / (gets all in-memory stub & proxy configs)
None
http code content-type response 200text/plain;charset=UTF-8YAML string
curl -X GET -H "Content-Type: application/json" http://localhost:8889/
GET /{stub_numeric_id} (gets stub by its resource-id-{stub_numeric_id} in the YAML config)
name type data type description stub_numeric_idrequired int ($int64) The specific stub numeric id
http code content-type response 200text/plain;charset=UTF-8YAML string 400application/json{"code":"400","message":"Bad Request"}
curl -X GET -H "Content-Type: application/json" http://localhost:8889/0
GET /{uuid} (gets stub by its defined uuid property)
name type data type description uuidrequired string The specific stub unique idendifier
http code content-type response 200text/plain;charset=UTF-8YAML string 400application/json{"code":"400","message":"Bad Request"}
curl -X GET -H "Content-Type: application/json" http://localhost:8889/some-unique-uuid-string
GET /proxy-config/default (gets default proxy-config)
None
http code content-type response 200text/plain;charset=UTF-8YAML string 400application/json{"code":"400","message":"Bad Request"}
curl -X GET -H "Content-Type: application/json" http://localhost:8889/proxy-config/default
GET /proxy-config/{uuid} (gets proxy config by its uuid property)
name type data type description uuidrequired string The specific proxy config unique idendifier
http code content-type response 200text/plain;charset=UTF-8YAML string 400application/json{"code":"400","message":"Bad Request"}
curl -X GET -H "Content-Type: application/json" http://localhost:8889/proxy-config/some-unique-uuid-string
PUT /{stub_numeric_id} (updates stub by its resource-id-{stub_numeric_id} in the config)
name type data type description stub_numeric_idrequired int ($int64) The specific stub numeric id
http code content-type response 201text/plain;charset=UTF-8Stub request index#<stub_numeric_id> updated successfully"400application/json{"code":"400","message":"Bad Request"}405text/html;charset=utf-8None
curl -X PUT -H "Content-Type: application/json" --data @put.json http://localhost:8889/0
PUT /{uuid} (updates stub by its defined uuid property)
name type data type description uuidrequired string The specific stub unique idendifier
http code content-type response 201text/plain;charset=UTF-8Stub request uuid#<uuid> updated successfully400application/json{"code":"400","message":"Bad Request"}405text/html;charset=utf-8None
curl -X PUT -H "Content-Type: application/json" --data @put.json http://localhost:8889/some-unique-uuid-string
PUT /proxy-config/default (updates default proxy-config)
None
http code content-type response 201text/plain;charset=UTF-8Proxy config uuid#default updated successfully400application/json{"code":"400","message":"Bad Request"}405text/html;charset=utf-8None
curl -X PUT -H "Content-Type: application/json" --data @put.json http://localhost:8889/proxy-config/default
PUT /proxy-config/{uuid} (updates proxy-config by its uuid property)
name type data type description uuidrequired string The specific proxy config unique idendifier
http code content-type response 201text/plain;charset=UTF-8Proxy config uuid#<uuid> updated successfully400application/json{"code":"400","message":"Bad Request"}405text/html;charset=utf-8None
curl -X PUT -H "Content-Type: application/json" --data @put.json http://localhost:8889/proxy-config/some-unique-uuid-string
DELETE / (deletes all in-memory stub & proxy configs)
None
http code content-type response 200text/plain;charset=UTF-8All in-memory YAML config was deleted successfully
curl -X DELETE -H "Content-Type: application/json" http://localhost:8889/
DELETE /{stub_numeric_id} (deletes stub by its resource-id-{stub_numeric_id} in the config)
name type data type description stub_numeric_idrequired int ($int64) The specific stub numeric id
http code content-type response 200text/plain;charset=UTF-8Stub request index#<stub_numeric_id> deleted successfully400application/json{"code":"400","message":"Bad Request"}
curl -X DELETE -H "Content-Type: application/json" http://localhost:8889/0
DELETE /{uuid} (updates stub by its defined uuid property)
name type data type description uuidrequired string The specific stub unique idendifier
http code content-type response 200text/plain;charset=UTF-8Stub request uuid#<uuid> deleted successfully400application/json{"code":"400","message":"Bad Request"}
curl -X DELETE -H "Content-Type: application/json" http://localhost:8889/some-unique-uuid-string
DELETE /proxy-config/{uuid} (deletes proxy-config by its uuid property)
name type data type description uuidrequired string The specific proxy config unique idendifier
http code content-type response 200text/plain;charset=UTF-8Proxy config uuid#<uuid> deleted successfully400application/json{"code":"400","message":"Bad Request"}
curl -X DELETE -H "Content-Type: application/json" http://localhost:8889/proxy-config/some-unique-uuid-string