Author: kminder
Date: Thu Aug 7 02:23:10 2014
New Revision: 1616388
URL: http://svn.apache.org/r1616388
Log:
Adding missed file from patch.
Added:
knox/trunk/books/0.5.0/admin_api.md
Added: knox/trunk/books/0.5.0/admin_api.md
URL:
http://svn.apache.org/viewvc/knox/trunk/books/0.5.0/admin_api.md?rev=1616388&view=auto
==============================================================================
--- knox/trunk/books/0.5.0/admin_api.md (added)
+++ knox/trunk/books/0.5.0/admin_api.md Thu Aug 7 02:23:10 2014
@@ -0,0 +1,160 @@
+<!---
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+--->
+
+### Admin API ###
+
+Access to the administrator functions of Knox are provided by the Admin REST
API.
+
+#### Admin API URL ####
+
+The URL mapping for the Knox Admin API is simple:
+
+| ------- |
-----------------------------------------------------------------------------
|
+| Gateway |
`https://{gateway-host}:{gateway-port}/{gateway-path}/admin/api/v1`
|
+
+Please note that to access that admin API, the user attempting to connect must
have admin credentials inside of the LDAP Server
+
+
+##### API Documentation
+
+###### Operations
+
+ * ###### HTTP GET
+ 1. #[Server Version]
+ 2. #[Topology Collection]
+ 3. #[Topology]
+ * ###### HTTP PUT
+ * ###### HTTP DELETE
+
+##### Server Version
+
+###### Description
+
+Calls to Knox and returns the gateway's current version and the version hash
inside of a JSON object.
+
+###### Example Request URL
+
+`https://{gateway-host}:{gateway-port}/{gateway-path}/admin/api/v1/version`
+
+###### Example cURL Request
+
+`curl -u admin:admin-password -i -k
https://{gateway-host}:{gateway-port}/{gateway-path}/admin/api/v1/version`
+
+###### Response
+
+ {
+ "hash":"{version-hash}",
+ "version":"0.5.0"
+ }
+
+
+##### Topology Collection
+
+###### Description
+
+Calls to Knox and return an array of JSON objects that represent the list of
deployed topologies currently inside of the gateway.
+
+###### Example Request URL
+
+`https://{gateway-host}:{gateway-port}/{gateway-path}/admin/api/{api-version}/topologies`
+
+###### Example cURL Request
+
+`curl -u admin:admin-password -i -k
https://{gateway-host}:{gateway-port}/{gateway-path}/admin/api/v1/topologies`
+
+###### Response
+
+ [
+ {
+
"href":"https://localhost:8443/gateway/admin/api/v1/topologies/_default",
+ "name":"_default",
+ "timestamp":"1405633120000",
+ "uri":"https://localhost:8443/gateway/_default"
+ },
+ {
+
"href":"https://localhost:8443/gateway/admin/api/v1/topologies/admin",
+ "name":"admin",
+ "timestamp":"1406672646000",
+ "uri":"https://localhost:8443/gateway/admin"
+ }
+ ]
+
+
+##### Topology
+
+###### Description
+
+Calls to Knox and return a JSON object that represents the requested topology
+
+###### Example Request URL
+
+`https://{gateway-host}:{gateway-port}/{gateway-path}/admin/api/v1/topologies/{topology-name}`
+
+###### Example cURL Request
+
+`curl -u admin:admin-password -i -k
https://{gateway-host}:{gateway-port}/{gateway-path}/admin/api/v1/topologies/{topology-name}`
+
+###### Response
+
+ {
+ "name": "admin",
+ "providers": [{
+ "enabled": true,
+ "name": "ShiroProvider",
+ "params": {
+ "sessionTimeout": "30",
+ "main.ldapRealm":
"org.apache.hadoop.gateway.shirorealm.KnoxLdapRealm",
+ "main.ldapRealm.userDnTemplate":
"uid={0},ou=people,dc=hadoop,dc=apache,dc=org",
+ "main.ldapRealm.contextFactory.url":
"ldap://localhost:33389",
+
"main.ldapRealm.contextFactory.authenticationMechanism": "simple",
+ "urls./**": "authcBasic"
+ },
+ "role": "authentication"
+ }, {
+ "enabled": true,
+ "name": "AclsAuthz",
+ "params": {
+ "knox.acl": "admin;*;*"
+ },
+ "role": "authorization"
+ }, {
+ "enabled": true,
+ "name": "Pseudo",
+ "params": {},
+ "role": "identity-assertion"
+ }, {
+ "enabled": true,
+ "name": "static",
+ "params": {
+ "localhost": "sandbox,sandbox.hortonworks.com"
+ },
+ "role": "hostmap"
+ }],
+ "services": [{
+ "name": null,
+ "params": {},
+ "role": "KNOX",
+ "url": null
+ }],
+ "timestamp": 1406672646000,
+ "uri": "https://localhost:8443/gateway/admin"
+ }
+
+
+
+
+