Make sure you executed the steps described here. You should also follow the setup described here.
curl -X POST "${API}/api/v1/auth" -H "Content-Type: application/json" -d '{"username": "1111111111111", "password": "1111111111111"}'
Should return:
{
"errors": {
"3001": "Username not found."
}
}
curl -X POST "${API}/api/v1/auth" -H "Content-Type: application/json" -d '{"username": "1111111111111", "password": ""}'
Should return:
{
"errors": {
"4006": "Password is invalid."
}
}
curl -X POST "${API}/api/v1/auth" -H "Content-Type: application/json" -d '{"username": "", "password": "1111111111"}'
Should return:
{
"errors": {
"4005": "Username is invalid."
}
}
curl -X POST "${API}/api/v1/auth" -H "Content-Type: application/json" -d '{"username": "'${ADMIN_USERNAME}'", "password": "11111111111111"}'
Should return:
{
"errors": {
"3002": "Invalid password."
}
}
curl -c ${COOKIE_JAR} -X POST "${API}/api/v1/auth" -H "Content-Type: application/json" -d '{"username": "'${ADMIN_USERNAME}'", "password": "'${ADMIN_PASSWORD}'"}'
Should return:
{
"token": "..." # A random token is returned.
}
curl -X DELETE "${API}/api/v1/auth"
Should return:
{
"errors": {
"3000": "Authentication error."
}
}
curl -X DELETE "${API}/api/v1/auth" -b "${COOKIE_JAR}"
Should return:
{}
curl -X POST "${API}/api/v1/people"
Should return:
{
"errors": {
"3000": "Authentication error."
}
}
curl -X PUT "${API}/api/v1/people/1"
Should return:
{
"errors": {
"3000": "Authentication error."
}
}
curl -X DELETE "${API}/api/v1/people/1"
Should return:
{
"errors": {
"3000": "Authentication error."
}
}
curl -X POST "${API}/api/v1/movies"
Should return:
{
"errors": {
"3000": "Authentication error."
}
}
curl -X PUT "${API}/api/v1/movies/1"
Should return:
{
"errors": {
"3000": "Authentication error."
}
}
curl -X DELETE "${API}/api/v1/movies/1"
Should return:
{
"errors": {
"3000": "Authentication error."
}
}
curl -X POST "${API}/api/v1/movies/1/actors/1"
Should return:
{
"errors": {
"3000": "Authentication error."
}
}
curl -X DELETE "${API}/api/v1/movies/1/actors/1"
Should return:
{
"errors": {
"3000": "Authentication error."
}
}
curl -X POST "${API}/api/v1/movies/1/directors/1"
Should return:
{
"errors": {
"3000": "Authentication error."
}
}
curl -X DELETE "${API}/api/v1/movies/1/directors/1"
Should return:
{
"errors": {
"3000": "Authentication error."
}
}
curl -X POST "${API}/api/v1/movies/1/producers/1"
Should return:
{
"errors": {
"3000": "Authentication error."
}
}
curl -X DELETE "${API}/api/v1/movies/1/producers/1"
Should return:
{
"errors": {
"3000": "Authentication error."
}
}