Cloud One Container Security API (2022-12-02)
Download OpenAPI specification:Download
Trend Micro Cloud One™ - Container Security provides policy-based deployment security, ensuring that container images are run only when they meet the security criteria that you define.
List policies
Retrieve a list of policies.
query Parameters
The response body contains the policy objects.
Something about your request didn't quite make sense. The error message should help you figure out what went wrong.
Did you forget to include an API Key in your request? You need to include a valid authentication header in your request. See API reference documentation for details on available authentication methods.
You tried to do something that you're not allowed to do, you naughty scamp. Check your privileges to see what you're actually allowed to do. This could also mean that your token has expired.
You have made too many requests too quickly. Check the Retry-After
header for an indication of when you might be able to try again.
Something has gone terribly wrong. Sorry! The error message may help you figure out what went wrong, but it's unlikely that you'll be able to do anything about it unless you're the server administrator. It's possible that trying again will help, but it's more likely that you're out of luck for the moment.
The service is temporarily unavailable, likely due to maintenance. It
should be available soon, check the Retry-After
header for an
indication of when you might be able to try again.
- Shell/Curl
- Node
- Python3
- Go
curl --request GET \ --url 'https://container.us-1.cloudone.trendmicro.com/api/policies?cursor=SOME_STRING_VALUE&limit=SOME_INTEGER_VALUE' \ --header 'Authorization: REPLACE_KEY_VALUE'
- 200
- 400
- 401
- 403
- 429
- 500
- 503
{- "policies": [
- {
- "id": "Policy-1fhJJhPdbKbGK83VL4GjBsFrXIR",
- "name": "example_policy",
- "description": "My policy description",
- "default": {
- "rules": [
- {
- "type": "registry",
- "enabled": true,
- "action": "block",
- "statement": {
- "key": "equals",
- "value": "gcr.io"
}
}
], - "exceptions": [
- {
- "type": "registry",
- "enabled": true,
- "statement": {
- "key": "equals",
- "value": "docker.io"
}
}
]
}, - "namespaced": [
- {
- "name": "example_ns_policy_definition",
- "namespaces": [
- "dev",
- "prod"
], - "rules": [
- {
- "type": "registry",
- "enabled": true,
- "action": "block",
- "statement": {
- "key": "equals",
- "value": "gcr.io"
}
}
], - "exceptions": [
- {
- "type": "registry",
- "enabled": true,
- "statement": {
- "key": "equals",
- "value": "docker.io"
}
}
]
}
], - "created": "2019-03-01T00:00:00Z",
- "updated": "2019-03-01T00:00:00Z",
- "rulesetsUpdated": "2019-03-01T00:00:00Z"
}
], - "next": "dGhpcyB2YWx1ZSBpcyBvcGFxdWUsIGRlY29kaW5nIGl0IHdvbid0IGJlIHVzZWZ1bAo="
}
Create a policy
Create a policy.
Request Body schema: application/json
The policy request has been accepted, the policy has been created, and the system will begin processing it soon.
Something about your request didn't quite make sense. The error message should help you figure out what went wrong.
Did you forget to include an API Key in your request? You need to include a valid authentication header in your request. See API reference documentation for details on available authentication methods.
You tried to do something that you're not allowed to do, you naughty scamp. Check your privileges to see what you're actually allowed to do. This could also mean that your token has expired.
You have made too many requests too quickly. Check the Retry-After
header for an indication of when you might be able to try again.
Something has gone terribly wrong. Sorry! The error message may help you figure out what went wrong, but it's unlikely that you'll be able to do anything about it unless you're the server administrator. It's possible that trying again will help, but it's more likely that you're out of luck for the moment.
The service is temporarily unavailable, likely due to maintenance. It
should be available soon, check the Retry-After
header for an
indication of when you might be able to try again.
- Payload
- Shell/Curl
- Node
- Python3
- Go
{- "name": "example_policy",
- "description": "(optional) a descriptive string",
- "default": {
- "rules": [
- {
- "type": "registry",
- "enabled": true,
- "action": "block",
- "statement": {
- "key": "equals",
- "value": "gcr.io"
}
}
], - "exceptions": [
- {
- "type": "registry",
- "enabled": true,
- "statement": {
- "key": "equals",
- "value": "docker.io"
}
}
]
}, - "namespaced": [
- {
- "name": "example_ns_policy_definition",
- "namespaces": [
- "dev",
- "prod"
], - "rules": [
- {
- "type": "registry",
- "enabled": true,
- "action": "block",
- "statement": {
- "key": "equals",
- "value": "gcr.io"
}
}
], - "exceptions": [
- {
- "type": "registry",
- "enabled": true,
- "statement": {
- "key": "equals",
- "value": "docker.io"
}
}
]
}
], - "runtime": {
- "default": {
- "rulesets": [
- {
- "id": "ruleset1-1u8aTLsht8qh2M0d7cPXqxnBfDG"
}
]
}
}
}
- 201
- 400
- 401
- 403
- 429
- 500
- 503
{- "runtime": {
- "default": {
- "rulesets": [
- {
- "id": "ruleset1-1u8aTLsht8qh2M0d7cPXqxnBfDG",
- "name": "ruleset1"
}
]
}
}, - "id": "Policy-1fhJJhPdbKbGK83VL4GjBsFrXIR",
- "name": "example_policy",
- "description": "My policy description",
- "default": {
- "rules": [
- {
- "type": "registry",
- "enabled": true,
- "action": "block",
- "statement": {
- "key": "equals",
- "value": "gcr.io"
}
}
], - "exceptions": [
- {
- "type": "registry",
- "enabled": true,
- "statement": {
- "key": "equals",
- "value": "docker.io"
}
}
]
}, - "namespaced": [
- {
- "name": "example_ns_policy_definition",
- "namespaces": [
- "dev",
- "prod"
], - "rules": [
- {
- "type": "registry",
- "enabled": true,
- "action": "block",
- "statement": {
- "key": "equals",
- "value": "gcr.io"
}
}
], - "exceptions": [
- {
- "type": "registry",
- "enabled": true,
- "statement": {
- "key": "equals",
- "value": "docker.io"
}
}
]
}
], - "created": "2019-03-01T00:00:00Z",
- "updated": "2019-03-01T00:00:00Z",
- "rulesetsUpdated": "2019-03-01T00:00:00Z"
}
Describe a policy
Retrieve policy details.
The response body contains the policy object.
Something about your request didn't quite make sense. The error message should help you figure out what went wrong.
Did you forget to include an API Key in your request? You need to include a valid authentication header in your request. See API reference documentation for details on available authentication methods.
You tried to do something that you're not allowed to do, you naughty scamp. Check your privileges to see what you're actually allowed to do. This could also mean that your token has expired.
The resource you were looking for doesn't exist.
You have made too many requests too quickly. Check the Retry-After
header for an indication of when you might be able to try again.
Something has gone terribly wrong. Sorry! The error message may help you figure out what went wrong, but it's unlikely that you'll be able to do anything about it unless you're the server administrator. It's possible that trying again will help, but it's more likely that you're out of luck for the moment.
The service is temporarily unavailable, likely due to maintenance. It
should be available soon, check the Retry-After
header for an
indication of when you might be able to try again.
- Shell/Curl
- Node
- Python3
- Go
curl --request GET \ --url https://container.us-1.cloudone.trendmicro.com/api/policies/{id} \ --header 'Authorization: REPLACE_KEY_VALUE'
- 200
- 400
- 401
- 403
- 404
- 429
- 500
- 503
{- "runtime": {
- "default": {
- "rulesets": [
- {
- "id": "ruleset1-1u8aTLsht8qh2M0d7cPXqxnBfDG",
- "name": "ruleset1"
}
]
}
}, - "id": "Policy-1fhJJhPdbKbGK83VL4GjBsFrXIR",
- "name": "example_policy",
- "description": "My policy description",
- "default": {
- "rules": [
- {
- "type": "registry",
- "enabled": true,
- "action": "block",
- "statement": {
- "key": "equals",
- "value": "gcr.io"
}
}
], - "exceptions": [
- {
- "type": "registry",
- "enabled": true,
- "statement": {
- "key": "equals",
- "value": "docker.io"
}
}
]
}, - "namespaced": [
- {
- "name": "example_ns_policy_definition",
- "namespaces": [
- "dev",
- "prod"
], - "rules": [
- {
- "type": "registry",
- "enabled": true,
- "action": "block",
- "statement": {
- "key": "equals",
- "value": "gcr.io"
}
}
], - "exceptions": [
- {
- "type": "registry",
- "enabled": true,
- "statement": {
- "key": "equals",
- "value": "docker.io"
}
}
]
}
], - "created": "2019-03-01T00:00:00Z",
- "updated": "2019-03-01T00:00:00Z",
- "rulesetsUpdated": "2019-03-01T00:00:00Z"
}
Update a policy
Update a new policy.
Request Body schema: application/json
The response body contains the policy details.
Something about your request didn't quite make sense. The error message should help you figure out what went wrong.
Did you forget to include an API Key in your request? You need to include a valid authentication header in your request. See API reference documentation for details on available authentication methods.
You tried to do something that you're not allowed to do, you naughty scamp. Check your privileges to see what you're actually allowed to do. This could also mean that your token has expired.
You have made too many requests too quickly. Check the Retry-After
header for an indication of when you might be able to try again.
Something has gone terribly wrong. Sorry! The error message may help you figure out what went wrong, but it's unlikely that you'll be able to do anything about it unless you're the server administrator. It's possible that trying again will help, but it's more likely that you're out of luck for the moment.
The service is temporarily unavailable, likely due to maintenance. It
should be available soon, check the Retry-After
header for an
indication of when you might be able to try again.
- Payload
- Shell/Curl
- Node
- Python3
- Go
{- "description": "(optional) a descriptive string",
- "default": {
- "rules": [
- {
- "type": "registry",
- "enabled": true,
- "action": "block",
- "statement": {
- "key": "equals",
- "value": "gcr.io"
}
}
], - "exceptions": [
- {
- "type": "registry",
- "enabled": true,
- "statement": {
- "key": "equals",
- "value": "docker.io"
}
}
]
}, - "namespaced": [
- {
- "name": "example_ns_policy_definition",
- "namespaces": [
- "dev",
- "prod"
], - "rules": [
- {
- "type": "registry",
- "enabled": true,
- "action": "block",
- "statement": {
- "key": "equals",
- "value": "gcr.io"
}
}
], - "exceptions": [
- {
- "type": "registry",
- "enabled": true,
- "statement": {
- "key": "equals",
- "value": "docker.io"
}
}
]
}
], - "runtime": {
- "default": {
- "rulesets": [
- {
- "id": "ruleset1-1u8aTLsht8qh2M0d7cPXqxnBfDG"
}
]
}
}
}
- 200
- 400
- 401
- 403
- 429
- 500
- 503
{- "runtime": {
- "default": {
- "rulesets": [
- {
- "id": "ruleset1-1u8aTLsht8qh2M0d7cPXqxnBfDG",
- "name": "ruleset1"
}
]
}
}, - "id": "Policy-1fhJJhPdbKbGK83VL4GjBsFrXIR",
- "name": "example_policy",
- "description": "My policy description",
- "default": {
- "rules": [
- {
- "type": "registry",
- "enabled": true,
- "action": "block",
- "statement": {
- "key": "equals",
- "value": "gcr.io"
}
}
], - "exceptions": [
- {
- "type": "registry",
- "enabled": true,
- "statement": {
- "key": "equals",
- "value": "docker.io"
}
}
]
}, - "namespaced": [
- {
- "name": "example_ns_policy_definition",
- "namespaces": [
- "dev",
- "prod"
], - "rules": [
- {
- "type": "registry",
- "enabled": true,
- "action": "block",
- "statement": {
- "key": "equals",
- "value": "gcr.io"
}
}
], - "exceptions": [
- {
- "type": "registry",
- "enabled": true,
- "statement": {
- "key": "equals",
- "value": "docker.io"
}
}
]
}
], - "created": "2019-03-01T00:00:00Z",
- "updated": "2019-03-01T00:00:00Z",
- "rulesetsUpdated": "2019-03-01T00:00:00Z"
}
Delete a policy
Delete a policy.
The policy is deleted.
The policy has been deleted.
Something about your request didn't quite make sense. The error message should help you figure out what went wrong.
Did you forget to include an API Key in your request? You need to include a valid authentication header in your request. See API reference documentation for details on available authentication methods.
You tried to do something that you're not allowed to do, you naughty scamp. Check your privileges to see what you're actually allowed to do. This could also mean that your token has expired.
The resource you were looking for doesn't exist.
You have made too many requests too quickly. Check the Retry-After
header for an indication of when you might be able to try again.
Something has gone terribly wrong. Sorry! The error message may help you figure out what went wrong, but it's unlikely that you'll be able to do anything about it unless you're the server administrator. It's possible that trying again will help, but it's more likely that you're out of luck for the moment.
The service is temporarily unavailable, likely due to maintenance. It
should be available soon, check the Retry-After
header for an
indication of when you might be able to try again.
- Shell/Curl
- Node
- Python3
- Go
curl --request DELETE \ --url https://container.us-1.cloudone.trendmicro.com/api/policies/{id} \ --header 'Authorization: REPLACE_KEY_VALUE'
- 400
- 401
- 403
- 404
- 429
- 500
- 503
{- "message": "Something went wrong. To fix it, try ...",
- "fields": {
- "property1": "string",
- "property2": "string"
}
}