From 972fb109440d43ca3a442a63b001ef0d737d1af9 Mon Sep 17 00:00:00 2001 From: Roland Dalmulder Date: Sun, 15 Nov 2026 14:40:45 +0100 Subject: [PATCH 1/3] Add a PhpStorm HTTP Client collection generated from the spec The phpstorm folder has a .http file per tag with a request for each of the 235 operations, using the example request bodies of the spec. scripts/generate-phpstorm.mjs writes it ("npm run phpstorm") and checks that it is up to date ("npm run phpstorm:check"). The check is part of "npm run check" and runs in CI, so a change of the spec must include the regenerated collection. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 3 + README.md | 9 + package.json | 4 +- phpstorm/.gitignore | 1 + phpstorm/Banners Categories.http | 49 ++++++ phpstorm/Banners Clients.http | 51 ++++++ phpstorm/Banners Content History.http | 28 ++++ phpstorm/Banners.http | 50 ++++++ phpstorm/Config Application.http | 24 +++ phpstorm/Config Component.http | 24 +++ .../Contacts Categories Fields Groups.http | 51 ++++++ phpstorm/Contacts Categories Fields.http | 55 +++++++ phpstorm/Contacts Categories.http | 49 ++++++ phpstorm/Contacts Content History.http | 28 ++++ phpstorm/Contacts Fields Groups.http | 51 ++++++ phpstorm/Contacts Fields.http | 55 +++++++ phpstorm/Contacts Form.http | 20 +++ phpstorm/Contacts Mail Fields Groups.http | 51 ++++++ phpstorm/Contacts Mail Fields.http | 55 +++++++ phpstorm/Contacts.http | 51 ++++++ .../Content Articles Content History.http | 28 ++++ phpstorm/Content Articles Fields Groups.http | 51 ++++++ phpstorm/Content Articles Fields.http | 55 +++++++ phpstorm/Content Articles.http | 52 ++++++ .../Content Categories Fields Groups.http | 51 ++++++ phpstorm/Content Categories Fields.http | 55 +++++++ phpstorm/Content Categories.http | 49 ++++++ phpstorm/Installer.http | 11 ++ phpstorm/Joomla Update.http | 63 +++++++ phpstorm/Languages Content.http | 52 ++++++ phpstorm/Languages Overrides Search.http | 22 +++ phpstorm/Languages Overrides.http | 91 +++++++++++ phpstorm/Languages.http | 17 ++ phpstorm/Media Adapters.http | 18 ++ phpstorm/Media Files.http | 55 +++++++ phpstorm/Menus Items.http | 112 +++++++++++++ phpstorm/Menus.http | 96 +++++++++++ phpstorm/Messages.http | 51 ++++++ phpstorm/Modules.http | 115 +++++++++++++ phpstorm/Newsfeeds Categories.http | 49 ++++++ phpstorm/Newsfeeds.http | 62 +++++++ phpstorm/Plugins.http | 30 ++++ phpstorm/Privacy Consents.http | 19 +++ phpstorm/Privacy Requests.http | 36 ++++ phpstorm/README.md | 106 ++++++++++++ phpstorm/Redirects.http | 50 ++++++ phpstorm/Tags.http | 52 ++++++ phpstorm/Templates Styles.http | 100 ++++++++++++ phpstorm/Users Fields Groups.http | 51 ++++++ phpstorm/Users Fields.http | 55 +++++++ phpstorm/Users Groups.http | 50 ++++++ phpstorm/Users Levels.http | 52 ++++++ phpstorm/Users.http | 54 ++++++ phpstorm/http-client.env.json | 5 + phpstorm/http-client.private.env.json.example | 6 + scripts/generate-phpstorm.mjs | 154 ++++++++++++++++++ 56 files changed, 2683 insertions(+), 1 deletion(-) create mode 100644 phpstorm/.gitignore create mode 100644 phpstorm/Banners Categories.http create mode 100644 phpstorm/Banners Clients.http create mode 100644 phpstorm/Banners Content History.http create mode 100644 phpstorm/Banners.http create mode 100644 phpstorm/Config Application.http create mode 100644 phpstorm/Config Component.http create mode 100644 phpstorm/Contacts Categories Fields Groups.http create mode 100644 phpstorm/Contacts Categories Fields.http create mode 100644 phpstorm/Contacts Categories.http create mode 100644 phpstorm/Contacts Content History.http create mode 100644 phpstorm/Contacts Fields Groups.http create mode 100644 phpstorm/Contacts Fields.http create mode 100644 phpstorm/Contacts Form.http create mode 100644 phpstorm/Contacts Mail Fields Groups.http create mode 100644 phpstorm/Contacts Mail Fields.http create mode 100644 phpstorm/Contacts.http create mode 100644 phpstorm/Content Articles Content History.http create mode 100644 phpstorm/Content Articles Fields Groups.http create mode 100644 phpstorm/Content Articles Fields.http create mode 100644 phpstorm/Content Articles.http create mode 100644 phpstorm/Content Categories Fields Groups.http create mode 100644 phpstorm/Content Categories Fields.http create mode 100644 phpstorm/Content Categories.http create mode 100644 phpstorm/Installer.http create mode 100644 phpstorm/Joomla Update.http create mode 100644 phpstorm/Languages Content.http create mode 100644 phpstorm/Languages Overrides Search.http create mode 100644 phpstorm/Languages Overrides.http create mode 100644 phpstorm/Languages.http create mode 100644 phpstorm/Media Adapters.http create mode 100644 phpstorm/Media Files.http create mode 100644 phpstorm/Menus Items.http create mode 100644 phpstorm/Menus.http create mode 100644 phpstorm/Messages.http create mode 100644 phpstorm/Modules.http create mode 100644 phpstorm/Newsfeeds Categories.http create mode 100644 phpstorm/Newsfeeds.http create mode 100644 phpstorm/Plugins.http create mode 100644 phpstorm/Privacy Consents.http create mode 100644 phpstorm/Privacy Requests.http create mode 100644 phpstorm/README.md create mode 100644 phpstorm/Redirects.http create mode 100644 phpstorm/Tags.http create mode 100644 phpstorm/Templates Styles.http create mode 100644 phpstorm/Users Fields Groups.http create mode 100644 phpstorm/Users Fields.http create mode 100644 phpstorm/Users Groups.http create mode 100644 phpstorm/Users Levels.http create mode 100644 phpstorm/Users.http create mode 100644 phpstorm/http-client.env.json create mode 100644 phpstorm/http-client.private.env.json.example create mode 100644 scripts/generate-phpstorm.mjs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c717c3c..036891b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,6 +46,9 @@ jobs: - name: Quality and completeness run: npm run quality + - name: PhpStorm collection up to date + run: npm run phpstorm:check + - name: Base branch version if: github.event_name == 'pull_request' run: git show "origin/${{ github.base_ref }}:src/joomla-ws-api.json" > "$RUNNER_TEMP/base.json" || rm -f "$RUNNER_TEMP/base.json" diff --git a/README.md b/README.md index c990d75..8ad867a 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,13 @@ The [`bruno`](https://github.com/joomla-projects/API-Endpoints/tree/bruno) branc [Bruno](https://www.usebruno.com) collection of the Joomla 6 API endpoints, made by René Kreijveld ([@renekreijveld](https://github.com/renekreijveld)). It is not yet up to date with this specification. +## PhpStorm collection + +The [`phpstorm`](phpstorm) folder has a collection for the HTTP Client of PhpStorm and other JetBrains IDEs: a +request for every operation of the specification, with its example request body. The `.http` files are generated +from the specification with `npm run phpstorm`, so they are always up to date with it. See +[`phpstorm/README.md`](phpstorm/README.md) for how to set it up. + ## Credits The specification was made by Sergey Tolkachyov ([@sergeytolkachyov](https://github.com/sergeytolkachyov)) for the Joomla Manual @@ -85,6 +92,8 @@ npm run build - **Quality and completeness**: summaries, descriptions, tags, `x-source`, path parameters, error responses, schemas and examples of each operation. The CI job summary shows how complete the spec is. - **Version**: `CHANGELOG.md` has a section for `info.version`, and the version does not go down. +- **PhpStorm collection**: the `.http` files in [`phpstorm`](phpstorm) are what `npm run phpstorm` generates from the + spec. When you change the spec, run `npm run phpstorm` and commit the result. CI also runs these checks: diff --git a/package.json b/package.json index 5176e92..586cf31 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,9 @@ "lint": "redocly lint src/joomla-ws-api.json --format=stylish", "quality": "node scripts/check-quality.mjs src/joomla-ws-api.json", "routes": "node scripts/check-routes.mjs src/joomla-ws-api.json", - "check": "npm run format:check && npm run validate:schema && npm run lint && npm run quality", + "phpstorm": "node scripts/generate-phpstorm.mjs", + "phpstorm:check": "node scripts/generate-phpstorm.mjs --check", + "check": "npm run format:check && npm run validate:schema && npm run lint && npm run quality && npm run phpstorm:check", "build": "node scripts/build.mjs" }, "devDependencies": { diff --git a/phpstorm/.gitignore b/phpstorm/.gitignore new file mode 100644 index 0000000..95914b9 --- /dev/null +++ b/phpstorm/.gitignore @@ -0,0 +1 @@ +http-client.private.env.json diff --git a/phpstorm/Banners Categories.http b/phpstorm/Banners Categories.http new file mode 100644 index 0000000..8494181 --- /dev/null +++ b/phpstorm/Banners Categories.http @@ -0,0 +1,49 @@ +# Banners Categories +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@category_id = 1 + +### List Banners Categories +# @name List Banners Categories +# Optional query parameters: page[offset], page[limit], filter[search], filter[state] +GET {{base_url}}/v1/banners/categories +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add Banners Category +# @name Add Banners Category +POST {{base_url}}/v1/banners/categories +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "Example" +} + +### Get Banners Category +# @name Get Banners Category +GET {{base_url}}/v1/banners/categories/{{category_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Banners Category +# @name Update Banners Category +PATCH {{base_url}}/v1/banners/categories/{{category_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "parent_id": 1, + "extension": "Example", + "title": "Example" +} + +### Delete Banners Category +# @name Delete Banners Category +DELETE {{base_url}}/v1/banners/categories/{{category_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Banners Clients.http b/phpstorm/Banners Clients.http new file mode 100644 index 0000000..e4f4d69 --- /dev/null +++ b/phpstorm/Banners Clients.http @@ -0,0 +1,51 @@ +# Banners Clients +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@client_id = 1 + +### List Banners Clients +# @name List Banners Clients +# Optional query parameters: page[offset], page[limit] +GET {{base_url}}/v1/banners/clients +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add Banners Client +# @name Add Banners Client +POST {{base_url}}/v1/banners/clients +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "name": "Example client", + "contact": "Contact person", + "extrainfo": "" +} + +### Get Banners Client +# @name Get Banners Client +GET {{base_url}}/v1/banners/clients/{{client_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Banners Client +# @name Update Banners Client +PATCH {{base_url}}/v1/banners/clients/{{client_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "name": "Example", + "contact": "Example", + "email": "example@example.invalid" +} + +### Delete Banners Client +# @name Delete Banners Client +DELETE {{base_url}}/v1/banners/clients/{{client_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Banners Content History.http b/phpstorm/Banners Content History.http new file mode 100644 index 0000000..7c92334 --- /dev/null +++ b/phpstorm/Banners Content History.http @@ -0,0 +1,28 @@ +# Banners Content History +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@banner_id = 1 +@version_id = 1 + +### List Banner Versions +# @name List Banner Versions +# Optional query parameters: page[offset], page[limit] +GET {{base_url}}/v1/banners/{{banner_id}}/contenthistory +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Delete Banner Version +# @name Delete Banner Version +# {{version_id}}: ID of the version (content history record), not of the Banner. +DELETE {{base_url}}/v1/banners/{{version_id}}/contenthistory +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Keep Banner Version +# @name Keep Banner Version +# {{version_id}}: ID of the version (content history record), not of the Banner. +PATCH {{base_url}}/v1/banners/{{version_id}}/contenthistory/keep +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Banners.http b/phpstorm/Banners.http new file mode 100644 index 0000000..0278621 --- /dev/null +++ b/phpstorm/Banners.http @@ -0,0 +1,50 @@ +# Banners +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@banner_id = 1 + +### List Banners +# @name List Banners +# Optional query parameters: page[offset], page[limit], filter[state] +GET {{base_url}}/v1/banners +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add Banner +# @name Add Banner +POST {{base_url}}/v1/banners +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "name": "Example", + "catid": 1 +} + +### Get Banner +# @name Get Banner +GET {{base_url}}/v1/banners/{{banner_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Banner +# @name Update Banner +PATCH {{base_url}}/v1/banners/{{banner_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "name": "Example", + "alias": "Example", + "catid": 1 +} + +### Delete Banner +# @name Delete Banner +DELETE {{base_url}}/v1/banners/{{banner_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Config Application.http b/phpstorm/Config Application.http new file mode 100644 index 0000000..0c87b6e --- /dev/null +++ b/phpstorm/Config Application.http @@ -0,0 +1,24 @@ +# Config Application +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +### Get Global Configuration +# @name Get Global Configuration +# Optional query parameters: page[offset], page[limit] +GET {{base_url}}/v1/config/application +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Global Configuration +# @name Update Global Configuration +PATCH {{base_url}}/v1/config/application +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "caching": 0, + "cache_handler": "Example", + "cache_platformprefix": false +} diff --git a/phpstorm/Config Component.http b/phpstorm/Config Component.http new file mode 100644 index 0000000..950a316 --- /dev/null +++ b/phpstorm/Config Component.http @@ -0,0 +1,24 @@ +# Config Component +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@component_name = com_content + +### Get Component Configuration +# @name Get Component Configuration +# Optional query parameters: page[offset], page[limit] +GET {{base_url}}/v1/config/{{component_name}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Component Configuration +# @name Update Component Configuration +PATCH {{base_url}}/v1/config/{{component_name}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "show_title": 1 +} diff --git a/phpstorm/Contacts Categories Fields Groups.http b/phpstorm/Contacts Categories Fields Groups.http new file mode 100644 index 0000000..7ce6cd4 --- /dev/null +++ b/phpstorm/Contacts Categories Fields Groups.http @@ -0,0 +1,51 @@ +# Contacts Categories Fields Groups +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@group_id = 1 + +### List Contacts Categories Field Groups +# @name List Contacts Categories Field Groups +# Optional query parameters: page[offset], page[limit] +GET {{base_url}}/v1/fields/groups/contacts/categories +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add Contacts Categories Field Group +# @name Add Contacts Categories Field Group +POST {{base_url}}/v1/fields/groups/contacts/categories +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "Example group", + "context": "com_contact.categories", + "description": "" +} + +### Get Contacts Categories Field Group +# @name Get Contacts Categories Field Group +GET {{base_url}}/v1/fields/groups/contacts/categories/{{group_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Contacts Categories Field Group +# @name Update Contacts Categories Field Group +PATCH {{base_url}}/v1/fields/groups/contacts/categories/{{group_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "Example", + "state": 1, + "created": "Example" +} + +### Delete Contacts Categories Field Group +# @name Delete Contacts Categories Field Group +DELETE {{base_url}}/v1/fields/groups/contacts/categories/{{group_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Contacts Categories Fields.http b/phpstorm/Contacts Categories Fields.http new file mode 100644 index 0000000..17e2a8f --- /dev/null +++ b/phpstorm/Contacts Categories Fields.http @@ -0,0 +1,55 @@ +# Contacts Categories Fields +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@field_id = 1 + +### List Contacts Categories Fields +# @name List Contacts Categories Fields +# Optional query parameters: page[offset], page[limit] +GET {{base_url}}/v1/fields/contacts/categories +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add Contacts Categories Field +# @name Add Contacts Categories Field +POST {{base_url}}/v1/fields/contacts/categories +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "Example field com_contact.categories", + "type": "text", + "context": "com_contact.categories", + "description": "", + "params": { + "display": "2" + } +} + +### Get Contacts Categories Field +# @name Get Contacts Categories Field +GET {{base_url}}/v1/fields/contacts/categories/{{field_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Contacts Categories Field +# @name Update Contacts Categories Field +PATCH {{base_url}}/v1/fields/contacts/categories/{{field_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "context": "Example", + "group_id": 1, + "assigned_cat_ids": [] +} + +### Delete Contacts Categories Field +# @name Delete Contacts Categories Field +DELETE {{base_url}}/v1/fields/contacts/categories/{{field_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Contacts Categories.http b/phpstorm/Contacts Categories.http new file mode 100644 index 0000000..007fab6 --- /dev/null +++ b/phpstorm/Contacts Categories.http @@ -0,0 +1,49 @@ +# Contacts Categories +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@category_id = 1 + +### List Contacts Categories +# @name List Contacts Categories +# Optional query parameters: page[offset], page[limit], filter[search], filter[state] +GET {{base_url}}/v1/contacts/categories +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add Contacts Category +# @name Add Contacts Category +POST {{base_url}}/v1/contacts/categories +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "Example" +} + +### Get Contacts Category +# @name Get Contacts Category +GET {{base_url}}/v1/contacts/categories/{{category_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Contacts Category +# @name Update Contacts Category +PATCH {{base_url}}/v1/contacts/categories/{{category_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "parent_id": 1, + "extension": "Example", + "title": "Example" +} + +### Delete Contacts Category +# @name Delete Contacts Category +DELETE {{base_url}}/v1/contacts/categories/{{category_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Contacts Content History.http b/phpstorm/Contacts Content History.http new file mode 100644 index 0000000..ee14188 --- /dev/null +++ b/phpstorm/Contacts Content History.http @@ -0,0 +1,28 @@ +# Contacts Content History +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@contact_id = 1 +@version_id = 1 + +### List Contact Versions +# @name List Contact Versions +# Optional query parameters: page[offset], page[limit] +GET {{base_url}}/v1/contacts/{{contact_id}}/contenthistory +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Delete Contact Version +# @name Delete Contact Version +# {{version_id}}: ID of the version (content history record), not of the Contact. +DELETE {{base_url}}/v1/contacts/{{version_id}}/contenthistory +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Keep Contact Version +# @name Keep Contact Version +# {{version_id}}: ID of the version (content history record), not of the Contact. +PATCH {{base_url}}/v1/contacts/{{version_id}}/contenthistory/keep +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Contacts Fields Groups.http b/phpstorm/Contacts Fields Groups.http new file mode 100644 index 0000000..153aa14 --- /dev/null +++ b/phpstorm/Contacts Fields Groups.http @@ -0,0 +1,51 @@ +# Contacts Fields Groups +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@group_id = 1 + +### List Contacts Field Groups +# @name List Contacts Field Groups +# Optional query parameters: page[offset], page[limit] +GET {{base_url}}/v1/fields/groups/contacts/contact +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add Contacts Field Group +# @name Add Contacts Field Group +POST {{base_url}}/v1/fields/groups/contacts/contact +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "Example group", + "context": "com_contact.contact", + "description": "" +} + +### Get Contacts Field Group +# @name Get Contacts Field Group +GET {{base_url}}/v1/fields/groups/contacts/contact/{{group_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Contacts Field Group +# @name Update Contacts Field Group +PATCH {{base_url}}/v1/fields/groups/contacts/contact/{{group_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "Example", + "state": 1, + "created": "Example" +} + +### Delete Contacts Field Group +# @name Delete Contacts Field Group +DELETE {{base_url}}/v1/fields/groups/contacts/contact/{{group_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Contacts Fields.http b/phpstorm/Contacts Fields.http new file mode 100644 index 0000000..a0459f6 --- /dev/null +++ b/phpstorm/Contacts Fields.http @@ -0,0 +1,55 @@ +# Contacts Fields +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@field_id = 1 + +### List Contacts Fields +# @name List Contacts Fields +# Optional query parameters: page[offset], page[limit] +GET {{base_url}}/v1/fields/contacts/contact +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add Contacts Field +# @name Add Contacts Field +POST {{base_url}}/v1/fields/contacts/contact +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "Example field com_contact.contact", + "type": "text", + "context": "com_contact.contact", + "description": "", + "params": { + "display": "2" + } +} + +### Get Contacts Field +# @name Get Contacts Field +GET {{base_url}}/v1/fields/contacts/contact/{{field_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Contacts Field +# @name Update Contacts Field +PATCH {{base_url}}/v1/fields/contacts/contact/{{field_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "context": "Example", + "group_id": 1, + "assigned_cat_ids": [] +} + +### Delete Contacts Field +# @name Delete Contacts Field +DELETE {{base_url}}/v1/fields/contacts/contact/{{field_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Contacts Form.http b/phpstorm/Contacts Form.http new file mode 100644 index 0000000..ca5ff9a --- /dev/null +++ b/phpstorm/Contacts Form.http @@ -0,0 +1,20 @@ +# Contacts Form +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@contact_id = 1 + +### Send Contact Form Message +# @name Send Contact Form Message +POST {{base_url}}/v1/contacts/form/{{contact_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "contact_name": "Example", + "contact_email": "example@example.invalid", + "contact_subject": "Example", + "contact_message": "Example" +} diff --git a/phpstorm/Contacts Mail Fields Groups.http b/phpstorm/Contacts Mail Fields Groups.http new file mode 100644 index 0000000..6dfdc62 --- /dev/null +++ b/phpstorm/Contacts Mail Fields Groups.http @@ -0,0 +1,51 @@ +# Contacts Mail Fields Groups +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@group_id = 1 + +### List Contacts Mail Field Groups +# @name List Contacts Mail Field Groups +# Optional query parameters: page[offset], page[limit] +GET {{base_url}}/v1/fields/groups/contacts/mail +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add Contacts Mail Field Group +# @name Add Contacts Mail Field Group +POST {{base_url}}/v1/fields/groups/contacts/mail +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "Example group", + "context": "com_contact.mail", + "description": "" +} + +### Get Contacts Mail Field Group +# @name Get Contacts Mail Field Group +GET {{base_url}}/v1/fields/groups/contacts/mail/{{group_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Contacts Mail Field Group +# @name Update Contacts Mail Field Group +PATCH {{base_url}}/v1/fields/groups/contacts/mail/{{group_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "Example", + "state": 1, + "created": "Example" +} + +### Delete Contacts Mail Field Group +# @name Delete Contacts Mail Field Group +DELETE {{base_url}}/v1/fields/groups/contacts/mail/{{group_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Contacts Mail Fields.http b/phpstorm/Contacts Mail Fields.http new file mode 100644 index 0000000..320d30c --- /dev/null +++ b/phpstorm/Contacts Mail Fields.http @@ -0,0 +1,55 @@ +# Contacts Mail Fields +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@field_id = 1 + +### List Contacts Mail Fields +# @name List Contacts Mail Fields +# Optional query parameters: page[offset], page[limit] +GET {{base_url}}/v1/fields/contacts/mail +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add Contacts Mail Field +# @name Add Contacts Mail Field +POST {{base_url}}/v1/fields/contacts/mail +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "Example field com_contact.mail", + "type": "text", + "context": "com_contact.mail", + "description": "", + "params": { + "display": "2" + } +} + +### Get Contacts Mail Field +# @name Get Contacts Mail Field +GET {{base_url}}/v1/fields/contacts/mail/{{field_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Contacts Mail Field +# @name Update Contacts Mail Field +PATCH {{base_url}}/v1/fields/contacts/mail/{{field_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "context": "Example", + "group_id": 1, + "assigned_cat_ids": [] +} + +### Delete Contacts Mail Field +# @name Delete Contacts Mail Field +DELETE {{base_url}}/v1/fields/contacts/mail/{{field_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Contacts.http b/phpstorm/Contacts.http new file mode 100644 index 0000000..f872423 --- /dev/null +++ b/phpstorm/Contacts.http @@ -0,0 +1,51 @@ +# Contacts +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@contact_id = 1 + +### List Contacts +# @name List Contacts +# Optional query parameters: page[offset], page[limit] +GET {{base_url}}/v1/contacts +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add Contact +# @name Add Contact +POST {{base_url}}/v1/contacts +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "name": "Example contact", + "catid": 4, + "language": "*" +} + +### Get Contact +# @name Get Contact +GET {{base_url}}/v1/contacts/{{contact_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Contact +# @name Update Contact +PATCH {{base_url}}/v1/contacts/{{contact_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "name": "Example", + "alias": "Example", + "version_note": "Example" +} + +### Delete Contact +# @name Delete Contact +DELETE {{base_url}}/v1/contacts/{{contact_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Content Articles Content History.http b/phpstorm/Content Articles Content History.http new file mode 100644 index 0000000..90e6b53 --- /dev/null +++ b/phpstorm/Content Articles Content History.http @@ -0,0 +1,28 @@ +# Content Articles Content History +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@article_id = 1 +@version_id = 1 + +### List Article Versions +# @name List Article Versions +# Optional query parameters: page[offset], page[limit] +GET {{base_url}}/v1/content/articles/{{article_id}}/contenthistory +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Delete Article Version +# @name Delete Article Version +# {{version_id}}: ID of the version (content history record), not of the Article. +DELETE {{base_url}}/v1/content/articles/{{version_id}}/contenthistory +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Keep Article Version +# @name Keep Article Version +# {{version_id}}: ID of the version (content history record), not of the Article. +PATCH {{base_url}}/v1/content/articles/{{version_id}}/contenthistory/keep +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Content Articles Fields Groups.http b/phpstorm/Content Articles Fields Groups.http new file mode 100644 index 0000000..b32bfe0 --- /dev/null +++ b/phpstorm/Content Articles Fields Groups.http @@ -0,0 +1,51 @@ +# Content Articles Fields Groups +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@group_id = 1 + +### List Content Articles Field Groups +# @name List Content Articles Field Groups +# Optional query parameters: page[offset], page[limit] +GET {{base_url}}/v1/fields/groups/content/articles +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add Content Articles Field Group +# @name Add Content Articles Field Group +POST {{base_url}}/v1/fields/groups/content/articles +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "Example group", + "context": "com_content.article", + "description": "" +} + +### Get Content Articles Field Group +# @name Get Content Articles Field Group +GET {{base_url}}/v1/fields/groups/content/articles/{{group_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Content Articles Field Group +# @name Update Content Articles Field Group +PATCH {{base_url}}/v1/fields/groups/content/articles/{{group_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "Example", + "state": 1, + "created": "Example" +} + +### Delete Content Articles Field Group +# @name Delete Content Articles Field Group +DELETE {{base_url}}/v1/fields/groups/content/articles/{{group_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Content Articles Fields.http b/phpstorm/Content Articles Fields.http new file mode 100644 index 0000000..d276708 --- /dev/null +++ b/phpstorm/Content Articles Fields.http @@ -0,0 +1,55 @@ +# Content Articles Fields +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@field_id = 1 + +### List Content Articles Fields +# @name List Content Articles Fields +# Optional query parameters: page[offset], page[limit] +GET {{base_url}}/v1/fields/content/articles +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add Content Articles Field +# @name Add Content Articles Field +POST {{base_url}}/v1/fields/content/articles +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "Example field com_content.article", + "type": "text", + "context": "com_content.article", + "description": "", + "params": { + "display": "2" + } +} + +### Get Content Articles Field +# @name Get Content Articles Field +GET {{base_url}}/v1/fields/content/articles/{{field_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Content Articles Field +# @name Update Content Articles Field +PATCH {{base_url}}/v1/fields/content/articles/{{field_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "context": "Example", + "group_id": 1, + "assigned_cat_ids": [] +} + +### Delete Content Articles Field +# @name Delete Content Articles Field +DELETE {{base_url}}/v1/fields/content/articles/{{field_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Content Articles.http b/phpstorm/Content Articles.http new file mode 100644 index 0000000..e745a5d --- /dev/null +++ b/phpstorm/Content Articles.http @@ -0,0 +1,52 @@ +# Content Articles +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@article_id = 1 + +### List Articles +# @name List Articles +# Optional query parameters: page[offset], page[limit], filter[author], filter[category], filter[search], filter[state], filter[featured], filter[tag], filter[language], filter[modified_start], filter[modified_end], filter[checked_out], filter[stage], list[ordering], list[direction] +GET {{base_url}}/v1/content/articles +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add Article +# @name Add Article +POST {{base_url}}/v1/content/articles +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "API Example", + "catid": 2, + "state": 0, + "introtext": "

Example

", + "fulltext": "", + "language": "*" +} + +### Get Article +# @name Get Article +GET {{base_url}}/v1/content/articles/{{article_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Article +# @name Update Article +PATCH {{base_url}}/v1/content/articles/{{article_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "Updated title" +} + +### Delete Article +# @name Delete Article +DELETE {{base_url}}/v1/content/articles/{{article_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Content Categories Fields Groups.http b/phpstorm/Content Categories Fields Groups.http new file mode 100644 index 0000000..6c67981 --- /dev/null +++ b/phpstorm/Content Categories Fields Groups.http @@ -0,0 +1,51 @@ +# Content Categories Fields Groups +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@group_id = 1 + +### List Content Categories Field Groups +# @name List Content Categories Field Groups +# Optional query parameters: page[offset], page[limit] +GET {{base_url}}/v1/fields/groups/content/categories +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add Content Categories Field Group +# @name Add Content Categories Field Group +POST {{base_url}}/v1/fields/groups/content/categories +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "Example group", + "context": "com_content.categories", + "description": "" +} + +### Get Content Categories Field Group +# @name Get Content Categories Field Group +GET {{base_url}}/v1/fields/groups/content/categories/{{group_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Content Categories Field Group +# @name Update Content Categories Field Group +PATCH {{base_url}}/v1/fields/groups/content/categories/{{group_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "Example", + "state": 1, + "created": "Example" +} + +### Delete Content Categories Field Group +# @name Delete Content Categories Field Group +DELETE {{base_url}}/v1/fields/groups/content/categories/{{group_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Content Categories Fields.http b/phpstorm/Content Categories Fields.http new file mode 100644 index 0000000..d55c52d --- /dev/null +++ b/phpstorm/Content Categories Fields.http @@ -0,0 +1,55 @@ +# Content Categories Fields +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@field_id = 1 + +### List Content Categories Fields +# @name List Content Categories Fields +# Optional query parameters: page[offset], page[limit] +GET {{base_url}}/v1/fields/content/categories +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add Content Categories Field +# @name Add Content Categories Field +POST {{base_url}}/v1/fields/content/categories +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "Example field com_content.categories", + "type": "text", + "context": "com_content.categories", + "description": "", + "params": { + "display": "2" + } +} + +### Get Content Categories Field +# @name Get Content Categories Field +GET {{base_url}}/v1/fields/content/categories/{{field_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Content Categories Field +# @name Update Content Categories Field +PATCH {{base_url}}/v1/fields/content/categories/{{field_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "context": "Example", + "group_id": 1, + "assigned_cat_ids": [] +} + +### Delete Content Categories Field +# @name Delete Content Categories Field +DELETE {{base_url}}/v1/fields/content/categories/{{field_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Content Categories.http b/phpstorm/Content Categories.http new file mode 100644 index 0000000..f174a5c --- /dev/null +++ b/phpstorm/Content Categories.http @@ -0,0 +1,49 @@ +# Content Categories +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@category_id = 1 + +### List Content Categories +# @name List Content Categories +# Optional query parameters: page[offset], page[limit], filter[search], filter[state] +GET {{base_url}}/v1/content/categories +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add Content Category +# @name Add Content Category +POST {{base_url}}/v1/content/categories +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "Example" +} + +### Get Content Category +# @name Get Content Category +GET {{base_url}}/v1/content/categories/{{category_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Content Category +# @name Update Content Category +PATCH {{base_url}}/v1/content/categories/{{category_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "parent_id": 1, + "extension": "Example", + "title": "Example" +} + +### Delete Content Category +# @name Delete Content Category +DELETE {{base_url}}/v1/content/categories/{{category_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Installer.http b/phpstorm/Installer.http new file mode 100644 index 0000000..5519093 --- /dev/null +++ b/phpstorm/Installer.http @@ -0,0 +1,11 @@ +# Installer +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +### List Extensions +# @name List Extensions +# Optional query parameters: page[offset], page[limit], core, status, type +GET {{base_url}}/v1/extensions +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Joomla Update.http b/phpstorm/Joomla Update.http new file mode 100644 index 0000000..b65f403 --- /dev/null +++ b/phpstorm/Joomla Update.http @@ -0,0 +1,63 @@ +# Joomla Update +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +### Get Update Health Check +# @name Get Update Health Check +GET {{base_url}}/v1/joomlaupdate/healthcheck +X-JUpdate-Token: {{update_token}} +Accept: application/vnd.api+json + +### Get Available Update +# @name Get Available Update +GET {{base_url}}/v1/joomlaupdate/getUpdate +X-JUpdate-Token: {{update_token}} +Accept: application/vnd.api+json + +### Prepare Update +# @name Prepare Update +POST {{base_url}}/v1/joomlaupdate/prepareUpdate +X-JUpdate-Token: {{update_token}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "targetVersion": "6.1.4" +} + +### Finalize Update +# @name Finalize Update +POST {{base_url}}/v1/joomlaupdate/finalizeUpdate +X-JUpdate-Token: {{update_token}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "fromVersion": "6.1.3", + "updateFileName": "update.zip" +} + +### Report Update Success +# @name Report Update Success +POST {{base_url}}/v1/joomlaupdate/notificationSuccess +X-JUpdate-Token: {{update_token}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "fromVersion": "6.1.3", + "toVersion": "6.1.4" +} + +### Report Update Failure +# @name Report Update Failure +POST {{base_url}}/v1/joomlaupdate/notificationFailed +X-JUpdate-Token: {{update_token}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "fromVersion": "6.1.3", + "toVersion": "6.1.4" +} diff --git a/phpstorm/Languages Content.http b/phpstorm/Languages Content.http new file mode 100644 index 0000000..3dad569 --- /dev/null +++ b/phpstorm/Languages Content.http @@ -0,0 +1,52 @@ +# Languages Content +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@language_id = 1 + +### List Content Languages +# @name List Content Languages +# Optional query parameters: page[offset], page[limit] +GET {{base_url}}/v1/languages/content +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add Content Language +# @name Add Content Language +POST {{base_url}}/v1/languages/content +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "lang_code": "Example", + "title": "Example", + "title_native": "Example", + "sef": "Example" +} + +### Get Content Language +# @name Get Content Language +GET {{base_url}}/v1/languages/content/{{language_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Content Language +# @name Update Content Language +PATCH {{base_url}}/v1/languages/content/{{language_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "lang_code": "Example", + "title": "Example", + "title_native": "Example" +} + +### Delete Content Language +# @name Delete Content Language +DELETE {{base_url}}/v1/languages/content/{{language_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Languages Overrides Search.http b/phpstorm/Languages Overrides Search.http new file mode 100644 index 0000000..626c772 --- /dev/null +++ b/phpstorm/Languages Overrides Search.http @@ -0,0 +1,22 @@ +# Languages Overrides Search +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +### Search Language Strings +# @name Search Language Strings +POST {{base_url}}/v1/languages/overrides/search +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "searchstring": "Example", + "searchtype": "constant" +} + +### Refresh Language Strings Cache +# @name Refresh Language Strings Cache +POST {{base_url}}/v1/languages/overrides/search/cache/refresh +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Languages Overrides.http b/phpstorm/Languages Overrides.http new file mode 100644 index 0000000..5b81e6b --- /dev/null +++ b/phpstorm/Languages Overrides.http @@ -0,0 +1,91 @@ +# Languages Overrides +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@lang_code = en-GB +@override_key = COM_EXAMPLE_KEY + +### List Site Language Overrides +# @name List Site Language Overrides +GET {{base_url}}/v1/languages/overrides/site/{{lang_code}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add Site Language Override +# @name Add Site Language Override +POST {{base_url}}/v1/languages/overrides/site/{{lang_code}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "key": "Example" +} + +### Get Site Language Override +# @name Get Site Language Override +GET {{base_url}}/v1/languages/overrides/site/{{lang_code}}/{{override_key}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Site Language Override +# @name Update Site Language Override +PATCH {{base_url}}/v1/languages/overrides/site/{{lang_code}}/{{override_key}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "key": "Example", + "override": "Example", + "both": false +} + +### Delete Site Language Override +# @name Delete Site Language Override +DELETE {{base_url}}/v1/languages/overrides/site/{{lang_code}}/{{override_key}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### List Administrator Language Overrides +# @name List Administrator Language Overrides +GET {{base_url}}/v1/languages/overrides/administrator/{{lang_code}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add Administrator Language Override +# @name Add Administrator Language Override +POST {{base_url}}/v1/languages/overrides/administrator/{{lang_code}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "key": "Example" +} + +### Get Administrator Language Override +# @name Get Administrator Language Override +GET {{base_url}}/v1/languages/overrides/administrator/{{lang_code}}/{{override_key}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Administrator Language Override +# @name Update Administrator Language Override +PATCH {{base_url}}/v1/languages/overrides/administrator/{{lang_code}}/{{override_key}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "key": "Example", + "override": "Example", + "both": false +} + +### Delete Administrator Language Override +# @name Delete Administrator Language Override +DELETE {{base_url}}/v1/languages/overrides/administrator/{{lang_code}}/{{override_key}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Languages.http b/phpstorm/Languages.http new file mode 100644 index 0000000..ba9f48e --- /dev/null +++ b/phpstorm/Languages.http @@ -0,0 +1,17 @@ +# Languages +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +### List Available Languages +# @name List Available Languages +# Optional query parameters: page[offset], page[limit] +GET {{base_url}}/v1/languages +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Install Language (not implemented) +# @name Install Language (not implemented) +POST {{base_url}}/v1/languages +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Media Adapters.http b/phpstorm/Media Adapters.http new file mode 100644 index 0000000..61710f3 --- /dev/null +++ b/phpstorm/Media Adapters.http @@ -0,0 +1,18 @@ +# Media Adapters +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@adapter_id = local-images + +### List Media Adapters +# @name List Media Adapters +GET {{base_url}}/v1/media/adapters +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Get Media Adapter +# @name Get Media Adapter +GET {{base_url}}/v1/media/adapters/{{adapter_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Media Files.http b/phpstorm/Media Files.http new file mode 100644 index 0000000..ffcd7f9 --- /dev/null +++ b/phpstorm/Media Files.http @@ -0,0 +1,55 @@ +# Media Files +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@path = local-images:/joomla_black.png + +### List Media Files +# @name List Media Files +# Optional query parameters: path, filter[search], url, temp, content, search_recursive +GET {{base_url}}/v1/media/files +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add Media File +# @name Add Media File +POST {{base_url}}/v1/media/files +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "path": "local-images:/example.txt", + "content": "RXhhbXBsZQ==", + "override": false +} + +### Get Media File or List Media Folder +# @name Get Media File or List Media Folder +# {{path}}: Adapter ID, a colon and the path from the root of the adapter, for example `local-images:/banners/osmbanner1.png`. +# Optional query parameters: url, temp, content, filter[search], search_recursive +GET {{base_url}}/v1/media/files/{{path}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Media File +# @name Update Media File +# {{path}}: Adapter ID, a colon and the path from the root of the adapter, for example `local-images:/banners/osmbanner1.png`. +PATCH {{base_url}}/v1/media/files/{{path}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "path": "local-images:/example.txt", + "content": "RXhhbXBsZQ==", + "override": false +} + +### Delete Media File +# @name Delete Media File +# {{path}}: Adapter ID, a colon and the path from the root of the adapter, for example `local-images:/banners/osmbanner1.png`. +DELETE {{base_url}}/v1/media/files/{{path}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Menus Items.http b/phpstorm/Menus Items.http new file mode 100644 index 0000000..fd1a6b7 --- /dev/null +++ b/phpstorm/Menus Items.http @@ -0,0 +1,112 @@ +# Menus Items +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@menu_item_id = 1 + +### List Site Menu Items +# @name List Site Menu Items +# Optional query parameters: page[offset], page[limit], filter[menutype] +GET {{base_url}}/v1/menus/site/items +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add Site Menu Item +# @name Add Site Menu Item +POST {{base_url}}/v1/menus/site/items +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "Example item", + "alias": "example-item", + "menutype": "mainmenu", + "type": "url", + "link": "https://example.org" +} + +### Get Site Menu Item +# @name Get Site Menu Item +GET {{base_url}}/v1/menus/site/items/{{menu_item_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Site Menu Item +# @name Update Site Menu Item +PATCH {{base_url}}/v1/menus/site/items/{{menu_item_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "Example", + "alias": "Example", + "note": "Example" +} + +### Delete Site Menu Item +# @name Delete Site Menu Item +DELETE {{base_url}}/v1/menus/site/items/{{menu_item_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### List Administrator Menu Items +# @name List Administrator Menu Items +# Optional query parameters: page[offset], page[limit], filter[menutype] +GET {{base_url}}/v1/menus/administrator/items +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add Administrator Menu Item +# @name Add Administrator Menu Item +POST {{base_url}}/v1/menus/administrator/items +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "Example", + "menutype": "Example", + "type": "Example" +} + +### Get Administrator Menu Item +# @name Get Administrator Menu Item +GET {{base_url}}/v1/menus/administrator/items/{{menu_item_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Administrator Menu Item +# @name Update Administrator Menu Item +PATCH {{base_url}}/v1/menus/administrator/items/{{menu_item_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "Example", + "alias": "Example", + "note": "Example" +} + +### Delete Administrator Menu Item +# @name Delete Administrator Menu Item +DELETE {{base_url}}/v1/menus/administrator/items/{{menu_item_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### List Site Menu Item Types +# @name List Site Menu Item Types +# Optional query parameters: page[offset], page[limit] +GET {{base_url}}/v1/menus/site/items/types +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### List Administrator Menu Item Types +# @name List Administrator Menu Item Types +# Optional query parameters: page[offset], page[limit] +GET {{base_url}}/v1/menus/administrator/items/types +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Menus.http b/phpstorm/Menus.http new file mode 100644 index 0000000..c0f03a6 --- /dev/null +++ b/phpstorm/Menus.http @@ -0,0 +1,96 @@ +# Menus +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@menu_id = 1 + +### List Site Menus +# @name List Site Menus +# Optional query parameters: page[offset], page[limit] +GET {{base_url}}/v1/menus/site +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add Site Menu +# @name Add Site Menu +POST {{base_url}}/v1/menus/site +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "menutype": "Example", + "title": "Example" +} + +### Get Site Menu +# @name Get Site Menu +GET {{base_url}}/v1/menus/site/{{menu_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Site Menu +# @name Update Site Menu +PATCH {{base_url}}/v1/menus/site/{{menu_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "menutype": "Example", + "title": "Example", + "description": "Example" +} + +### Delete Site Menu +# @name Delete Site Menu +DELETE {{base_url}}/v1/menus/site/{{menu_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### List Administrator Menus +# @name List Administrator Menus +# Optional query parameters: page[offset], page[limit] +GET {{base_url}}/v1/menus/administrator +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add Administrator Menu +# @name Add Administrator Menu +POST {{base_url}}/v1/menus/administrator +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "Example admin menu", + "menutype": "example-admin", + "description": "", + "client_id": 1 +} + +### Get Administrator Menu +# @name Get Administrator Menu +GET {{base_url}}/v1/menus/administrator/{{menu_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Administrator Menu +# @name Update Administrator Menu +PATCH {{base_url}}/v1/menus/administrator/{{menu_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "menutype": "Example", + "title": "Example", + "description": "Example" +} + +### Delete Administrator Menu +# @name Delete Administrator Menu +DELETE {{base_url}}/v1/menus/administrator/{{menu_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Messages.http b/phpstorm/Messages.http new file mode 100644 index 0000000..08d477e --- /dev/null +++ b/phpstorm/Messages.http @@ -0,0 +1,51 @@ +# Messages +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@message_id = 1 + +### List Messages +# @name List Messages +# Optional query parameters: page[offset], page[limit] +GET {{base_url}}/v1/messages +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add Message +# @name Add Message +POST {{base_url}}/v1/messages +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "user_id_to": 1, + "subject": "Example", + "message": "Example" +} + +### Get Message +# @name Get Message +GET {{base_url}}/v1/messages/{{message_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Message +# @name Update Message +PATCH {{base_url}}/v1/messages/{{message_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "user_id_to": 1, + "subject": "Example", + "message": "Example" +} + +### Delete Message +# @name Delete Message +DELETE {{base_url}}/v1/messages/{{message_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Modules.http b/phpstorm/Modules.http new file mode 100644 index 0000000..53963d5 --- /dev/null +++ b/phpstorm/Modules.http @@ -0,0 +1,115 @@ +# Modules +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@module_id = 1 + +### List Site Module Types +# @name List Site Module Types +GET {{base_url}}/v1/modules/types/site +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### List Administrator Module Types +# @name List Administrator Module Types +GET {{base_url}}/v1/modules/types/administrator +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### List Site Modules +# @name List Site Modules +# Optional query parameters: page[offset], page[limit] +GET {{base_url}}/v1/modules/site +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add Site Module +# @name Add Site Module +POST {{base_url}}/v1/modules/site +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "Example module", + "module": "mod_custom", + "language": "*", + "params": { + "style": "0" + } +} + +### Get Site Module +# @name Get Site Module +GET {{base_url}}/v1/modules/site/{{module_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Site Module +# @name Update Site Module +PATCH {{base_url}}/v1/modules/site/{{module_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "Example", + "note": "Example", + "version_note": "Example" +} + +### Delete Site Module +# @name Delete Site Module +DELETE {{base_url}}/v1/modules/site/{{module_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### List Administrator Modules +# @name List Administrator Modules +# Optional query parameters: page[offset], page[limit] +GET {{base_url}}/v1/modules/administrator +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add Administrator Module +# @name Add Administrator Module +POST {{base_url}}/v1/modules/administrator +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "Example module", + "module": "mod_custom", + "language": "*", + "params": { + "style": "0" + }, + "client_id": 1 +} + +### Get Administrator Module +# @name Get Administrator Module +GET {{base_url}}/v1/modules/administrator/{{module_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Administrator Module +# @name Update Administrator Module +PATCH {{base_url}}/v1/modules/administrator/{{module_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "Example", + "note": "Example", + "version_note": "Example" +} + +### Delete Administrator Module +# @name Delete Administrator Module +DELETE {{base_url}}/v1/modules/administrator/{{module_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Newsfeeds Categories.http b/phpstorm/Newsfeeds Categories.http new file mode 100644 index 0000000..2c2c880 --- /dev/null +++ b/phpstorm/Newsfeeds Categories.http @@ -0,0 +1,49 @@ +# Newsfeeds Categories +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@category_id = 1 + +### List Newsfeeds Categories +# @name List Newsfeeds Categories +# Optional query parameters: page[offset], page[limit], filter[search], filter[state] +GET {{base_url}}/v1/newsfeeds/categories +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add Newsfeeds Category +# @name Add Newsfeeds Category +POST {{base_url}}/v1/newsfeeds/categories +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "Example" +} + +### Get Newsfeeds Category +# @name Get Newsfeeds Category +GET {{base_url}}/v1/newsfeeds/categories/{{category_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Newsfeeds Category +# @name Update Newsfeeds Category +PATCH {{base_url}}/v1/newsfeeds/categories/{{category_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "parent_id": 1, + "extension": "Example", + "title": "Example" +} + +### Delete Newsfeeds Category +# @name Delete Newsfeeds Category +DELETE {{base_url}}/v1/newsfeeds/categories/{{category_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Newsfeeds.http b/phpstorm/Newsfeeds.http new file mode 100644 index 0000000..f1fd1bb --- /dev/null +++ b/phpstorm/Newsfeeds.http @@ -0,0 +1,62 @@ +# Newsfeeds +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@feed_id = 1 + +### List Newsfeeds +# @name List Newsfeeds +# Optional query parameters: page[offset], page[limit] +GET {{base_url}}/v1/newsfeeds/feeds +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add Newsfeed +# @name Add Newsfeed +POST {{base_url}}/v1/newsfeeds/feeds +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "name": "Example feed", + "link": "https://example.org/feed", + "catid": 5, + "description": "", + "metadesc": "", + "images": { + "image_first": "" + }, + "metadata": { + "robots": "" + }, + "params": { + "show_feed_image": "1" + } +} + +### Get Newsfeed +# @name Get Newsfeed +GET {{base_url}}/v1/newsfeeds/feeds/{{feed_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Newsfeed +# @name Update Newsfeed +PATCH {{base_url}}/v1/newsfeeds/feeds/{{feed_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "name": "Example", + "alias": "Example", + "published": 1 +} + +### Delete Newsfeed +# @name Delete Newsfeed +DELETE {{base_url}}/v1/newsfeeds/feeds/{{feed_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Plugins.http b/phpstorm/Plugins.http new file mode 100644 index 0000000..3ef9981 --- /dev/null +++ b/phpstorm/Plugins.http @@ -0,0 +1,30 @@ +# Plugins +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@plugin_id = 1 + +### List Plugins +# @name List Plugins +# Optional query parameters: page[offset], page[limit], filter[element], filter[status], filter[search], filter[type] +GET {{base_url}}/v1/plugins +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Get Plugin +# @name Get Plugin +GET {{base_url}}/v1/plugins/{{plugin_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Plugin +# @name Update Plugin +PATCH {{base_url}}/v1/plugins/{{plugin_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "enabled": 1 +} diff --git a/phpstorm/Privacy Consents.http b/phpstorm/Privacy Consents.http new file mode 100644 index 0000000..8e65357 --- /dev/null +++ b/phpstorm/Privacy Consents.http @@ -0,0 +1,19 @@ +# Privacy Consents +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@consent_id = 1 + +### List Privacy Consents +# @name List Privacy Consents +# Optional query parameters: page[offset], page[limit] +GET {{base_url}}/v1/privacy/consents +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Get Privacy Consent +# @name Get Privacy Consent +GET {{base_url}}/v1/privacy/consents/{{consent_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Privacy Requests.http b/phpstorm/Privacy Requests.http new file mode 100644 index 0000000..08086d6 --- /dev/null +++ b/phpstorm/Privacy Requests.http @@ -0,0 +1,36 @@ +# Privacy Requests +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@request_id = 1 + +### List Privacy Requests +# @name List Privacy Requests +# Optional query parameters: page[offset], page[limit] +GET {{base_url}}/v1/privacy/requests +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add Privacy Request +# @name Add Privacy Request +POST {{base_url}}/v1/privacy/requests +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "email": "example@example.invalid" +} + +### Get Privacy Request +# @name Get Privacy Request +GET {{base_url}}/v1/privacy/requests/{{request_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Export Privacy Request Data +# @name Export Privacy Request Data +GET {{base_url}}/v1/privacy/requests/export/{{request_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/README.md b/phpstorm/README.md new file mode 100644 index 0000000..948ae84 --- /dev/null +++ b/phpstorm/README.md @@ -0,0 +1,106 @@ +# PhpStorm HTTP Client collection + +PhpStorm HTTP Client collection for the Joomla 6 Web Services API. + +The collection has a request for every route of the [OpenAPI specification](../src/joomla-ws-api.json) in this +repository, with the example request bodies of the specification. It works in PhpStorm and in any other JetBrains IDE +with the built-in [HTTP Client](https://www.jetbrains.com/help/phpstorm/http-client-in-product-code-editor.html). + +## Installation instructions + +### Prepare your Joomla 6 website + +1. Install Joomla 6 on your server or local development environment or use an existing Joomla 6 website. +2. Login into the Joomla 6 administrator panel and go to the Global Configuration. +3. On the **Site** tab make sure that the **Search Engine Friendly URLs** option is enabled. If it isn't, enable it and click the **Save & Close** button at the top. +4. Click on the **User Menu** button at the top right and select **Edit Account**. +5. On the **User Profile** page go to the **Joomla API Token** tab. +6. Check if the token is present, if it isn't, click the **Save** button at the top and the token will be generated. +7. Close the Edit profile page. +8. Go to **System** > **Plugins**. +9. Click on the **Filter Options** button. In the **Select Type** dropdown choose **webservices**. +10. Make sure all Web Services plugins are enabled. If any of them is disabled, enable it and click the **Save & Close** button at the top. + +Your Joomla website is now ready to be used with the webservices API and the PhpStorm collection. + +### Install the collection + +Download this repository to your local machine. Unzip the file if needed. Once unzipped there is a folder **phpstorm** in +the repository. Copy that folder and all its contents into a project you open in PhpStorm, or open the folder itself as +a project. + +The folder contains one `.http` file per group of endpoints (a tag in the specification), for example `Banners.http` +and `Content Articles.http`. + +### Configure the environment + +The requests use two variables: `base_url` and `api_key`. They are set in two environment files in the **phpstorm** folder. + +1. Open `http-client.env.json` and change the value of `base_url` to the URL of your Joomla website, for example + ```https://www.myjoomlawebsite.com/api/index.php```. Keep the ```/api/index.php``` part at the end of the URL, as that + is the endpoint for Joomla API requests. +2. Copy `http-client.private.env.json.example` to `http-client.private.env.json`. +3. Copy the API token from your Joomla user profile and paste it as the value of `api_key` in + `http-client.private.env.json`. + +The private environment file is listed in `.gitignore`, so your token is not committed by accident. + +The requests in `Joomla Update.http` do not use the API token. They use the token of the Joomla Automated Updates +service, which you find in the options of Joomla Update. Set it as the value of `update_token` in +`http-client.private.env.json` if you want to use these requests. + +## Using the collection + +### Running a GET request + +A simple test to see if the API endpoints are working is a ```GET``` on Config Application. + +1. Open `Config Application.http`. +2. In the toolbar at the top of the editor, select the **joomla** environment in the **Run with** dropdown. +3. Click the green run icon in the gutter next to **Get Global Configuration**. The URL for this request is ```{{base_url}}/v1/config/application```. +4. If all is working you should see a response with status 200 in the **Services** tool window, with the global + configuration of your Joomla website in JSON format. + +### Using variables in requests + +Requests that work on a single item use a variable in the URL, for example ```{{article_id}}```. These variables are +defined at the top of each `.http` file with a default value: + +``` +@article_id = 1 +``` + +First, retrieve a list of articles. + +1. Open `Content Articles.http`. +2. Run the request **List Articles**. The URL for this request is ```{{base_url}}/v1/content/articles```. +3. If your Joomla website has articles, you should see a response with status 200 and a list of articles in JSON format. + +Retrieve an article with a specific ID. + +1. In the JSON result of the content/articles request, find the ID of an article you want to retrieve. An example ID is shown as ```"id": 11```. +2. Change the variable at the top of `Content Articles.http` to ```@article_id = 11```. +3. Run the request **Get Article**. The URL for this request is ```{{base_url}}/v1/content/articles/{{article_id}}```. + +### Query parameters + +List requests support paging, and some also support filters. The available query parameters are listed in a comment +above the request. Add them to the URL, for example: + +``` +# Optional query parameters: page[offset], page[limit], filter[search], filter[state] +GET {{base_url}}/v1/content/articles?filter[search]=joomla&page[limit]=5 +``` + +## Updating the collection + +The `.http` files are generated from the specification by +[`scripts/generate-phpstorm.mjs`](../scripts/generate-phpstorm.mjs). Do not change them by hand: change +`src/joomla-ws-api.json` and generate the collection again, in the same pull request. + +```bash +npm run phpstorm # writes the .http files in this folder +npm run phpstorm:check # fails when the .http files are not up to date with the specification +``` + +CI runs the check on every pull request. diff --git a/phpstorm/Redirects.http b/phpstorm/Redirects.http new file mode 100644 index 0000000..fb77932 --- /dev/null +++ b/phpstorm/Redirects.http @@ -0,0 +1,50 @@ +# Redirects +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@redirect_id = 1 + +### List Redirects +# @name List Redirects +# Optional query parameters: page[offset], page[limit] +GET {{base_url}}/v1/redirects +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add Redirect +# @name Add Redirect +POST {{base_url}}/v1/redirects +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "old_url": "Example", + "new_url": "Example" +} + +### Get Redirect +# @name Get Redirect +GET {{base_url}}/v1/redirects/{{redirect_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Redirect +# @name Update Redirect +PATCH {{base_url}}/v1/redirects/{{redirect_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "old_url": "Example", + "new_url": "Example", + "comment": "Example" +} + +### Delete Redirect +# @name Delete Redirect +DELETE {{base_url}}/v1/redirects/{{redirect_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Tags.http b/phpstorm/Tags.http new file mode 100644 index 0000000..f9c671e --- /dev/null +++ b/phpstorm/Tags.http @@ -0,0 +1,52 @@ +# Tags +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@tag_id = 1 + +### List Tags +# @name List Tags +# Optional query parameters: page[offset], page[limit], filter[search] +GET {{base_url}}/v1/tags +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add Tag +# @name Add Tag +POST {{base_url}}/v1/tags +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "Example tag", + "parent_id": 1, + "description": "", + "language": "*" +} + +### Get Tag +# @name Get Tag +GET {{base_url}}/v1/tags/{{tag_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Tag +# @name Update Tag +PATCH {{base_url}}/v1/tags/{{tag_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "parent_id": 1, + "title": "Example", + "note": "Example" +} + +### Delete Tag +# @name Delete Tag +DELETE {{base_url}}/v1/tags/{{tag_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Templates Styles.http b/phpstorm/Templates Styles.http new file mode 100644 index 0000000..6833791 --- /dev/null +++ b/phpstorm/Templates Styles.http @@ -0,0 +1,100 @@ +# Templates Styles +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@template_style_id = 1 + +### List Site Template Styles +# @name List Site Template Styles +# Optional query parameters: page[offset], page[limit] +GET {{base_url}}/v1/templates/styles/site +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add Site Template Style +# @name Add Site Template Style +POST {{base_url}}/v1/templates/styles/site +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "template": "cassiopeia", + "title": "Example style", + "params": { + "brand": "1" + } +} + +### Get Site Template Style +# @name Get Site Template Style +GET {{base_url}}/v1/templates/styles/site/{{template_style_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Site Template Style +# @name Update Site Template Style +PATCH {{base_url}}/v1/templates/styles/site/{{template_style_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "Example", + "assigned": "Example", + "home": 1 +} + +### Delete Site Template Style +# @name Delete Site Template Style +DELETE {{base_url}}/v1/templates/styles/site/{{template_style_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### List Administrator Template Styles +# @name List Administrator Template Styles +# Optional query parameters: page[offset], page[limit] +GET {{base_url}}/v1/templates/styles/administrator +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add Administrator Template Style +# @name Add Administrator Template Style +POST {{base_url}}/v1/templates/styles/administrator +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "template": "atum", + "title": "Example style", + "params": { + "hue": "hsl(214, 63%, 20%)" + } +} + +### Get Administrator Template Style +# @name Get Administrator Template Style +GET {{base_url}}/v1/templates/styles/administrator/{{template_style_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Administrator Template Style +# @name Update Administrator Template Style +PATCH {{base_url}}/v1/templates/styles/administrator/{{template_style_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "Example", + "assigned": "Example", + "home": 0 +} + +### Delete Administrator Template Style +# @name Delete Administrator Template Style +DELETE {{base_url}}/v1/templates/styles/administrator/{{template_style_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Users Fields Groups.http b/phpstorm/Users Fields Groups.http new file mode 100644 index 0000000..0e2babc --- /dev/null +++ b/phpstorm/Users Fields Groups.http @@ -0,0 +1,51 @@ +# Users Fields Groups +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@group_id = 1 + +### List Users Field Groups +# @name List Users Field Groups +# Optional query parameters: page[offset], page[limit] +GET {{base_url}}/v1/fields/groups/users +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add Users Field Group +# @name Add Users Field Group +POST {{base_url}}/v1/fields/groups/users +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "Example group", + "context": "com_users.user", + "description": "" +} + +### Get Users Field Group +# @name Get Users Field Group +GET {{base_url}}/v1/fields/groups/users/{{group_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Users Field Group +# @name Update Users Field Group +PATCH {{base_url}}/v1/fields/groups/users/{{group_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "Example", + "state": 1, + "created": "Example" +} + +### Delete Users Field Group +# @name Delete Users Field Group +DELETE {{base_url}}/v1/fields/groups/users/{{group_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Users Fields.http b/phpstorm/Users Fields.http new file mode 100644 index 0000000..5becfea --- /dev/null +++ b/phpstorm/Users Fields.http @@ -0,0 +1,55 @@ +# Users Fields +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@field_id = 1 + +### List Users Fields +# @name List Users Fields +# Optional query parameters: page[offset], page[limit] +GET {{base_url}}/v1/fields/users +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add Users Field +# @name Add Users Field +POST {{base_url}}/v1/fields/users +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "Example field com_users.user", + "type": "text", + "context": "com_users.user", + "description": "", + "params": { + "display": "2" + } +} + +### Get Users Field +# @name Get Users Field +GET {{base_url}}/v1/fields/users/{{field_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Users Field +# @name Update Users Field +PATCH {{base_url}}/v1/fields/users/{{field_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "context": "Example", + "group_id": 1, + "assigned_cat_ids": [] +} + +### Delete Users Field +# @name Delete Users Field +DELETE {{base_url}}/v1/fields/users/{{field_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Users Groups.http b/phpstorm/Users Groups.http new file mode 100644 index 0000000..7ba81b3 --- /dev/null +++ b/phpstorm/Users Groups.http @@ -0,0 +1,50 @@ +# Users Groups +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@group_id = 1 + +### List User Groups +# @name List User Groups +# Optional query parameters: page[offset], page[limit] +GET {{base_url}}/v1/users/groups +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add User Group +# @name Add User Group +POST {{base_url}}/v1/users/groups +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "Example group", + "parent_id": 1 +} + +### Get User Group +# @name Get User Group +GET {{base_url}}/v1/users/groups/{{group_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update User Group +# @name Update User Group +PATCH {{base_url}}/v1/users/groups/{{group_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "Example", + "parent_id": 1, + "actions": [] +} + +### Delete User Group +# @name Delete User Group +DELETE {{base_url}}/v1/users/groups/{{group_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Users Levels.http b/phpstorm/Users Levels.http new file mode 100644 index 0000000..32d6550 --- /dev/null +++ b/phpstorm/Users Levels.http @@ -0,0 +1,52 @@ +# Users Levels +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@level_id = 1 + +### List Access Levels +# @name List Access Levels +# Optional query parameters: page[offset], page[limit] +GET {{base_url}}/v1/users/levels +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add Access Level +# @name Add Access Level +POST {{base_url}}/v1/users/levels +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "API example", + "rules": [ + 2, + 3 + ] +} + +### Get Access Level +# @name Get Access Level +GET {{base_url}}/v1/users/levels/{{level_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update Access Level +# @name Update Access Level +PATCH {{base_url}}/v1/users/levels/{{level_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "title": "API example", + "rules": "[2,3]" +} + +### Delete Access Level +# @name Delete Access Level +DELETE {{base_url}}/v1/users/levels/{{level_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/Users.http b/phpstorm/Users.http new file mode 100644 index 0000000..66e1363 --- /dev/null +++ b/phpstorm/Users.http @@ -0,0 +1,54 @@ +# Users +# +# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. +# Set base_url and api_key in http-client.env.json and http-client.private.env.json. + +@user_id = 1 + +### List Users +# @name List Users +# Optional query parameters: page[offset], page[limit], filter[state], filter[active], filter[groupid], filter[search], filter[registrationDateStart], filter[registrationDateEnd], filter[lastVisitDateStart], filter[lastVisitDateEnd] +GET {{base_url}}/v1/users +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Add User +# @name Add User +POST {{base_url}}/v1/users +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "name": "Example user", + "username": "example", + "email": "user@example.org", + "groups": [ + 2 + ] +} + +### Get User +# @name Get User +GET {{base_url}}/v1/users/{{user_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json + +### Update User +# @name Update User +PATCH {{base_url}}/v1/users/{{user_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json +Content-Type: application/json + +{ + "name": "Example", + "username": "Example", + "password": "Example" +} + +### Delete User +# @name Delete User +DELETE {{base_url}}/v1/users/{{user_id}} +X-Joomla-Token: {{api_key}} +Accept: application/vnd.api+json diff --git a/phpstorm/http-client.env.json b/phpstorm/http-client.env.json new file mode 100644 index 0000000..567c079 --- /dev/null +++ b/phpstorm/http-client.env.json @@ -0,0 +1,5 @@ +{ + "joomla": { + "base_url": "https://yourjoomlasite.com/api/index.php" + } +} diff --git a/phpstorm/http-client.private.env.json.example b/phpstorm/http-client.private.env.json.example new file mode 100644 index 0000000..0f6a93b --- /dev/null +++ b/phpstorm/http-client.private.env.json.example @@ -0,0 +1,6 @@ +{ + "joomla": { + "api_key": "your-joomla-api-token", + "update_token": "your-automated-updates-token" + } +} diff --git a/scripts/generate-phpstorm.mjs b/scripts/generate-phpstorm.mjs new file mode 100644 index 0000000..20bd05c --- /dev/null +++ b/scripts/generate-phpstorm.mjs @@ -0,0 +1,154 @@ +#!/usr/bin/env node +// Generates the PhpStorm HTTP Client collection in phpstorm/ from the spec: one .http file per tag, with a +// request for each operation. The request bodies are the examples of the spec. +// +// Usage: node scripts/generate-phpstorm.mjs [--check] [spec.json] (default: src/joomla-ws-api.json) +// --check: do not write, but fail when the files in phpstorm/ differ from what the spec generates. + +import fs from 'node:fs'; +import path from 'node:path'; +import { deref, loadSpec, METHODS, report } from './lib.mjs'; + +const OUT = 'phpstorm'; +const args = process.argv.slice(2); +const check = args.includes('--check'); +const specFile = args.find((a) => a !== '--check') ?? 'src/joomla-ws-api.json'; + +// Name of the {id} variable, by the last word of the tag +const ID_NAMES = { + Categories: 'category_id', + Clients: 'client_id', + Form: 'contact_id', + Fields: 'field_id', + Groups: 'group_id', + Levels: 'level_id', + Items: 'menu_item_id', + Styles: 'template_style_id', + Content: 'language_id', + Overrides: 'override_key', + Requests: 'request_id', + Consents: 'consent_id', + Adapters: 'adapter_id', + Newsfeeds: 'feed_id', + Articles: 'article_id', +}; + +// Default values of the path variables +const DEFAULTS = { + adapter_id: 'local-images', + override_key: 'COM_EXAMPLE_KEY', + lang_code: 'en-GB', + component_name: 'com_content', + path: 'local-images:/joomla_black.png', +}; + +/** "Banners Categories" -> "category_id". Content history uses the ID of the item it belongs to. */ +function idName(tag) { + const words = tag.split(' '); + const last = words.at(-1); + if (last === 'History') return words.at(-3).replace(/s$/, '').toLowerCase() + '_id'; + return ID_NAMES[last] ?? last.replace(/s$/, '').toLowerCase() + '_id'; +} + +const firstSentence = (text) => text.trim().split(/(?<=\.)\s/)[0]; + +function bodyExample(content) { + const media = content['application/json'] ?? Object.values(content)[0]; + if ('example' in media) return media.example; + if (media.examples) return deref(spec, Object.values(media.examples)[0]).value; + return {}; +} + +const spec = loadSpec(specFile); +const files = new Map(); + +// The operations in the order of the spec (operations() of lib.mjs sorts the methods) +const ordered = Object.entries(spec.paths).flatMap(([route, pathItem]) => + Object.keys(pathItem) + .filter((method) => METHODS.includes(method)) + .map((method) => ({ route, method, operation: pathItem[method], pathItem })), +); + +for (const { route, method, operation, pathItem } of ordered) { + const tag = operation.tags[0]; + const parameters = [...(pathItem.parameters ?? []), ...(operation.parameters ?? [])].map((p) => deref(spec, p)); + const variables = {}; + const notes = []; + let url = route; + for (const p of parameters.filter((p) => p.in === 'path')) { + let name = p.name; + if (name === 'id') name = (p.description ?? '').includes('ID of the version') ? 'version_id' : idName(tag); + url = url.replace(`{${p.name}}`, `{{${name}}}`); + variables[name] = p.example ?? DEFAULTS[name] ?? 1; + if (p.description) notes.push(`{{${name}}}: ${firstSentence(p.description)}`); + } + const security = operation.security ?? spec.security ?? []; + const requestBody = deref(spec, operation.requestBody); + if (!files.has(tag)) files.set(tag, []); + files.get(tag).push({ + summary: operation.summary, + method: method.toUpperCase(), + url: `{{base_url}}${url}`, + variables, + notes: [...new Set(notes)], + query: parameters.filter((p) => p.in === 'query').map((p) => p.name), + updateToken: security.some((s) => 'JUpdateToken' in s), + body: requestBody ? bodyExample(requestBody.content) : null, + }); +} + +/** The contents of the .http file of one tag. */ +function render(tag, requests) { + const lines = [ + `# ${tag}`, + '#', + `# Generated from the OpenAPI spec of the Joomla Web Services API ${spec.info.version}.`, + '# Set base_url and api_key in http-client.env.json and http-client.private.env.json.', + '', + ]; + const variables = {}; + for (const r of requests) { + for (const [name, value] of Object.entries(r.variables)) variables[name] ??= value; + } + for (const [name, value] of Object.entries(variables)) lines.push(`@${name} = ${value}`); + if (Object.keys(variables).length) lines.push(''); + + for (const r of requests) { + lines.push(`### ${r.summary}`, `# @name ${r.summary}`); + for (const note of r.notes) lines.push(`# ${note}`); + if (r.query.length) lines.push(`# Optional query parameters: ${r.query.join(', ')}`); + lines.push(`${r.method} ${r.url}`); + lines.push(r.updateToken ? 'X-JUpdate-Token: {{update_token}}' : 'X-Joomla-Token: {{api_key}}'); + lines.push('Accept: application/vnd.api+json'); + if (r.body !== null) lines.push('Content-Type: application/json', '', JSON.stringify(r.body, null, 2)); + lines.push(''); + } + return lines.join('\n').trimEnd() + '\n'; +} + +const wanted = new Map([...files].map(([tag, requests]) => [`${tag}.http`, render(tag, requests)])); +const existing = fs.existsSync(OUT) ? fs.readdirSync(OUT).filter((f) => f.endsWith('.http')) : []; +const requests = [...files.values()].reduce((n, r) => n + r.length, 0); + +if (check) { + const errors = []; + for (const [file, contents] of wanted) { + const target = path.join(OUT, file); + if (!fs.existsSync(target)) errors.push(`${target} is missing`); + else if (fs.readFileSync(target, 'utf8') !== contents) errors.push(`${target} is not up to date`); + } + for (const file of existing.filter((f) => !wanted.has(f))) { + errors.push(`${path.join(OUT, file)} has no tag in the spec`); + } + if (errors.length) errors.push('Run "npm run phpstorm" and commit the result.'); + report({ + title: 'PhpStorm collection', + summary: [`${wanted.size} files, ${requests} requests`], + errors, + }); +} else { + fs.mkdirSync(OUT, { recursive: true }); + for (const file of existing.filter((f) => !wanted.has(f))) fs.rmSync(path.join(OUT, file)); + for (const [file, contents] of wanted) fs.writeFileSync(path.join(OUT, file), contents); + console.log(`${OUT}: ${wanted.size} files, ${requests} requests`); +} From 6240f710e0ee8a9fa0f8450ce97d0f844c5d85b2 Mon Sep 17 00:00:00 2001 From: Roland Dalmulder Date: Sun, 15 Nov 2026 15:56:37 +0100 Subject: [PATCH 2/3] Generate the PhpStorm collection at build time instead of committing it to main - The generator writes to dist/phpstorm/ (git-ignored), with file names without spaces. The README and environment files of the collection are in scripts/phpstorm/. - npm run build adds joomla-ws-api--phpstorm.zip to the release files and the .sha256. - A new workflow commits the collection to the phpstorm branch on every push to main, when it changed. - No phpstorm/*.http files and no phpstorm:check in main anymore. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 4 +- .github/workflows/phpstorm.yml | 61 ++++++++++ .github/workflows/release.yml | 4 +- README.md | 22 ++-- package.json | 3 +- phpstorm/Banners Categories.http | 49 -------- phpstorm/Banners Clients.http | 51 -------- phpstorm/Banners Content History.http | 28 ----- phpstorm/Banners.http | 50 -------- phpstorm/Config Application.http | 24 ---- phpstorm/Config Component.http | 24 ---- .../Contacts Categories Fields Groups.http | 51 -------- phpstorm/Contacts Categories Fields.http | 55 --------- phpstorm/Contacts Categories.http | 49 -------- phpstorm/Contacts Content History.http | 28 ----- phpstorm/Contacts Fields Groups.http | 51 -------- phpstorm/Contacts Fields.http | 55 --------- phpstorm/Contacts Form.http | 20 --- phpstorm/Contacts Mail Fields Groups.http | 51 -------- phpstorm/Contacts Mail Fields.http | 55 --------- phpstorm/Contacts.http | 51 -------- .../Content Articles Content History.http | 28 ----- phpstorm/Content Articles Fields Groups.http | 51 -------- phpstorm/Content Articles Fields.http | 55 --------- phpstorm/Content Articles.http | 52 -------- .../Content Categories Fields Groups.http | 51 -------- phpstorm/Content Categories Fields.http | 55 --------- phpstorm/Content Categories.http | 49 -------- phpstorm/Installer.http | 11 -- phpstorm/Joomla Update.http | 63 ---------- phpstorm/Languages Content.http | 52 -------- phpstorm/Languages Overrides Search.http | 22 ---- phpstorm/Languages Overrides.http | 91 -------------- phpstorm/Languages.http | 17 --- phpstorm/Media Adapters.http | 18 --- phpstorm/Media Files.http | 55 --------- phpstorm/Menus Items.http | 112 ----------------- phpstorm/Menus.http | 96 --------------- phpstorm/Messages.http | 51 -------- phpstorm/Modules.http | 115 ------------------ phpstorm/Newsfeeds Categories.http | 49 -------- phpstorm/Newsfeeds.http | 62 ---------- phpstorm/Plugins.http | 30 ----- phpstorm/Privacy Consents.http | 19 --- phpstorm/Privacy Requests.http | 36 ------ phpstorm/Redirects.http | 50 -------- phpstorm/Tags.http | 52 -------- phpstorm/Templates Styles.http | 100 --------------- phpstorm/Users Fields Groups.http | 51 -------- phpstorm/Users Fields.http | 55 --------- phpstorm/Users Groups.http | 50 -------- phpstorm/Users Levels.http | 52 -------- phpstorm/Users.http | 54 -------- scripts/build.mjs | 52 +++++++- scripts/generate-phpstorm.mjs | 51 +++----- {phpstorm => scripts/phpstorm}/.gitignore | 0 {phpstorm => scripts/phpstorm}/README.md | 49 +++++--- .../phpstorm}/http-client.env.json | 0 .../http-client.private.env.json.example | 0 59 files changed, 178 insertions(+), 2464 deletions(-) create mode 100644 .github/workflows/phpstorm.yml delete mode 100644 phpstorm/Banners Categories.http delete mode 100644 phpstorm/Banners Clients.http delete mode 100644 phpstorm/Banners Content History.http delete mode 100644 phpstorm/Banners.http delete mode 100644 phpstorm/Config Application.http delete mode 100644 phpstorm/Config Component.http delete mode 100644 phpstorm/Contacts Categories Fields Groups.http delete mode 100644 phpstorm/Contacts Categories Fields.http delete mode 100644 phpstorm/Contacts Categories.http delete mode 100644 phpstorm/Contacts Content History.http delete mode 100644 phpstorm/Contacts Fields Groups.http delete mode 100644 phpstorm/Contacts Fields.http delete mode 100644 phpstorm/Contacts Form.http delete mode 100644 phpstorm/Contacts Mail Fields Groups.http delete mode 100644 phpstorm/Contacts Mail Fields.http delete mode 100644 phpstorm/Contacts.http delete mode 100644 phpstorm/Content Articles Content History.http delete mode 100644 phpstorm/Content Articles Fields Groups.http delete mode 100644 phpstorm/Content Articles Fields.http delete mode 100644 phpstorm/Content Articles.http delete mode 100644 phpstorm/Content Categories Fields Groups.http delete mode 100644 phpstorm/Content Categories Fields.http delete mode 100644 phpstorm/Content Categories.http delete mode 100644 phpstorm/Installer.http delete mode 100644 phpstorm/Joomla Update.http delete mode 100644 phpstorm/Languages Content.http delete mode 100644 phpstorm/Languages Overrides Search.http delete mode 100644 phpstorm/Languages Overrides.http delete mode 100644 phpstorm/Languages.http delete mode 100644 phpstorm/Media Adapters.http delete mode 100644 phpstorm/Media Files.http delete mode 100644 phpstorm/Menus Items.http delete mode 100644 phpstorm/Menus.http delete mode 100644 phpstorm/Messages.http delete mode 100644 phpstorm/Modules.http delete mode 100644 phpstorm/Newsfeeds Categories.http delete mode 100644 phpstorm/Newsfeeds.http delete mode 100644 phpstorm/Plugins.http delete mode 100644 phpstorm/Privacy Consents.http delete mode 100644 phpstorm/Privacy Requests.http delete mode 100644 phpstorm/Redirects.http delete mode 100644 phpstorm/Tags.http delete mode 100644 phpstorm/Templates Styles.http delete mode 100644 phpstorm/Users Fields Groups.http delete mode 100644 phpstorm/Users Fields.http delete mode 100644 phpstorm/Users Groups.http delete mode 100644 phpstorm/Users Levels.http delete mode 100644 phpstorm/Users.http rename {phpstorm => scripts/phpstorm}/.gitignore (100%) rename {phpstorm => scripts/phpstorm}/README.md (67%) rename {phpstorm => scripts/phpstorm}/http-client.env.json (100%) rename {phpstorm => scripts/phpstorm}/http-client.private.env.json.example (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 036891b..af90680 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,9 +46,6 @@ jobs: - name: Quality and completeness run: npm run quality - - name: PhpStorm collection up to date - run: npm run phpstorm:check - - name: Base branch version if: github.event_name == 'pull_request' run: git show "origin/${{ github.base_ref }}:src/joomla-ws-api.json" > "$RUNNER_TEMP/base.json" || rm -f "$RUNNER_TEMP/base.json" @@ -57,6 +54,7 @@ jobs: id: version run: node scripts/check-version.mjs src/joomla-ws-api.json CHANGELOG.md "$RUNNER_TEMP/base.json" + # Also generates the PhpStorm collection - name: Build run: npm run build diff --git a/.github/workflows/phpstorm.yml b/.github/workflows/phpstorm.yml new file mode 100644 index 0000000..1e01afe --- /dev/null +++ b/.github/workflows/phpstorm.yml @@ -0,0 +1,61 @@ +name: PhpStorm branch + +# On every push to main, the PhpStorm HTTP Client collection is generated from the spec and committed to the +# phpstorm branch, when it changed. The commit message names the spec version and the main commit, for instance +# "Generated from 6.2.0 (main 9bd9ea4)". The first run creates the branch. +# The fixed collection of each release is the release file joomla-ws-api--phpstorm.zip. + +on: + push: + branches: [main] + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: phpstorm-branch + cancel-in-progress: false + +jobs: + phpstorm: + name: Update the phpstorm branch + # Not in forks: there the phpstorm branch can be the head of a pull request. + if: github.repository == 'joomla-projects/API-Endpoints' + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v7 + + - uses: actions/setup-node@v7 + with: + node-version: 22 + + # The generator only uses Node.js itself: no npm ci needed + - name: Generate the collection + run: node scripts/generate-phpstorm.mjs + + - name: Commit to the phpstorm branch + run: | + version=$(node -p "require('./src/joomla-ws-api.json').info.version") + branch="$RUNNER_TEMP/phpstorm" + if git ls-remote --exit-code --heads origin phpstorm > /dev/null; then + git fetch --quiet --depth 1 origin phpstorm + git worktree add --quiet --detach "$branch" FETCH_HEAD + else + echo "::notice::The phpstorm branch does not exist yet: creating it" + git worktree add --quiet --orphan -b phpstorm-generated "$branch" + fi + cd "$branch" + git rm -r --quiet --ignore-unmatch . + cp -a "$GITHUB_WORKSPACE/dist/phpstorm/." . + git add -A + if git diff --cached --quiet; then + echo "The collection did not change." + exit 0 + fi + git -c user.name="github-actions[bot]" -c user.email="41898233+github-actions[bot]@users.noreply.github.com" \ + commit --quiet -m "Generated from $version (main ${GITHUB_SHA::7})" + git push --quiet origin HEAD:refs/heads/phpstorm + git log -1 --stat --format='%s' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9b65470..c785dc2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,7 @@ name: Release # Push a tag that equals info.version of src/joomla-ws-api.json, for instance 6.2.1: # git tag -a 6.2.1 -m "Joomla Web Services API 6.2.1" && git push origin 6.2.1 -# The release gets the files joomla-ws-api-.json, .yaml, .html and .sha256. +# The release gets the files joomla-ws-api-.json, .yaml, .html, -phpstorm.zip and .sha256. # The highest version becomes the "latest" release: # https://api.github.com/repos/joomla-projects/API-Endpoints/releases/latest @@ -57,7 +57,7 @@ jobs: | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -n 1) latest=false [ "$highest" = "$GITHUB_REF_NAME" ] && latest=true - gh release create "$GITHUB_REF_NAME" dist/* \ + gh release create "$GITHUB_REF_NAME" dist/joomla-ws-api-* \ --verify-tag \ --title "Joomla Web Services API $GITHUB_REF_NAME" \ --notes-file notes.md \ diff --git a/README.md b/README.md index 8ad867a..dbbfa2f 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,8 @@ The specification is one file: [`src/joomla-ws-api.json`](src/joomla-ws-api.json | Not yet released (`main`) | https://raw.githubusercontent.com/joomla-projects/API-Endpoints/main/src/joomla-ws-api.json | Each release has these files, with its version in the name: `joomla-ws-api-.json`, the same spec in -YAML (`.yaml`), readable documentation (`.html`, Redoc) and checksums (`.sha256`). +YAML (`.yaml`), readable documentation (`.html`, Redoc), the [PhpStorm collection](#phpstorm-collection) +(`-phpstorm.zip`, since the release after 6.2.0) and checksums (`.sha256`). For AI agents and other tools: the JSON of the latest release has the version in `tag_name`, and the download URL of each file in `assets[].browser_download_url`. For instance: @@ -53,10 +54,19 @@ The [`bruno`](https://github.com/joomla-projects/API-Endpoints/tree/bruno) branc ## PhpStorm collection -The [`phpstorm`](phpstorm) folder has a collection for the HTTP Client of PhpStorm and other JetBrains IDEs: a -request for every operation of the specification, with its example request body. The `.http` files are generated -from the specification with `npm run phpstorm`, so they are always up to date with it. See -[`phpstorm/README.md`](phpstorm/README.md) for how to set it up. +A collection for the HTTP Client of PhpStorm and other JetBrains IDEs: a request for every operation of the +specification, with its example request body. It is generated from the specification, so it is always up to date +with it. + +- **A release**: each release after 6.2.0 has the collection of that version in + `joomla-ws-api--phpstorm.zip`. +- **The [`phpstorm`](https://github.com/joomla-projects/API-Endpoints/tree/phpstorm) branch**: the collection of the + newest specification in `main`, also with improvements that are not released yet. It is updated automatically on + every change of `main`. + +Its [README](scripts/phpstorm/README.md) explains how to set it up. To generate the collection yourself, run +`npm run phpstorm`: it writes the collection in `dist/phpstorm/`, from +[`scripts/generate-phpstorm.mjs`](scripts/generate-phpstorm.mjs) and the files in [`scripts/phpstorm`](scripts/phpstorm). ## Credits @@ -92,8 +102,6 @@ npm run build - **Quality and completeness**: summaries, descriptions, tags, `x-source`, path parameters, error responses, schemas and examples of each operation. The CI job summary shows how complete the spec is. - **Version**: `CHANGELOG.md` has a section for `info.version`, and the version does not go down. -- **PhpStorm collection**: the `.http` files in [`phpstorm`](phpstorm) are what `npm run phpstorm` generates from the - spec. When you change the spec, run `npm run phpstorm` and commit the result. CI also runs these checks: diff --git a/package.json b/package.json index 586cf31..80f8e26 100644 --- a/package.json +++ b/package.json @@ -15,8 +15,7 @@ "quality": "node scripts/check-quality.mjs src/joomla-ws-api.json", "routes": "node scripts/check-routes.mjs src/joomla-ws-api.json", "phpstorm": "node scripts/generate-phpstorm.mjs", - "phpstorm:check": "node scripts/generate-phpstorm.mjs --check", - "check": "npm run format:check && npm run validate:schema && npm run lint && npm run quality && npm run phpstorm:check", + "check": "npm run format:check && npm run validate:schema && npm run lint && npm run quality", "build": "node scripts/build.mjs" }, "devDependencies": { diff --git a/phpstorm/Banners Categories.http b/phpstorm/Banners Categories.http deleted file mode 100644 index 8494181..0000000 --- a/phpstorm/Banners Categories.http +++ /dev/null @@ -1,49 +0,0 @@ -# Banners Categories -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@category_id = 1 - -### List Banners Categories -# @name List Banners Categories -# Optional query parameters: page[offset], page[limit], filter[search], filter[state] -GET {{base_url}}/v1/banners/categories -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add Banners Category -# @name Add Banners Category -POST {{base_url}}/v1/banners/categories -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "Example" -} - -### Get Banners Category -# @name Get Banners Category -GET {{base_url}}/v1/banners/categories/{{category_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Banners Category -# @name Update Banners Category -PATCH {{base_url}}/v1/banners/categories/{{category_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "parent_id": 1, - "extension": "Example", - "title": "Example" -} - -### Delete Banners Category -# @name Delete Banners Category -DELETE {{base_url}}/v1/banners/categories/{{category_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Banners Clients.http b/phpstorm/Banners Clients.http deleted file mode 100644 index e4f4d69..0000000 --- a/phpstorm/Banners Clients.http +++ /dev/null @@ -1,51 +0,0 @@ -# Banners Clients -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@client_id = 1 - -### List Banners Clients -# @name List Banners Clients -# Optional query parameters: page[offset], page[limit] -GET {{base_url}}/v1/banners/clients -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add Banners Client -# @name Add Banners Client -POST {{base_url}}/v1/banners/clients -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "name": "Example client", - "contact": "Contact person", - "extrainfo": "" -} - -### Get Banners Client -# @name Get Banners Client -GET {{base_url}}/v1/banners/clients/{{client_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Banners Client -# @name Update Banners Client -PATCH {{base_url}}/v1/banners/clients/{{client_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "name": "Example", - "contact": "Example", - "email": "example@example.invalid" -} - -### Delete Banners Client -# @name Delete Banners Client -DELETE {{base_url}}/v1/banners/clients/{{client_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Banners Content History.http b/phpstorm/Banners Content History.http deleted file mode 100644 index 7c92334..0000000 --- a/phpstorm/Banners Content History.http +++ /dev/null @@ -1,28 +0,0 @@ -# Banners Content History -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@banner_id = 1 -@version_id = 1 - -### List Banner Versions -# @name List Banner Versions -# Optional query parameters: page[offset], page[limit] -GET {{base_url}}/v1/banners/{{banner_id}}/contenthistory -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Delete Banner Version -# @name Delete Banner Version -# {{version_id}}: ID of the version (content history record), not of the Banner. -DELETE {{base_url}}/v1/banners/{{version_id}}/contenthistory -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Keep Banner Version -# @name Keep Banner Version -# {{version_id}}: ID of the version (content history record), not of the Banner. -PATCH {{base_url}}/v1/banners/{{version_id}}/contenthistory/keep -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Banners.http b/phpstorm/Banners.http deleted file mode 100644 index 0278621..0000000 --- a/phpstorm/Banners.http +++ /dev/null @@ -1,50 +0,0 @@ -# Banners -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@banner_id = 1 - -### List Banners -# @name List Banners -# Optional query parameters: page[offset], page[limit], filter[state] -GET {{base_url}}/v1/banners -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add Banner -# @name Add Banner -POST {{base_url}}/v1/banners -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "name": "Example", - "catid": 1 -} - -### Get Banner -# @name Get Banner -GET {{base_url}}/v1/banners/{{banner_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Banner -# @name Update Banner -PATCH {{base_url}}/v1/banners/{{banner_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "name": "Example", - "alias": "Example", - "catid": 1 -} - -### Delete Banner -# @name Delete Banner -DELETE {{base_url}}/v1/banners/{{banner_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Config Application.http b/phpstorm/Config Application.http deleted file mode 100644 index 0c87b6e..0000000 --- a/phpstorm/Config Application.http +++ /dev/null @@ -1,24 +0,0 @@ -# Config Application -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -### Get Global Configuration -# @name Get Global Configuration -# Optional query parameters: page[offset], page[limit] -GET {{base_url}}/v1/config/application -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Global Configuration -# @name Update Global Configuration -PATCH {{base_url}}/v1/config/application -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "caching": 0, - "cache_handler": "Example", - "cache_platformprefix": false -} diff --git a/phpstorm/Config Component.http b/phpstorm/Config Component.http deleted file mode 100644 index 950a316..0000000 --- a/phpstorm/Config Component.http +++ /dev/null @@ -1,24 +0,0 @@ -# Config Component -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@component_name = com_content - -### Get Component Configuration -# @name Get Component Configuration -# Optional query parameters: page[offset], page[limit] -GET {{base_url}}/v1/config/{{component_name}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Component Configuration -# @name Update Component Configuration -PATCH {{base_url}}/v1/config/{{component_name}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "show_title": 1 -} diff --git a/phpstorm/Contacts Categories Fields Groups.http b/phpstorm/Contacts Categories Fields Groups.http deleted file mode 100644 index 7ce6cd4..0000000 --- a/phpstorm/Contacts Categories Fields Groups.http +++ /dev/null @@ -1,51 +0,0 @@ -# Contacts Categories Fields Groups -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@group_id = 1 - -### List Contacts Categories Field Groups -# @name List Contacts Categories Field Groups -# Optional query parameters: page[offset], page[limit] -GET {{base_url}}/v1/fields/groups/contacts/categories -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add Contacts Categories Field Group -# @name Add Contacts Categories Field Group -POST {{base_url}}/v1/fields/groups/contacts/categories -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "Example group", - "context": "com_contact.categories", - "description": "" -} - -### Get Contacts Categories Field Group -# @name Get Contacts Categories Field Group -GET {{base_url}}/v1/fields/groups/contacts/categories/{{group_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Contacts Categories Field Group -# @name Update Contacts Categories Field Group -PATCH {{base_url}}/v1/fields/groups/contacts/categories/{{group_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "Example", - "state": 1, - "created": "Example" -} - -### Delete Contacts Categories Field Group -# @name Delete Contacts Categories Field Group -DELETE {{base_url}}/v1/fields/groups/contacts/categories/{{group_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Contacts Categories Fields.http b/phpstorm/Contacts Categories Fields.http deleted file mode 100644 index 17e2a8f..0000000 --- a/phpstorm/Contacts Categories Fields.http +++ /dev/null @@ -1,55 +0,0 @@ -# Contacts Categories Fields -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@field_id = 1 - -### List Contacts Categories Fields -# @name List Contacts Categories Fields -# Optional query parameters: page[offset], page[limit] -GET {{base_url}}/v1/fields/contacts/categories -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add Contacts Categories Field -# @name Add Contacts Categories Field -POST {{base_url}}/v1/fields/contacts/categories -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "Example field com_contact.categories", - "type": "text", - "context": "com_contact.categories", - "description": "", - "params": { - "display": "2" - } -} - -### Get Contacts Categories Field -# @name Get Contacts Categories Field -GET {{base_url}}/v1/fields/contacts/categories/{{field_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Contacts Categories Field -# @name Update Contacts Categories Field -PATCH {{base_url}}/v1/fields/contacts/categories/{{field_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "context": "Example", - "group_id": 1, - "assigned_cat_ids": [] -} - -### Delete Contacts Categories Field -# @name Delete Contacts Categories Field -DELETE {{base_url}}/v1/fields/contacts/categories/{{field_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Contacts Categories.http b/phpstorm/Contacts Categories.http deleted file mode 100644 index 007fab6..0000000 --- a/phpstorm/Contacts Categories.http +++ /dev/null @@ -1,49 +0,0 @@ -# Contacts Categories -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@category_id = 1 - -### List Contacts Categories -# @name List Contacts Categories -# Optional query parameters: page[offset], page[limit], filter[search], filter[state] -GET {{base_url}}/v1/contacts/categories -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add Contacts Category -# @name Add Contacts Category -POST {{base_url}}/v1/contacts/categories -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "Example" -} - -### Get Contacts Category -# @name Get Contacts Category -GET {{base_url}}/v1/contacts/categories/{{category_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Contacts Category -# @name Update Contacts Category -PATCH {{base_url}}/v1/contacts/categories/{{category_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "parent_id": 1, - "extension": "Example", - "title": "Example" -} - -### Delete Contacts Category -# @name Delete Contacts Category -DELETE {{base_url}}/v1/contacts/categories/{{category_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Contacts Content History.http b/phpstorm/Contacts Content History.http deleted file mode 100644 index ee14188..0000000 --- a/phpstorm/Contacts Content History.http +++ /dev/null @@ -1,28 +0,0 @@ -# Contacts Content History -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@contact_id = 1 -@version_id = 1 - -### List Contact Versions -# @name List Contact Versions -# Optional query parameters: page[offset], page[limit] -GET {{base_url}}/v1/contacts/{{contact_id}}/contenthistory -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Delete Contact Version -# @name Delete Contact Version -# {{version_id}}: ID of the version (content history record), not of the Contact. -DELETE {{base_url}}/v1/contacts/{{version_id}}/contenthistory -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Keep Contact Version -# @name Keep Contact Version -# {{version_id}}: ID of the version (content history record), not of the Contact. -PATCH {{base_url}}/v1/contacts/{{version_id}}/contenthistory/keep -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Contacts Fields Groups.http b/phpstorm/Contacts Fields Groups.http deleted file mode 100644 index 153aa14..0000000 --- a/phpstorm/Contacts Fields Groups.http +++ /dev/null @@ -1,51 +0,0 @@ -# Contacts Fields Groups -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@group_id = 1 - -### List Contacts Field Groups -# @name List Contacts Field Groups -# Optional query parameters: page[offset], page[limit] -GET {{base_url}}/v1/fields/groups/contacts/contact -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add Contacts Field Group -# @name Add Contacts Field Group -POST {{base_url}}/v1/fields/groups/contacts/contact -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "Example group", - "context": "com_contact.contact", - "description": "" -} - -### Get Contacts Field Group -# @name Get Contacts Field Group -GET {{base_url}}/v1/fields/groups/contacts/contact/{{group_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Contacts Field Group -# @name Update Contacts Field Group -PATCH {{base_url}}/v1/fields/groups/contacts/contact/{{group_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "Example", - "state": 1, - "created": "Example" -} - -### Delete Contacts Field Group -# @name Delete Contacts Field Group -DELETE {{base_url}}/v1/fields/groups/contacts/contact/{{group_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Contacts Fields.http b/phpstorm/Contacts Fields.http deleted file mode 100644 index a0459f6..0000000 --- a/phpstorm/Contacts Fields.http +++ /dev/null @@ -1,55 +0,0 @@ -# Contacts Fields -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@field_id = 1 - -### List Contacts Fields -# @name List Contacts Fields -# Optional query parameters: page[offset], page[limit] -GET {{base_url}}/v1/fields/contacts/contact -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add Contacts Field -# @name Add Contacts Field -POST {{base_url}}/v1/fields/contacts/contact -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "Example field com_contact.contact", - "type": "text", - "context": "com_contact.contact", - "description": "", - "params": { - "display": "2" - } -} - -### Get Contacts Field -# @name Get Contacts Field -GET {{base_url}}/v1/fields/contacts/contact/{{field_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Contacts Field -# @name Update Contacts Field -PATCH {{base_url}}/v1/fields/contacts/contact/{{field_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "context": "Example", - "group_id": 1, - "assigned_cat_ids": [] -} - -### Delete Contacts Field -# @name Delete Contacts Field -DELETE {{base_url}}/v1/fields/contacts/contact/{{field_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Contacts Form.http b/phpstorm/Contacts Form.http deleted file mode 100644 index ca5ff9a..0000000 --- a/phpstorm/Contacts Form.http +++ /dev/null @@ -1,20 +0,0 @@ -# Contacts Form -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@contact_id = 1 - -### Send Contact Form Message -# @name Send Contact Form Message -POST {{base_url}}/v1/contacts/form/{{contact_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "contact_name": "Example", - "contact_email": "example@example.invalid", - "contact_subject": "Example", - "contact_message": "Example" -} diff --git a/phpstorm/Contacts Mail Fields Groups.http b/phpstorm/Contacts Mail Fields Groups.http deleted file mode 100644 index 6dfdc62..0000000 --- a/phpstorm/Contacts Mail Fields Groups.http +++ /dev/null @@ -1,51 +0,0 @@ -# Contacts Mail Fields Groups -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@group_id = 1 - -### List Contacts Mail Field Groups -# @name List Contacts Mail Field Groups -# Optional query parameters: page[offset], page[limit] -GET {{base_url}}/v1/fields/groups/contacts/mail -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add Contacts Mail Field Group -# @name Add Contacts Mail Field Group -POST {{base_url}}/v1/fields/groups/contacts/mail -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "Example group", - "context": "com_contact.mail", - "description": "" -} - -### Get Contacts Mail Field Group -# @name Get Contacts Mail Field Group -GET {{base_url}}/v1/fields/groups/contacts/mail/{{group_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Contacts Mail Field Group -# @name Update Contacts Mail Field Group -PATCH {{base_url}}/v1/fields/groups/contacts/mail/{{group_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "Example", - "state": 1, - "created": "Example" -} - -### Delete Contacts Mail Field Group -# @name Delete Contacts Mail Field Group -DELETE {{base_url}}/v1/fields/groups/contacts/mail/{{group_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Contacts Mail Fields.http b/phpstorm/Contacts Mail Fields.http deleted file mode 100644 index 320d30c..0000000 --- a/phpstorm/Contacts Mail Fields.http +++ /dev/null @@ -1,55 +0,0 @@ -# Contacts Mail Fields -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@field_id = 1 - -### List Contacts Mail Fields -# @name List Contacts Mail Fields -# Optional query parameters: page[offset], page[limit] -GET {{base_url}}/v1/fields/contacts/mail -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add Contacts Mail Field -# @name Add Contacts Mail Field -POST {{base_url}}/v1/fields/contacts/mail -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "Example field com_contact.mail", - "type": "text", - "context": "com_contact.mail", - "description": "", - "params": { - "display": "2" - } -} - -### Get Contacts Mail Field -# @name Get Contacts Mail Field -GET {{base_url}}/v1/fields/contacts/mail/{{field_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Contacts Mail Field -# @name Update Contacts Mail Field -PATCH {{base_url}}/v1/fields/contacts/mail/{{field_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "context": "Example", - "group_id": 1, - "assigned_cat_ids": [] -} - -### Delete Contacts Mail Field -# @name Delete Contacts Mail Field -DELETE {{base_url}}/v1/fields/contacts/mail/{{field_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Contacts.http b/phpstorm/Contacts.http deleted file mode 100644 index f872423..0000000 --- a/phpstorm/Contacts.http +++ /dev/null @@ -1,51 +0,0 @@ -# Contacts -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@contact_id = 1 - -### List Contacts -# @name List Contacts -# Optional query parameters: page[offset], page[limit] -GET {{base_url}}/v1/contacts -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add Contact -# @name Add Contact -POST {{base_url}}/v1/contacts -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "name": "Example contact", - "catid": 4, - "language": "*" -} - -### Get Contact -# @name Get Contact -GET {{base_url}}/v1/contacts/{{contact_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Contact -# @name Update Contact -PATCH {{base_url}}/v1/contacts/{{contact_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "name": "Example", - "alias": "Example", - "version_note": "Example" -} - -### Delete Contact -# @name Delete Contact -DELETE {{base_url}}/v1/contacts/{{contact_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Content Articles Content History.http b/phpstorm/Content Articles Content History.http deleted file mode 100644 index 90e6b53..0000000 --- a/phpstorm/Content Articles Content History.http +++ /dev/null @@ -1,28 +0,0 @@ -# Content Articles Content History -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@article_id = 1 -@version_id = 1 - -### List Article Versions -# @name List Article Versions -# Optional query parameters: page[offset], page[limit] -GET {{base_url}}/v1/content/articles/{{article_id}}/contenthistory -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Delete Article Version -# @name Delete Article Version -# {{version_id}}: ID of the version (content history record), not of the Article. -DELETE {{base_url}}/v1/content/articles/{{version_id}}/contenthistory -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Keep Article Version -# @name Keep Article Version -# {{version_id}}: ID of the version (content history record), not of the Article. -PATCH {{base_url}}/v1/content/articles/{{version_id}}/contenthistory/keep -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Content Articles Fields Groups.http b/phpstorm/Content Articles Fields Groups.http deleted file mode 100644 index b32bfe0..0000000 --- a/phpstorm/Content Articles Fields Groups.http +++ /dev/null @@ -1,51 +0,0 @@ -# Content Articles Fields Groups -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@group_id = 1 - -### List Content Articles Field Groups -# @name List Content Articles Field Groups -# Optional query parameters: page[offset], page[limit] -GET {{base_url}}/v1/fields/groups/content/articles -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add Content Articles Field Group -# @name Add Content Articles Field Group -POST {{base_url}}/v1/fields/groups/content/articles -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "Example group", - "context": "com_content.article", - "description": "" -} - -### Get Content Articles Field Group -# @name Get Content Articles Field Group -GET {{base_url}}/v1/fields/groups/content/articles/{{group_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Content Articles Field Group -# @name Update Content Articles Field Group -PATCH {{base_url}}/v1/fields/groups/content/articles/{{group_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "Example", - "state": 1, - "created": "Example" -} - -### Delete Content Articles Field Group -# @name Delete Content Articles Field Group -DELETE {{base_url}}/v1/fields/groups/content/articles/{{group_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Content Articles Fields.http b/phpstorm/Content Articles Fields.http deleted file mode 100644 index d276708..0000000 --- a/phpstorm/Content Articles Fields.http +++ /dev/null @@ -1,55 +0,0 @@ -# Content Articles Fields -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@field_id = 1 - -### List Content Articles Fields -# @name List Content Articles Fields -# Optional query parameters: page[offset], page[limit] -GET {{base_url}}/v1/fields/content/articles -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add Content Articles Field -# @name Add Content Articles Field -POST {{base_url}}/v1/fields/content/articles -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "Example field com_content.article", - "type": "text", - "context": "com_content.article", - "description": "", - "params": { - "display": "2" - } -} - -### Get Content Articles Field -# @name Get Content Articles Field -GET {{base_url}}/v1/fields/content/articles/{{field_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Content Articles Field -# @name Update Content Articles Field -PATCH {{base_url}}/v1/fields/content/articles/{{field_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "context": "Example", - "group_id": 1, - "assigned_cat_ids": [] -} - -### Delete Content Articles Field -# @name Delete Content Articles Field -DELETE {{base_url}}/v1/fields/content/articles/{{field_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Content Articles.http b/phpstorm/Content Articles.http deleted file mode 100644 index e745a5d..0000000 --- a/phpstorm/Content Articles.http +++ /dev/null @@ -1,52 +0,0 @@ -# Content Articles -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@article_id = 1 - -### List Articles -# @name List Articles -# Optional query parameters: page[offset], page[limit], filter[author], filter[category], filter[search], filter[state], filter[featured], filter[tag], filter[language], filter[modified_start], filter[modified_end], filter[checked_out], filter[stage], list[ordering], list[direction] -GET {{base_url}}/v1/content/articles -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add Article -# @name Add Article -POST {{base_url}}/v1/content/articles -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "API Example", - "catid": 2, - "state": 0, - "introtext": "

Example

", - "fulltext": "", - "language": "*" -} - -### Get Article -# @name Get Article -GET {{base_url}}/v1/content/articles/{{article_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Article -# @name Update Article -PATCH {{base_url}}/v1/content/articles/{{article_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "Updated title" -} - -### Delete Article -# @name Delete Article -DELETE {{base_url}}/v1/content/articles/{{article_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Content Categories Fields Groups.http b/phpstorm/Content Categories Fields Groups.http deleted file mode 100644 index 6c67981..0000000 --- a/phpstorm/Content Categories Fields Groups.http +++ /dev/null @@ -1,51 +0,0 @@ -# Content Categories Fields Groups -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@group_id = 1 - -### List Content Categories Field Groups -# @name List Content Categories Field Groups -# Optional query parameters: page[offset], page[limit] -GET {{base_url}}/v1/fields/groups/content/categories -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add Content Categories Field Group -# @name Add Content Categories Field Group -POST {{base_url}}/v1/fields/groups/content/categories -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "Example group", - "context": "com_content.categories", - "description": "" -} - -### Get Content Categories Field Group -# @name Get Content Categories Field Group -GET {{base_url}}/v1/fields/groups/content/categories/{{group_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Content Categories Field Group -# @name Update Content Categories Field Group -PATCH {{base_url}}/v1/fields/groups/content/categories/{{group_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "Example", - "state": 1, - "created": "Example" -} - -### Delete Content Categories Field Group -# @name Delete Content Categories Field Group -DELETE {{base_url}}/v1/fields/groups/content/categories/{{group_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Content Categories Fields.http b/phpstorm/Content Categories Fields.http deleted file mode 100644 index d55c52d..0000000 --- a/phpstorm/Content Categories Fields.http +++ /dev/null @@ -1,55 +0,0 @@ -# Content Categories Fields -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@field_id = 1 - -### List Content Categories Fields -# @name List Content Categories Fields -# Optional query parameters: page[offset], page[limit] -GET {{base_url}}/v1/fields/content/categories -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add Content Categories Field -# @name Add Content Categories Field -POST {{base_url}}/v1/fields/content/categories -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "Example field com_content.categories", - "type": "text", - "context": "com_content.categories", - "description": "", - "params": { - "display": "2" - } -} - -### Get Content Categories Field -# @name Get Content Categories Field -GET {{base_url}}/v1/fields/content/categories/{{field_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Content Categories Field -# @name Update Content Categories Field -PATCH {{base_url}}/v1/fields/content/categories/{{field_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "context": "Example", - "group_id": 1, - "assigned_cat_ids": [] -} - -### Delete Content Categories Field -# @name Delete Content Categories Field -DELETE {{base_url}}/v1/fields/content/categories/{{field_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Content Categories.http b/phpstorm/Content Categories.http deleted file mode 100644 index f174a5c..0000000 --- a/phpstorm/Content Categories.http +++ /dev/null @@ -1,49 +0,0 @@ -# Content Categories -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@category_id = 1 - -### List Content Categories -# @name List Content Categories -# Optional query parameters: page[offset], page[limit], filter[search], filter[state] -GET {{base_url}}/v1/content/categories -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add Content Category -# @name Add Content Category -POST {{base_url}}/v1/content/categories -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "Example" -} - -### Get Content Category -# @name Get Content Category -GET {{base_url}}/v1/content/categories/{{category_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Content Category -# @name Update Content Category -PATCH {{base_url}}/v1/content/categories/{{category_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "parent_id": 1, - "extension": "Example", - "title": "Example" -} - -### Delete Content Category -# @name Delete Content Category -DELETE {{base_url}}/v1/content/categories/{{category_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Installer.http b/phpstorm/Installer.http deleted file mode 100644 index 5519093..0000000 --- a/phpstorm/Installer.http +++ /dev/null @@ -1,11 +0,0 @@ -# Installer -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -### List Extensions -# @name List Extensions -# Optional query parameters: page[offset], page[limit], core, status, type -GET {{base_url}}/v1/extensions -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Joomla Update.http b/phpstorm/Joomla Update.http deleted file mode 100644 index b65f403..0000000 --- a/phpstorm/Joomla Update.http +++ /dev/null @@ -1,63 +0,0 @@ -# Joomla Update -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -### Get Update Health Check -# @name Get Update Health Check -GET {{base_url}}/v1/joomlaupdate/healthcheck -X-JUpdate-Token: {{update_token}} -Accept: application/vnd.api+json - -### Get Available Update -# @name Get Available Update -GET {{base_url}}/v1/joomlaupdate/getUpdate -X-JUpdate-Token: {{update_token}} -Accept: application/vnd.api+json - -### Prepare Update -# @name Prepare Update -POST {{base_url}}/v1/joomlaupdate/prepareUpdate -X-JUpdate-Token: {{update_token}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "targetVersion": "6.1.4" -} - -### Finalize Update -# @name Finalize Update -POST {{base_url}}/v1/joomlaupdate/finalizeUpdate -X-JUpdate-Token: {{update_token}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "fromVersion": "6.1.3", - "updateFileName": "update.zip" -} - -### Report Update Success -# @name Report Update Success -POST {{base_url}}/v1/joomlaupdate/notificationSuccess -X-JUpdate-Token: {{update_token}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "fromVersion": "6.1.3", - "toVersion": "6.1.4" -} - -### Report Update Failure -# @name Report Update Failure -POST {{base_url}}/v1/joomlaupdate/notificationFailed -X-JUpdate-Token: {{update_token}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "fromVersion": "6.1.3", - "toVersion": "6.1.4" -} diff --git a/phpstorm/Languages Content.http b/phpstorm/Languages Content.http deleted file mode 100644 index 3dad569..0000000 --- a/phpstorm/Languages Content.http +++ /dev/null @@ -1,52 +0,0 @@ -# Languages Content -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@language_id = 1 - -### List Content Languages -# @name List Content Languages -# Optional query parameters: page[offset], page[limit] -GET {{base_url}}/v1/languages/content -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add Content Language -# @name Add Content Language -POST {{base_url}}/v1/languages/content -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "lang_code": "Example", - "title": "Example", - "title_native": "Example", - "sef": "Example" -} - -### Get Content Language -# @name Get Content Language -GET {{base_url}}/v1/languages/content/{{language_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Content Language -# @name Update Content Language -PATCH {{base_url}}/v1/languages/content/{{language_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "lang_code": "Example", - "title": "Example", - "title_native": "Example" -} - -### Delete Content Language -# @name Delete Content Language -DELETE {{base_url}}/v1/languages/content/{{language_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Languages Overrides Search.http b/phpstorm/Languages Overrides Search.http deleted file mode 100644 index 626c772..0000000 --- a/phpstorm/Languages Overrides Search.http +++ /dev/null @@ -1,22 +0,0 @@ -# Languages Overrides Search -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -### Search Language Strings -# @name Search Language Strings -POST {{base_url}}/v1/languages/overrides/search -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "searchstring": "Example", - "searchtype": "constant" -} - -### Refresh Language Strings Cache -# @name Refresh Language Strings Cache -POST {{base_url}}/v1/languages/overrides/search/cache/refresh -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Languages Overrides.http b/phpstorm/Languages Overrides.http deleted file mode 100644 index 5b81e6b..0000000 --- a/phpstorm/Languages Overrides.http +++ /dev/null @@ -1,91 +0,0 @@ -# Languages Overrides -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@lang_code = en-GB -@override_key = COM_EXAMPLE_KEY - -### List Site Language Overrides -# @name List Site Language Overrides -GET {{base_url}}/v1/languages/overrides/site/{{lang_code}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add Site Language Override -# @name Add Site Language Override -POST {{base_url}}/v1/languages/overrides/site/{{lang_code}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "key": "Example" -} - -### Get Site Language Override -# @name Get Site Language Override -GET {{base_url}}/v1/languages/overrides/site/{{lang_code}}/{{override_key}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Site Language Override -# @name Update Site Language Override -PATCH {{base_url}}/v1/languages/overrides/site/{{lang_code}}/{{override_key}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "key": "Example", - "override": "Example", - "both": false -} - -### Delete Site Language Override -# @name Delete Site Language Override -DELETE {{base_url}}/v1/languages/overrides/site/{{lang_code}}/{{override_key}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### List Administrator Language Overrides -# @name List Administrator Language Overrides -GET {{base_url}}/v1/languages/overrides/administrator/{{lang_code}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add Administrator Language Override -# @name Add Administrator Language Override -POST {{base_url}}/v1/languages/overrides/administrator/{{lang_code}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "key": "Example" -} - -### Get Administrator Language Override -# @name Get Administrator Language Override -GET {{base_url}}/v1/languages/overrides/administrator/{{lang_code}}/{{override_key}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Administrator Language Override -# @name Update Administrator Language Override -PATCH {{base_url}}/v1/languages/overrides/administrator/{{lang_code}}/{{override_key}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "key": "Example", - "override": "Example", - "both": false -} - -### Delete Administrator Language Override -# @name Delete Administrator Language Override -DELETE {{base_url}}/v1/languages/overrides/administrator/{{lang_code}}/{{override_key}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Languages.http b/phpstorm/Languages.http deleted file mode 100644 index ba9f48e..0000000 --- a/phpstorm/Languages.http +++ /dev/null @@ -1,17 +0,0 @@ -# Languages -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -### List Available Languages -# @name List Available Languages -# Optional query parameters: page[offset], page[limit] -GET {{base_url}}/v1/languages -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Install Language (not implemented) -# @name Install Language (not implemented) -POST {{base_url}}/v1/languages -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Media Adapters.http b/phpstorm/Media Adapters.http deleted file mode 100644 index 61710f3..0000000 --- a/phpstorm/Media Adapters.http +++ /dev/null @@ -1,18 +0,0 @@ -# Media Adapters -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@adapter_id = local-images - -### List Media Adapters -# @name List Media Adapters -GET {{base_url}}/v1/media/adapters -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Get Media Adapter -# @name Get Media Adapter -GET {{base_url}}/v1/media/adapters/{{adapter_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Media Files.http b/phpstorm/Media Files.http deleted file mode 100644 index ffcd7f9..0000000 --- a/phpstorm/Media Files.http +++ /dev/null @@ -1,55 +0,0 @@ -# Media Files -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@path = local-images:/joomla_black.png - -### List Media Files -# @name List Media Files -# Optional query parameters: path, filter[search], url, temp, content, search_recursive -GET {{base_url}}/v1/media/files -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add Media File -# @name Add Media File -POST {{base_url}}/v1/media/files -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "path": "local-images:/example.txt", - "content": "RXhhbXBsZQ==", - "override": false -} - -### Get Media File or List Media Folder -# @name Get Media File or List Media Folder -# {{path}}: Adapter ID, a colon and the path from the root of the adapter, for example `local-images:/banners/osmbanner1.png`. -# Optional query parameters: url, temp, content, filter[search], search_recursive -GET {{base_url}}/v1/media/files/{{path}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Media File -# @name Update Media File -# {{path}}: Adapter ID, a colon and the path from the root of the adapter, for example `local-images:/banners/osmbanner1.png`. -PATCH {{base_url}}/v1/media/files/{{path}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "path": "local-images:/example.txt", - "content": "RXhhbXBsZQ==", - "override": false -} - -### Delete Media File -# @name Delete Media File -# {{path}}: Adapter ID, a colon and the path from the root of the adapter, for example `local-images:/banners/osmbanner1.png`. -DELETE {{base_url}}/v1/media/files/{{path}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Menus Items.http b/phpstorm/Menus Items.http deleted file mode 100644 index fd1a6b7..0000000 --- a/phpstorm/Menus Items.http +++ /dev/null @@ -1,112 +0,0 @@ -# Menus Items -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@menu_item_id = 1 - -### List Site Menu Items -# @name List Site Menu Items -# Optional query parameters: page[offset], page[limit], filter[menutype] -GET {{base_url}}/v1/menus/site/items -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add Site Menu Item -# @name Add Site Menu Item -POST {{base_url}}/v1/menus/site/items -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "Example item", - "alias": "example-item", - "menutype": "mainmenu", - "type": "url", - "link": "https://example.org" -} - -### Get Site Menu Item -# @name Get Site Menu Item -GET {{base_url}}/v1/menus/site/items/{{menu_item_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Site Menu Item -# @name Update Site Menu Item -PATCH {{base_url}}/v1/menus/site/items/{{menu_item_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "Example", - "alias": "Example", - "note": "Example" -} - -### Delete Site Menu Item -# @name Delete Site Menu Item -DELETE {{base_url}}/v1/menus/site/items/{{menu_item_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### List Administrator Menu Items -# @name List Administrator Menu Items -# Optional query parameters: page[offset], page[limit], filter[menutype] -GET {{base_url}}/v1/menus/administrator/items -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add Administrator Menu Item -# @name Add Administrator Menu Item -POST {{base_url}}/v1/menus/administrator/items -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "Example", - "menutype": "Example", - "type": "Example" -} - -### Get Administrator Menu Item -# @name Get Administrator Menu Item -GET {{base_url}}/v1/menus/administrator/items/{{menu_item_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Administrator Menu Item -# @name Update Administrator Menu Item -PATCH {{base_url}}/v1/menus/administrator/items/{{menu_item_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "Example", - "alias": "Example", - "note": "Example" -} - -### Delete Administrator Menu Item -# @name Delete Administrator Menu Item -DELETE {{base_url}}/v1/menus/administrator/items/{{menu_item_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### List Site Menu Item Types -# @name List Site Menu Item Types -# Optional query parameters: page[offset], page[limit] -GET {{base_url}}/v1/menus/site/items/types -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### List Administrator Menu Item Types -# @name List Administrator Menu Item Types -# Optional query parameters: page[offset], page[limit] -GET {{base_url}}/v1/menus/administrator/items/types -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Menus.http b/phpstorm/Menus.http deleted file mode 100644 index c0f03a6..0000000 --- a/phpstorm/Menus.http +++ /dev/null @@ -1,96 +0,0 @@ -# Menus -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@menu_id = 1 - -### List Site Menus -# @name List Site Menus -# Optional query parameters: page[offset], page[limit] -GET {{base_url}}/v1/menus/site -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add Site Menu -# @name Add Site Menu -POST {{base_url}}/v1/menus/site -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "menutype": "Example", - "title": "Example" -} - -### Get Site Menu -# @name Get Site Menu -GET {{base_url}}/v1/menus/site/{{menu_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Site Menu -# @name Update Site Menu -PATCH {{base_url}}/v1/menus/site/{{menu_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "menutype": "Example", - "title": "Example", - "description": "Example" -} - -### Delete Site Menu -# @name Delete Site Menu -DELETE {{base_url}}/v1/menus/site/{{menu_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### List Administrator Menus -# @name List Administrator Menus -# Optional query parameters: page[offset], page[limit] -GET {{base_url}}/v1/menus/administrator -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add Administrator Menu -# @name Add Administrator Menu -POST {{base_url}}/v1/menus/administrator -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "Example admin menu", - "menutype": "example-admin", - "description": "", - "client_id": 1 -} - -### Get Administrator Menu -# @name Get Administrator Menu -GET {{base_url}}/v1/menus/administrator/{{menu_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Administrator Menu -# @name Update Administrator Menu -PATCH {{base_url}}/v1/menus/administrator/{{menu_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "menutype": "Example", - "title": "Example", - "description": "Example" -} - -### Delete Administrator Menu -# @name Delete Administrator Menu -DELETE {{base_url}}/v1/menus/administrator/{{menu_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Messages.http b/phpstorm/Messages.http deleted file mode 100644 index 08d477e..0000000 --- a/phpstorm/Messages.http +++ /dev/null @@ -1,51 +0,0 @@ -# Messages -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@message_id = 1 - -### List Messages -# @name List Messages -# Optional query parameters: page[offset], page[limit] -GET {{base_url}}/v1/messages -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add Message -# @name Add Message -POST {{base_url}}/v1/messages -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "user_id_to": 1, - "subject": "Example", - "message": "Example" -} - -### Get Message -# @name Get Message -GET {{base_url}}/v1/messages/{{message_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Message -# @name Update Message -PATCH {{base_url}}/v1/messages/{{message_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "user_id_to": 1, - "subject": "Example", - "message": "Example" -} - -### Delete Message -# @name Delete Message -DELETE {{base_url}}/v1/messages/{{message_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Modules.http b/phpstorm/Modules.http deleted file mode 100644 index 53963d5..0000000 --- a/phpstorm/Modules.http +++ /dev/null @@ -1,115 +0,0 @@ -# Modules -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@module_id = 1 - -### List Site Module Types -# @name List Site Module Types -GET {{base_url}}/v1/modules/types/site -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### List Administrator Module Types -# @name List Administrator Module Types -GET {{base_url}}/v1/modules/types/administrator -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### List Site Modules -# @name List Site Modules -# Optional query parameters: page[offset], page[limit] -GET {{base_url}}/v1/modules/site -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add Site Module -# @name Add Site Module -POST {{base_url}}/v1/modules/site -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "Example module", - "module": "mod_custom", - "language": "*", - "params": { - "style": "0" - } -} - -### Get Site Module -# @name Get Site Module -GET {{base_url}}/v1/modules/site/{{module_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Site Module -# @name Update Site Module -PATCH {{base_url}}/v1/modules/site/{{module_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "Example", - "note": "Example", - "version_note": "Example" -} - -### Delete Site Module -# @name Delete Site Module -DELETE {{base_url}}/v1/modules/site/{{module_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### List Administrator Modules -# @name List Administrator Modules -# Optional query parameters: page[offset], page[limit] -GET {{base_url}}/v1/modules/administrator -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add Administrator Module -# @name Add Administrator Module -POST {{base_url}}/v1/modules/administrator -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "Example module", - "module": "mod_custom", - "language": "*", - "params": { - "style": "0" - }, - "client_id": 1 -} - -### Get Administrator Module -# @name Get Administrator Module -GET {{base_url}}/v1/modules/administrator/{{module_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Administrator Module -# @name Update Administrator Module -PATCH {{base_url}}/v1/modules/administrator/{{module_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "Example", - "note": "Example", - "version_note": "Example" -} - -### Delete Administrator Module -# @name Delete Administrator Module -DELETE {{base_url}}/v1/modules/administrator/{{module_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Newsfeeds Categories.http b/phpstorm/Newsfeeds Categories.http deleted file mode 100644 index 2c2c880..0000000 --- a/phpstorm/Newsfeeds Categories.http +++ /dev/null @@ -1,49 +0,0 @@ -# Newsfeeds Categories -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@category_id = 1 - -### List Newsfeeds Categories -# @name List Newsfeeds Categories -# Optional query parameters: page[offset], page[limit], filter[search], filter[state] -GET {{base_url}}/v1/newsfeeds/categories -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add Newsfeeds Category -# @name Add Newsfeeds Category -POST {{base_url}}/v1/newsfeeds/categories -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "Example" -} - -### Get Newsfeeds Category -# @name Get Newsfeeds Category -GET {{base_url}}/v1/newsfeeds/categories/{{category_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Newsfeeds Category -# @name Update Newsfeeds Category -PATCH {{base_url}}/v1/newsfeeds/categories/{{category_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "parent_id": 1, - "extension": "Example", - "title": "Example" -} - -### Delete Newsfeeds Category -# @name Delete Newsfeeds Category -DELETE {{base_url}}/v1/newsfeeds/categories/{{category_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Newsfeeds.http b/phpstorm/Newsfeeds.http deleted file mode 100644 index f1fd1bb..0000000 --- a/phpstorm/Newsfeeds.http +++ /dev/null @@ -1,62 +0,0 @@ -# Newsfeeds -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@feed_id = 1 - -### List Newsfeeds -# @name List Newsfeeds -# Optional query parameters: page[offset], page[limit] -GET {{base_url}}/v1/newsfeeds/feeds -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add Newsfeed -# @name Add Newsfeed -POST {{base_url}}/v1/newsfeeds/feeds -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "name": "Example feed", - "link": "https://example.org/feed", - "catid": 5, - "description": "", - "metadesc": "", - "images": { - "image_first": "" - }, - "metadata": { - "robots": "" - }, - "params": { - "show_feed_image": "1" - } -} - -### Get Newsfeed -# @name Get Newsfeed -GET {{base_url}}/v1/newsfeeds/feeds/{{feed_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Newsfeed -# @name Update Newsfeed -PATCH {{base_url}}/v1/newsfeeds/feeds/{{feed_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "name": "Example", - "alias": "Example", - "published": 1 -} - -### Delete Newsfeed -# @name Delete Newsfeed -DELETE {{base_url}}/v1/newsfeeds/feeds/{{feed_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Plugins.http b/phpstorm/Plugins.http deleted file mode 100644 index 3ef9981..0000000 --- a/phpstorm/Plugins.http +++ /dev/null @@ -1,30 +0,0 @@ -# Plugins -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@plugin_id = 1 - -### List Plugins -# @name List Plugins -# Optional query parameters: page[offset], page[limit], filter[element], filter[status], filter[search], filter[type] -GET {{base_url}}/v1/plugins -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Get Plugin -# @name Get Plugin -GET {{base_url}}/v1/plugins/{{plugin_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Plugin -# @name Update Plugin -PATCH {{base_url}}/v1/plugins/{{plugin_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "enabled": 1 -} diff --git a/phpstorm/Privacy Consents.http b/phpstorm/Privacy Consents.http deleted file mode 100644 index 8e65357..0000000 --- a/phpstorm/Privacy Consents.http +++ /dev/null @@ -1,19 +0,0 @@ -# Privacy Consents -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@consent_id = 1 - -### List Privacy Consents -# @name List Privacy Consents -# Optional query parameters: page[offset], page[limit] -GET {{base_url}}/v1/privacy/consents -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Get Privacy Consent -# @name Get Privacy Consent -GET {{base_url}}/v1/privacy/consents/{{consent_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Privacy Requests.http b/phpstorm/Privacy Requests.http deleted file mode 100644 index 08086d6..0000000 --- a/phpstorm/Privacy Requests.http +++ /dev/null @@ -1,36 +0,0 @@ -# Privacy Requests -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@request_id = 1 - -### List Privacy Requests -# @name List Privacy Requests -# Optional query parameters: page[offset], page[limit] -GET {{base_url}}/v1/privacy/requests -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add Privacy Request -# @name Add Privacy Request -POST {{base_url}}/v1/privacy/requests -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "email": "example@example.invalid" -} - -### Get Privacy Request -# @name Get Privacy Request -GET {{base_url}}/v1/privacy/requests/{{request_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Export Privacy Request Data -# @name Export Privacy Request Data -GET {{base_url}}/v1/privacy/requests/export/{{request_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Redirects.http b/phpstorm/Redirects.http deleted file mode 100644 index fb77932..0000000 --- a/phpstorm/Redirects.http +++ /dev/null @@ -1,50 +0,0 @@ -# Redirects -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@redirect_id = 1 - -### List Redirects -# @name List Redirects -# Optional query parameters: page[offset], page[limit] -GET {{base_url}}/v1/redirects -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add Redirect -# @name Add Redirect -POST {{base_url}}/v1/redirects -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "old_url": "Example", - "new_url": "Example" -} - -### Get Redirect -# @name Get Redirect -GET {{base_url}}/v1/redirects/{{redirect_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Redirect -# @name Update Redirect -PATCH {{base_url}}/v1/redirects/{{redirect_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "old_url": "Example", - "new_url": "Example", - "comment": "Example" -} - -### Delete Redirect -# @name Delete Redirect -DELETE {{base_url}}/v1/redirects/{{redirect_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Tags.http b/phpstorm/Tags.http deleted file mode 100644 index f9c671e..0000000 --- a/phpstorm/Tags.http +++ /dev/null @@ -1,52 +0,0 @@ -# Tags -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@tag_id = 1 - -### List Tags -# @name List Tags -# Optional query parameters: page[offset], page[limit], filter[search] -GET {{base_url}}/v1/tags -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add Tag -# @name Add Tag -POST {{base_url}}/v1/tags -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "Example tag", - "parent_id": 1, - "description": "", - "language": "*" -} - -### Get Tag -# @name Get Tag -GET {{base_url}}/v1/tags/{{tag_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Tag -# @name Update Tag -PATCH {{base_url}}/v1/tags/{{tag_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "parent_id": 1, - "title": "Example", - "note": "Example" -} - -### Delete Tag -# @name Delete Tag -DELETE {{base_url}}/v1/tags/{{tag_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Templates Styles.http b/phpstorm/Templates Styles.http deleted file mode 100644 index 6833791..0000000 --- a/phpstorm/Templates Styles.http +++ /dev/null @@ -1,100 +0,0 @@ -# Templates Styles -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@template_style_id = 1 - -### List Site Template Styles -# @name List Site Template Styles -# Optional query parameters: page[offset], page[limit] -GET {{base_url}}/v1/templates/styles/site -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add Site Template Style -# @name Add Site Template Style -POST {{base_url}}/v1/templates/styles/site -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "template": "cassiopeia", - "title": "Example style", - "params": { - "brand": "1" - } -} - -### Get Site Template Style -# @name Get Site Template Style -GET {{base_url}}/v1/templates/styles/site/{{template_style_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Site Template Style -# @name Update Site Template Style -PATCH {{base_url}}/v1/templates/styles/site/{{template_style_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "Example", - "assigned": "Example", - "home": 1 -} - -### Delete Site Template Style -# @name Delete Site Template Style -DELETE {{base_url}}/v1/templates/styles/site/{{template_style_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### List Administrator Template Styles -# @name List Administrator Template Styles -# Optional query parameters: page[offset], page[limit] -GET {{base_url}}/v1/templates/styles/administrator -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add Administrator Template Style -# @name Add Administrator Template Style -POST {{base_url}}/v1/templates/styles/administrator -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "template": "atum", - "title": "Example style", - "params": { - "hue": "hsl(214, 63%, 20%)" - } -} - -### Get Administrator Template Style -# @name Get Administrator Template Style -GET {{base_url}}/v1/templates/styles/administrator/{{template_style_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Administrator Template Style -# @name Update Administrator Template Style -PATCH {{base_url}}/v1/templates/styles/administrator/{{template_style_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "Example", - "assigned": "Example", - "home": 0 -} - -### Delete Administrator Template Style -# @name Delete Administrator Template Style -DELETE {{base_url}}/v1/templates/styles/administrator/{{template_style_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Users Fields Groups.http b/phpstorm/Users Fields Groups.http deleted file mode 100644 index 0e2babc..0000000 --- a/phpstorm/Users Fields Groups.http +++ /dev/null @@ -1,51 +0,0 @@ -# Users Fields Groups -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@group_id = 1 - -### List Users Field Groups -# @name List Users Field Groups -# Optional query parameters: page[offset], page[limit] -GET {{base_url}}/v1/fields/groups/users -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add Users Field Group -# @name Add Users Field Group -POST {{base_url}}/v1/fields/groups/users -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "Example group", - "context": "com_users.user", - "description": "" -} - -### Get Users Field Group -# @name Get Users Field Group -GET {{base_url}}/v1/fields/groups/users/{{group_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Users Field Group -# @name Update Users Field Group -PATCH {{base_url}}/v1/fields/groups/users/{{group_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "Example", - "state": 1, - "created": "Example" -} - -### Delete Users Field Group -# @name Delete Users Field Group -DELETE {{base_url}}/v1/fields/groups/users/{{group_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Users Fields.http b/phpstorm/Users Fields.http deleted file mode 100644 index 5becfea..0000000 --- a/phpstorm/Users Fields.http +++ /dev/null @@ -1,55 +0,0 @@ -# Users Fields -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@field_id = 1 - -### List Users Fields -# @name List Users Fields -# Optional query parameters: page[offset], page[limit] -GET {{base_url}}/v1/fields/users -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add Users Field -# @name Add Users Field -POST {{base_url}}/v1/fields/users -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "Example field com_users.user", - "type": "text", - "context": "com_users.user", - "description": "", - "params": { - "display": "2" - } -} - -### Get Users Field -# @name Get Users Field -GET {{base_url}}/v1/fields/users/{{field_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Users Field -# @name Update Users Field -PATCH {{base_url}}/v1/fields/users/{{field_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "context": "Example", - "group_id": 1, - "assigned_cat_ids": [] -} - -### Delete Users Field -# @name Delete Users Field -DELETE {{base_url}}/v1/fields/users/{{field_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Users Groups.http b/phpstorm/Users Groups.http deleted file mode 100644 index 7ba81b3..0000000 --- a/phpstorm/Users Groups.http +++ /dev/null @@ -1,50 +0,0 @@ -# Users Groups -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@group_id = 1 - -### List User Groups -# @name List User Groups -# Optional query parameters: page[offset], page[limit] -GET {{base_url}}/v1/users/groups -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add User Group -# @name Add User Group -POST {{base_url}}/v1/users/groups -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "Example group", - "parent_id": 1 -} - -### Get User Group -# @name Get User Group -GET {{base_url}}/v1/users/groups/{{group_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update User Group -# @name Update User Group -PATCH {{base_url}}/v1/users/groups/{{group_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "Example", - "parent_id": 1, - "actions": [] -} - -### Delete User Group -# @name Delete User Group -DELETE {{base_url}}/v1/users/groups/{{group_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Users Levels.http b/phpstorm/Users Levels.http deleted file mode 100644 index 32d6550..0000000 --- a/phpstorm/Users Levels.http +++ /dev/null @@ -1,52 +0,0 @@ -# Users Levels -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@level_id = 1 - -### List Access Levels -# @name List Access Levels -# Optional query parameters: page[offset], page[limit] -GET {{base_url}}/v1/users/levels -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add Access Level -# @name Add Access Level -POST {{base_url}}/v1/users/levels -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "API example", - "rules": [ - 2, - 3 - ] -} - -### Get Access Level -# @name Get Access Level -GET {{base_url}}/v1/users/levels/{{level_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update Access Level -# @name Update Access Level -PATCH {{base_url}}/v1/users/levels/{{level_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "title": "API example", - "rules": "[2,3]" -} - -### Delete Access Level -# @name Delete Access Level -DELETE {{base_url}}/v1/users/levels/{{level_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/phpstorm/Users.http b/phpstorm/Users.http deleted file mode 100644 index 66e1363..0000000 --- a/phpstorm/Users.http +++ /dev/null @@ -1,54 +0,0 @@ -# Users -# -# Generated from the OpenAPI spec of the Joomla Web Services API 6.2.0. -# Set base_url and api_key in http-client.env.json and http-client.private.env.json. - -@user_id = 1 - -### List Users -# @name List Users -# Optional query parameters: page[offset], page[limit], filter[state], filter[active], filter[groupid], filter[search], filter[registrationDateStart], filter[registrationDateEnd], filter[lastVisitDateStart], filter[lastVisitDateEnd] -GET {{base_url}}/v1/users -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Add User -# @name Add User -POST {{base_url}}/v1/users -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "name": "Example user", - "username": "example", - "email": "user@example.org", - "groups": [ - 2 - ] -} - -### Get User -# @name Get User -GET {{base_url}}/v1/users/{{user_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json - -### Update User -# @name Update User -PATCH {{base_url}}/v1/users/{{user_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json -Content-Type: application/json - -{ - "name": "Example", - "username": "Example", - "password": "Example" -} - -### Delete User -# @name Delete User -DELETE {{base_url}}/v1/users/{{user_id}} -X-Joomla-Token: {{api_key}} -Accept: application/vnd.api+json diff --git a/scripts/build.mjs b/scripts/build.mjs index b8241c3..283025a 100644 --- a/scripts/build.mjs +++ b/scripts/build.mjs @@ -3,7 +3,9 @@ // joomla-ws-api-.json the spec, unchanged // joomla-ws-api-.yaml the same spec in YAML // joomla-ws-api-.html readable documentation (Redoc) +// joomla-ws-api--phpstorm.zip the PhpStorm HTTP Client collection (scripts/generate-phpstorm.mjs) // joomla-ws-api-.sha256 checksums of the files above +// The collection is also left unzipped in dist/phpstorm/. // // Usage: node scripts/build.mjs [--tag ] // --tag: fail unless the tag equals info.version of the spec (used by the release workflow). @@ -12,6 +14,7 @@ import { execFileSync } from 'node:child_process'; import crypto from 'node:crypto'; import fs from 'node:fs'; import path from 'node:path'; +import zlib from 'node:zlib'; import { loadSpec } from './lib.mjs'; const SRC = 'src/joomla-ws-api.json'; @@ -34,13 +37,60 @@ const redocly = (...a) => { execFileSync(process.execPath, [path.join('node_modules', '@redocly', 'cli', 'bin', 'cli.js'), ...a], { stdio: 'inherit' }); }; +/** Writes a zip file of the files in dir, in the folder root of the zip. Fixed dates, so a build is reproducible. */ +function zip(dir, root, target) { + const names = fs.readdirSync(dir).sort(); + const local = []; + const central = []; + let offset = 0; + for (const name of names) { + const data = fs.readFileSync(path.join(dir, name)); + const deflated = zlib.deflateRawSync(data, { level: 9 }); + const fileName = Buffer.from(`${root}/${name}`); + const crc = zlib.crc32(data); + // version 2.0, flags (UTF-8 names), deflate, time 00:00, date 1980-01-01, crc, sizes, name length, extra length + const fields = (b, at) => { + b.writeUInt16LE(20, at); + b.writeUInt16LE(0x0800, at + 2); + b.writeUInt16LE(8, at + 4); + b.writeUInt16LE(0, at + 6); + b.writeUInt16LE(0x21, at + 8); + b.writeUInt32LE(crc, at + 10); + b.writeUInt32LE(deflated.length, at + 14); + b.writeUInt32LE(data.length, at + 18); + b.writeUInt16LE(fileName.length, at + 22); + }; + const header = Buffer.alloc(30); + header.writeUInt32LE(0x04034b50, 0); + fields(header, 4); + const entry = Buffer.alloc(46); + entry.writeUInt32LE(0x02014b50, 0); + entry.writeUInt16LE(20, 4); + fields(entry, 6); + entry.writeUInt32LE(offset, 42); + local.push(header, fileName, deflated); + central.push(entry, fileName); + offset += header.length + fileName.length + deflated.length; + } + const directory = Buffer.concat(central); + const end = Buffer.alloc(22); + end.writeUInt32LE(0x06054b50, 0); + end.writeUInt16LE(names.length, 8); + end.writeUInt16LE(names.length, 10); + end.writeUInt32LE(directory.length, 12); + end.writeUInt32LE(offset, 16); + fs.writeFileSync(target, Buffer.concat([...local, directory, end])); +} + const base = `joomla-ws-api-${version}`; -const files = [`${base}.json`, `${base}.yaml`, `${base}.html`]; +const files = [`${base}.json`, `${base}.yaml`, `${base}.html`, `${base}-phpstorm.zip`]; // The spec is one self-contained file: the release JSON is the source file as it is. fs.copyFileSync(SRC, `${DIST}/${base}.json`); redocly('bundle', SRC, '--output', `${DIST}/${base}.yaml`); redocly('build-docs', SRC, '--output', `${DIST}/${base}.html`, '--title', `Joomla ${version} Web Services API`); +execFileSync(process.execPath, ['scripts/generate-phpstorm.mjs', SRC], { stdio: 'inherit' }); +zip(`${DIST}/phpstorm`, `${base}-phpstorm`, `${DIST}/${base}-phpstorm.zip`); const sums = files.map((f) => `${crypto.createHash('sha256').update(fs.readFileSync(path.join(DIST, f))).digest('hex')} ${f}`); fs.writeFileSync(`${DIST}/${base}.sha256`, sums.join('\n') + '\n'); diff --git a/scripts/generate-phpstorm.mjs b/scripts/generate-phpstorm.mjs index 20bd05c..7c10f08 100644 --- a/scripts/generate-phpstorm.mjs +++ b/scripts/generate-phpstorm.mjs @@ -1,18 +1,18 @@ #!/usr/bin/env node -// Generates the PhpStorm HTTP Client collection in phpstorm/ from the spec: one .http file per tag, with a -// request for each operation. The request bodies are the examples of the spec. +// Generates the PhpStorm HTTP Client collection in dist/phpstorm/ from the spec: one .http file per tag, with a +// request for each operation, and the files of scripts/phpstorm/ (README and environment files). The request +// bodies are the examples of the spec. The collection is not committed to main: the release has it as a zip file, +// and the phpstorm branch has the collection of the latest main. // -// Usage: node scripts/generate-phpstorm.mjs [--check] [spec.json] (default: src/joomla-ws-api.json) -// --check: do not write, but fail when the files in phpstorm/ differ from what the spec generates. +// Usage: node scripts/generate-phpstorm.mjs [spec.json] (default: src/joomla-ws-api.json) import fs from 'node:fs'; import path from 'node:path'; -import { deref, loadSpec, METHODS, report } from './lib.mjs'; +import { deref, loadSpec, METHODS } from './lib.mjs'; -const OUT = 'phpstorm'; -const args = process.argv.slice(2); -const check = args.includes('--check'); -const specFile = args.find((a) => a !== '--check') ?? 'src/joomla-ws-api.json'; +const OUT = 'dist/phpstorm'; +const STATIC = 'scripts/phpstorm'; +const specFile = process.argv[2] ?? 'src/joomla-ws-api.json'; // Name of the {id} variable, by the last word of the tag const ID_NAMES = { @@ -126,29 +126,12 @@ function render(tag, requests) { return lines.join('\n').trimEnd() + '\n'; } -const wanted = new Map([...files].map(([tag, requests]) => [`${tag}.http`, render(tag, requests)])); -const existing = fs.existsSync(OUT) ? fs.readdirSync(OUT).filter((f) => f.endsWith('.http')) : []; -const requests = [...files.values()].reduce((n, r) => n + r.length, 0); +/** "Banners Categories" -> "banners-categories.http" */ +const fileName = (tag) => `${tag.toLowerCase().replace(/[^a-z0-9]+/g, '-')}.http`; -if (check) { - const errors = []; - for (const [file, contents] of wanted) { - const target = path.join(OUT, file); - if (!fs.existsSync(target)) errors.push(`${target} is missing`); - else if (fs.readFileSync(target, 'utf8') !== contents) errors.push(`${target} is not up to date`); - } - for (const file of existing.filter((f) => !wanted.has(f))) { - errors.push(`${path.join(OUT, file)} has no tag in the spec`); - } - if (errors.length) errors.push('Run "npm run phpstorm" and commit the result.'); - report({ - title: 'PhpStorm collection', - summary: [`${wanted.size} files, ${requests} requests`], - errors, - }); -} else { - fs.mkdirSync(OUT, { recursive: true }); - for (const file of existing.filter((f) => !wanted.has(f))) fs.rmSync(path.join(OUT, file)); - for (const [file, contents] of wanted) fs.writeFileSync(path.join(OUT, file), contents); - console.log(`${OUT}: ${wanted.size} files, ${requests} requests`); -} +const requests = [...files.values()].reduce((n, r) => n + r.length, 0); +fs.rmSync(OUT, { recursive: true, force: true }); +fs.mkdirSync(OUT, { recursive: true }); +fs.cpSync(STATIC, OUT, { recursive: true }); +for (const [tag, tagRequests] of files) fs.writeFileSync(path.join(OUT, fileName(tag)), render(tag, tagRequests)); +console.log(`${OUT}: ${files.size} files, ${requests} requests`); diff --git a/phpstorm/.gitignore b/scripts/phpstorm/.gitignore similarity index 100% rename from phpstorm/.gitignore rename to scripts/phpstorm/.gitignore diff --git a/phpstorm/README.md b/scripts/phpstorm/README.md similarity index 67% rename from phpstorm/README.md rename to scripts/phpstorm/README.md index 948ae84..8511372 100644 --- a/phpstorm/README.md +++ b/scripts/phpstorm/README.md @@ -2,9 +2,9 @@ PhpStorm HTTP Client collection for the Joomla 6 Web Services API. -The collection has a request for every route of the [OpenAPI specification](../src/joomla-ws-api.json) in this -repository, with the example request bodies of the specification. It works in PhpStorm and in any other JetBrains IDE -with the built-in [HTTP Client](https://www.jetbrains.com/help/phpstorm/http-client-in-product-code-editor.html). +The collection has a request for every route of the [OpenAPI specification](https://github.com/joomla-projects/API-Endpoints) of the +Joomla Web Services API, with the example request bodies of the specification. It works in PhpStorm and in any other +JetBrains IDE with the built-in [HTTP Client](https://www.jetbrains.com/help/phpstorm/http-client-in-product-code-editor.html). ## Installation instructions @@ -25,16 +25,26 @@ Your Joomla website is now ready to be used with the webservices API and the Php ### Install the collection -Download this repository to your local machine. Unzip the file if needed. Once unzipped there is a folder **phpstorm** in -the repository. Copy that folder and all its contents into a project you open in PhpStorm, or open the folder itself as -a project. +There are two ways to get the collection: -The folder contains one `.http` file per group of endpoints (a tag in the specification), for example `Banners.http` -and `Content Articles.http`. +- **A release**: each [release](https://github.com/joomla-projects/API-Endpoints/releases/latest) has the file + `joomla-ws-api--phpstorm.zip`, the collection of that version of the specification. Unzip it. +- **The `phpstorm` branch**: the [`phpstorm`](https://github.com/joomla-projects/API-Endpoints/tree/phpstorm) branch always has the collection + of the newest specification, also with improvements that are not released yet. Clone it, or download it as a zip + file: + ```bash + git clone --branch phpstorm --single-branch https://github.com/joomla-projects/API-Endpoints.git joomla-phpstorm + ``` + +Copy the folder with all its contents into a project you open in PhpStorm, or open the folder itself as a project. + +The folder contains one `.http` file per group of endpoints (a tag in the specification), for example `banners.http` +and `content-articles.http`. ### Configure the environment -The requests use two variables: `base_url` and `api_key`. They are set in two environment files in the **phpstorm** folder. +The requests use two variables: `base_url` and `api_key`. They are set in two environment files in the folder of the +collection. 1. Open `http-client.env.json` and change the value of `base_url` to the URL of your Joomla website, for example ```https://www.myjoomlawebsite.com/api/index.php```. Keep the ```/api/index.php``` part at the end of the URL, as that @@ -45,7 +55,7 @@ The requests use two variables: `base_url` and `api_key`. They are set in two en The private environment file is listed in `.gitignore`, so your token is not committed by accident. -The requests in `Joomla Update.http` do not use the API token. They use the token of the Joomla Automated Updates +The requests in `joomla-update.http` do not use the API token. They use the token of the Joomla Automated Updates service, which you find in the options of Joomla Update. Set it as the value of `update_token` in `http-client.private.env.json` if you want to use these requests. @@ -55,7 +65,7 @@ service, which you find in the options of Joomla Update. Set it as the value of A simple test to see if the API endpoints are working is a ```GET``` on Config Application. -1. Open `Config Application.http`. +1. Open `config-application.http`. 2. In the toolbar at the top of the editor, select the **joomla** environment in the **Run with** dropdown. 3. Click the green run icon in the gutter next to **Get Global Configuration**. The URL for this request is ```{{base_url}}/v1/config/application```. 4. If all is working you should see a response with status 200 in the **Services** tool window, with the global @@ -72,14 +82,14 @@ defined at the top of each `.http` file with a default value: First, retrieve a list of articles. -1. Open `Content Articles.http`. +1. Open `content-articles.http`. 2. Run the request **List Articles**. The URL for this request is ```{{base_url}}/v1/content/articles```. 3. If your Joomla website has articles, you should see a response with status 200 and a list of articles in JSON format. Retrieve an article with a specific ID. 1. In the JSON result of the content/articles request, find the ID of an article you want to retrieve. An example ID is shown as ```"id": 11```. -2. Change the variable at the top of `Content Articles.http` to ```@article_id = 11```. +2. Change the variable at the top of `content-articles.http` to ```@article_id = 11```. 3. Run the request **Get Article**. The URL for this request is ```{{base_url}}/v1/content/articles/{{article_id}}```. ### Query parameters @@ -95,12 +105,13 @@ GET {{base_url}}/v1/content/articles?filter[search]=joomla&page[limit]=5 ## Updating the collection The `.http` files are generated from the specification by -[`scripts/generate-phpstorm.mjs`](../scripts/generate-phpstorm.mjs). Do not change them by hand: change -`src/joomla-ws-api.json` and generate the collection again, in the same pull request. +[`scripts/generate-phpstorm.mjs`](https://github.com/joomla-projects/API-Endpoints/blob/main/scripts/generate-phpstorm.mjs). +Do not change them by hand: to improve a request, change the specification in a pull request to the `main` branch of +[joomla-projects/API-Endpoints](https://github.com/joomla-projects/API-Endpoints). After the merge, the `phpstorm` branch is updated +automatically. + +To generate the collection yourself, from a clone of the `main` branch (Node.js 22 or later): ```bash -npm run phpstorm # writes the .http files in this folder -npm run phpstorm:check # fails when the .http files are not up to date with the specification +npm run phpstorm # writes the collection in dist/phpstorm/ ``` - -CI runs the check on every pull request. diff --git a/phpstorm/http-client.env.json b/scripts/phpstorm/http-client.env.json similarity index 100% rename from phpstorm/http-client.env.json rename to scripts/phpstorm/http-client.env.json diff --git a/phpstorm/http-client.private.env.json.example b/scripts/phpstorm/http-client.private.env.json.example similarity index 100% rename from phpstorm/http-client.private.env.json.example rename to scripts/phpstorm/http-client.private.env.json.example From 5cd1f3544f45206d3f7565992512280b88a58821 Mon Sep 17 00:00:00 2001 From: Roland Dalmulder Date: Sun, 15 Nov 2026 17:19:08 +0100 Subject: [PATCH 3/3] Address review: main-only branch push, flat zip check, 6.2.1 in the READMEs - phpstorm.yml: only push to the phpstorm branch when the workflow runs from main. - build.mjs: zip() fails with a clear message when the folder has a subfolder. - READMEs: the release zip is available since 6.2.1. - Collection README: single backticks for inline code. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/phpstorm.yml | 3 ++- README.md | 4 ++-- scripts/build.mjs | 10 ++++++++-- scripts/phpstorm/README.md | 18 +++++++++--------- 4 files changed, 21 insertions(+), 14 deletions(-) diff --git a/.github/workflows/phpstorm.yml b/.github/workflows/phpstorm.yml index 1e01afe..4ef74a0 100644 --- a/.github/workflows/phpstorm.yml +++ b/.github/workflows/phpstorm.yml @@ -21,7 +21,8 @@ jobs: phpstorm: name: Update the phpstorm branch # Not in forks: there the phpstorm branch can be the head of a pull request. - if: github.repository == 'joomla-projects/API-Endpoints' + # Only from main: a manual run from another branch must not push to phpstorm. + if: github.repository == 'joomla-projects/API-Endpoints' && github.ref == 'refs/heads/main' runs-on: ubuntu-latest permissions: contents: write diff --git a/README.md b/README.md index dbbfa2f..51b2c78 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ The specification is one file: [`src/joomla-ws-api.json`](src/joomla-ws-api.json Each release has these files, with its version in the name: `joomla-ws-api-.json`, the same spec in YAML (`.yaml`), readable documentation (`.html`, Redoc), the [PhpStorm collection](#phpstorm-collection) -(`-phpstorm.zip`, since the release after 6.2.0) and checksums (`.sha256`). +(`-phpstorm.zip`, since 6.2.1) and checksums (`.sha256`). For AI agents and other tools: the JSON of the latest release has the version in `tag_name`, and the download URL of each file in `assets[].browser_download_url`. For instance: @@ -58,7 +58,7 @@ A collection for the HTTP Client of PhpStorm and other JetBrains IDEs: a request specification, with its example request body. It is generated from the specification, so it is always up to date with it. -- **A release**: each release after 6.2.0 has the collection of that version in +- **A release**: each release since 6.2.1 has the collection of that version in `joomla-ws-api--phpstorm.zip`. - **The [`phpstorm`](https://github.com/joomla-projects/API-Endpoints/tree/phpstorm) branch**: the collection of the newest specification in `main`, also with improvements that are not released yet. It is updated automatically on diff --git a/scripts/build.mjs b/scripts/build.mjs index 283025a..b8abd66 100644 --- a/scripts/build.mjs +++ b/scripts/build.mjs @@ -37,9 +37,15 @@ const redocly = (...a) => { execFileSync(process.execPath, [path.join('node_modules', '@redocly', 'cli', 'bin', 'cli.js'), ...a], { stdio: 'inherit' }); }; -/** Writes a zip file of the files in dir, in the folder root of the zip. Fixed dates, so a build is reproducible. */ +/** + * Writes a zip file of the files in dir, in the folder root of the zip. Fixed dates, so a build is reproducible. + * Only a flat folder: a subfolder is an error. + */ function zip(dir, root, target) { - const names = fs.readdirSync(dir).sort(); + const entries = fs.readdirSync(dir, { withFileTypes: true }); + const other = entries.filter((e) => !e.isFile()).map((e) => e.name); + if (other.length) throw new Error(`zip: ${dir} may only contain files, not: ${other.join(', ')}`); + const names = entries.map((e) => e.name).sort(); const local = []; const central = []; let offset = 0; diff --git a/scripts/phpstorm/README.md b/scripts/phpstorm/README.md index 8511372..cbdf4a8 100644 --- a/scripts/phpstorm/README.md +++ b/scripts/phpstorm/README.md @@ -27,7 +27,7 @@ Your Joomla website is now ready to be used with the webservices API and the Php There are two ways to get the collection: -- **A release**: each [release](https://github.com/joomla-projects/API-Endpoints/releases/latest) has the file +- **A release**: each [release](https://github.com/joomla-projects/API-Endpoints/releases/latest) since 6.2.1 has the file `joomla-ws-api--phpstorm.zip`, the collection of that version of the specification. Unzip it. - **The `phpstorm` branch**: the [`phpstorm`](https://github.com/joomla-projects/API-Endpoints/tree/phpstorm) branch always has the collection of the newest specification, also with improvements that are not released yet. Clone it, or download it as a zip @@ -47,7 +47,7 @@ The requests use two variables: `base_url` and `api_key`. They are set in two en collection. 1. Open `http-client.env.json` and change the value of `base_url` to the URL of your Joomla website, for example - ```https://www.myjoomlawebsite.com/api/index.php```. Keep the ```/api/index.php``` part at the end of the URL, as that + `https://www.myjoomlawebsite.com/api/index.php`. Keep the `/api/index.php` part at the end of the URL, as that is the endpoint for Joomla API requests. 2. Copy `http-client.private.env.json.example` to `http-client.private.env.json`. 3. Copy the API token from your Joomla user profile and paste it as the value of `api_key` in @@ -63,17 +63,17 @@ service, which you find in the options of Joomla Update. Set it as the value of ### Running a GET request -A simple test to see if the API endpoints are working is a ```GET``` on Config Application. +A simple test to see if the API endpoints are working is a `GET` on Config Application. 1. Open `config-application.http`. 2. In the toolbar at the top of the editor, select the **joomla** environment in the **Run with** dropdown. -3. Click the green run icon in the gutter next to **Get Global Configuration**. The URL for this request is ```{{base_url}}/v1/config/application```. +3. Click the green run icon in the gutter next to **Get Global Configuration**. The URL for this request is `{{base_url}}/v1/config/application`. 4. If all is working you should see a response with status 200 in the **Services** tool window, with the global configuration of your Joomla website in JSON format. ### Using variables in requests -Requests that work on a single item use a variable in the URL, for example ```{{article_id}}```. These variables are +Requests that work on a single item use a variable in the URL, for example `{{article_id}}`. These variables are defined at the top of each `.http` file with a default value: ``` @@ -83,14 +83,14 @@ defined at the top of each `.http` file with a default value: First, retrieve a list of articles. 1. Open `content-articles.http`. -2. Run the request **List Articles**. The URL for this request is ```{{base_url}}/v1/content/articles```. +2. Run the request **List Articles**. The URL for this request is `{{base_url}}/v1/content/articles`. 3. If your Joomla website has articles, you should see a response with status 200 and a list of articles in JSON format. Retrieve an article with a specific ID. -1. In the JSON result of the content/articles request, find the ID of an article you want to retrieve. An example ID is shown as ```"id": 11```. -2. Change the variable at the top of `content-articles.http` to ```@article_id = 11```. -3. Run the request **Get Article**. The URL for this request is ```{{base_url}}/v1/content/articles/{{article_id}}```. +1. In the JSON result of the content/articles request, find the ID of an article you want to retrieve. An example ID is shown as `"id": 11`. +2. Change the variable at the top of `content-articles.http` to `@article_id = 11`. +3. Run the request **Get Article**. The URL for this request is `{{base_url}}/v1/content/articles/{{article_id}}`. ### Query parameters