POST v1/accounts/{foreignaccountkey}/credentials
Creates a new set of credentials that give access to this api account. An api secret is generated and returned as part of new credential object.<br/> Note: POSTed Scope, ScopeRef and Integration values are ignored and set by the system,.
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
foreignaccountkey |
The Api Account the new credentials are on |
string |
Required |
Body Parameters
THe new credentials
CredentialName | Description | Type | Additional information |
---|---|---|---|
IntegrationName | string |
None. |
|
StreamId | string |
None. |
|
Description | string |
None. |
|
ApiClientId | string |
None. |
|
ApiClientSecret | string |
None. |
|
Permissions | string |
None. |
|
Scope | integer |
None. |
|
ScopeRef | string |
None. |
|
Status | integer |
None. |
|
Role | integer |
None. |
|
IPAddresses | Collection of string |
None. |
|
ForeignAttributes | string |
None. |
Request Formats
application/json, text/json
{ "IntegrationName": "sample string 1", "StreamId": "sample string 2", "Description": "sample string 3", "ApiClientId": "sample string 4", "ApiClientSecret": "sample string 5", "Permissions": "sample string 6", "Scope": 7, "ScopeRef": "sample string 8", "Status": 9, "Role": 10, "IPAddresses": [ "sample string 1", "sample string 2" ], "ForeignAttributes": "sample string 11" }
application/xml, text/xml
<Credential xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AS.Models.API"> <ApiClientId>sample string 4</ApiClientId> <ApiClientSecret>sample string 5</ApiClientSecret> <Description>sample string 3</Description> <ForeignAttributes>sample string 11</ForeignAttributes> <IPAddresses xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:string>sample string 1</d2p1:string> <d2p1:string>sample string 2</d2p1:string> </IPAddresses> <IntegrationName>sample string 1</IntegrationName> <Permissions>sample string 6</Permissions> <Role>10</Role> <Scope>7</Scope> <ScopeRef>sample string 8</ScopeRef> <Status>9</Status> <StreamId>sample string 2</StreamId> </Credential>
application/x-www-form-urlencoded
Response Information
Resource Description
The new credential
PBPRReturnOfICredentialName | Description | Type | Additional information |
---|---|---|---|
Data | ICredential |
None. |
|
Success |
Gets the success status of the API call |
boolean |
None. |
Meta |
Gets the optional meta-data |
Dictionary of string [key] and string [value] |
None. |
Code |
Get the http code of the API call e.g. 200, 202, 409 |
integer |
None. |
ErrorCode |
Get the failure error code of the API call. This is available if Success is false |
integer |
None. |
ErrorSubCode |
Gets the error sub code if available |
integer |
None. |
ErrorDescription |
Gets a textual description of the error |
string |
None. |
StatusUrl |
Gets the status url for any ACCEPTed API commands. Any command (POST,DELETE,PATCh,PUT) to the API usually returns a 202 response code. The status of the command can be queried using the URL provided |
string |
None. |
ContinuationToken |
Gets the token to be used for paged queries |
string |
None. |
Response Formats
application/json, text/json
{ "Success": true, "Meta": { "sample string 1": "sample string 2", "sample string 3": "sample string 4" }, "Code": 2, "ErrorCode": 3, "Data": null, "ErrorSubCode": 4, "ErrorDescription": "sample string 5", "StatusUrl": "sample string 6", "ContinuationToken": "sample string 7" }
application/xml, text/xml
<PBPRReturnOfanyType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AS.Models.API"> <Code>2</Code> <ContinuationToken>sample string 7</ContinuationToken> <ErrorCode>3</ErrorCode> <ErrorDescription>sample string 5</ErrorDescription> <ErrorSubCode>4</ErrorSubCode> <Meta xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:KeyValueOfstringstring> <d2p1:Key>sample string 1</d2p1:Key> <d2p1:Value>sample string 2</d2p1:Value> </d2p1:KeyValueOfstringstring> <d2p1:KeyValueOfstringstring> <d2p1:Key>sample string 3</d2p1:Key> <d2p1:Value>sample string 4</d2p1:Value> </d2p1:KeyValueOfstringstring> </Meta> <StatusUrl>sample string 6</StatusUrl> <Success>true</Success> <Data i:nil="true" /> </PBPRReturnOfanyType>