# REST Resource: projects.locations.certificates

- [Resource: Certificate](https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.certificates#Certificate)
  - [JSON representation](https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.certificates#Certificate.SCHEMA_REPRESENTATION)
  - [State](https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.certificates#Certificate.State)
  - [ClientCertificate](https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.certificates#Certificate.ClientCertificate)
    - [JSON representation](https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.certificates#Certificate.ClientCertificate.SCHEMA_REPRESENTATION)
- [Methods](https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.certificates#METHODS_SUMMARY)

## Resource: Certificate

The certificate definition

| JSON representation |
|---|
| ``` { "name": string, "displayName": string, "description": string, "requestorId": string, "credentialId": string, "certificateStatus": enum (`https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.certificates#Certificate.State`), "validStartTime": string, "validEndTime": string, "rawCertificate": { object (`https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.certificates#Certificate.ClientCertificate`) } } ``` |

| Fields ||
|---|---|
| `name` | `string` Output only. Auto generated primary key |
| `displayName` | `string` Required. name of the certificate |
| `description` | `string` Description of the certificate |
| `requestorId` | `string` Immutable. Requestor ID to be used to register certificate with trawler |
| `credentialId` | `string` Immutable. Credential id that will be used to register with trawler |
| `certificateStatus` | ``enum (`https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.certificates#Certificate.State`)`` Status of the certificate |
| `validStartTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The timestamp after which certificate will be valid Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `validEndTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The timestamp after which certificate will expire Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `rawCertificate` | ``object (`https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.certificates#Certificate.ClientCertificate`)`` Input only. Raw client certificate which would be registered with trawler |

### State

Status of the certificate

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | Unspecified certificate status |
| `ACTIVE` | Certificate in active state will be able to use |
| `EXPIRED` | Certificate in expired state needs to be updated |

### ClientCertificate

Contains client certificate information

| JSON representation |
|---|
| ``` { "sslCertificate": string, "encryptedPrivateKey": string, "passphrase": string } ``` |

| Fields ||
|---|---|
| `sslCertificate` | `string` The ssl certificate encoded in PEM format. This string must include the begin header and end footer lines. For example, ---BEGIN CERTIFICATE--- MIICTTCCAbagAwIBAgIJAPT0tSKNxan/MA0GCSqGSIb3DQEBCwUAMCoxFzAVBgNV BAoTDkdvb2dsZSBURVNUSU5HMQ8wDQYDVQQDEwZ0ZXN0Q0EwHhcNMTUwMTAxMDAw MDAwWhcNMjUwMTAxMDAwMDAwWjAuMRcwFQYDVQQKEw5Hb29nbGUgVEVTVElORzET MBEGA1UEAwwKam9lQGJhbmFuYTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA vDYFgMgxi5W488d9J7UpCInl0NXmZQpJDEHE4hvkaRlH7pnC71H0DLt0/3zATRP1 JzY2+eqBmbGl4/sgZKYv8UrLnNyQNUTsNx1iZAfPUflf5FwgVsai8BM0pUciq1NB xD429VFcrGZNucvFLh72RuRFIKH8WUpiK/iZNFkWhZ0CAwEAAaN3MHUwDgYDVR0P AQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAMBgNVHRMB Af8EAjAAMBkGA1UdDgQSBBCVgnFBCWgL/iwCqnGrhTPQMBsGA1UdIwQUMBKAEKey Um2o4k2WiEVA0ldQvNYwDQYJKoZIhvcNAQELBQADgYEAYK986R4E3L1v+Q6esBtW JrUwA9UmJRSQr0N5w3o9XzarU37/bkjOP0Fw0k/A6Vv1n3vlciYfBFaBIam1qRHr 5dMsYf4CZS6w50r7hyzqyrwDoyNxkLnd2PdcHT/sym1QmflsjEs7pejtnohO6N2H wQW6M0H7Zt8claGRla4fKkg= ---END CERTIFICATE--- |
| `encryptedPrivateKey` | `string` The ssl certificate encoded in PEM format. This string must include the begin header and end footer lines. For example, ---BEGIN CERTIFICATE--- MIICTTCCAbagAwIBAgIJAPT0tSKNxan/MA0GCSqGSIb3DQEBCwUAMCoxFzAVBgNV BAoTDkdvb2dsZSBURVNUSU5HMQ8wDQYDVQQDEwZ0ZXN0Q0EwHhcNMTUwMTAxMDAw MDAwWhcNMjUwMTAxMDAwMDAwWjAuMRcwFQYDVQQKEw5Hb29nbGUgVEVTVElORzET MBEGA1UEAwwKam9lQGJhbmFuYTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA vDYFgMgxi5W488d9J7UpCInl0NXmZQpJDEHE4hvkaRlH7pnC71H0DLt0/3zATRP1 JzY2+eqBmbGl4/sgZKYv8UrLnNyQNUTsNx1iZAfPUflf5FwgVsai8BM0pUciq1NB xD429VFcrGZNucvFLh72RuRFIKH8WUpiK/iZNFkWhZ0CAwEAAaN3MHUwDgYDVR0P AQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAMBgNVHRMB Af8EAjAAMBkGA1UdDgQSBBCVgnFBCWgL/iwCqnGrhTPQMBsGA1UdIwQUMBKAEKey Um2o4k2WiEVA0ldQvNYwDQYJKoZIhvcNAQELBQADgYEAYK986R4E3L1v+Q6esBtW JrUwA9UmJRSQr0N5w3o9XzarU37/bkjOP0Fw0k/A6Vv1n3vlciYfBFaBIam1qRHr 5dMsYf4CZS6w50r7hyzqyrwDoyNxkLnd2PdcHT/sym1QmflsjEs7pejtnohO6N2H wQW6M0H7Zt8claGRla4fKkg= ---END CERTIFICATE--- |
| `passphrase` | `string` 'passphrase' should be left unset if private key is not encrypted. Note that 'passphrase' is not the password for web server, but an extra layer of security to protected private key. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.certificates/create` | Creates a new certificate. |
| ### `https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.certificates/delete` | Delete a certificate |
| ### `https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.certificates/get` | Get a certificates in the specified project. |
| ### `https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.certificates/list` | List all the certificates that match the filter. |
| ### `https://docs.cloud.google.com/application-integration/docs/reference/rest/v1/projects.locations.certificates/patch` | Updates the certificate by id. |