New REPP doc

This commit is contained in:
Martin Lensment 2015-04-01 13:32:38 +03:00
parent 7e123f902e
commit 21f07076cd
9 changed files with 113 additions and 153 deletions

View file

@ -1,7 +1,14 @@
## GET /repp/v1/contacts
Returns contacts of the current registrar.
### Example
#### Parameters
| Field name | Required | Type | Allowed values |
| ---------- | -------- | ---- | -------------- |
| limit | false | Integer | [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] |
| offset | false | Integer | |
| details | false | String | ["true", "false"] |
#### Request
```
@ -16,31 +23,36 @@ Content-Type: application/json
```
HTTP/1.1 200
Cache-Control: max-age=0, private, must-revalidate
Content-Length: 483
Content-Length: 566
Content-Type: application/json
{
"contacts": [
{
"id": 1,
"code": "sh470279120",
"code": "sh889404040",
"reg_no": null,
"phone": "+372.12345678",
"email": "bettye.feil@ratkegoldner.net",
"email": "annetta.toy@mitchell.org",
"fax": null,
"created_at": "2015-03-31T07:39:10.854Z",
"updated_at": "2015-03-31T07:39:10.854Z",
"created_at": "2015-04-01T10:30:47.470Z",
"updated_at": "2015-04-01T10:30:47.470Z",
"ident": "37605030299",
"ident_type": "priv",
"created_by_id": null,
"updated_by_id": null,
"auth_info": "password",
"name": "Leopoldo Waelchi0",
"name": "Rogers Bruen0",
"org_name": null,
"registrar_id": 1,
"creator_str": "autotest",
"updator_str": "autotest",
"ident_country_code": "EE"
"ident_country_code": "EE",
"city": "Tallinn",
"street": "Short street 11",
"zip": "11111",
"country_code": "EE",
"state": null
}
],
"total_number_of_records": 2
@ -50,7 +62,6 @@ Content-Type: application/json
## GET /repp/v1/contacts
Returns contact names with offset.
### Example
#### Request
```
@ -70,64 +81,8 @@ Content-Type: application/json
{
"contacts": [
"sh226475261"
"sh914462381"
],
"total_number_of_records": 2
}
```
## GET /repp/v1/contacts
Returns contact names of the current registrar.
### Example
#### Request
```
GET /repp/v1/contacts HTTP/1.1
Accept: application/json
Authorization: Basic Z2l0bGFiOmdoeXQ5ZTRmdQ==
Content-Length: 0
Content-Type: application/json
```
#### Response
```
HTTP/1.1 200
Cache-Control: max-age=0, private, must-revalidate
Content-Length: 70
Content-Type: application/json
{
"contacts": [
"sh470279120",
"sh226475261"
],
"total_number_of_records": 2
}
```
## GET /repp/v1/contacts
Returns an error with invalid parameters in contact index.
### Example
#### Request
```
GET /repp/v1/contacts?limit=0 HTTP/1.1
Accept: application/json
Authorization: Basic Z2l0bGFiOmdoeXQ5ZTRmdQ==
Content-Length: 0
Content-Type: application/json
```
#### Response
```
HTTP/1.1 400
Cache-Control: no-cache
Content-Length: 45
Content-Type: application/json
{
"error": "limit does not have a valid value"
}
```

View file

@ -1,7 +1,14 @@
## GET /repp/v1/domains
Returns domains of the current registrar.
### Example
#### Parameters
| Field name | Required | Type | Allowed values |
| ---------- | -------- | ---- | -------------- |
| limit | false | Integer | [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] |
| offset | false | Integer | |
| details | false | String | ["true", "false"] |
#### Request
```
@ -25,21 +32,21 @@ Content-Type: application/json
"id": 1,
"name": "domain0.ee",
"registrar_id": 1,
"registered_at": "2015-03-31T07:39:11.598Z",
"registered_at": "2015-04-01T10:30:48.773Z",
"status": null,
"valid_from": "2015-03-31T00:00:00.000Z",
"valid_to": "2016-03-31T00:00:00.000Z",
"valid_from": "2015-04-01T00:00:00.000Z",
"valid_to": "2016-04-01T00:00:00.000Z",
"owner_contact_id": 1,
"auth_info": "fc7828fbc275ff16b86a31def3e7a60d",
"created_at": "2015-03-31T07:39:11.595Z",
"updated_at": "2015-03-31T07:39:11.591Z",
"auth_info": "1a93d4599945df52de0a38c64b470e67",
"created_at": "2015-04-01T10:30:48.768Z",
"updated_at": "2015-04-01T10:30:48.762Z",
"name_dirty": "domain0.ee",
"name_puny": "domain0.ee",
"period": 1,
"period_unit": "y",
"creator_str": null,
"updator_str": null,
"whois_body": " This Whois Server contains information on\n Estonian Top Level Domain ee TLD\n\n domain: domain0.ee\n registrar: registrar1\n status:\n registered: \n changed: 2015-03-31 07:39:11\n expire:\n outzone:\n delete:\n\n \n\n nsset:\n nserver:\n\n registrar: registrar1\n phone: \n address: Street 111, Town, County, Postal\n created: 2015-03-31 07:39:11\n changed: 2015-03-31 07:39:11\n"
"whois_body": " This Whois Server contains information on\n Estonian Top Level Domain ee TLD\n\n domain: domain0.ee\n registrar: registrar1\n status:\n registered: \n changed: 2015-04-01 10:30:48\n expire:\n outzone:\n delete:\n\n \n\n nsset:\n nserver:\n\n registrar: registrar1\n phone: \n address: Street 111, Town, County, Postal\n created: 2015-04-01 10:30:48\n changed: 2015-04-01 10:30:48\n"
}
],
"total_number_of_records": 2
@ -49,7 +56,6 @@ Content-Type: application/json
## GET /repp/v1/domains
Returns domain names with offset.
### Example
#### Request
```
@ -74,59 +80,3 @@ Content-Type: application/json
"total_number_of_records": 2
}
```
## GET /repp/v1/domains
Returns domain names of the current registrar.
### Example
#### Request
```
GET /repp/v1/domains HTTP/1.1
Accept: application/json
Authorization: Basic Z2l0bGFiOmdoeXQ5ZTRmdQ==
Content-Length: 0
Content-Type: application/json
```
#### Response
```
HTTP/1.1 200
Cache-Control: max-age=0, private, must-revalidate
Content-Length: 67
Content-Type: application/json
{
"domains": [
"domain0.ee",
"domain1.ee"
],
"total_number_of_records": 2
}
```
## GET /repp/v1/domains
Returns an error with invalid parameters in domain index.
### Example
#### Request
```
GET /repp/v1/domains?limit=0 HTTP/1.1
Accept: application/json
Authorization: Basic Z2l0bGFiOmdoeXQ5ZTRmdQ==
Content-Length: 0
Content-Type: application/json
```
#### Response
```
HTTP/1.1 400
Cache-Control: no-cache
Content-Length: 45
Content-Type: application/json
{
"error": "limit does not have a valid value"
}
```