# Method: projects.locations.certificateAuthorities.fetch

- [HTTP request](https://docs.cloud.google.com/certificate-authority-service/docs/reference/rest/v1beta1/projects.locations.certificateAuthorities/fetch#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/certificate-authority-service/docs/reference/rest/v1beta1/projects.locations.certificateAuthorities/fetch#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/certificate-authority-service/docs/reference/rest/v1beta1/projects.locations.certificateAuthorities/fetch#body.request_body)
- [Response body](https://docs.cloud.google.com/certificate-authority-service/docs/reference/rest/v1beta1/projects.locations.certificateAuthorities/fetch#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/certificate-authority-service/docs/reference/rest/v1beta1/projects.locations.certificateAuthorities/fetch#body.FetchCertificateAuthorityCsrResponse.SCHEMA_REPRESENTATION)
- [Authorization Scopes](https://docs.cloud.google.com/certificate-authority-service/docs/reference/rest/v1beta1/projects.locations.certificateAuthorities/fetch#body.aspect)

Fetch a certificate signing request (CSR) from a `https://docs.cloud.google.com/certificate-authority-service/docs/reference/rest/v1beta1/projects.locations.certificateAuthorities#CertificateAuthority` that is in state `https://docs.cloud.google.com/certificate-authority-service/docs/reference/rest/v1beta1/projects.locations.certificateAuthorities#State.ENUM_VALUES.PENDING_ACTIVATION` and is of type `https://docs.cloud.google.com/certificate-authority-service/docs/reference/rest/v1beta1/projects.locations.certificateAuthorities#Type.ENUM_VALUES.SUBORDINATE`. The CSR must then be signed by the desired parent Certificate Authority, which could be another `https://docs.cloud.google.com/certificate-authority-service/docs/reference/rest/v1beta1/projects.locations.certificateAuthorities#CertificateAuthority` resource, or could be an on-prem certificate authority. See also `https://docs.cloud.google.com/certificate-authority-service/docs/reference/rest/v1beta1/projects.locations.certificateAuthorities/activate#google.cloud.security.privateca.v1beta1.CertificateAuthorityService.ActivateCertificateAuthority`.

### HTTP request

`GET https://privateca.googleapis.com/v1beta1/{name=projects/*/locations/*/certificateAuthorities/*}:fetch`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. The resource name for this `https://docs.cloud.google.com/certificate-authority-service/docs/reference/rest/v1beta1/projects.locations.certificateAuthorities#CertificateAuthority` in the format `projects/*/locations/*/certificateAuthorities/*`. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `name`: - `privateca.certificateAuthorities.get` |

### Request body

The request body must be empty.

### Response body

If successful, the response body contains data with the following structure:
Response message for `https://docs.cloud.google.com/certificate-authority-service/docs/reference/rest/v1beta1/projects.locations.certificateAuthorities/fetch#google.cloud.security.privateca.v1beta1.CertificateAuthorityService.FetchCertificateAuthorityCsr`.

| JSON representation ||
|---|---|
| ``` { "pemCsr": string } ``` |

| Fields ||
|---|---|
| `pemCsr` | `string` Output only. The PEM-encoded signed certificate signing request (CSR). |

### Authorization Scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authentication Overview](https://cloud.google.com/docs/authentication/).