I'm thinking that you are really not understanding what it is you need to do in code. You should never be hardcoding a database "id", as that identifies only one particular record. I can't think of a function that would ever only do that.
The "id" field of a "grade_grades" table identifies one unique record for one specific user on one specific "grade_items" record. And a "grade_items" record identifies one unique record for a specific gradeable activity in a specific course.
To extract a "grade_items" record, you would need to know the specific course and gradeable activity you are interested in. A gradeable activity can be a manual entry, a course entry or an actual course activity.
My guess is that you should really be using the Gradebook API's (https://docs.moodle.org/dev/Gradebook_API).
mike