POST example/api/apikey/generateuserkey

https://app.bwz.se/bedrock/example/api/apikey/generateuserkey

Create a new user API key

Request Information

URI Parameters

None.

Body Parameters

Id of the user to connect the API key to

CreateUserApiKeyArgs
NameDescriptionTypeAdditional information
Description

A description of the api key usage

string

None.

IsEnabled

Can the api key be used for API requests

boolean

Required

UserId

Id of the user to connect the API key to

integer

Required

Request Formats

application/json, text/json

Sample:
{
  "Description": "sample string 1",
  "IsEnabled": true,
  "UserId": 3
}

application/xml, text/xml

Sample:
<CreateUserApiKeyArgs xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Netoptions.BizWizard.Api.Common.Models.ApiKey">
  <Description>sample string 1</Description>
  <IsEnabled>true</IsEnabled>
  <UserId>3</UserId>
</CreateUserApiKeyArgs>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

An UserApiKeyModel of the created API key.

UserApiKeyModel
NameDescriptionTypeAdditional information
Id

The Id of the API key

integer

None.

ApiKey

The secret key value

string

None.

UserId

Id if the connected User

integer

None.

Description

A description of the api key usage

string

None.

IsEnabled

Can the api key be used for API requests

boolean

None.

Response Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "ApiKey": "sample string 2",
  "UserId": 3,
  "Description": "sample string 4",
  "IsEnabled": true
}

application/xml, text/xml

Sample:
<UserApiKeyModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Netoptions.BizWizard.Api.Common.Models.ApiKey">
  <ApiKey>sample string 2</ApiKey>
  <Description>sample string 4</Description>
  <Id>1</Id>
  <IsEnabled>true</IsEnabled>
  <UserId>3</UserId>
</UserApiKeyModel>