{"error": {
"code": "ValidationException",
"message": {
"lang": "en",
"value": "The request could not be completed due to data input errors."
},
"detail": {
"errorCode": "483",
"devErrorMessage": "The request could not be completed due to data input errors.",
"userErrorMessage": "The request could not be completed due to data input errors.",
"userErrorKey": "error.validation.entity",
"validationErrors": [
{
"field": "ApiEula",
"error": "API Eula referenced doesn't exist.",
"key": "error.apiApiEulaNotExists"
},
{
"field": "PolicyTemplateArguments",
"error": "Cannot save Portal Published API with mismatch of Policy Template arguments compared to Gateway Policy Template.",
"key": "error.api.gateway.policytemplate.arg.mismatch"
}
]
}
}}
<Please see attached file for image>
<Please see attached file for image>
<Please see attached file for image>
c:\curl --insecure -X POST -d "username=tenant4%5cadmin&password=7layer&grant_type=password&client_id=53f1d4d58cd34181b63dc59589e18515&client_secret=52ecc9a73dbb4ebb81fa783952128ebe" https://apim-ssg.support.local:9443/auth/oauth/v2/token
{
"access_token":"09174147-3ef9-4613-88b8-0f328e17c6b0",
"token_type":"Bearer",
"expires_in":3600,
"refresh_token":"a0c8f961-422e-4b07-934f-c32360a7bfa3",
"scope":"oob"}
<Please see attached file for image>
Data contained in the Body:
<Please see attached file for image>
Step 5: To build the payload for multiple/custom policy temples need to do a get on /2.0/Apis NOT /Apis (this is old with different structure) to understand json structure
NOTE: there is no swagger for Get /2.0/Apis need to use a tool like Postman
<Please see attached file for image>
{
"uuid": "30a6d908-497b-4336-b25e-bf2c0e31f5be",
"encassId": "35df6c7e5522c546d000161fbf78ffea",
"name": "getRequestHeaders",
"description": "",
"policyGuid": "6c113c5e-6811-4270-b00a-d5eb4eadb83b",
"fragmentDetails": {
"hasRouting": false,
"parsedPolicyDetails": ""
},
"arguments": [],
"default": false
}
{
"uuid": "952820cd-9454-458b-92e1-3c45bdb7a6aa",
"encassId": "3322031b114b9ab1ed3b2fdb6f575424",
"name": "Quota by Month",
"description": "Quota by Month",
"policyGuid": "9821aceb-20c8-4f54-a056-fced22834530",
"fragmentDetails": {
"hasRouting": false,
"parsedPolicyDetails": ""
},
"arguments": [
{
"name": "quotaHitsPerMonth",
"type": "int",
"label": "Hits (max: 2000000000) *"
}
],
"default": false
},
{
"Name": "My Swagger Petstore 69",
"Version": "1",
"ApiEulaUuid": "bcb5798d-1cc8-40f3-a443-887db30c24af",
"PrivateDescription": "",
"Description": "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). ",
"SsgUrl": "PetStore_69",
"PolicyEntities": {
"results": [
{
"PolicyEntityUuid": "30a6d908-497b-4336-b25e-bf2c0e31f5be",
"PolicyTemplateArguments": {
"results": []
}
},
{
"PolicyEntityUuid": "952820cd-9454-458b-92e1-3c45bdb7a6aa",
"PolicyTemplateArguments": {
"results": [
{
"ApiUuid": "{{GENERATED_UUID}}",
"Name": "quotaHitsPerMonth",
"Value": "0",
"Label": "Hits (max: 2000000000) *",
"Type": "int",
"PolicyTemplateUuid": "952820cd-9454-458b-92e1-3c45bdb7a6aa"
}
]
}
}
]
},
"AuthenticationType": "NONE",
"AuthenticationParameters": "{}",
"ApiLocationUrl": "https://petstore.swagger.io/v2/70",
"Uuid": "{{GENERATED_GUID}}"
}
<Please see attached file for image>