Skip to content

Commit dc5ee1a

Browse files
fix(api): update out of date cert api docs (#339)
1 parent 8ff2605 commit dc5ee1a

1 file changed

Lines changed: 87 additions & 29 deletions

File tree

  • src/reference-guide/controller-api

src/reference-guide/controller-api/v2.0.md

Lines changed: 87 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -383,24 +383,35 @@ DEIS_PLATFORM_VERSION: 2.0.0
383383
Content-Type: application/json
384384
385385
{
386-
"count": 1,
387-
"next": null,
388-
"previous": null,
389-
"results": [
390-
{
391-
"common_name": "test.example.com",
392-
"expires": "2014-01-01T00:00:00UTC"
393-
}
394-
]
386+
"count": 1,
387+
"next": null,
388+
"previous": null,
389+
"results": [
390+
{
391+
"id": 22,
392+
"owner": "test",
393+
"san": [],
394+
"domains": [],
395+
"created": "2016-06-22T22:24:20Z",
396+
"updated": "2016-06-22T22:24:20Z",
397+
"name": "foo",
398+
"common_name": "bar.com",
399+
"fingerprint": "7A:CA:B8:50:FF:8D:EB:03:3D:AC:AD:13:4F:EE:03:D5:5D:EB:5E:37:51:8C:E0:98:F8:1B:36:2B:20:83:0D:C0",
400+
"expires": "2017-01-14T23:57:57Z",
401+
"starts": "2016-01-15T23:57:57Z",
402+
"issuer": "/C=US/ST=CA/L=San Francisco/O=Deis/OU=Engineering/CN=bar.com/emailAddress=engineering@deis.com",
403+
"subject": "/C=US/ST=CA/L=San Francisco/O=Deis/OU=Engineering/CN=bar.com/emailAddress=engineering@deis.com"
404+
}
405+
]
395406
}
396407
```
397408

398-
### List Certificate Details
409+
### Get Certificate Details
399410

400411
Example Request:
401412

402413
```
403-
GET /v2/certs/test.example.com HTTP/1.1
414+
GET /v2/certs/foo HTTP/1.1
404415
Host: deis.example.com
405416
Authorization: token abc123
406417
```
@@ -414,12 +425,19 @@ DEIS_PLATFORM_VERSION: 2.0.0
414425
Content-Type: application/json
415426
416427
{
417-
"updated": "2014-01-01T00:00:00UTC",
418-
"created": "2014-01-01T00:00:00UTC",
419-
"expires": "2015-01-01T00:00:00UTC",
420-
"common_name": "test.example.com",
421-
"owner": "test",
422-
"id": 1
428+
"id": 22,
429+
"owner": "test",
430+
"san": [],
431+
"domains": [],
432+
"created": "2016-06-22T22:24:20Z",
433+
"updated": "2016-06-22T22:24:20Z",
434+
"name": "foo",
435+
"common_name": "bar.com",
436+
"fingerprint": "7A:CA:B8:50:FF:8D:EB:03:3D:AC:AD:13:4F:EE:03:D5:5D:EB:5E:37:51:8C:E0:98:F8:1B:36:2B:20:83:0D:C0",
437+
"expires": "2017-01-14T23:57:57Z",
438+
"starts": "2016-01-15T23:57:57Z",
439+
"issuer": "/C=US/ST=CA/L=San Francisco/O=Deis/OU=Engineering/CN=bar.com/emailAddress=engineering@deis.com",
440+
"subject": "/C=US/ST=CA/L=San Francisco/O=Deis/OU=Engineering/CN=bar.com/emailAddress=engineering@deis.com"
423441
}
424442
```
425443

@@ -434,43 +452,83 @@ Content-Type: application/json
434452
Authorization: token abc123
435453
436454
{
455+
"name": "foo"
437456
"certificate": "-----BEGIN CERTIFICATE-----",
438457
"key": "-----BEGIN RSA PRIVATE KEY-----"
439458
}
440459
```
441460

442-
Optional Parameters:
461+
Example Response:
443462

444463
```
464+
HTTP/1.1 201 CREATED
465+
DEIS_API_VERSION: 2.0
466+
DEIS_PLATFORM_VERSION: 2.0.0
467+
Content-Type: application/json
468+
445469
{
446-
"common_name": "test.example.com"
470+
"id": 22,
471+
"owner": "test",
472+
"san": [],
473+
"domains": [],
474+
"created": "2016-06-22T22:24:20Z",
475+
"updated": "2016-06-22T22:24:20Z",
476+
"name": "foo",
477+
"common_name": "bar.com",
478+
"fingerprint": "7A:CA:B8:50:FF:8D:EB:03:3D:AC:AD:13:4F:EE:03:D5:5D:EB:5E:37:51:8C:E0:98:F8:1B:36:2B:20:83:0D:C0",
479+
"expires": "2017-01-14T23:57:57Z",
480+
"starts": "2016-01-15T23:57:57Z",
481+
"issuer": "/C=US/ST=CA/L=San Francisco/O=Deis/OU=Engineering/CN=bar.com/emailAddress=engineering@deis.com",
482+
"subject": "/C=US/ST=CA/L=San Francisco/O=Deis/OU=Engineering/CN=bar.com/emailAddress=engineering@deis.com"
447483
}
448484
```
449485

486+
### Destroy a Certificate
487+
488+
Example Request:
489+
490+
```
491+
DELETE /v2/certs/foo HTTP/1.1
492+
Host: deis.example.com
493+
Authorization: token abc123
494+
```
495+
450496
Example Response:
451497

452498
```
453-
HTTP/1.1 201 CREATED
499+
HTTP/1.1 204 NO CONTENT
454500
DEIS_API_VERSION: 2.0
455501
DEIS_PLATFORM_VERSION: 2.0.0
456-
Content-Type: application/json
502+
```
503+
504+
### Attach a Domain to a Certificate
505+
506+
Example Request:
507+
508+
```
509+
POST /v2/certs/foo/domains/ HTTP/1.1
510+
Host: deis.example.com
511+
Authorization: token abc123
457512
458513
{
459-
"updated": "2014-01-01T00:00:00UTC",
460-
"created": "2014-01-01T00:00:00UTC",
461-
"expires": "2015-01-01T00:00:00UTC",
462-
"common_name": "test.example.com",
463-
"owner": "test",
464-
"id": 1
514+
"domain": "test.com"
465515
}
466516
```
467517

468-
### Destroy a Certificate
518+
Example Response:
519+
520+
```
521+
HTTP/1.1 201 CREATED
522+
DEIS_API_VERSION: 2.0
523+
DEIS_PLATFORM_VERSION: 2.0.0
524+
```
525+
526+
### Remove a Domain from a Certificate
469527

470528
Example Request:
471529

472530
```
473-
DELETE /v2/certs/test.example.com HTTP/1.1
531+
DELETE /v2/certs/foo/domains/test.com/ HTTP/1.1
474532
Host: deis.example.com
475533
Authorization: token abc123
476534
```

0 commit comments

Comments
 (0)