Update custom rules (current user)
documentedReplace/update the current user’s custom rules with a provided array.
PUT /api/v1/users/current/custom_rulesUsersno implementation yet0 runsNo implementation yet. Run it to have the agent write one, or open a pull request with your own.
Seed example (keychains curl)
npx -y keychains@latest curl "https://api.wakatime.com/api/v1/users/current/custom_rules" \
-X PUT \
-H "Authorization: Bearer {{OAUTH2_ACCESS_TOKEN}}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '[{"id":"{{$rule1_id}}","action":"{{$rule1_action}}","source":"{{$rule1_source}}","operation":"{{$rule1_operation}}","source_value":"{{$rule1_source_value}}","destination":"{{$rule1_destination}}","destination_value":"{{$rule1_destination_value}}","priority":{{$rule1_priority}}},{"id":"{{$rule2_id}}","action":"{{$rule2_action}}","source":"{{$rule2_source}}","operation":"{{$rule2_operation}}","source_value":"{{$rule2_source_value}}","destination":"{{$rule2_destination}}","destination_value":"{{$rule2_destination_value}}","priority":{{$rule2_priority}}}]'