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

umami 2.x migration - make 2.9.0 compatible #15

Closed
6 tasks done
boly38 opened this issue Jan 20, 2024 · 1 comment
Closed
6 tasks done

umami 2.x migration - make 2.9.0 compatible #15

boly38 opened this issue Jan 20, 2024 · 1 comment
Assignees
Labels
bug Something isn't working enhancement New feature or request
Milestone

Comments

@boly38
Copy link
Owner

boly38 commented Jan 20, 2024

this client has not been updated since long time (ex. was compatible with umami 1.40 and now umami is 2.9.0)

For information typical error i for boly38/action-umami-report s now

TypeError: t.map is not a function

In addition, I noticed that jakobbouchard/umami-api-client seems not migrated to 2.x too

so todo tasks :

@boly38 boly38 added enhancement New feature or request bug Something isn't working labels Jan 20, 2024
@boly38 boly38 self-assigned this Jan 20, 2024
@boly38
Copy link
Owner Author

boly38 commented Jan 20, 2024

Changes in API and so in umami client:

  • /api/website/ become /api/websites/ (cf example under)
  • and so /api/website/${siteData.website_id} become /api/websites/${siteData.id}
  • site data keys have changes, ex.
    • from 'website_id', 'website_uuid', 'name', 'domain', 'created_at' to 'id', 'name', 'domain', 'createdAt',
    • and so a period change from start_at, end_at to startAt, endAt
  • login failed message moved from 401 - Login failed - 401 Unauthorized to 401 - Login failed - message.incorrect-username-password
  • get sites response data now include a new level where array of websites is located in data attribute. (cf example under)
    • ⚠️ Note that umami doc is no up-to-date to (maybe check and create an umami issue)
  • ⚠️ note that the upgrade is limited to current scope and this list may not be exhaustive

exemple of GET /api/websites response

{
  data: [
    {
      id: 'aaaaa-dddd-eeee-ffff',
      name: '3_DEV',
      domain: 'localhost',
      shareId: null,
      resetAt: null,
      userId: 'uuuuu-dddd-eeee-ffff',
      createdAt: '2022-11-05T14:43:21.494Z',
      updatedAt: null,
      deletedAt: null,
      teamWebsite: [],
      user: [Object]
    }
  ],
  count: 3,
  page: 1,
  pageSize: 100,
  orderBy: 'name'
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant