User

A User is the entity that can access the APIs provided by Uanataca.

Allowed HTTP verbs by this endpoint:

Verb Endpoint Action
POST /users/ Create a new User
GET /users/ Get the list of Users
GET /users/{id}/ Get information about a User

Create a User

A RAO is needed to create a new User.

Endpoint:
/api/v1/users/
Method:
POST
Body parameters:
Parameter Description Required
permission_profile The permission profile id that will be associated to this User Yes
request The Request id Yes
registration_authority The registration authority id Yes
rao The rao id Yes
Response

The HTTP status code is 201 if the User is created successful and the response body a JSON with the User data.

Example

            {
                "registration_authority": 41,
                "permission_profile": 18,
                "request": 787,
                "rao": 219
            }

            curl -H "Content-Type: application/json" -d @params.json -X POST https://api.uanataca.com/api/v1/users/
            

            {
                "pk": 36,
                "permission_profile": 18,
                "registration_authority": 41,
                "request": 787
            }

Getting a list of Users

A list of the available users can be retrived with a GET request.

Endpoint:
/api/v1/users/
Method:
GET
Response

In case of success the response body is a JSON, structured with the mechanism of pagination, with the list of all the users found and the HTTP status code is 200.

Example

            curl -X GET https://api.uanataca.com/api/v1/users/
            

            {
                "count": 30,
                "next": "https://api.uanataca.com/api/v1/users/?page=2",
                "previous": null,
                "results": [
                    {
                        "pk": 22,
                        "permission_profile": 18,
                        "registration_authority": 24,
                        "request": 506
                    },
                    ...
                ]
            }

Get a User

Get the info of a specified user.

Endpoint:
/api/v1/users/{id}/
Method:
GET
Path Parameters:
Parameter Description
id The id of the User
Response

In case of success the response body is a JSON structure containing the info of the user, and the HTTP status code is 200.

Example

            curl -X GET https://api.uanataca.com/api/v1/users/36/
            

            {
                "pk": 36,
                "permission_profile": 18,
                "registration_authority": 41,
                "request": 787
            }