diff --git a/api/RealWorldAPI.jmx b/api/RealWorldAPI.jmx new file mode 100644 index 000000000..6f1fae64b --- /dev/null +++ b/api/RealWorldAPI.jmx @@ -0,0 +1,1316 @@ + + + + + false + + false + + + + + + + + + false + -1 + + 10 + 5 + true + 60 + 0 + continue + false + + + + + + SERVER + YOURHOST + = + API Server hostname or IP address + + + PORT + PORTNUMBER + = + API Server port number + + + URL + /api + Base URL of the API + = + + + USERNAME + someuser + = + + + EMAIL + someuser@mail.com + = + + + PASSWORD + password12341234 + = + + + Adjust these variables depending on your back end + + + + + + + ${SERVER} + ${PORT} + + + + 6 + + + + + + + + Content-Type + application/json + + + X-Requested-With + XMLHttpRequest + + + + + + 999999 + 1 + + true + + counter + This is used to make sure we register a different user name and email address for each cycle through the API + + + + + false + false + + + + true + + + + false + {"user":{"email":"${counter}${EMAIL}", "password":"${PASSWORD}", "username":"${counter}${USERNAME}"}} + = + + + + + + + + ${URL}/users + POST + true + false + true + false + + + + + + + + + Content-Type + application/json + + + X-Requested-With + XMLHttpRequest + + + + + + + true + + + + false + {"user":{"email":"${counter}${EMAIL}", "password":"${PASSWORD}"}} + = + + + + + + + + ${URL}/users/login + POST + true + false + true + false + + + + + + + + + Content-Type + application/json + + + X-Requested-With + XMLHttpRequest + + + + + + + true + + + + false + {"user":{"email":"${counter}${EMAIL}", "password":"${PASSWORD}"}} + = + + + + + + + + ${URL}/users/login + POST + true + false + true + false + + + + + + + + + Content-Type + application/json + + + X-Requested-With + XMLHttpRequest + + + + + + 0 + token + $.user.token + + + + + + + + + + + + ${URL}/user + GET + true + false + true + false + + + + + + + + + Content-Type + application/json + + + X-Requested-With + XMLHttpRequest + + + Authorization + Token ${token} + + + + + + + true + + + + false + {"user":{"email":"${counter}${EMAIL}"}} + = + + + + + + + + ${URL}/user + PUT + true + false + true + false + + + + + + + + + Content-Type + application/json + + + X-Requested-With + XMLHttpRequest + + + Authorization + Token ${token} + + + + + + + + + + + + + + + + ${URL}/articles + GET + true + false + true + false + + + + + + + + + Content-Type + application/json + + + X-Requested-With + XMLHttpRequest + + + Authorization + Token ${token} + + + + + + + + + + + + + + ${URL}/articles/feed + GET + true + false + true + false + + + + + + + + + Content-Type + application/json + + + X-Requested-With + XMLHttpRequest + + + Authorization + Token ${token} + + + + + + + + + + author + johnjacob + author + = + false + true + + + + + + + + ${URL}/articles + GET + true + false + true + false + + + + + + + + + Content-Type + application/json + + + X-Requested-With + XMLHttpRequest + + + + + + + + + + author + ${USERNAME} + author + = + false + true + + + + + + + + ${URL}/articles + GET + true + false + true + false + + + + + + + + + Content-Type + application/json + + + X-Requested-With + XMLHttpRequest + + + Authorization + Token ${token} + + + + + + + + + + favorited + jane + favorited + = + false + true + + + + + + + + ${URL}/articles + GET + true + false + true + false + + + + + + + + + Content-Type + application/json + + + X-Requested-With + XMLHttpRequest + + + + + + + + + + favorited + jane + favorited + = + false + true + + + + + + + + ${URL}/articles + GET + true + false + true + false + + + + + + + + + Content-Type + application/json + + + X-Requested-With + XMLHttpRequest + + + Authorization + Token ${token} + + + + + + + + + + + + + + ${URL}/tags + GET + true + false + true + false + + + + + + + + + Content-Type + application/json + + + X-Requested-With + XMLHttpRequest + + + + + + + + + + tag + dragons + tag + = + false + true + + + + + + + + ${URL}/articles + GET + true + false + true + false + + + + + + + + + Content-Type + application/json + + + X-Requested-With + XMLHttpRequest + + + + + + + + + + + + + + ${URL}/articles + GET + true + false + true + false + + + + + + + + + Content-Type + application/json + + + X-Requested-With + XMLHttpRequest + + + + + + + + + + + + + + ${URL}/articles + GET + true + false + true + false + + + + + + + + + Content-Type + application/json + + + X-Requested-With + XMLHttpRequest + + + Authorization + Token ${token} + + + + + + + + true + + + + false + {"article":{"title":"How to train your dragon", "description":"Ever wonder how?", "body":"Very carefully.", "tagList":["dragons","training"]}} + = + + + + + + + + ${URL}/articles + POST + true + false + true + false + + + + + + + + + Content-Type + application/json + + + X-Requested-With + XMLHttpRequest + + + Authorization + Token ${token} + + + + + + 0 + slug + $.article.slug + + + + + true + + + + false + {"article":{"body":"With two hands"}} + = + + + + + + + + ${URL}/articles/${slug} + PUT + true + false + true + false + + + + + + + + + Content-Type + application/json + + + X-Requested-With + XMLHttpRequest + + + Authorization + Token ${token} + + + + + + + + + + + + + + ${URL}/articles/${slug} + GET + true + false + true + false + + + + + + + + + Content-Type + application/json + + + X-Requested-With + XMLHttpRequest + + + Authorization + Token ${token} + + + + + + + + + + + + + + ${URL}/articles/${slug}/favorite + POST + true + false + true + false + + + + + + + + + Content-Type + application/json + + + X-Requested-With + XMLHttpRequest + + + Authorization + Token ${token} + + + + + + + + + + + + + + ${URL}/articles/${slug}/favorite + DELETE + true + false + true + false + + + + + + + + + Content-Type + application/json + + + X-Requested-With + XMLHttpRequest + + + Authorization + Token ${token} + + + + + + + true + + + + false + {"comment":{"body":"Thank you so much!"}} + = + + + + + + + + ${URL}/articles/${slug}/comments + POST + true + false + true + false + + + + + + + + + Content-Type + application/json + + + X-Requested-With + XMLHttpRequest + + + Authorization + Token ${token} + + + + + + 0 + commentId + $.comment.id + + + + + + + + + + + + ${URL}/articles/${slug}/comments + GET + true + false + true + false + + + + + + + + + Content-Type + application/json + + + X-Requested-With + XMLHttpRequest + + + Authorization + Token ${token} + + + + + + + + + + + + + + ${URL}/articles/${slug}/comments/${commentId} + DELETE + true + false + true + false + + + + + + + + + Content-Type + application/json + + + X-Requested-With + XMLHttpRequest + + + Authorization + Token ${token} + + + + + + + + + + + + + + ${URL}/articles/${slug} + DELETE + true + false + true + false + + + + + + + + + Content-Type + application/json + + + X-Requested-With + XMLHttpRequest + + + Authorization + Token ${token} + + + + + + + true + + + + false + {"user":{"email":"celeb${counter}${EMAIL}", "password":"${PASSWORD}", "username":"celeb${counter}${USERNAME}"}} + = + + + + + + + + ${URL}/users + POST + true + false + true + false + + + + + + + + + Content-Type + application/json + + + X-Requested-With + XMLHttpRequest + + + + + + + + + + + + + + ${URL}/profiles/celeb${counter}${USERNAME} + GET + true + false + true + false + + + + + + + + + Content-Type + application/json + + + X-Requested-With + XMLHttpRequest + + + Authorization + Token ${token} + + + + + + + true + + + + false + {"user":{"email":"${EMAIL}"}} + = + + + + + + + + ${URL}/profiles/celeb${counter}${USERNAME}/follow + POST + true + false + true + false + + + + + + + + + Content-Type + application/json + + + X-Requested-With + XMLHttpRequest + + + Authorization + Token ${token} + + + + + + + + + + + + + + ${URL}/profiles/celeb${counter}${USERNAME}/follow + DELETE + true + false + true + false + + + + + + + + + Content-Type + application/json + + + X-Requested-With + XMLHttpRequest + + + Authorization + Token ${token} + + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + true + + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + true + + + + + + + + +