{"swagger":"2.0","info":{"description":"This are the list of API available in AAF\n","version":"1.0.0","title":"AAF Rest API","contact":{"email":"cjf@ceva.com"}},"tags":[{"name":"Users","description":"Operations on users"},{"name":"Permissions","description":"Operations on permissions"},{"name":"Roles","description":"Operations on roles"}],"paths":{"/users":{"post":{"tags":["Users"],"summary":"Create a new user","operationId":"addUser","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"user","in":"body","description":"User object that needs to be added","required":true,"schema":{"$ref":"#/definitions/User"}}],"responses":{"201":{"description":"User created"},"401":{"description":"Not Authorized to access API"},"403":{"description":"No required permissions to access API"},"405":{"description":"Method not allowed"},"415":{"description":"Invalid User object input"}}}},"/users/{userPrincipal}":{"get":{"tags":["Users"],"summary":"Find a user by user principal","operationId":"getUserByUserPrinicpal","produces":["application/json"],"parameters":[{"name":"userPrincipal","in":"path","description":"user principal","required":true,"type":"string"}],"responses":{"200":{"description":"successful operation","schema":{"$ref":"#/definitions/User"}},"401":{"description":"Not Authorized to access API"},"403":{"description":"No required permissions to access API"},"404":{"description":"User not found"}}},"put":{"tags":["Users"],"summary":"Update a user by user principal","operationId":"updateUserByUserPrincipal","consumes":["application/json"],"parameters":[{"name":"userPrincipal","in":"path","description":"user principal that is to be updated","required":true,"type":"string"},{"name":"user","in":"body","description":"User object that needs to be updated","required":true,"schema":{"$ref":"#/definitions/User"}}],"responses":{"204":{"description":"User updated"},"401":{"description":"Not Authorized to access API"},"403":{"description":"No required permissions to access API"},"404":{"description":"User id not found"},"405":{"description":"Method not allowed"},"415":{"description":"Invalid User object input"}}}},"/users/{userPrincipal}/roles":{"get":{"tags":["Users"],"summary":"Get all assigned roles to a user by user principal","operationId":"getRolesForUser","produces":["application/json"],"parameters":[{"name":"userPrincipal","in":"path","description":"user principal","required":true,"type":"string"}],"responses":{"200":{"description":"Successful operation","schema":{"$ref":"#/definitions/Role"}},"401":{"description":"Not Authorized to access API"},"403":{"description":"No required permissions to access API"},"404":{"description":"User not found"}}},"put":{"tags":["Users"],"summary":"Update roles assigned to a user by user principal","operationId":"addRolesToUser","consumes":["application/json"],"parameters":[{"name":"userPrincipal","in":"path","description":"user principal that is to be updated","required":true,"type":"string"},{"name":"role","in":"body","description":"Role object that should be added to user","required":true,"schema":{"type":"array","items":{"$ref":"#/definitions/Role"}}}],"responses":{"204":{"description":"User updated"},"401":{"description":"Not Authorized to access API"},"403":{"description":"No required permissions to access API"},"404":{"description":"User id not found"},"405":{"description":"Method not allowed"},"415":{"description":"Invalid User object input"}}},"delete":{"tags":["Users"],"summary":"Remove roles assigned to a user by user principal","operationId":"deleteRolesFromUser","consumes":["application/json"],"parameters":[{"name":"userPrincipal","in":"path","description":"user principal that is to be updated","required":true,"type":"string"},{"name":"permission","in":"body","description":"Role object","required":true,"schema":{"type":"array","items":{"$ref":"#/definitions/Role"}}}],"responses":{"204":{"description":"Roles are deleted for user"},"401":{"description":"Not Authorized to access API"},"403":{"description":"No required permissions to access API"},"404":{"description":"User id not found"},"405":{"description":"Method not allowed"},"415":{"description":"Invalid Role or Permission object input"}}}},"/users/{userPrincipal}/roleIds":{"put":{"tags":["Users"],"summary":"Update roles ids assigned to a user by user principal","operationId":"addRoleIdsToUser","consumes":["application/json"],"parameters":[{"name":"userPrincipal","in":"path","description":"user principal that is to be updated","required":true,"type":"string"},{"name":"role","in":"body","description":"Role object that should be added to user","required":true,"schema":{"type":"array","items":{"$ref":"#/definitions/Role"}}}],"responses":{"204":{"description":"User updated"},"401":{"description":"Not Authorized to access API"},"403":{"description":"No required permissions to access API"},"404":{"description":"User id not found"},"405":{"description":"Method not allowed"},"415":{"description":"Invalid User object input"}}},"delete":{"tags":["Users"],"summary":"Remove roles ids assigned to a user by user principal","operationId":"deleteRoleIdsFromUser","consumes":["application/json"],"parameters":[{"name":"userPrincipal","in":"path","description":"user principal that is to be updated","required":true,"type":"string"},{"name":"permission","in":"body","description":"Role object","required":true,"schema":{"type":"array","items":{"$ref":"#/definitions/Role"}}}],"responses":{"204":{"description":"Roles are deleted for user"},"401":{"description":"Not Authorized to access API"},"403":{"description":"No required permissions to access API"},"404":{"description":"User id not found"},"405":{"description":"Method not allowed"},"415":{"description":"Invalid Role object input"}}}},"/users/{userPrincipal}/change_password":{"put":{"tags":["Users"],"summary":"Update a user password by user principal","operationId":"updateUserPasswordByUserPrincipal","consumes":["application/json"],"parameters":[{"name":"userPrincipal","in":"path","description":"user principal password to be updated","required":true,"type":"string"},{"in":"body","name":"body","description":"User object password that needs to be updated","required":true,"schema":{"$ref":"#/definitions/User"}}],"responses":{"204":{"description":"User password updated"},"401":{"description":"Not Authorized to access API"},"403":{"description":"No required permissions to access API"},"404":{"description":"User principal not found"},"405":{"description":"Method not allowed"},"415":{"description":"Invalid User object input"}}}},"/users/{userPrincipal}/forgot_password":{"put":{"tags":["Users"],"summary":"Reset password by user principal","operationId":"resetUserPasswordByUserPrincipal","parameters":[{"name":"userPrincipal","in":"path","description":"user principal that is to be updated","required":true,"type":"string"}],"responses":{"204":{"description":"User password is reset"},"401":{"description":"Not Authorized to access API"},"403":{"description":"No required permissions to access API"},"404":{"description":"User principal not found"}}}},"/users/{userPrincipal}/unlock":{"put":{"tags":["Users"],"summary":"Unlock user by user principal","operationId":"unlockUserByUserPrincipal","parameters":[{"name":"userPrincipal","in":"path","description":"user principal that is to be unlocked","required":true,"type":"string"}],"responses":{"204":{"description":"User unlocked"},"401":{"description":"Not Authorized to access API"},"403":{"description":"No required permissions to access API"},"404":{"description":"User principal not found"}}}},"/users/{userPrincipal}/exists":{"get":{"tags":["Users"],"summary":"Check if user exists by user principal","operationId":"isUserPrincipalExists","parameters":[{"name":"userPrincipal","in":"path","description":"user principal that is to be checked","required":true,"type":"string"}],"responses":{"204":{"description":"User exists"},"401":{"description":"Not Authorized to access API"},"403":{"description":"No required permissions to access API"},"404":{"description":"User principal not found"}}}},"/users/{userPrincipal}/expiry":{"put":{"tags":["Users"],"summary":"Extend user expiry by user principal","operationId":"extendAccountExpiryDate","consumes":["application/json"],"parameters":[{"name":"userPrincipal","in":"path","description":"user principal that is to be extended","required":true,"type":"string"},{"name":"user","in":"body","description":"User object that needs to be updated","required":true,"schema":{"$ref":"#/definitions/User"}}],"responses":{"204":{"description":"User expiry extended"},"401":{"description":"Not Authorized to access API"},"403":{"description":"No required permissions to access API"},"404":{"description":"User principal not found"}}}},"/user/login":{"get":{"tags":["Users"],"summary":"Logs user into the system","operationId":"loginUser","produces":["application/json","application/xml"],"parameters":[{"name":"username","in":"query","description":"The user name for login","required":true,"type":"string"},{"name":"password","in":"query","description":"The password for login in clear text","required":true,"type":"string"}],"responses":{"200":{"description":"successful operation"},"401":{"description":"Invalid username/password supplied"}}}},"/user/logout":{"get":{"tags":["Users"],"summary":"Logs out current logged in user session","operationId":"logoutUser","responses":{"default":{"description":"successful operation"}}}},"/permissions":{"post":{"tags":["Permissions"],"summary":"Create a new permission","operationId":"addPermission","consumes":["application/json"],"produces":["application/json"],"parameters":[{"in":"body","name":"body","description":"Permission object that needs to be added","required":true,"schema":{"$ref":"#/definitions/Permission"}}],"responses":{"201":{"description":"Permission created"},"401":{"description":"Not Authorized to access API"},"403":{"description":"No required permissions to access API"},"405":{"description":"Method not allowed"},"415":{"description":"Invalid Permission object input."}}},"get":{"tags":["Permissions"],"summary":"Find all permissions","operationId":"getPermissions","produces":["application/json"],"responses":{"200":{"description":"Successful operation","schema":{"$ref":"#/definitions/Permission"}},"401":{"description":"Not Authorized to access API"},"403":{"description":"No required permissions to access API"}}}},"/permissions/{permissionId}":{"get":{"tags":["Permissions"],"summary":"Find a permission by ID","operationId":"getPermissionById","produces":["application/json"],"parameters":[{"name":"permissionId","in":"path","description":"ID of permission to return","required":true,"type":"integer"}],"responses":{"200":{"description":"Successful operation","schema":{"type":"array","items":{"$ref":"#/definitions/Permission"}}},"401":{"description":"Not Authorized to access API"},"403":{"description":"No required permissions to access API"},"404":{"description":"Permission not found"}}},"put":{"tags":["Permissions"],"summary":"Update a permission by ID","operationId":"updatePermissionById","consumes":["application/json"],"parameters":[{"name":"permissionId","in":"path","description":"permission id that is to be updated","required":true,"type":"integer"},{"in":"body","name":"body","description":"Permission object that needs to be updated","required":true,"schema":{"$ref":"#/definitions/Permission"}}],"responses":{"204":{"description":"Permission updated"},"401":{"description":"Not Authorized to access API"},"403":{"description":"No required permissions to access API"},"404":{"description":"Permission id not found"},"405":{"description":"Method not allowed"},"415":{"description":"Invalid Permission object input."}}},"delete":{"tags":["Permissions"],"summary":"Delete a permission by ID","operationId":"deletePermissionById","parameters":[{"name":"permissionId","in":"path","description":"permission id that is to be updated","required":true,"type":"integer"}],"responses":{"204":{"description":"Permission deleted"},"401":{"description":"Not Authorized to access API"},"403":{"description":"No required permissions to access API"},"404":{"description":"Permission id not found"}}}},"/permissions/domains":{"get":{"tags":["Permissions"],"summary":"Find all domains","operationId":"getAllDomains","produces":["application/json"],"responses":{"200":{"description":"Successful operation","schema":{"type":"array","items":{"$ref":"#/definitions/DomainActionLookup"}}},"401":{"description":"Not Authorized to access API"},"403":{"description":"No required permissions to access API"},"404":{"description":"Permission not found"}}}},"/permissions/domainActions":{"get":{"tags":["Permissions"],"summary":"Find all domain actionss","operationId":"getAllDomainActions","produces":["application/json"],"responses":{"200":{"description":"Successful operation","schema":{"type":"array","items":{"$ref":"#/definitions/DomainLookup"}}},"401":{"description":"Not Authorized to access API"},"403":{"description":"No required permissions to access API"},"404":{"description":"Permission not found"}}}},"/permissions/domainActions/{domainCode}":{"get":{"tags":["Permissions"],"summary":"Find domain actionss by domainCode","operationId":"getDomainActionsByDomainCode","produces":["application/json"],"parameters":[{"name":"domainCode","in":"path","description":"domain to return","required":true,"type":"string"}],"responses":{"200":{"description":"Successful operation","schema":{"type":"array","items":{"$ref":"#/definitions/DomainActionLookup"}}},"401":{"description":"Not Authorized to access API"},"403":{"description":"No required permissions to access API"},"404":{"description":"Permission not found"}}}},"/roles":{"post":{"tags":["Roles"],"summary":"Create a new role","operationId":"addRole","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"role","in":"body","description":"Role object that needs to be added","required":true,"schema":{"$ref":"#/definitions/Role"}}],"responses":{"201":{"description":"Role created"},"401":{"description":"Not Authorized to access API"},"403":{"description":"No required permissions to access API"},"405":{"description":"Method not allowed"},"415":{"description":"Invalid Role object input."}}},"get":{"tags":["Roles"],"summary":"Find all roles","operationId":"getRoles","produces":["application/json"],"responses":{"200":{"description":"Successful operation","schema":{"type":"array","items":{"$ref":"#/definitions/Role"}}},"401":{"description":"Not Authorized to access API"},"403":{"description":"No required permissions to access API"}}}},"/roles/{roleId}":{"get":{"tags":["Roles"],"summary":"Find a role by ID","operationId":"getRoleById","produces":["application/json"],"parameters":[{"name":"roleId","in":"path","description":"ID of role to return","required":true,"type":"integer"}],"responses":{"200":{"description":"Successful operation","schema":{"$ref":"#/definitions/Role"}},"401":{"description":"Not Authorized to access API"},"403":{"description":"No required permissions to access API"},"404":{"description":"Role not found"}}},"put":{"tags":["Roles"],"summary":"Update a role by ID","operationId":"updateRoleById","consumes":["application/json"],"parameters":[{"name":"roleId","in":"path","description":"role id that is to be updated","required":true,"type":"integer"}],"responses":{"204":{"description":"Role updated"},"401":{"description":"Not Authorized to access API"},"403":{"description":"No required permissions to access API"},"404":{"description":"Role id not found"},"405":{"description":"Method not allowed"},"415":{"description":"Invalid Role object input."}}},"delete":{"tags":["Roles"],"summary":"Delete a role by ID","operationId":"deleteRoleById","parameters":[{"name":"roleId","in":"path","description":"role id that is to be updated","required":true,"type":"integer"}],"responses":{"204":{"description":"Role deleted"},"401":{"description":"Not Authorized to access API"},"403":{"description":"No required permissions to access API"},"404":{"description":"Role id not found"}}}},"/roles/{roleId}/permissions":{"get":{"tags":["Roles"],"summary":"Get all permissions assigned to a role by ID","operationId":"getPermissionsForRole","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"roleId","in":"path","description":"role ID","required":true,"type":"integer"}],"responses":{"200":{"description":"Successful operation","schema":{"type":"array","items":{"$ref":"#/definitions/Permission"}}},"401":{"description":"Not Authorized to access API"},"403":{"description":"No required permissions to access API"},"404":{"description":"Role not found"}}},"post":{"tags":["Roles"],"summary":"Add permissions to a role by ID","operationId":"addPermissionsToRole","consumes":["application/json"],"parameters":[{"name":"roleId","in":"path","description":"role id that is to be updated","required":true,"type":"integer"},{"name":"permission","in":"body","description":"Permission object","required":true,"schema":{"type":"array","items":{"$ref":"#/definitions/Permission"}}}],"responses":{"204":{"description":"Role updated"},"401":{"description":"Not Authorized to access API"},"403":{"description":"No required permissions to access API"},"404":{"description":"Role id not found"},"405":{"description":"Method not allowed"},"415":{"description":"Invalid Role or Permission object input"}}},"delete":{"tags":["Roles"],"summary":"Delete permission from a role by ID","operationId":"deletePermissionsFromRole","consumes":["application/json"],"parameters":[{"name":"roleId","in":"path","description":"role ID","required":true,"type":"integer"},{"name":"permission","in":"body","description":"Permission object","required":true,"schema":{"type":"array","items":{"$ref":"#/definitions/Permission"}}}],"responses":{"204":{"description":"Permission deleted from given role ID"},"401":{"description":"Not Authorized to access API"},"403":{"description":"No required permissions to access API"},"404":{"description":"Role id not found"},"405":{"description":"Method not allowed"},"415":{"description":"Invalid Role or Permission object input"}}}},"/roles/{roleId}/users":{"get":{"tags":["Roles"],"summary":"Get all users assigned to a role by ID","operationId":"getUsersForRole","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"roleId","in":"path","description":"role ID","required":true,"type":"integer"}],"responses":{"200":{"description":"Successful operation","schema":{"type":"array","items":{"$ref":"#/definitions/User"}}},"401":{"description":"Not Authorized to access API"},"403":{"description":"No required permissions to access API"},"404":{"description":"Role not found"}}}}},"definitions":{"User":{"type":"object","properties":{"userId":{"type":"integer"},"userPrincipal":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"userType":{"type":"string"}},"xml":{"name":"User"}},"Permission":{"type":"object","properties":{"permissionId":{"type":"integer"},"permission":{"type":"string"},"domain":{"type":"string"},"action":{"type":"string"},"instance":{"type":"string"},"description":{"type":"string"}},"xml":{"name":"Permission"}},"DomainLookup":{"type":"object","properties":{"domainCode":{"type":"string"}},"xml":{"name":"DomainLookup"}},"DomainActionLookup":{"type":"object","properties":{"domainCode":{"type":"string"},"actionCode":{"type":"string"}},"xml":{"name":"DomainActionLookup"}},"Role":{"type":"object","properties":{"roleId":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"editRole":{"type":"boolean"},"deleteRole":{"type":"boolean"},"changePermission":{"type":"boolean"}},"xml":{"name":"Role"}}},"host":"virtserver.swaggerhub.com","schemes":["https"],"basePath":"/kolluv/AAFRest/1.0.0"}