PIM-2328: Change method to get attribute ids

| Q                   | A
| ------------------- | ---
| Bug fix?            | N
| New feature?        | N
| BC breaks?          | Y
| Tests pass?         | Y
| Scenarios pass?     | ~
| Checkstyle issues?  | N
| Changelog updated?  | Y
| Fixed tickets       | PIM-2328
| Doc PR              |