File: dynamic_repository.rst

package info (click to toggle)
blender-doc 4.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 253,604 kB
  • sloc: python: 13,030; javascript: 322; makefile: 113; sh: 107
file content (47 lines) | stat: -rw-r--r-- 1,609 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
.. _extensions-create_repo-dynamic:

****************************************
Creating a Dynamic Extensions Repository
****************************************

A dynamic repository allows you to serve a smaller JSON file with only the latest version
of the extensions which are compatible with the query parameters.
This is only relevant for repositories which contain multiple version of multiple extensions.

For small or personal repositories it is simpler and recommended to use
:doc:`static repositories <static_repository>` instead.

Listing
=======

To setup a dynamic extensions repository, follow the steps for :doc:`static repositories <static_repository>`,
since the format and the listing are the same.

Query Parameters
================

When Blender fetches the extensions listing it passes the following arguments to make sure only
compatible extensions are listed:

- ``platform``
- ``blender_version``

These arguments are passed as parameters to the server via a query URL:

   :URL: ``https://extensions.blender.org/api/v1/extensions/``
   :query URL: ``https://extensions.blender.org/api/v1/extensions/?blender_version=4.2.0&platform=linux-x64``


Access Token
============

Some repositories may require authentication. The user can specify an ``access token`` for a repository,
which is passed along with the API request from Blender.

This is passed to the servers via an Authorization header:

.. code-block:: sh

   curl -i https://extensions.blender.org/api/v1/extensions/ \
        -H "Accept: application/json" \
        -H "Authorization: Bearer abc29832befb92983423abcaef93001"