diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-05-18 19:36:42 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-05-18 19:36:42 +0000 |
commit | 92d15d57f9e7ce2e4844854c1decba04e728f2fb (patch) | |
tree | fadc3efeaba7fd67b82b225f9695e8bc6837f26c /api-ref | |
parent | 7bfd105a64f12d9f9e448486371ae307b3fcef97 (diff) | |
parent | 49effdd966bc0fbe0e5a42cf1b15266452d652eb (diff) | |
download | designate-92d15d57f9e7ce2e4844854c1decba04e728f2fb.tar.gz |
Merge "Add Tld to api-ref docs"
Diffstat (limited to 'api-ref')
-rw-r--r-- | api-ref/source/dns-api-v2-tld.inc | 235 | ||||
-rw-r--r-- | api-ref/source/index.rst | 1 | ||||
-rw-r--r-- | api-ref/source/parameters.yaml | 49 | ||||
-rw-r--r-- | api-ref/source/samples/tlds/create-tld-request.json | 4 | ||||
-rw-r--r-- | api-ref/source/samples/tlds/list-tlds-response.json | 26 | ||||
-rw-r--r-- | api-ref/source/samples/tlds/tld-response.json | 10 | ||||
-rw-r--r-- | api-ref/source/samples/tlds/update-tld-request.json | 4 | ||||
-rw-r--r-- | api-ref/source/samples/tlds/update-tld-response.json | 10 |
8 files changed, 339 insertions, 0 deletions
diff --git a/api-ref/source/dns-api-v2-tld.inc b/api-ref/source/dns-api-v2-tld.inc new file mode 100644 index 00000000..6c306f4a --- /dev/null +++ b/api-ref/source/dns-api-v2-tld.inc @@ -0,0 +1,235 @@ +=== +Tld +=== + +Tld operations. + + +Create Tld +========== + +.. rest_method:: POST /v2/tlds + +Create a tld + + +Normal response codes: 201 +Error response codes:409,405,404,403,401,400,503, + + +Request +------- + +.. rest_parameters:: parameters.yaml + + - x-auth-token: x-auth-token + - x-auth-all-projects: x-auth-all-projects + - x-auth-sudo-project-id: x-auth-sudo-project-id + - name: tld_name + - description: tld_description + +Request Example +--------------- + +.. literalinclude:: samples/tlds/create-tld-request.json + :language: javascript + + + +Response Parameters +------------------- + +.. rest_parameters:: parameters.yaml + + - x-openstack-request-id: x-openstack-request-id + - id: id + - name: tld_name + - description: tld_description + - created_at: created_at + - updated_at: updated_at + - links: links + + +Response Example +---------------- + +.. literalinclude:: samples/tlds/tld-response.json + :language: javascript + + +Show Tld +======== + +.. rest_method:: GET /v2/tlds/{tld_id} + +Show a tld + + +Normal response codes: 200 +Error response codes:405,404,403,401,400,503 + + +Request +------- + +.. rest_parameters:: parameters.yaml + + - x-auth-token: x-auth-token + - x-auth-all-projects: x-auth-all-projects + - x-auth-sudo-project-id: x-auth-sudo-project-id + - tld_id: tld_id + + + +Response Parameters +------------------- + +.. rest_parameters:: parameters.yaml + + - x-openstack-request-id: x-openstack-request-id + - id: id + - name: tld_name + - description: tld_description + - created_at: created_at + - updated_at: updated_at + - links: links + + + +Response Example +---------------- + +.. literalinclude:: samples/tlds/tld-response.json + :language: javascript + + +List Tlds +========= + +.. rest_method:: GET /v2/tlds + +List the tlds associated with the Project + + +Normal response codes: 200 +Error response codes:405,403,401,400,503 + + +Request +------- + +.. rest_parameters:: parameters.yaml + + - x-auth-token: x-auth-token + - x-auth-all-projects: x-auth-all-projects + - x-auth-sudo-project-id: x-auth-sudo-project-id + - limit: limit + - marker: marker + - sort_dir: sort_dir + - sort_key: sort_key + - name: tld_name_filter + + +Response Parameters +------------------- + +.. rest_parameters:: parameters.yaml + + - x-openstack-request-id: x-openstack-request-id + - id: id + - name: tld_name + - description: tld_description + - created_at: created_at + - updated_at: updated_at + - links: links + + +Response Example +---------------- + +.. literalinclude:: samples/tlds/list-tlds-response.json + :language: javascript + + +Update Tld +========== + +.. rest_method:: PATCH /v2/tlds/{tld_id} + +Update a tld + + +Normal response codes: 200 +Error response codes:405,404,403,401,400,503, + + +Request +------- + +.. rest_parameters:: parameters.yaml + + - x-auth-token: x-auth-token + - x-auth-all-projects: x-auth-all-projects + - x-auth-sudo-project-id: x-auth-sudo-project-id + - tld_id: tld_id + - name: tld_name + - description: tld_description + + +Request Example +--------------- + +.. literalinclude:: samples/tlds/update-tld-request.json + :language: javascript + + +Response Parameters +------------------- + +.. rest_parameters:: parameters.yaml + + - x-openstack-request-id: x-openstack-request-id + - id: id + - name: tld_name + - description: tld_description + - created_at: created_at + - updated_at: updated_at + - links: links + + + +Response Example +---------------- + +.. literalinclude:: samples/tlds/update-tld-response.json + :language: javascript + + +Delete Tld +========== + +.. rest_method:: DELETE /v2/tlds/{tld_id} + +Delete a tld + +Normal response codes: 204 +Error response codes:405,404,403,401,400,503, + + +Request +------- + +.. rest_parameters:: parameters.yaml + + - x-auth-token: x-auth-token + - x-auth-all-projects: x-auth-all-projects + - x-auth-sudo-project-id: x-auth-sudo-project-id + - tld_id: tld_id + + +Response Parameters +------------------- + +.. rest_parameters:: parameters.yaml + + - x-openstack-request-id: x-openstack-request-id diff --git a/api-ref/source/index.rst b/api-ref/source/index.rst index e09ce178..3fbb73ee 100644 --- a/api-ref/source/index.rst +++ b/api-ref/source/index.rst @@ -16,3 +16,4 @@ .. include:: dns-api-v2-recordset.inc .. include:: dns-api-v2-pool.inc .. include:: dns-api-v2-limits.inc +.. include:: dns-api-v2-tld.inc diff --git a/api-ref/source/parameters.yaml b/api-ref/source/parameters.yaml index 0033530d..e5292573 100644 --- a/api-ref/source/parameters.yaml +++ b/api-ref/source/parameters.yaml @@ -864,6 +864,55 @@ pool_attributes: required: true type: object + +############################# +# Tld Variables # +############################# + + +# Header Variables +################### + +# Path Variables +################# + +tld_id: + description: | + ID for this tld + in: path + required: true + type: uuid + +# Query Variables +################## + +# Filters + +tld_name_filter: + description: | + Filter results to only show tlds that have a name matching the filter + in: query + required: false + type: string + + +# Body Variables +################# + +tld_name: + description: | + Name for this tld + in: body + required: true + type: string + +tld_description: + description: | + Description for this tld + in: body + required: false + type: string + ############################# # <ITEM> Variables # ############################# diff --git a/api-ref/source/samples/tlds/create-tld-request.json b/api-ref/source/samples/tlds/create-tld-request.json new file mode 100644 index 00000000..b0fba1c0 --- /dev/null +++ b/api-ref/source/samples/tlds/create-tld-request.json @@ -0,0 +1,4 @@ +{ + "name" : "com", + "description" : "tld description" +} diff --git a/api-ref/source/samples/tlds/list-tlds-response.json b/api-ref/source/samples/tlds/list-tlds-response.json new file mode 100644 index 00000000..625ff16c --- /dev/null +++ b/api-ref/source/samples/tlds/list-tlds-response.json @@ -0,0 +1,26 @@ +{ + "tlds": [ + { + "name": "edu", + "links": { + "self": "http://192.168.11.182:9001/v2/tlds/a7bba387-712b-4b42-9368-4508642c6113" + }, + "created_at": "2016-05-10 05:21:40", + "updated_at": null, + "id": "a7bba387-712b-4b42-9368-4508642c6113", + "description": "demo TLD" + }, + { + "name": "com", + "links": { + "self": "http://192.168.11.182:9001/v2/tlds/cfee7486-7ce4-4851-9c38-7b0fe3d42ee9" + }, + "created_at": "2016-05-18 05:07:58", + "updated_at": null, + "id": "cfee7486-7ce4-4851-9c38-7b0fe3d42ee9", + "description": "tld description" + } + ], + "links": {"self": "http://192.168.11.182:9001/v2/tlds" + } +} diff --git a/api-ref/source/samples/tlds/tld-response.json b/api-ref/source/samples/tlds/tld-response.json new file mode 100644 index 00000000..b3414082 --- /dev/null +++ b/api-ref/source/samples/tlds/tld-response.json @@ -0,0 +1,10 @@ +{ + "name": "com", + "links": { + "self": "http://192.168.11.182:9001/v2/tlds/cfee7486-7ce4-4851-9c38-7b0fe3d42ee9" + }, + "created_at": "2016-05-18 05:07:58", + "updated_at": null, + "id": "cfee7486-7ce4-4851-9c38-7b0fe3d42ee9", + "description": "tld description" +} diff --git a/api-ref/source/samples/tlds/update-tld-request.json b/api-ref/source/samples/tlds/update-tld-request.json new file mode 100644 index 00000000..f6b96247 --- /dev/null +++ b/api-ref/source/samples/tlds/update-tld-request.json @@ -0,0 +1,4 @@ +{ + "name" : "org", + "description" : "Updated the name from com to org" +} diff --git a/api-ref/source/samples/tlds/update-tld-response.json b/api-ref/source/samples/tlds/update-tld-response.json new file mode 100644 index 00000000..d0c1937b --- /dev/null +++ b/api-ref/source/samples/tlds/update-tld-response.json @@ -0,0 +1,10 @@ +{ + "name": "org", + "links": { + "self": "http://192.168.11.182:9001/v2/tlds/cfee7486-7ce4-4851-9c38-7b0fe3d42ee9" + }, + "created_at": "2016-05-18 05:07:58", + "updated_at": "2016-05-18 05:45:24", + "id": "cfee7486-7ce4-4851-9c38-7b0fe3d42ee9", + "description": "Updated the name from com to org" +} |