{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "GET ALL JSON Schema for credentials",
"type": "object",
"definitions": {
"GUID": {
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"resourceMetadata": {
"properties": {
"client": {
"type": "string"
},
"tenantId": {
"type": "string"
},
"groupId": {
"type": "string"
},
"resourceName": {
"type": "string"
},
"originalHref": {
"type": "string"
}
}
},
"provisioningState": {
"enum": [ "Succeeded", "Updating", "Deleting", "Failed" ]
},
"certType": {
"type": "object",
"properties": {
"provisioningState": {
"$ref": "#/definitions/provisioningState"
},
"type": {
"enum": [ "X509Certificate" ]
},
"value": {
"type": "string"
}
},
"required": [
"provisioningState",
"type",
"value"
]
},
"usernameType": {
"type": "object",
"properties": {
"provisioningState": {
"$ref": "#/definitions/provisioningState"
},
"type": {
"enum": [ "usernamePassword" ]
},
"userName": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"provisioningState",
"type",
"userName",
"value"
]
},
"credential": {
"type" : "object",
"properties": {
"resourceRef": {
"type": "string"
},
"resourceId": {
"type": "string"
},
"etag": {
"type": "string"
},
"instanceId": {
"$ref": "#/definitions/GUID"
},
"resourceMetadata": {
"$ref": "#/definitions/resourceMetadata"
},
"tags": {
"additionalProperties": { "type": "string" }
},
"properties": {
"oneOf": [
{ "$ref": "#/definitions/certType" },
{ "$ref": "#/definitions/usernameType" }
]
}
},
"required": [
"resourceRef",
"resourceId",
"etag",
"instanceId",
"properties"
]
},
"credentialArray": {
"type": "array",
"minItems": 0,
"uniqueItems": true,
"items": { "$ref": "#/definitions/credential" }
}
},
"properties": {
"value": { "$ref": "#/definitions/credentialArray" },
"nextLink": {
"type": "string",
"format": "uri",
"default": ""
}
},
"required": [ "nextLink" ]
}