curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{
"username":"test_user_001",
"password":"Hello World"
}' "http://localhost:8000/auth/token/obtain/"
POST /auth/token/obtain/ HTTP/1.1
Host: localhost:8000
Content-Type: application/json
Accept: application/json
{
"username":"test_user_001",
"password":"Hello World"
}
Status | 200 OK |
---|---|
Content-Type | application/json |
|
curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{
"refresh":"sample_token"
}' "http://localhost:8000/auth/token/refresh/"
POST /auth/token/refresh/ HTTP/1.1
Host: localhost:8000
Content-Type: application/json
Accept: application/json
{
"refresh":"sample_token"
}
Status | 200 OK |
---|---|
Content-Type | application/json |
|
curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{
"username":"test_staff_user_001",
"password":"Hello Staff Password"
}' "http://localhost:8000/auth/token/obtain/"
POST /auth/token/obtain/ HTTP/1.1
Host: localhost:8000
Content-Type: application/json
Accept: application/json
{
"username":"test_staff_user_001",
"password":"Hello Staff Password"
}
Status | 200 OK |
---|---|
Content-Type | application/json |
|
curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{
"refresh":"sample_staff_token"
}' "http://localhost:8000/auth/token/refresh/"
POST /auth/token/refresh/ HTTP/1.1
Host: localhost:8000
Content-Type: application/json
Accept: application/json
{
"refresh":"sample_staff_token"
}
Status | 200 OK |
---|---|
Content-Type | application/json |
|
curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{
"username":"sample_superuser_001",
"password":"Hello Superuser Password"
}' "http://localhost:8000/auth/token/obtain/"
POST /auth/token/obtain/ HTTP/1.1
Host: localhost:8000
Content-Type: application/json
Accept: application/json
{
"username":"sample_superuser_001",
"password":"Hello Superuser Password"
}
Status | 200 OK |
---|---|
Content-Type | application/json |
|
curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{
"refresh":"sample_superuser_token"
}' "http://localhost:8000/auth/token/refresh/"
POST /auth/token/refresh/ HTTP/1.1
Host: localhost:8000
Content-Type: application/json
Accept: application/json
{
"refresh":"sample_superuser_token"
}
Status | 200 OK |
---|---|
Content-Type | application/json |
|
curl -X GET -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer sample_staff_token" "http://localhost:8000/users?limit=10"
GET /users?limit=10 HTTP/1.1
Host: localhost:8000
Accept: application/json
Content-Type: application/json
Authorization: Bearer sample_staff_token
curl -X GET -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer sample_token" "http://localhost:8000/users/test_user_001"
GET /users/test_user_001 HTTP/1.1
Host: localhost:8000
Accept: application/json
Content-Type: application/json
Authorization: Bearer sample_token