Bug #17846
closedapi/v2/auth_source_ldaps/ API doesn't display Organizations and Locations assigned
Description
As a user, I would like to view the Organizations and Locations assigned for a LDAP Source through API
Current Result :
- curl -k -s -u admin https://satellite.lab.example.com/api/auth_source_ldaps
{
"total": 1,
"subtotal": 1,
"page": 1,
"per_page": 20,
"search": null,
"sort": {
"by": null,
"order": null
},
"results": [{"host":"192.168.123.4","port":389,"account":"LAB\\satsvc","base_dn":"dc=lab,dc=example,dc=com","ldap_filter":"","attr_login":"sAMAccountName","attr_firstname":"givenName","attr_lastname":"sn","attr_mail":"mail","attr_photo":"","onthefly_register":true,"usergroup_sync":true,"tls":false,"server_type":"active_directory","groups_base":"","created_at":"2016-11-28 05:31:11 UTC","updated_at":"2016-12-26 00:58:12 UTC","id":3,"type":"AuthSourceLdap","name":"AD"}]
}
- curl -k -s -u admin https://satellite.lab.example.com/api/auth_source_ldaps
{
"total": 1,
"subtotal": 1,
"page": 1,
"per_page": 20,
"search": null,
"sort": {
"by": null,
"order": null
},
"results": [{"host":"192.168.123.4","port":389,"account":"LAB\\satsvc","base_dn":"dc=lab,dc=example,dc=com","ldap_filter":"","attr_login":"sAMAccountName","attr_firstname":"givenName","attr_lastname":"sn","attr_mail":"mail","attr_photo":"","onthefly_register":true,"usergroup_sync":true,"tls":false,"server_type":"active_directory","groups_base":"","created_at":"2016-12-26 05:57:38 UTC","updated_at":"2016-12-26 05:57:38 UTC","id":3,"type":"AuthSourceLdap","name":"AD","locations":[{"id":2,"name":"New York","title":"New York","description":null}],"organizations":[{"id":1,"name":"ExampleCorp","title":"ExampleCorp","description":""}]}]
}