Skip to content

Latest commit

 

History

History
202 lines (167 loc) · 6.05 KB

acme_accounts.rst

File metadata and controls

202 lines (167 loc) · 6.05 KB

acme_accounts

.. versionadded:: 3.1

GET

Gets information for all :term:`ACME Account` s.

Auth. Required:Yes
Roles Required:"admin"
Permissions Required:ACME:READ
Response Type:Array

Request Structure

No parameters available

Response Structure

email:The email connected to the :term:`ACME Account`.
privateKey:The private key connected to the :term:`ACME Account`.
uri:The URI for the :term:`ACME Account`. Differs per provider.
provider:The :abbr:`ACME (Automatic Certificate Management Environment)` provider.
HTTP/1.1 200 OK
Content-Type: application/json

{ "response": [
        {
                "email": "sample@example.com",
                "privateKey": "-----BEGIN RSA PRIVATE KEY-----\nSampleKey\n-----END RSA PRIVATE KEY-----\n",
                "uri": "https://acme.example.com/acct/1",
                "provider": "Lets Encrypt"
        }
]}

POST

Creates a new :term:`ACME Account`.

Auth. Required:Yes
Roles Required:"admin"
Permissions Required:ACME:CREATE, ACME:READ
Response Type:Object

Request Structure

The request body must be a single :term:`ACME Account` object with the following keys:

email:The email connected to the :term:`ACME Account`.
privateKey:The private key connected to the :term:`ACME Account`.
uri:The URI for the :term:`ACME Account`. Differs per provider.
provider:The :abbr:`ACME (Automatic Certificate Management Environment)` provider.
POST /api/4.0/acme_accounts HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.47.0
Accept: */*
Cookie: mojolicious=...
Content-Length: 181
Content-Type: application/json

{
        "email": "sample@example.com",
        "privateKey": "-----BEGIN RSA PRIVATE KEY-----\nSampleKey\n-----END RSA PRIVATE KEY-----\n",
        "uri": "https://acme.example.com/acct/1",
        "provider": "Lets Encrypt"
}

Response Structure

email:The email connected to the :term:`ACME Account`.
privateKey:The private key connected to the :term:`ACME Account`.
uri:The URI for the :term:`ACME Account`. Differs per provider.
provider:The :abbr:`ACME (Automatic Certificate Management Environment)` provider.
HTTP/1.1 201 Created
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Set-Cookie, Cookie
Access-Control-Allow-Methods: POST,GET,OPTIONS,PUT,DELETE
Access-Control-Allow-Origin: *
Content-Type: application/json
Set-Cookie: mojolicious=...; Path=/; Expires=Mon, 10 Dec 2020 17:40:54 GMT; Max-Age=3600; HttpOnly
Whole-Content-Sha512: eQrl48zWids0kDpfCYmmtYMpegjnFxfOVvlBYxxLSfp7P7p6oWX4uiC+/Cfh2X9i3G+MQ36eH95gukJqOBOGbQ==
X-Server-Name: traffic_ops_golang/
Date: Wed, 05 Dec 2018 19:18:21 GMT
Content-Length: 253

{ "alerts": [
        {
                "text": "Acme account created",
                "level":"success"
        }
],
"response": {
        "email": "sample@example.com",
        "privateKey": "-----BEGIN RSA PRIVATE KEY-----\nSampleKey\n-----END RSA PRIVATE KEY-----\n",
        "uri": "https://acme.example.com/acct/1",
        "provider": "Lets Encrypt"
}}

PUT

Updates an existing :term:`ACME Account`.

Auth. Required:Yes
Roles Required:"admin"
Permissions Required:ACME:UPDATE, ACME:READ
Response Type:Object

Request Structure

The request body must be a single :term:`ACME Account` object with the following keys:

email:The email connected to the :term:`ACME Account`.
privateKey:The private key connected to the :term:`ACME Account`.
uri:The URI for the :term:`ACME Account`. Differs per provider.
provider:The :abbr:`ACME (Automatic Certificate Management Environment)` provider.
PUT /api/4.0/acme_accounts HTTP/1.1
Host: trafficops.infra.ciab.test
User-Agent: curl/7.47.0
Accept: */*
Cookie: mojolicious=...
Content-Length: 181
Content-Type: application/json

{
        "email": "sample@example.com",
        "privateKey": "-----BEGIN RSA PRIVATE KEY-----\nSampleKey\n-----END RSA PRIVATE KEY-----\n",
        "uri": "https://acme.example.com/acct/1",
        "provider": "Lets Encrypt"
}

Response Structure

email:The email connected to the :term:`ACME Account`.
privateKey:The private key connected to the :term:`ACME Account`.
uri:The URI for the :term:`ACME Account`. Differs per provider.
provider:The :abbr:`ACME (Automatic Certificate Management Environment)` provider.
HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Set-Cookie, Cookie
Access-Control-Allow-Methods: POST,GET,OPTIONS,PUT,DELETE
Access-Control-Allow-Origin: *
Content-Type: application/json
Set-Cookie: mojolicious=...; Path=/; Expires=Mon, 10 Dec 2020 17:40:54 GMT; Max-Age=3600; HttpOnly
Whole-Content-Sha512: eQrl48zWids0kDpfCYmmtYMpegjnFxfOVvlBYxxLSfp7P7p6oWX4uiC+/Cfh2X9i3G+MQ36eH95gukJqOBOGbQ==
X-Server-Name: traffic_ops_golang/
Date: Wed, 05 Dec 2018 19:18:21 GMT
Content-Length: 253

{ "alerts": [
        {
                "text": "Acme account updated",
                "level":"success"
        }
],
"response": {
        "email": "sample@example.com",
        "privateKey": "-----BEGIN RSA PRIVATE KEY-----\nSampleKey\n-----END RSA PRIVATE KEY-----\n",
        "uri": "https://acme.example.com/acct/1",
        "provider": "Lets Encrypt"
}}