In the past months, the front-end team worked on a new application that is well documented and maintainable. This resulted in the need of two new APIs.
This resulted in an exchange of JSON-files over email, rather than a proper API-documentation. I am currently in the process of trying to convince the product-owner to allocate time for this, as I'm quite disappointed about the total lack of docs.
Do you have any tips on how to take this on?
If you are expecting clients to integrate with your backend without documentation, and you do not have an enterprise-level agreement, then it would be a deterrent for integration on most teams. Making that case should be straightforward. More documentation would mean more adoption, which means more value for the company.
One way to make API documentation easy is to generate it from code rather than write a doc manually. This can pull from class and method comments to add description to your endpoints (if those comments exist and are relevant), but even if they aren't there you'll still have access to the endpoints and the input/output.
I'm not sure what your tech stack is but here's an example using Django w/ Django Rest Framework. You can use Swagger [1] for docs / a browsable interface to the API. Then you can use an integration like Django Rest Swagger [2] to automate most of the work.
[1]: http://swagger.io
If the REST API is documented in OpenAPI/Swagger spec, you can then use Swagger Codegen [1] to automatically generate API clients in Java, C#, Javascript, Typescript, Ruby, ObjC, Swift and more.
[1]: https://github.com/swagger-api/swagger-codegen
Disclosure: I'm a top contributor to Swagger Codegen
We are a C# shop and it's awesome how our XML comments flow into the docs seamlessly. Makes documentation almost zero extra work.
This has python support.. might be helpful : http://apidocjs.com/#examples
Start by creating a Github wiki for documentation for both front-end and back-end API's. Add them as collaborators, or create them right inside each existing repo if you can. Populate the back-end one as best you can to your knowledge, then ask for them to validate.
I always think of documentation as a note to my future self. In X months, what won't I remember?
1) It is hard to write clear explanations of things that you don't understand.
2) It adds another project to your plate. If you don't actually allocate time for this project from what you are currently doing, it won't get done well and it will distract you from what your primary responsibility is.
EDIT: So, OP would need to convince the product owner that he should spend his time on docs rather than javascript.
To put it another way, you'll never have enough leverage to talk another business unit into spending their time and money to solve your problems. You need to make your problem someone else's -- someone with the ability to force the solution.
The only real value of any software is that it does what someone says it does, and if nobody says it does anything, then I would argue it is not creating value for anyone. It is showing up to work and consuming resources, but it's not moving the company anywhere.
Growth in a company means building things that are the foundation for something else, and those foundations are based on the assurances of people with credible word. Documentation creates a basis for that credibility. A lack of credibility means a lack of ability to deliver value.
If your backend devs won't document their APIs as a matter of backward principle, your company is probably in a death spiral, fire them or eject.
What are the product-owner's overall goals? You should tie documentation to that. In a healthy organisation, the product-owner's goals will either be already pretty clear or they'll be actively working on making them clear. If they aren't clear to you then do a quick check through emails/minutes/retrospectives to see if you've missed something and ask for a half hour on their calendar to seek clarity. Take the bulk of that time to listen[1] to what their priorities and stressors are. Pay particular attention to where your work fits into that. If your work actually doesn't fit into that then you've got a bit of an organisational incentives problem. Assuming it does, then make your case that documentation in a canonical place (even if it is those same json files and some comments) is not a nice-to-have but a need-to-have for frontend to deliver what the product owner needs.
For all of this, I've assumed that the product owner for the backend and frontend is the same person. If it is two different people, then you might have a conflict of incentives that needs to be fixed: The backend team has little/no incentive to help the frontend team. If that is the case, then you should have a chat with the product owner of the frontend team because that is an organisation-level problem and some incentives will need to get re-aligned.
[1] https://hbr.org/2016/07/what-great-listeners-actually-do
What are your expectations?
What is the minimum possible that could be done to meet your expectations?
What deficiencies currently exist that are blocking you?
Once you have this written down, only then should you approach the other party. Remember YOU think it is "messy" "lacks docs", however others may think it is fine. You will not win any friends by demanding someone does more work that they don't consider to be worthwhile.
If you have no leverage, then you are asking for a favor.
Be nice, be friendly and courteous. Try to see the other person's viewpoint.
Good luck in your negotiation.