PUT Api/Mandator/ApiKey

Creates a new API key.

Request Information

URI Parameters

None.

Body Parameters

Information for the new API key.

ApiKeyCreateParameter
NameDescriptionTypeAdditional information
MandatorId

integer

None.

Name

string

None.

IsEnabled

boolean

None.

AccessLevels

Collection of ApiKeyAccessLevel

None.

Request Formats

application/json, text/json

Sample:
{
  "MandatorId": 1,
  "Name": "sample string 2",
  "IsEnabled": true,
  "AccessLevels": [
    0,
    0
  ]
}

application/xml, text/xml

Sample:
<ApiKeyCreateParameter xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/eRecruiter.Api.Parameters">
  <AccessLevels xmlns:d2p1="http://schemas.datacontract.org/2004/07/eRecruiter.Api.Responses">
    <d2p1:ApiKeyAccessLevel>Jobs</d2p1:ApiKeyAccessLevel>
    <d2p1:ApiKeyAccessLevel>Jobs</d2p1:ApiKeyAccessLevel>
  </AccessLevels>
  <IsEnabled>true</IsEnabled>
  <Name>sample string 2</Name>
  <MandatorId>1</MandatorId>
</ApiKeyCreateParameter>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

The newly created API key.

ApiKeyResponse
NameDescriptionTypeAdditional information
Id

integer

None.

Name

string

None.

Key

string

None.

MandatorId

integer

None.

IsEnabled

boolean

None.

AccessLevels

Collection of ApiKeyAccessLevel

None.

Response Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "Name": "sample string 2",
  "Key": "sample string 3",
  "MandatorId": 4,
  "IsEnabled": true,
  "AccessLevels": [
    0,
    0
  ]
}

application/xml, text/xml

Sample:
<ApiKeyResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/eRecruiter.Api.Responses">
  <AccessLevels>
    <ApiKeyAccessLevel>Jobs</ApiKeyAccessLevel>
    <ApiKeyAccessLevel>Jobs</ApiKeyAccessLevel>
  </AccessLevels>
  <Id>1</Id>
  <IsEnabled>true</IsEnabled>
  <Key>sample string 3</Key>
  <MandatorId>4</MandatorId>
  <Name>sample string 2</Name>
</ApiKeyResponse>