Rao

Generate a new RAO for a specified registration authority.

Allowed HTTP verbs by this endpoint:

Verb Endpoint Action
POST /rao/ Create a new RAO
GET /rao/ Get the list of RAOs
GET /rao/{id}/ Get information about a RAO
PUT /rao/{id}/ Update information about a RAO

Create a RAO

The main requirement needed to create a new RAO, is a Software Request with the state ISSUED and its certificate as a Base64 formatted string. If this requirement is satisfied, it is possible to create a new RAO querying the endpoint with a POST request.

Endpoint:
/api/v1/rao/
Method:
POST
Body Parameters:
Parameter Description Required
registration_authority_master The registration authority master id Yes
registration_authority The list of the RAs where the RAO can operate Yes
certificate The Request certificate in Base64 format Yes
given_name The RAO's name Yes
surname_1 The RAO's first surname Yes
surname_2 The RAO's second surname No
id_document_number The RAO's document number Yes
id_document_description The document description No
id_document_issuer The document issuer No
email A valid email address Yes
Response

If the creation of the RAO is successful, the response is a JSON with the info about it.

Example

            {
                "registration_authority_master": "41",
                "registration_authority": ["41"],
                "certificate": "MIIHpzCCBY+gAwIBAgIIRQGwWzXaC1QwDQYJK...",
                "id_document_number": "12354232414",
                "email": "email@example.com",
                "given_name": "This is not the RAO",
                "surname_1": "You were",
                "surname_2": "Looking for"
            }

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

            {
                "pk": 219,
                "given_name": "This is not the RAO",
                "surname_1": "You were",
                "surname_2": "Looking for",
                "certificate": {
                    "profile": "EXTERNAL",
                    "status": 0,
                    "valid_from": "2019-01-28T16:31:00",
                    "valid_to": "2021-01-27T16:31:00",
                    "valid": "UNKNOW",
                    "revokation_reason": null,
                    "serial_number": "4501b05b35da0b54",
                    "subject": "CN=Gnigni Bubu, 2.5.4.5=IDCES-12432143313213, 2.5.4.42=Gnigni, 2.5.4.4=Bubu, C=ES",
                    "data": "MIIHpzCCBY+gAwIBAgIIRQGwW...",
                    "issuer": "2.5.4.97=VATES-A66721499, CN=UANATACA CA1 DEVEL 2016, OU=AC-UANATACA, O=UANATACA S.A., L=Barcelona (see current address at www.uanataca.com/address), C=ES"
                },
                "id_document_number": "12354232414",
                "id_document_description": null,
                "id_document_issuer": null,
                "registration_authority": [
                    41
                ],
                "registration_authority_master": 41
            }

Get a List of RAOs

The list of all the available RAOs can be retrieved through a GET request.

Endpoint:
/api/v1/rao/
Method:
GET

The result can be filtered with these parameters:

Field
given_name
surname_1
surname_2
certificate
registration_authority
registration_authority_master
Response

The response is a JSON structure with the list of RAOs and that take advantage of the mechanism of pagination.

Example

This example get the list of RAOs associated to the registration authority 41.


            curl -X GET https://api.uanataca.com/api/v1/rao/?registration_authority=41
            

            {
                "count": 1,
                "next": "null",
                "previous": null,
                "results": [
                    {
                        "pk": 219,
                        "given_name": "This is not the RAO",
                        "surname_1": "You were",
                        "surname_2": "Looking for",
                        "certificate": {
                            "profile": "EXTERNAL",
                            "status": 0,
                            "valid_from": "2019-01-28T16:31:00Z",
                            "valid_to": "2021-01-27T16:31:00Z",
                            "valid": "VALID",
                            "revokation_reason": null,
                            "serial_number": "4501b05b35da0b54",
                            "subject": "CN=Gnigni Bubu, 2.5.4.5=IDCES-12432143313213, 2.5.4.42=Gnigni, 2.5.4.4=Bubu, C=ES",
                            "data": "MIIHpzCCBY+gAwIBA...",
                            "issuer": "2.5.4.97=VATES-A66721499, CN=UANATACA CA1 DEVEL 2016, OU=AC-UANATACA, O=UANATACA S.A., L=Barcelona (see current address at www.uanataca.com/address), C=ES"
                        },
                        "id_document_number": "12354232414",
                        "id_document_description": null,
                        "id_document_issuer": null,
                        "registration_authority": [
                            41
                        ],
                        "registration_authority_master": 41
                    }
                ]
            }

