semvec/pypi-packages huggingface dataset:
hangar-api 2023.12
Hangar API
Keywords: OpenAPI,OpenAPI-Generator,Hangar API

    This page describes the format for the current Hangar REST API as well as general usage guidelines.&lt;br&gt; Note that all routes **not** listed here should be considered **internal**, and can change at a moment&#39;s notice. **Do not use them**.  ## Authentication and Authorization There are two ways to consume the API: Authenticated or anonymous.  ### Anonymous When using anonymous authentication, you only have access to public information, but you don&#39;t need to worry about creating and storing an API key or handing JWTs.  ### Authenticated If you need access to non-public content or actions, you need to create and use API keys. These can be created by going to the API keys page via the profile dropdown or by going to your user page and clicking on the key icon.  API keys allow you to impersonate yourself, so they should be handled like passwords. **Do not share them with anyone else!**  #### Getting and Using a JWT Once you have an API key, you need to authenticate yourself: Send a &#x60;POST&#x60; request with your API key identifier to &#x60;/api/v1/authenticate?apiKey&#x3D;yourKey&#x60;. The response will contain your JWT as well as an expiration time. Put this JWT into the &#x60;Authorization&#x60; header of every request and make sure to request a new JWT after the expiration time has passed.  Please also set a meaningful &#x60;User-Agent&#x60; header. This allows us to better identify loads and needs for potentially new endpoints.  ## Misc ### Date Formats Standard ISO types. Where possible, we use the [OpenAPI format modifier](https://swagger.io/docs/specification/data-models/data-types/#format).  ### Rate Limits and Caching The default rate limit is set at 20 requests every 5 seconds with an initial overdraft for extra leniency. Individual endpoints, such as version creation, may have stricter rate limiting.  If applicable, always cache responses. The Hangar API itself is cached by CloudFlare and internally.