/eventdelivery/addKeys

POST


Description

Adds one or more public keys to the specified application. Public keys are required in order to download the event messages delivered by the SIEM Event Delivery service. Note, however, that applications can only be assigned a maximum of 10 public keys: your API call will fail if you attempt to add more than 10 keys to an application. If you need to do, say, add 10 different keys to an application, you’ll have to remove the 10 existing keys and then add the replacement keys.


Base URL

The base URL for this endpoint is your Identity Cloud Configuration API URL (including the appropriate region) followed by your application ID. For example, if you are in the US region and your application ID is htb8fuhxnf8e38jrzub3c7pfrr then your base URL will look like this:

https://v1.api.us.janrain.com/config/applications/htb8fuhxnf8e38jrzub3c7pfrr

If you are in the Australian (AU) region your URL will look like this:

https://v1.api.au.janrain.com/config/applications/htb8fuhxnf8e38jrzub3c7pfrr


URL Path Parameters
 

Parameter

Type

Required

Description

region

string


Yes

Identity Cloud geographic region that hosts the application. Allowed values are:

  • us
  • eu
  • au
  • sg
  • cc

appID

string

Yes

Unique identifier of the Identity Cloud application where the public keys are being added. For example:

htb8fuhxnf8e38jrzub3c7pfrr


Request Parameters

Request parameters must be formatted as JSON objects and included in your API call’s body parameter. Valid request parameters include the following:

Parameter

Type

Required

Description

keys

array (string)


Yes

JSON array of the public keys to be added to the Identity Cloud application. For example:

["ssh-rsa
DDDAB3NzaC1yc2EAACCDEQABAAABAPOUh6ty
PEFEzV0LX3XGF55RMsQz1x2cEikKDEY0aIj4
1qgxMCP/iteneqXSIFZBp5vizPvaoIR3Um9x
K7PGoW8giupGn+EPuxIA4cDM4vzOqOkiMPhz
5XK0whEjkVzTo4+S0puvDZuwIsdiW9mxhJc7
tgBNL0c2r3SYVkz4G/fslNfRPAABAAM49f4f
htxPb5ok4Q2Lg9dPKVHO/Bgeu5woMc7RY0p1
ej6D4CKFE6lymSDJpW0YHX/wqE9+cfNfRP7x
Gt5Rq9t2ta6F6fmX0agvpFyNfRPFbXeUBr7o
sSCJNgvavWbA4cDniWrOvYX2xwWdhXmX3ue6
8ZbabVoha3W1 karim.nafir@mail.com"]

Note that you do not need to include the parameter name (keys) in the body request. The parameter value (the public keys) is all that’s needed.


Authentication

This endpoint requires Basic authentication and an API client with the owner feature. When configuring authentication, use your client ID as the username and your client secret as the password.


Sample Request (curl)

The following command adds a single public key to the application with the ID htb8fuhxnf8e38jrzub3c7pfrr:


curl -X POST \
  https://v1.api.us.janrain.com/config/applications/htb8fuhxnf8e38jrzub3c7pfrr/eventdelivery/addKeys \
  -H 'Authorization: Basic M2dmYmdycmE3dzI4MmhndHJ5cGZxeDlwemhxaGpnZDU6Y2dkY3A3bWhjeWszYmZocnl2d2NmY2c3NTdqdzRhb3E=' \
  -H 'Content-Type: application/json' \
  -d '{
  ["ssh-rsa
DDDAB3NzaC1yc2EAACCDEQABAAABAPOUh6tyPEFEzV0LX3XGF55RMsQz1x2cEikKDEY0aIj41qgxMCP/iteneqXSIFZBp5vizPvaoIR3Um9x
K7PGoW8giupGn+EPuxIA4cDM4vzOqOkiMPhz5XK0whEjkVzTo4+S0puvDZuwIsdiW9mxhJc7tgBNL0c2r3SYVkz4G/fslNfRPAABAAM49f4f
htxPb5ok4Q2Lg9dPKVHO/Bgeu5woMc7RY0p1ej6D4CKFE6lymSDJpW0YHX/wqE9+cfNfRP7xGt5Rq9t2ta6F6fmX0agvpFyNfRPFbXeUBr7o
sSCJNgvavWbA4cDniWrOvYX2xwWdhXmX3ue68ZbabVoha3W1 karim.nafir@mail.com"]
}' 

Responses

201 Created

If your call to this endpoint succeeds, you'll get back a response similar to this:

"The public key(s) were added successfully."


Error Response Codes

The following table includes information about some of the other response codes that you might encounter when calling this endpoint.

Response Code

Description

400

The request payload is not valid JSON. Your API request did not pass the JSON schema validation. Verify that you are using correctly-formatted JSON in the request parameter and then try again.

You will also receive this error if you attempt to add more than 10 keys to your S3 bucket.

401

Not authorized. Your client credentials may be invalid. You have specified an invalid client name and/or an invalid client secret.

403

Forbidden. Your credentials are valid for the application but not for this endpoint. For example, if you have read-only credentials those credentials can only be used with GET endpoints.

404

The Akamai account ID was not found. Check your application settings for 'akamai_account_id'. Your Akamai account ID must be listed in the application settings for the application specified in your API call. You can use the /{appId}/settings/options API endpoint or the Console to verify your application settings.