Foundry API

<back to all web services

GenerateMachineApiKeyRequest

Requires Authentication
The following routes are available for this service:
POST/machines/{Id}/generate-api-key
GenerateMachineApiKeyRequest Parameters:
NameParameterData TypeRequiredDescription
IdpathstringNo
PostOperationTenanted<TResponse> Parameters:
NameParameterData TypeRequiredDescription
OrganisationIdformstringNo
GenerateMachineApiKeyResponse Parameters:
NameParameterData TypeRequiredDescription
ApiKeyformApiKeyNo
ResponseStatusformResponseStatusNo
ApiKey Parameters:
NameParameterData TypeRequiredDescription
UserIdformstringNo
DescriptionformstringNo
ExpiresUtcformDateTime?No
KeyformstringNo
IdformstringNo
GenerateMachineApiKeyResponse Parameters:
NameParameterData TypeRequiredDescription
ApiKeyformApiKeyNo
ResponseStatusformResponseStatusNo

To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /machines/{Id}/generate-api-key HTTP/1.1 
Host: foundrystage-api-app.azurewebsites.net 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"id":"String","organisationId":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"apiKey":{"userId":"String","description":"String","expiresUtc":null,"key":"String","id":"String"},"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}