Merge pull request #1924 from internetee/1869-renew-repp-docs

Changed integrated docs to the link to Github Pages doc
This commit is contained in:
Timo Võhmar 2021-04-14 18:30:17 +03:00 committed by GitHub
commit b0c9744bed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 2 additions and 823 deletions

View file

@ -18,7 +18,7 @@ Documentation
* [EPP documentation](/doc/epp)
* [EPP request-response examples](/doc/epp-examples.md)
* [REPP documentation](/doc/repp-doc.md)
* [REPP documentation](https://internetee.github.io/repp-apidoc/)
Installation
------------

View file

@ -1,29 +0,0 @@
## GET /repp/v1/accounts/balance
Returns account balance of the current registrar.
#### Request
```
GET /repp/v1/accounts/balance 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: 37
Content-Type: application/json
{
"code": 1000,
"message": "Command completed successfully",
"data": {
"balance": "356.0",
"currency": "EUR"
}
}
```

View file

@ -1,30 +0,0 @@
# Admin domain contacts
## PATCH https://repp.internet.ee/v1/domains/admin_contacts
Replaces admin domain contacts of the current registrar.
### Example request
```
PATCH /repp/v1/domains/admin_contacts HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Basic dGVzdDp0ZXN0dGVzdA==
{
"current_contact_id": "ATSAA:749AA80F",
"new_contact_id": "ATSAA:E36957D7"
}
```
### Example response
```
{
"code": 1000,
"message": "Command completed successfully",
"data": {
"affected_domains": [
"private.ee",
],
"skipped_domains": []
}
}
```

View file

@ -1,39 +0,0 @@
## GET /repp/v1/auctions
Return a list of auctions currently in progress. The list of domains changes
every day.
In contrast with other endpoints in REPP, this one is publicly available for
anyone without authentication.
#### Request
```
GET /repp/v1/auctions HTTP/1.1
Host: registry.test
User-Agent: curl/7.64.1
Accept: */*
```
#### Response
```
HTTP/1.1 200 OK
Date: Thu, 21 May 2020 10:39:45 GMT
Content-Type: application/json; charset=utf-8
ETag: W/"217bd9ee4dfbb332172a1baf80ee0ba9"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: a26b6801-bf3f-4922-b0db-3b081bacb130
X-Runtime: 1.481174
Transfer-Encoding: chunked
{
"count":1,
"auctions": [
{
"domain_name": "auctionäöüõ.test",
"punycode_domain_name": "xn--auction-cxa7mj0e.test"
}
]
}
```

View file

@ -1,228 +0,0 @@
## GET /repp/v1/contacts
Returns contacts of the current registrar.
#### Parameters
| Field name | Required | Type | Allowed values | Description |
| ---------- | -------- | ---- | -------------- | ----------- |
| limit | false | Integer | [1..200] | How many contacts to show |
| offset | false | Integer | | Contact number to start at |
| details | false | String | ["true", "false"] | Whether to include details |
#### Request
```
GET /repp/v1/contacts?limit=1&details=true 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: 564
Content-Type: application/json
{
"contacts": [
{
"id": 1,
"code": "REGISTRAR2:SH022086480",
"phone": "+372.12345678",
"email": "hoyt@deckowbechtelar.net",
"fax": null,
"created_at": "2015-09-09T09:11:14.130Z",
"updated_at": "2015-09-09T09:11:14.130Z",
"ident": "37605030299",
"ident_type": "priv",
"auth_info": "password",
"name": "Karson Kessler0",
"org_name": null,
"registrar_id": 2,
"creator_str": null,
"updator_str": null,
"ident_country_code": "EE",
"city": "Tallinn",
"street": "Short street 11",
"zip": "11111",
"country_code": "EE",
"state": null,
"statuses": [
"ok"
],
"status_notes": {
}
}
],
"total_number_of_records": 2
}
```
## GET /repp/v1/contacts
Returns contact names with offset.
#### Request
```
GET /repp/v1/contacts?offset=1 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
{
"contacts": [
"REGISTRAR2:SH749456461"
],
"total_number_of_records": 2
}
```
## POST /repp/v1/contacts
Creates new contact
#### Request
```
POST /repp/v1/contacts HTTP/1.1
Authorization: Basic dGVzdDp0ZXN0MTIz
Content-Type: application/json
{
"contact": {
"name": "John Doe",
"email": "john@doe.com",
"phone": "+371.1234567",
"ident": {
"ident": "12345678901",
"ident_type": "priv",
"ident_country_code": "EE"
}
}
}
```
#### Response
```
HTTP/1.1 200
Cache-Control: max-age=0, private, must-revalidate
Content-Type: application/json
{
"code": 1000,
"message": "Command completed successfully",
"data": {
"contact": {
"id": "ATSAA:20DCDCA1"
}
}
}
```
#### Failed response
```
HTTP/1.1 400
Cache-Control: max-age=0, private, must-revalidate
Content-Type: application/json
{
"code": 2005,
"message": "Ident code does not conform to national identification number format of Estonia",
"data": {}
}
```
## PUT /repp/v1/contacts/**contact id**
Updates existing contact
#### Request
```
PUT /repp/v1/contacts/ATSAA:9CD5F321 HTTP/1.1
Authorization: Basic dGVzdDp0ZXN0MTIz
Content-Type: application/json
{
"contact": {
"phone": "+372.123123123"
}
}
```
#### Response
```
HTTP/1.1 200
Cache-Control: max-age=0, private, must-revalidate
Content-Type: application/json
{
"code": 1000,
"message": "Command completed successfully",
"data": {
"contact": {
"id": "ATSAA:20DCDCA1"
}
}
}
```
#### Failed response
```
HTTP/1.1 400
Cache-Control: max-age=0, private, must-revalidate
Content-Type: application/json
{
"code": 2005,
"message": "Phone nr is invalid [phone]",
"data": {}
}
```
## DELETE /repp/v1/contacts/**contact id**
Deletes existing contact
#### Request
```
DELETE /repp/v1/contacts/ATSAA:9CD5F321 HTTP/1.1
Authorization: Basic dGVzdDp0ZXN0MTIz
Content-Type: application/json
```
#### Response
```
HTTP/1.1 200
Cache-Control: max-age=0, private, must-revalidate
Content-Type: application/json
{
"code": 1000,
"message": "Command completed successfully",
"data": {}
}
```
#### Failed response
```
HTTP/1.1 400
Cache-Control: max-age=0, private, must-revalidate
Content-Type: application/json
{
"code": 2305,
"message": "Object association prohibits operation [domains]",
"data": {}
}
```

View file

@ -1,195 +0,0 @@
# Domain listing
## GET /repp/v1/domains
Returns domains of the current registrar.
#### Parameters
| Field name | Required | Type | Allowed values | Description |
| ---------- | -------- | ---- | -------------- | ----------- |
| limit | false | Integer | [1..200] | How many domains to show |
| offset | false | Integer | | Domain number to start at |
| details | false | String | ["true", "false"] | Whether to include details |
#### Request
```
GET /repp/v1/domains?limit=1&details=true 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-Type: application/json
{
"code": 1000,
"message": "Command completed successfully",
"data": {
"domains": [
{
"id": 7,
"name": "private.ee",
"registrar_id": 2,
"valid_to": "2022-09-23T00:00:00.000+03:00",
"registrant_id": 11,
"created_at": "2020-09-22T14:16:47.420+03:00",
"updated_at": "2020-10-21T13:31:43.733+03:00",
"name_dirty": "private.ee",
"name_puny": "private.ee",
"period": 1,
"period_unit": "y",
"creator_str": "2-ApiUser: test",
"updator_str": null,
"outzone_at": null,
"delete_date": null,
"registrant_verification_asked_at": null,
"registrant_verification_token": null,
"pending_json": {},
"force_delete_date": null,
"statuses": [
"serverRenewProhibited"
],
"status_notes": {
"ok": "",
"serverRenewProhibited": ""
},
"upid": null,
"up_date": null,
"uuid": "6b6affa7-1449-4bd8-acf5-8b4752406705",
"locked_by_registrant_at": null,
"force_delete_start": null,
"force_delete_data": null,
"auth_info": "367b1e6d1f0d9aa190971ad8f571cd4d",
"valid_from": "2020-09-22T14:16:47.420+03:00"
}
],
"total_number_of_records": 10
}
}
```
## GET /repp/v1/domains
Returns domain names with offset.
#### Request
```
GET /repp/v1/domains?offset=1 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-Type: application/json
{
"code": 1000,
"message": "Command completed successfully",
"data": {
"domains": [
"private.ee",
],
"total_number_of_records": 1
}
}
```
# Transfer info
## GET /repp/v1/domains/*domainname.ee*/transfer_info
Returns details of contacts associated with a domain to be transfered. Necessary for pre-transfer checks and better user experience in automated registrar systems.
Please note the domain name in the path
#### Request
```
GET /repp/v1/domains/ee-test.ee/transfer_info HTTP/1.1
Accept: application/json
Authorization: Basic Z2l0bGFiOmdoeXQ5ZTRmdQ==
Content-Length: 0
Content-Type: application/json
Auth-Code: authinfopw
```
Please note that domain transfer/authorisation code must be placed in header - *Auth-Code*
#### Response
```
HTTP/1.1 200 OK
Cache-Control: max-age=0, private, must-revalidate
Content-Type: application/json
{
"code": 1000,
"message": "Command completed successfully",
"data": {
"domain":"ee-test.ee",
"registrant":{
"code":"EE:R1",
"name":"Registrant",
"ident":"17612535",
"ident_type":"org",
"ident_country_code":"EE",
"phone":"+372.1234567",
"email":"registrant@cache.ee",
"street":"Businesstreet 1",
"city":"Tallinn",
"zip":"10101",
"country_code":"EE",
"statuses":[
"ok",
"linked"
]
},
"admin_contacts":[
{
"code":"EE:A1",
"name":"Admin Contact",
"ident":"17612535376",
"ident_type":"priv",
"ident_country_code":"EE",
"phone":"+372.7654321",
"email":"admin@cache.ee",
"street":"Adminstreet 2",
"city":"Tallinn",
"zip":"12345",
"country_code":"EE",
"statuses":[
"ok",
"linked"
]
}
],
"tech_contacts":[
{
"code":"EE:T1",
"name":"Tech Contact",
"ident":"17612536",
"ident_type":"org",
"ident_country_code":"EE",
"phone":"+372.7654321",
"email":"tech@cache.ee",
"street":"Techstreet 1",
"city":"Tallinn",
"zip":"12345",
"country_code":"EE",
"statuses":[
"ok",
"linked"
]
}
]
}
}
}
```

View file

@ -1,30 +0,0 @@
# Tech domain contacts
## PATCH https://repp.internet.ee/v1/domains/contacts
Replaces technical domain contacts of the current registrar.
### Example request
```
PATCH /repp/v1/domains/contacts HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Basic dGVzdDp0ZXN0dGVzdA==
{
"current_contact_id": "ATSAA:749AA80F",
"new_contact_id": "ATSAA:E36957D7"
}
```
### Example response
```
{
"code": 1000,
"message": "Command completed successfully",
"data": {
"affected_domains": [
"private.ee",
],
"skipped_domains": []
}
}
```

View file

@ -1,86 +0,0 @@
# Domain transfers
## POST /repp/v1/domains/transfer
Transfers domains.
#### Request
```
POST /repp/v1/domains/transfer
Accept: application/json
Content-Type: application/json
Authorization: Basic dGVzdDp0ZXN0dGVzdA==
{
"data": {
"domain_transfers": [
{
"domain_name":"example.com",
"transferCode":"63e7"
},
{
"domain_name":"example.org",
"transferCode":"15f9"
}
]
}
}
```
#### Response on success
```
HTTP/1.1 200
Content-Type: application/json
{
"code": 1000,
"message": "Command completed successfully",
"data": {
"success": [
{
"type": "domain_transfer",
"domain_name": "example.com"
},
{
"type": "domain_transfer",
"domain_name": "example.org"
}
],
"failed": []
}
}
```
#### Response on failure
```
HTTP/1.1 400
Content-Type: application/json
{
"code": 1000,
"message": "Command completed successfully",
"data": {
"success": [],
"failed": [
{
"type": "domain_transfer",
"domain_name": "example.com",
"errors": [
{
"code": "2202",
"msg": "Invalid authorization information"
}
]
},
{
"type": "domain_transfer",
"domain_name": "example.org",
"errors": [
{
"code": "2304",
"msg": "Object status prohibits operation"
}
]
}
]
}
}
```

View file

@ -1,63 +0,0 @@
# Nameservers
## PUT /repp/v1/registrar/nameservers
Replaces all name servers of current registrar domains.
#### Request
```
PUT /repp/v1/registrar/nameservers
Accept: application/json
Content-Type: application/json
Authorization: Basic dGVzdDp0ZXN0dGVzdA==
{
"data": {
"type": "nameserver",
"id": "ns1.example.com",
"attributes": {
"hostname": "new-ns1.example.com",
"ipv4": ["192.0.2.1", "192.0.2.2"],
"ipv6": ["2001:db8::1", "2001:db8::2"]
}
}
}
```
#### Response on success
```
HTTP/1.1 200
Content-Type: application/json
{
"code": 1000,
"message": "Command completed successfully",
"data": {
"type": "nameserver",
"id": "new-ns1.example.com",
"attributes": {
"hostname": "new-ns1.example.com",
"ipv4": [
"192.0.2.1",
"192.0.2.2"
],
"ipv6": [
"2001:db8::1",
"2001:db8::2"
]
},
"affected_domains": [
"private.ee"
]
}
}
```
#### Response on failure
```
HTTP/1.1 400
Content-Type: application/json
{
"code": 2005,
"message": "IPv4 is invalid [ipv4]",
"data": {}
}
```

View file

@ -1,100 +0,0 @@
## GET /repp/v1/retained_domains
Return a list of disputed, reserved and blocked domains, along with total count.
You can filter them by type of the domain, which can be: `reserved`, `blocked`
or `disputed`.
NB! A domain name can be both `disputed` and `reserved` at the same time, and it
will appear on the list as two separate objects.
In contrast with other endpoints in REPP, this one is publicly available for
anyone without authentication.
#### Parameters
| Field name | Required | Type | Allowed values | Description |
| ---------- | -------- | ---- | -------------- | ----------- |
| type | false | string | ["reserved", "blocked", "disputed"] | Type of domains to show |
#### Request
```
GET /repp/v1/retained_domains?type=reserved HTTP/1.1
Accept: application/json
User-Agent: curl/7.64.1
```
#### Response
```
HTTP/1.1 200 OK
Date: Fri, 15 May 2020 11:30:07 GMT
Content-Type: application/json; charset=utf-8
ETag: W/"a905b531243a6b0be42beb9d6ce60619"
Cache-Control: max-age=0, private, must-revalidate
Transfer-Encoding: chunked
{
"count": 1,
"domains": [
{
"name": "reserved.test",
"status": "reserved",
"punycode_name": "reserved.test"
}
]
}
```
After you have made the first request, you can save the ETag header, and
send it as If-None-Match in the subsequent request for cache validation.
Due to the fact that the lists are not changing frequently and are quite long,
it is recommended that you take advantage of ETag cache.
ETag key values depend on the request parameters. A request for only blocked
domains returns different cache key than request for all domains.
### Cache Request
```
GET /repp/v1/retained_domains?type=reserved HTTP/1.1
Accept: application/json
User-Agent: curl/7.64.1
If-None-Match: W/"a905b531243a6b0be42beb9d6ce60619"
```
#### Cache hit response
Response with no body and status 304 is sent in case the list have not changed.
```
HTTP/1.1 304 Not Modified
Date: Fri, 15 May 2020 11:34:25 GMT
ETag: W/"a905b531243a6b0be42beb9d6ce60619"
Cache-Control: max-age=0, private, must-revalidate
```
#### Cache miss response
Standard 200 response (with the current complete list) is sent when the list have changed since last requested.
```
HTTP/1.1 200 OK
Date: Fri, 15 May 2020 11:30:07 GMT
Content-Type: application/json; charset=utf-8
ETag: W/"a905b531243a6b0be42beb9d6ce60619"
Transfer-Encoding: chunked
{
"count": 1,
"domains": [
{
"name": "reserved.test",
"status": "reserved",
"punycode_name": "reserved.test"
}
]
}
```

View file

@ -1,24 +1,3 @@
# REPP integration specification
REPP uses HTTP/1.1 protocol (http://tools.ietf.org/html/rfc2616) and
Basic Authentication (http://tools.ietf.org/html/rfc2617#section-2) using
Secure Transport (https://tools.ietf.org/html/rfc5246) with certificate and key (https://tools.ietf.org/html/rfc5280).
Credentials and certificate are issued by EIS (in an exchange for desired API username, CSR and IP).
To quickly test the API, use curl:
curl -q -k --cert user.crt.pem --key user.key.pem https://TBA/repp/v1/accounts/balance -u username:password
Test API endpoint: https://testepp.internet.ee/repp/v1
Production API endpoint: TBA
Main communication specification through Restful EPP (REPP):
[Contact related functions](repp/v1/contact.md)
[Domain related functions](repp/v1/domain.md)
[Domain transfers](repp/v1/domain_transfers.md)
[Account related functions](repp/v1/account.md)
[Nameservers](repp/v1/nameservers.md)
[Retained domains](repp/v1/retained_domains.md)
[Auctions](repp/v1/auctions.md)
REST EPP API documentation is available on a [REPP GitHub page](https://internetee.github.io/repp-apidoc/).