# Gateway CA ## List SSH Certificate Authorities (CA) `client.zeroTrust.access.gatewayCA.list(GatewayCAListParamsparams, RequestOptionsoptions?): SinglePage` **get** `/accounts/{account_id}/access/gateway_ca` Lists SSH Certificate Authorities (CA). ### Parameters - `params: GatewayCAListParams` - `account_id: string` Identifier. ### Returns - `GatewayCAListResponse` - `id?: string` The key ID of this certificate. - `public_key?: string` The public key of this certificate. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const gatewayCAListResponse of client.zeroTrust.access.gatewayCA.list({ account_id: '023e105f4ecef8ad9ca31a8372d0c353', })) { console.log(gatewayCAListResponse.id); } ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": [ { "id": "id", "public_key": "public_key" } ], "result_info": { "count": 1, "page": 1, "per_page": 20, "total_count": 2000, "total_pages": 100 } } ``` ## Add a new SSH Certificate Authority (CA) `client.zeroTrust.access.gatewayCA.create(GatewayCACreateParamsparams, RequestOptionsoptions?): GatewayCACreateResponse` **post** `/accounts/{account_id}/access/gateway_ca` Adds a new SSH Certificate Authority (CA). ### Parameters - `params: GatewayCACreateParams` - `account_id: string` Identifier. ### Returns - `GatewayCACreateResponse` - `id?: string` The key ID of this certificate. - `public_key?: string` The public key of this certificate. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const gatewayCA = await client.zeroTrust.access.gatewayCA.create({ account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(gatewayCA.id); ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "id": "id", "public_key": "public_key" } } ``` ## Delete an SSH Certificate Authority (CA) `client.zeroTrust.access.gatewayCA.delete(stringcertificateId, GatewayCADeleteParamsparams, RequestOptionsoptions?): GatewayCADeleteResponse` **delete** `/accounts/{account_id}/access/gateway_ca/{certificate_id}` Deletes an SSH Certificate Authority. ### Parameters - `certificateId: string` UUID. - `params: GatewayCADeleteParams` - `account_id: string` Identifier. ### Returns - `GatewayCADeleteResponse` - `id?: string` UUID. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted }); const gatewayCA = await client.zeroTrust.access.gatewayCA.delete( 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, ); console.log(gatewayCA.id); ``` #### Response ```json { "errors": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "messages": [ { "code": 1000, "message": "message", "documentation_url": "documentation_url", "source": { "pointer": "pointer" } } ], "success": true, "result": { "id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415" } } ``` ## Domain Types ### Gateway CA List Response - `GatewayCAListResponse` - `id?: string` The key ID of this certificate. - `public_key?: string` The public key of this certificate. ### Gateway CA Create Response - `GatewayCACreateResponse` - `id?: string` The key ID of this certificate. - `public_key?: string` The public key of this certificate. ### Gateway CA Delete Response - `GatewayCADeleteResponse` - `id?: string` UUID.