3DSlicer开发之路——Extensions(八)

What is an API Key (Application programming interface key)?

An application programming interface key (API key) is a code passed in by computer programs calling an application programming interface (API) to identify the calling program, its developer, or its user to the Web site. API keys are used to track and control how the API is being used, for example to prevent malicious use or abuse of the API (as defined perhaps by terms of service).(应用程序编程接口键(API key)是由调用应用程序编程接口(API)的计算机程序传入的代码,用于标识调用程序、其开发人员或Web站点的用户。API键用于跟踪和控制API的使用方式,例如防止恶意使用或滥用API(可能由服务条款定义)。)

The API key often acts as both a unique identifier and a secret token for authentication, and will generally have a set of access rights on the API associated with it.[1]

API keys can be based on the universally unique identifier (UUID) system to ensure they will be unique to each user.(API密钥通常同时充当惟一标识符和用于身份验证的秘密令牌,并且通常在与之关联的API上具有一组访问权限API密钥可以基于通用惟一标识符(UUID)系统,以确保它们对每个用户都是惟一的。


How to obtain an API key to submit on the extension server ?

In order to upload extensions on the slicer extensions server, (如果你想要将你的extensions 上传到slicer extensions server,这一步是必须的)it is required to:

  1. Create an account on the extension server: http://slicer.kitware.com by clicking on the Register link in the top right corner

                             

                This image shows the top portion of http://slicer.kitware.com after it has been expanded by clicking the Register button.

  1. Go to NA-MIC community and click on Join community
  2. Retrieve your API key looking at your account details:    
  •             Go to http://slicer.kitware.com. If needed, signin by clicking on Login in the top right corner.
  •             Click on your name in the top right corner.
  •             Click on My account.
  •             Click on API tab.
  •             Copy the API Key associated with Default application.

                    

There is currently a bug preventing api key containing non alpanumeric characters from being used.

If your Default api key contain for example a /, try to delete the api key and regenerate one that is not containing "/" and is named Default.

We are working on the issue to update the build system so that it properly escape "/" and also get in touch with Midas team so that api key containing just number and letter are generated.(你的API key可能有问题,因此你需要一些操作来消除这些问题)

原文地址:https://www.cnblogs.com/oneDongHua/p/14264078.html