Post Resource Matches
This endpoint returns a list of cached resources from the input list.
This endpoint matches given resource SHA-1/file size pairs against the Cloud Controller cache and reports the subset that describes already cached files. This is usually used to avoid uploading duplicate files when pushing an app which has only been partially changed. The path and mode fields are not used when matching.
When uploading package bits, the response from this endpoint should be used as the resources form field. As such, it is useful to include the path and mode fields for each resource even though they are not used when determining a resource match.
Cloud Foundry operators may set minimum/maximum file sizes to match against. If the file size provided is outside this range, it will not be matched against.
If the resource_matching feature flag is disabled, resource matching will always return an empty array.
Show optional properties
{
"resources": [
{}
]
}
{
"resources": [
{
"checksum": {
"value": "string"
},
"size_in_bytes": 0,
"path": "string"
}
]
}
List of resources to check for in the resource cache
Created
{
"resources": [
{
"checksum": {
"value": "string"
},
"size_in_bytes": 0,
"path": "string",
"mode": "string"
}
]
}
resources
Bad Request
{
"errors": [
{
"code": 0,
"detail": "string",
"title": "string"
}
]
}
errors
Unauthorized
{
"errors": [
{
"code": 0,
"detail": "string",
"title": "string"
}
]
}
errors
Forbidden
{
"errors": [
{
"code": 0,
"detail": "string",
"title": "string"
}
]
}
errors
Conflict
{
"errors": [
{
"code": 0,
"detail": "string",
"title": "string"
}
]
}
errors
Unprocessable Entity
{
"errors": [
{
"code": 0,
"detail": "string",
"title": "string"
}
]
}
errors
Internal Server Error
{
"errors": [
{
"code": 0,
"detail": "string",
"title": "string"
}
]
}
errors
Service Unavailable
{
"errors": [
{
"code": 0,
"detail": "string",
"title": "string"
}
]
}
errors
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"resources":["object"]}' https://{api_host}/v3/resource_matches