Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api contact endpoint error #5698

Closed
npracht opened this issue Feb 9, 2018 · 4 comments
Closed

api contact endpoint error #5698

npracht opened this issue Feb 9, 2018 · 4 comments
Labels
bug Issues or PR's relating to bugs

Comments

@npracht
Copy link
Member

npracht commented Feb 9, 2018

Q A
Bug report? x
Feature request?
Enhancement?

Description:

When you use /api/contacts?limit=5&start=0&orderBy=lastActive&orderByDir=desc according to the API documentation, you get a 500 error.

Then i tried /api/contacts?limit=5&start=0&orderBy=last_active&orderByDir=desc and it works. I don't know if the issue is the documentation or the software. I have the feeling that the first query was working in the past.

If a bug:

Q A
Mautic version 2.12
PHP version
@npracht
Copy link
Member Author

npracht commented Feb 9, 2018

Label: Bug

@mautibot mautibot added the bug Issues or PR's relating to bugs label Feb 9, 2018
@Woeler
Copy link
Contributor

Woeler commented Feb 9, 2018

Can confirm. In the response the field is called lastActive, as is in the documentation. However, the api query only works if you use the database column name, which is last_active. I just tested some more and it seems to happen with all camelcase attributes. dateIdentified does not work, but date_identified does.

I guess an update to the devdocs is the most logical option here? Though having two separate sets of attribute names isn't the nicest thing.

@dbhurley
Copy link
Member

Agreed - dev docs should be updated.

@Woeler
Copy link
Contributor

Woeler commented Feb 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues or PR's relating to bugs
Projects
None yet
Development

No branches or pull requests

4 participants