https://bitbucket.org/pndlm/pndlm-testapi
Username: blarson
Password: speedo123
This API will accept cookie or bearer token authentication. After logging in via /api/v0/auth/login, a session cookie will be set. Include this cookie or bearer token in subsequent requests to access protected endpoints.
{
"Username": "string",
"Password": "string"
}
{
"Token": "string"
}
Invalid credentials
curl -X POST https://testapi.pndlm.net/api/v0/auth/login \
-H "Content-Type: application/json" \
-d '{"Username":"blarson","Password":"speedo123"}' \
-c cookies.txt
Session cookie is deleted. No response body.
curl -X POST https://testapi.pndlm.net/api/v0/auth/logout \
-b cookies.txt -c cookies.txt
{
"IsAuthenticated": false,
"Username": ""
}
Or when authenticated:
{
"IsAuthenticated": true,
"Username": "string"
}
curl https://testapi.pndlm.net/api/v0/status \
-b cookies.txt
{
"Joke": "string"
}
Not authenticated
curl https://testapi.pndlm.net/api/v0/joke \
-b cookies.txt