Skip to the content
Documentation

apikey

No ratings yet

Available since Exponential 6.0.15 (in development, not in a release yet).

Summary

The apikey module: personal API keys (publishing keys) of the signed in user (doc/eng-us/guides/api-keys.md).

Description

The apikey module: personal API keys (publishing keys) of the signed in user (doc/eng-us/guides/api-keys.md).

apikey/list is the "API access" page of the user's account: the user's keys, a form to make one (name, scopes, lifetime; the key is shown once) and revoking. It is in site.ini [RoleSettings] PolicyOmitList[] because it checks for itself: anonymous visitors get the sign in and register links, every signed in user sees and can revoke their own keys, and only a user with apikey/create may make new ones.

apikey/create: may make keys. Its Scope limitation narrows which scopes a key may be given; each scope also needs the policy it stands for (rest.ini [ApiKeySettings] Scopes[]), so a key never exceeds its owner. No role has it in a new installation; give it to the roles that may publish through the API.

Views

Name Summary
list  

Policy functions

Function Limitations
create Scope

Fetch functions

Name Summary
can_create expApiKeyFunctionCollection::fetchCanCreate()
counts expApiKeyFunctionCollection::fetchCounts()

Source

kernel/apikey/module.php

See also

Help: guides/api-keys.md

Generated examples: the views of apikey

Generated examples: the policies of apikey

Added to the reference for Exponential 6.0.15: the 4.x reference had no page for this module.

In this section

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.