diff --git a/docs/api.md b/docs/api.md index 75c4d3719a8352dae45177cbc931fa70d58fef1d..8449f9b5179bde3b21d566bed8a7fca8369049d2 100644 --- a/docs/api.md +++ b/docs/api.md @@ -4,7 +4,7 @@ Keymanager supports a JSON API to manage and query keys. ## Authentication -API access is granted only authenticated you need to supply an Authorization header with every request. +Most API methods are only available authenticated. You need to supply an Authorization header with those requests. ``` Authorization: Bearer <API-Key> @@ -12,8 +12,8 @@ Authorization: Bearer <API-Key> ## `POST /api/json/key/create` -Creates a key and charges it by specified amount. Creates a Order to do so. A note can be attached to the Order. -`manual` is currently the only valid payment processor for API. +Creates a key and charges it by the specified amount. Creates a order to do so. A note can be attached to the order. +`manual` is currently the only valid payment processor for API use. Can take either amount or price. If both supplied only amount is taken into account. ### Parameters @@ -28,7 +28,7 @@ Can take either amount or price. If both supplied only amount is taken into acco ### Example Response Successfull discharge will have a response code of `201` -If the key cannot be charged because it is already charged with too many Orders response code will be `403` +If the key cannot be charged because it is already charged with too many orders and the response code will be `403` ```json { @@ -88,8 +88,8 @@ Successfull discharge will have a response code of `201` ## `POST /api/json/key/:key/charge` -Charges a key by specified amount. Creates a Order to do so. A note can be attached to the Order. -`manual` is currently the only valid payment processor for API. +Charges a key by specified amount. Creates a Order to do so. A note can be attached to the order. +`manual` is currently the only valid payment processor for API use. Can take either amount or price. If both supplied only amount is taken into account. ### Parameters @@ -117,7 +117,7 @@ If the key cannot be charged because it is already charged with too many Orders ## `GET /api/json/token/pubkey` Retrieves the pubkey the server is using currently for token signatures. -This Method does not require authentication +This method does not require authentication ### Example Response @@ -135,7 +135,7 @@ This Method does not require authentication Signs submitted blinded tokens with the servers private key. The submitted key needs to hold a charge for each token or the request will fail. The Key will be discharged by this action. You cannot submit more than 10 tokens to be signed. -This Method does not require authentication +This method does not require authentication ### Parameters @@ -201,7 +201,7 @@ If any validation errors (signature, token format, etc.) occured response code w ## `POST /api/json/token/use` -Uses supplied Tokens to be consumed for MetaGer search. All supplied Tokens will be invalid after this action. +Uses supplied tokens to be consumed for MetaGer search. All supplied tokens will be invalid after this action. You cannot submit more than 10 tokens to be used. ### Parameters