sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject sqoop git commit: SQOOP-2094: Sqoop2: Update RESTAPI.rst
Date Mon, 30 Mar 2015 18:57:27 GMT
Repository: sqoop
Updated Branches:
  refs/heads/sqoop2 3a655ad37 -> 81ca8d3d2


SQOOP-2094: Sqoop2: Update RESTAPI.rst

(Richard Zhou via Abraham Elmahrek)


Project: http://git-wip-us.apache.org/repos/asf/sqoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/sqoop/commit/81ca8d3d
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/81ca8d3d
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/81ca8d3d

Branch: refs/heads/sqoop2
Commit: 81ca8d3d2f4bd6c10720eb4caa426648f288b939
Parents: 3a655ad
Author: Abraham Elmahrek <abe@apache.org>
Authored: Mon Mar 30 11:29:20 2015 -0700
Committer: Abraham Elmahrek <abe@apache.org>
Committed: Mon Mar 30 11:29:20 2015 -0700

----------------------------------------------------------------------
 docs/src/site/sphinx/RESTAPI.rst | 161 +++++++++++++++++++++++++++++++++-
 1 file changed, 160 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/81ca8d3d/docs/src/site/sphinx/RESTAPI.rst
----------------------------------------------------------------------
diff --git a/docs/src/site/sphinx/RESTAPI.rst b/docs/src/site/sphinx/RESTAPI.rst
index fa23b42..d5b19dc 100644
--- a/docs/src/site/sphinx/RESTAPI.rst
+++ b/docs/src/site/sphinx/RESTAPI.rst
@@ -1439,4 +1439,163 @@ Provide the name of the job in the url [jname] part.
         error-details: "org.apache.sqoop.common.SqoopException: GENERIC_HDFS_CONNECTOR_0000:Error
occurs during partitioner...."
       }
     ]
-  }
\ No newline at end of file
+  }
+
+/v1/authorization/roles/create - [POST] - Create Role
+-----------------------------------------------------
+
+Create a new role object. Provide values to the link config inputs for the ones that are
required.
+
+* Method: ``POST``
+* Format: ``JSON``
+* Fields of Request:
+
++--------------------------+--------------------------------------------------------------------------------------+
+|   Field                  | Description                                                
                         |
++==========================+======================================================================================+
+| ``role``                 | The root of the post data in JSON                          
                         |
++--------------------------+--------------------------------------------------------------------------------------+
+| ``name``                 | The name of this role                                      
                         |
++--------------------------+--------------------------------------------------------------------------------------+
+
+* Request Example:
+
+::
+
+  {
+    role: {
+        name: "testRole",
+    }
+  }
+
+/v1/authorization/role/[role-name]  - [DELETE] - Delete Role
+------------------------------------------------------------
+
+Delete a role with name [role-name]
+
+* Method: ``DELETE``
+* Format: ``JSON``
+* Request Content: ``None``
+* Response Content: ``None``
+
+/v1/authorization/roles?principal_type=[principal-type]&principal_name=[principal-name]
- [GET]  Get all Roles by Principal
+---------------------------------------------------------------------------------------------------------------------------
+
+Get all the roles or for a given principal identified by ``[principal-type]`` and ``[principal-name]``
part.
+
+/v1/authorization/principals?role_name=[rname] - [GET]  Get all Principals by Role
+----------------------------------------------------------------------------------
+
+Get all the principals for a given role identified by ``[rname]`` part.
+
+/v1/authorization/roles/grant - [PUT] - Grant a Role to a Principal
+-------------------------------------------------------------------
+
+Grant a role with ``[role-name]`` to a principal with ``[principal-type]`` and ``[principal-name]``.
+
+* Method: ``PUT``
+* Format: ``JSON``
+* Fields of Request:
+
+The same as Create Role and
+
++--------------------------+--------------------------------------------------------------------------------------+
+|   Field                  | Description                                                
                         |
++==========================+======================================================================================+
+| ``principals``           | The root of the post data in JSON                          
                         |
++--------------------------+--------------------------------------------------------------------------------------+
+| ``name``                 | The name of this principal                                 
                         |
++--------------------------+--------------------------------------------------------------------------------------+
+| ``type``                 | The type of this principal, ("USER", "GROUP", "ROLE")      
                         |
++--------------------------+--------------------------------------------------------------------------------------+
+
+* Request Example:
+
+::
+
+  {
+    roles: [{
+        name: "testRole",
+    }],
+    principals: [{
+        name: "testPrincipalName",
+        type: "USER",
+    }]
+  }
+
+* Response Content: ``None``
+
+/v1/authorization/roles/revoke - [PUT] - Revoke a Role from a Principal
+-----------------------------------------------------------------------
+
+Revoke a role with ``[role-name]`` to a principal with ``[principal-type]`` and ``[principal-name]``.
+
+* Method: ``PUT``
+* Format: ``JSON``
+* Fields of Request:
+
+The same as Grant Role
+
+* Response Content: ``None``
+
+/v1/authorization/privileges/grant - [PUT] - Grant a Privilege to a Principal
+-----------------------------------------------------------------------------
+
+Grant a privilege with ``[resource-name]``, ``[resource-type]``, ``[action]`` and ``[with-grant-option]``
to a principal with``[principal-type]`` and ``[principal-name]``.
+
+* Method: ``PUT``
+* Format: ``JSON``
+* Fields of Request:
+
+The same as Principal and
+
++--------------------------+--------------------------------------------------------------------------------------+
+|   Field                  | Description                                                
                         |
++==========================+======================================================================================+
+| ``privileges``           | The root of the post data in JSON                          
                         |
++--------------------------+--------------------------------------------------------------------------------------+
+| ``resource-name``        | The resource name of this privilege                        
                         |
++--------------------------+--------------------------------------------------------------------------------------+
+| ``resource-type``        | The resource type of this privilege, ("CONNECTOR", "LINK", "JOB")
                   |
++--------------------------+--------------------------------------------------------------------------------------+
+| ``action``               | The action type of this privilege, ("READ", "WRITE", "ALL")
                         |
++--------------------------+--------------------------------------------------------------------------------------+
+| ``with-grant-option``    | The resource type of this privilege                        
                         |
++--------------------------+--------------------------------------------------------------------------------------+
+
+* Request Example:
+
+::
+
+  {
+    privileges: [{
+        resource-name: "testResourceName",
+        resource-type: "LINK",
+        action: "READ",
+        with-grant-option: false,
+    }]
+    principals: [{
+        name: "testPrincipalName",
+        type: "USER",
+    }]
+  }
+
+* Response Content: ``None``
+
+/v1/authorization/privileges/revoke - [PUT] - Revoke a Privilege to a Principal
+-------------------------------------------------------------------------------
+
+Revoke a privilege with ``[resource-name]``, ``[resource-type]``, ``[action]`` and ``[with-grant-option]``
to a principal with``[principal-type]`` and ``[principal-name]``.
+
+* Method: ``PUT``
+* Format: ``JSON``
+* Fields of Request:
+
+The same as Grant Privilege
+
+* Response Content: ``None``
+
+/v1/authorization/privilieges?principal_type=[principal-type]&principal_name=[principal-name]&resource_type=[resource-type]&resource_name=[resource-name]
- [GET]  Get all Roles by Principal (and Resource)
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+Get all the privileges or for a given principal identified by ``[principal-type]`` and ``[principal-name]``
(and a given resource identified by ``[resource-type]`` and ``[resource-name]``).
\ No newline at end of file


Mime
View raw message