Get info about a RAO

The info about a RAO can be retrieved in any moment with a GET request.

Endpoint:
/api/v1/rao/{id}/
Method:
GET
Path Parameters:
Param Description
id The RAO's unique identifier
Response

The response is the complete info about the RAO specified.

Example

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

            {
                "pk": 219,
                "given_name": "This is not the RAO",
                "surname_1": "You were",
                "surname_2": "Looking for",
                "certificate": {
                    "profile": "EXTERNAL",
                    "status": 0,
                    "valid_from": "2019-01-28T16:31:00Z",
                    "valid_to": "2021-01-27T16:31:00Z",
                    "valid": "VALID",
                    "revokation_reason": null,
                    "serial_number": "4501b05b35da0b54",
                    "subject": "CN=Gnigni Bubu, 2.5.4.5=IDCES-12432143313213, 2.5.4.42=Gnigni, 2.5.4.4=Bubu, C=ES",
                    "data": "MIIHpzCCBY+gAwIBAgIIRQGwWzXaC...",
                    "issuer": "2.5.4.97=VATES-A66721499, CN=UANATACA CA1 DEVEL 2016, OU=AC-UANATACA, O=UANATACA S.A., L=Barcelona (see current address at www.uanataca.com/address), C=ES"
                },
                "id_document_number": "12354232414",
                "id_document_description": null,
                "id_document_issuer": null,
                "registration_authority": [
                    41
                ],
                "registration_authority_master": 41
            }

Update RAO's info

The update of the info is possible with a PUT request passing the params that we want to update.

Endpoint:
/api/v1/rao/{id}/
Method:
PUT
Path Parameters:
Param Description
id The RAO's unique identifier
Response

The successful response of this endpoint is the complete list of the info about the RAO updated.

Example

            {
                "registration_authority_master": "41",
                "registration_authority": ["41"],
                "email": "anewemail@example.com",
                "given_name": "This is not the RAO",
                "surname_1": "You were",
                "surname_2": "Looking for"
            }

            curl -d @params.json -X PUT https://api.uanataca.com/api/v1/rao/219/
            

            {
                "pk": 219,
                "given_name": "This is not the RAO",
                "surname_1": "You were",
                "surname_2": "Looking for",
                "certificate": {
                    "profile": "EXTERNAL",
                    "status": 0,
                    "valid_from": "2019-01-28T16:31:00Z",
                    "valid_to": "2021-01-27T16:31:00Z",
                    "valid": "VALID",
                    "revokation_reason": null,
                    "serial_number": "4501b05b35da0b54",
                    "subject": "CN=Gnigni Bubu, 2.5.4.5=IDCES-12432143313213, 2.5.4.42=Gnigni, 2.5.4.4=Bubu, C=ES",
                    "data": "MIIHpzCCBY+gAwIBAgIIRQGwWzXaC1Q...",
                    "issuer": "2.5.4.97=VATES-A66721499, CN=UANATACA CA1 DEVEL 2016, OU=AC-UANATACA, O=UANATACA S.A., L=Barcelona (see current address at www.uanataca.com/address), C=ES"
                },
                "id_document_number": "12354232414",
                "id_document_description": null,
                "id_document_issuer": null,
                "registration_authority": [
                    41
                ],
                "registration_authority_master": 41
            }