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

Posting multiple tasks with one request #17

Open
edvasqueza opened this issue Aug 19, 2016 · 3 comments
Open

Posting multiple tasks with one request #17

edvasqueza opened this issue Aug 19, 2016 · 3 comments

Comments

@edvasqueza
Copy link

edvasqueza commented Aug 19, 2016

I suggest adding a way to create multiple tasks in one request. I'm working in a project that loads projects to paymo and I have to create many tasks at once. This is not good either for you or me, I have to make a lot of calls sequentially and I'm pretty sure your server is not happy about it.

@pjdewitte
Copy link

This would also be useful for other endpoints such as time entries, since as far as I know, there is no bulk import mechanism when migrating from a different service to Paymo.

Even if it would be limited to 100 or 10 objects, it still would mean a big performance improvement, for the client and probably also for the server.

@ajmwd
Copy link

ajmwd commented May 20, 2024

This request appears to be about 8 years old and there is still no way to POST (Create) multiple objects or an array of objects, at least that I could find. Considering how long this request has been open, is Paymo intentionally blocking the ability to perform bulk imports, or is that just a feature request that has not been prioritized yet?

@ajmwd
Copy link

ajmwd commented Jun 8, 2024

UPDATE

ISSUE: Rate Limit

I was able to successfully submit multiple POST Time Entry Create requests via Postman (see below). Unfortunately, I ran into the next Paymo BLOCKER... the Paymo API only allows (5) POST requests before responding with "Too Many Requests". Paymo seems like they really do not want people to migrate into their system. They seem to put up barrier after blocker after barrier. Following is the method for POST creating up to (5) time entries.

SOLVED: Rate Limit

Based on Paymo API Docs > Rate Limiting (https://github.com/paymoapp/api?tab=readme-ov-file#rate-limiting).

  • In Postman > Collection > Run Configuration…
  • Set Delay to at least 4001 milliseconds, recommend 5000.

The method below has been updated to include this.

Postman Multiple POST Request Method

  • CREATE: Collection: [your collection name].
    • Include your 'Authorization' or create 'Variables' for your authorization.
    • NO variable (ie. data_json_file=[name of file.extension]) is needed, the Postman Collection Runner is capable of just allowing the user to select an external JSON file in the Run configuration screen.
  • CREATE: Request: [your time entry request name].
    • NO variable (ie. "currentItem") is needed, the Postman Collection Runner is capable of apply the JSON in the external data file to the variables listed plainly above.
    • NO scripts (Pre OR Post Request) are necessary.
    • Body > raw. Enter the following required fields into the Body.
{
"task_id": "{{task_id}}",
"start_time": "{{start_time}}",
"end_time": "{{end_time}}",
"description": "{{description}}"
}
  • RUN: Collection: Run [your collection name].
    • Run Configuration…
      • Iterations = [number of entries].
      • Delay = at least 4001 milliseconds, recommend 5000.
      • Data: select a data file (JSON or CSV) of time entries, that you created, from macOS Finder (or Windows Explorer).
      • Persist Responses: check, to allow for debugging.
    • Note: Paymo API will automatically reject/ignore POST requests with an existing "task_id" value and respond with 'duplicate entry'.
  • CONFIRM: Goto Paymo > Timesheets > Agenda View and enter the appropriate date range to confirm that time entries have been successfully POSTed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants