User

Manage users and roles.

Note

For response codes, see Response status codes.

GET /user

Returns all users in the system.

Optional URL parameters

Parameter Description Example
status

Restricts returned users to either active or inactive:

  • active users with at least one role assigned
  • inactive users with no roles assigned
\user?status=inactive

Example request

curl -k -o c:\curl\getusers.xml --user ACL\AXAPIUser:Password -X GET https://ax.acl.com:8443/restv1/user

Example response

<?xml version="1.0" encoding="UTF-8"?>
<users href="https://ax.acl.com:8443/restv1/user">
  <users>
    <user href="https://ax.acl.com:8443/restv1/user/acl/jsmith">
      <domain>ACL</domain>
      <name>jsmith</name>
      <displayName>John Smith</displayName>
      <roles>
        <role>Ax Gateway Access</role>
        <role>AX User Role</role>
      </roles>
      <sid>S-1-5-21-98513804-3812715869-3980764571-500</sid>
    </user>
  </users>
</users>

GET /user/{username}

Returns the specified user on the default Active Directory domain.

Example request

curl -k -o c:\curl\getUserDefault.xml --user ACL\AXAPIUser:Password -X GET https://ax.acl.com:8443/restv1/user/AXUser1

Example response

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>  
<user href="https://ax.acl.com:8443/restv1/user/ACL/jsmith">
  <domain>ACL</domain>
  <name>jsmith</name>
  <displayName>John Smith</displayName>
  <roles>
    <role>Ax Gateway Access</role>
	<role>AX User Role</role>
  </roles>
  <sid>S-1-5-21-2580069558-570973688-1066067791-6383</sid>
</user>

GET /user/{domain}/{username}

Returns the specified user on the specified Active Directory domain.

Example request

curl -k -o c:\curl\getUserDefault.xml --user ACL\AXAPIUser:Password -X GET https://ax.acl.com:8443/restv1/user/ACL/AXUser1

Example response

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<user href="https://ax.acl.com:8443/restv1/user/ACL/jsmith">
  <domain>ACL</domain>
  <name>jsmith</name>
  <displayName>John Smith</displayName>
  <roles>
    <role>Ax Gateway Access</role>
    <role>AX User Role</role>
  </roles>
  <sid>S-1-5-21-2580069558-570973688-1066067791-6383</sid>
</user>

POST /user

Creates a new user

XML schema

Field Definition
domain Optional. The Active Directory domain the user belongs to. If you do not include this field, the default domain is used.
name The Active Directory user name of the user.
role

Optional. The role(s) to assign to the user:

  • AX User Role the User role for AX Client
  • AX Admin Role the Administrator role for AX Client
  • AX Gateway Access AX Web Client access

You may specify one or more role fields inside the roles node. If you omit the roles node, no roles are assigned to the user and the user is created in an inactive state.

Example XML

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<user>
  <domain>ACL</domain>
  <name>jsmith</name>
  <roles>
    <role>AX User Role</role>
    <role>Ax Gateway Access</role>
  </roles>
</user>

Example request

curl -k -o c:\curl\createuser.xml -X POST -H "Content-type: application/vnd.com.acl.ax.user+xml" -d "@request.xml" --user ACL\AXAPIUser:Password https://ax.acl.com:8443/restv1/user

Example response

https://ax.acl.com:8443/restv1/user/jsmith

Note

If creating the user exceeds the user limit, a 409 (conflict) status error is returned and the user is not created.

POST /user/{username}

Updates the role assignments of the specified user on the default Active Directory domain. This request is a full update, the user is assigned all roles specified in the request XML. If a role is not included in the XML, the user is not assigned the role, even if the user had the role assigned before the request is made.

To remove all roles from the user and make the user inactive, submit an empty roles node.

XML schema

Field Definition
role

Optional. The role(s) to assign to the user:

  • AX User Role the User role for AX Client
  • AX Admin Role the Administrator role for AX Client
  • AX Gateway AccessAX Web Client access

You may specify one or more role fields inside the roles node. If you omit the roles node, no roles are assigned to the user and the user is placed in an inactive state.

Example request

curl -k -X POST -H "Content-type: application/vnd.com.acl.ax.user+xml" -d "@data.xml" --user ACL\AXAPIUser:Password https://ax.acl.com:8443/restv1/user/AXTest1

POST /user/{domain}/{username}

Updates the role assignments of the specified user on the specified Active Directory domain. This request is a full update, the user is assigned all roles specified in the request XML. If a role is not included in the XML, the user is not assigned the role, even if the user had the role assigned before the request is made.

To remove all roles from the user and make the user inactive, submit an empty roles node.

XML schema

Field Definition
role

Optional. The role(s) to assign to the user:

  • AX User Role the User role for AX Client
  • AX Admin Role the Administrator role for AX Client
  • AX Gateway AccessAX Web Client access

You may specify one or more role fields inside the roles node. If you omit the roles node, no roles are assigned to the user and the user is placed in an inactive state.

Example request

curl -k -X POST -H "Content-type: application/vnd.com.acl.ax.user+xml" -d "@data.xml" --user ACL\AXAPIUser:Password https://ax.acl.com:8443/restv1/user/ACL/AXTest1

DELETE /user/{username}

Delete the specified user on the default Active Directory domain.

Example request

curl -k -X DELETE --user ACL\AXAPIUser:Password https://ax.acl.com:8443/restv1/user/AXTest1

DELETE /user/{domain}/{username}

Delete the specified user on the specified Active Directory domain.

Example request

curl -k -X DELETE --user ACL\AXAPIUser:Password https://ax.acl.com:8443/restv1/user/ACL/AXTest1

(C) ACL Services Ltd. All Rights Reserved.

Friday, April 19, 2019