Skip to content

Latest commit

 

History

History
58 lines (36 loc) · 1.4 KB

apiKey_create.rst

File metadata and controls

58 lines (36 loc) · 1.4 KB

apiKey_create

POST /users/{uid}/apikeys

Summary

  • Method: POST
  • Response Code: 201
  • Response Formats: application/xml application/json
  • Since: UForge 3.7

Creates an API Key for the specified user.

Note

The apikeypair-object can be empty as only the description information is used. The public and secret key information is generated automatically. Though you must send an empty apikeypair-object in the request body.

Security Summary

  • Requires Authentication: true
  • Entitlements Required: api_key_access

URI Parameters

  • uid (required): the user name (login name) of the user-object

HTTP Request Body Parameters

A apiKeyPair-object object

Example Request

curl "https://uforge.example.com/api/users/{uid}/apikeys" -X POST \
-u USER_LOGIN:PASSWORD -H "Accept: application/xml"-H "Content-type: application/xml" --data-binary "@representation.xml"

Example of representation.xml content (the request body):

<ns0:apiKeyPair xmlns:ns0="http://www.usharesoft.com/uforge"></ns0:apiKeyPair>
  • apiKey-delete
  • apiKey-getAll
  • apiKey-update
  • apikeypairs-object
  • user-object