forked from vikunja/vikunja
71 lines
1.5 KiB
HTTP
71 lines
1.5 KiB
HTTP
# Get all namespaces
|
|
GET http://localhost:8080/api/v1/namespaces
|
|
Authorization: Bearer {{auth_token}}
|
|
|
|
###
|
|
|
|
# Get one namespaces
|
|
GET http://localhost:8080/api/v1/namespaces/-1
|
|
Authorization: Bearer {{auth_token}}
|
|
|
|
###
|
|
|
|
# Get all users who have access to that namespace
|
|
GET http://localhost:8080/api/v1/namespaces/12/users
|
|
Authorization: Bearer {{auth_token}}
|
|
|
|
###
|
|
|
|
# Give a user access to that namespace
|
|
PUT http://localhost:8080/api/v1/namespaces/1/users
|
|
Authorization: Bearer {{auth_token}}
|
|
Content-Type: application/json
|
|
|
|
{"user_id":3, "right": 0}
|
|
|
|
###
|
|
|
|
# Update a users access to that namespace
|
|
POST http://localhost:8080/api/v1/namespaces/1/users/3
|
|
Authorization: Bearer {{auth_token}}
|
|
Content-Type: application/json
|
|
|
|
{"right": 2}
|
|
|
|
###
|
|
|
|
# Delete a user from a namespace
|
|
DELETE http://localhost:8080/api/v1/namespaces/1/users/2
|
|
Authorization: Bearer {{auth_token}}
|
|
|
|
###
|
|
|
|
# Get all teams who have access to that namespace
|
|
GET http://localhost:8080/api/v1/namespaces/1/teams
|
|
Authorization: Bearer {{auth_token}}
|
|
|
|
###
|
|
|
|
# Give a team access to that namespace
|
|
PUT http://localhost:8080/api/v1/namespaces/1/teams
|
|
Authorization: Bearer {{auth_token}}
|
|
Content-Type: application/json
|
|
|
|
{"team_id":3, "right": 0}
|
|
|
|
###
|
|
|
|
# Update a teams access to that namespace
|
|
POST http://localhost:8080/api/v1/namespaces/1/teams/1
|
|
Authorization: Bearer {{auth_token}}
|
|
Content-Type: application/json
|
|
|
|
{"right": 0}
|
|
|
|
###
|
|
|
|
# Delete a team from a namespace
|
|
DELETE http://localhost:8080/api/v1/namespaces/1/teams/2
|
|
Authorization: Bearer {{auth_token}}
|
|
|
|
### |