Add a new Matching Criteria to a Resource Definition.
POST {{baseUrl}}/orgs/:orgId/resources/defs/:defId/criteria
Matching Criteria are combined with Resource Type to select a specific definition. Matching Criteria can be set for any combination of Application ID, Environment ID, Environment Type, and Resource ID. In the event of multiple matches, the most specific match is chosen.
For example, given 3 sets of matching criteria for the same type:
1. {"env_type":"test"}
2. {"env_type":"development"}
3. {"env_type":"test", "app_id":"my-app"}
If, a resource of that time was needed in an Application my-app
, Environment qa-team
with Type test
and Resource ID modules.my-module-externals.my-resource
, there would be two resources definitions matching the criteria: #1 & #3. Definition #3 will be chosen because it's matching criteria is the most specific.
Request Body
{"env_id"=>"production"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |
RESPONSES
status: OK
{"app_id":"tempor mollit pariatur","env_id":"consectetur consequat aliquip","env_type":"magn","id":"laboris dolor","res_id":"veniam amet non in"}