# Catalog Syncs ## List Catalog Syncs `client.magicCloudNetworking.catalogSyncs.list(CatalogSyncListParamsparams, RequestOptionsoptions?): SinglePage` **get** `/accounts/{account_id}/magic/cloud/catalog-syncs` List Catalog Syncs (Closed Beta). ### Parameters - `params: CatalogSyncListParams` - `account_id: string` ### Returns - `CatalogSyncListResponse` - `id: string` - `description: string` - `destination_id: string` - `destination_type: "NONE" | "ZERO_TRUST_LIST"` - `"NONE"` - `"ZERO_TRUST_LIST"` - `last_user_update_at: string` - `name: string` - `policy: string` - `update_mode: "AUTO" | "MANUAL"` - `"AUTO"` - `"MANUAL"` - `errors?: Record` - `code: 1001 | 1002 | 1003 | 152 more` - `1001` - `1002` - `1003` - `1004` - `1005` - `1006` - `1007` - `1008` - `1009` - `1010` - `1011` - `1012` - `1013` - `1014` - `1015` - `1016` - `1017` - `1018` - `2001` - `2002` - `2003` - `2004` - `2005` - `2006` - `2007` - `2008` - `2009` - `2010` - `2011` - `2012` - `2013` - `2014` - `2015` - `2016` - `2017` - `2018` - `2019` - `2020` - `2021` - `2022` - `3001` - `3002` - `3003` - `3004` - `3005` - `3006` - `3007` - `4001` - `4002` - `4003` - `4004` - `4005` - `4006` - `4007` - `4008` - `4009` - `4010` - `4011` - `4012` - `4013` - `4014` - `4015` - `4016` - `4017` - `4018` - `4019` - `4020` - `4021` - `4022` - `4023` - `5001` - `5002` - `5003` - `5004` - `102000` - `102001` - `102002` - `102003` - `102004` - `102005` - `102006` - `102007` - `102008` - `102009` - `102010` - `102011` - `102012` - `102013` - `102014` - `102015` - `102016` - `102017` - `102018` - `102019` - `102020` - `102021` - `102022` - `102023` - `102024` - `102025` - `102026` - `102027` - `102028` - `102029` - `102030` - `102031` - `102032` - `102033` - `102034` - `102035` - `102036` - `102037` - `102038` - `102039` - `102040` - `102041` - `102042` - `102043` - `102044` - `102045` - `102046` - `102047` - `102048` - `102049` - `102050` - `102051` - `102052` - `102053` - `102054` - `102055` - `102056` - `102057` - `102058` - `102059` - `102060` - `102061` - `102062` - `102063` - `102064` - `102065` - `102066` - `102067` - `102068` - `102069` - `102070` - `102071` - `102072` - `103001` - `103002` - `103003` - `103004` - `103005` - `103006` - `103007` - `103008` - `message: string` - `documentation_url?: string` - `meta?: Meta` - `l10n_key?: string` - `loggable_error?: string` - `template_data?: unknown` - `trace_id?: string` - `source?: Source` - `parameter?: string` - `parameter_value_index?: number` - `pointer?: string` - `includes_discoveries_until?: string` - `last_attempted_update_at?: string` - `last_successful_update_at?: string` ### 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 catalogSyncListResponse of client.magicCloudNetworking.catalogSyncs.list({ account_id: 'account_id', })) { console.log(catalogSyncListResponse.id); } ``` #### Response ```json { "errors": [ { "code": 1001, "message": "message", "documentation_url": "documentation_url", "meta": { "l10n_key": "l10n_key", "loggable_error": "loggable_error", "template_data": {}, "trace_id": "trace_id" }, "source": { "parameter": "parameter", "parameter_value_index": 0, "pointer": "pointer" } } ], "messages": [ { "code": 1001, "message": "message", "documentation_url": "documentation_url", "meta": { "l10n_key": "l10n_key", "loggable_error": "loggable_error", "template_data": {}, "trace_id": "trace_id" }, "source": { "parameter": "parameter", "parameter_value_index": 0, "pointer": "pointer" } } ], "result": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "description": "description", "destination_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "destination_type": "NONE", "last_user_update_at": "last_user_update_at", "name": "name", "policy": "policy", "update_mode": "AUTO", "errors": { "foo": { "code": 1001, "message": "message", "documentation_url": "documentation_url", "meta": { "l10n_key": "l10n_key", "loggable_error": "loggable_error", "template_data": {}, "trace_id": "trace_id" }, "source": { "parameter": "parameter", "parameter_value_index": 0, "pointer": "pointer" } } }, "includes_discoveries_until": "includes_discoveries_until", "last_attempted_update_at": "last_attempted_update_at", "last_successful_update_at": "last_successful_update_at" } ], "success": true } ``` ## Read Catalog Sync `client.magicCloudNetworking.catalogSyncs.get(stringsyncId, CatalogSyncGetParamsparams, RequestOptionsoptions?): CatalogSyncGetResponse` **get** `/accounts/{account_id}/magic/cloud/catalog-syncs/{sync_id}` Read a Catalog Sync (Closed Beta). ### Parameters - `syncId: string` - `params: CatalogSyncGetParams` - `account_id: string` ### Returns - `CatalogSyncGetResponse` - `id: string` - `description: string` - `destination_id: string` - `destination_type: "NONE" | "ZERO_TRUST_LIST"` - `"NONE"` - `"ZERO_TRUST_LIST"` - `last_user_update_at: string` - `name: string` - `policy: string` - `update_mode: "AUTO" | "MANUAL"` - `"AUTO"` - `"MANUAL"` - `errors?: Record` - `code: 1001 | 1002 | 1003 | 152 more` - `1001` - `1002` - `1003` - `1004` - `1005` - `1006` - `1007` - `1008` - `1009` - `1010` - `1011` - `1012` - `1013` - `1014` - `1015` - `1016` - `1017` - `1018` - `2001` - `2002` - `2003` - `2004` - `2005` - `2006` - `2007` - `2008` - `2009` - `2010` - `2011` - `2012` - `2013` - `2014` - `2015` - `2016` - `2017` - `2018` - `2019` - `2020` - `2021` - `2022` - `3001` - `3002` - `3003` - `3004` - `3005` - `3006` - `3007` - `4001` - `4002` - `4003` - `4004` - `4005` - `4006` - `4007` - `4008` - `4009` - `4010` - `4011` - `4012` - `4013` - `4014` - `4015` - `4016` - `4017` - `4018` - `4019` - `4020` - `4021` - `4022` - `4023` - `5001` - `5002` - `5003` - `5004` - `102000` - `102001` - `102002` - `102003` - `102004` - `102005` - `102006` - `102007` - `102008` - `102009` - `102010` - `102011` - `102012` - `102013` - `102014` - `102015` - `102016` - `102017` - `102018` - `102019` - `102020` - `102021` - `102022` - `102023` - `102024` - `102025` - `102026` - `102027` - `102028` - `102029` - `102030` - `102031` - `102032` - `102033` - `102034` - `102035` - `102036` - `102037` - `102038` - `102039` - `102040` - `102041` - `102042` - `102043` - `102044` - `102045` - `102046` - `102047` - `102048` - `102049` - `102050` - `102051` - `102052` - `102053` - `102054` - `102055` - `102056` - `102057` - `102058` - `102059` - `102060` - `102061` - `102062` - `102063` - `102064` - `102065` - `102066` - `102067` - `102068` - `102069` - `102070` - `102071` - `102072` - `103001` - `103002` - `103003` - `103004` - `103005` - `103006` - `103007` - `103008` - `message: string` - `documentation_url?: string` - `meta?: Meta` - `l10n_key?: string` - `loggable_error?: string` - `template_data?: unknown` - `trace_id?: string` - `source?: Source` - `parameter?: string` - `parameter_value_index?: number` - `pointer?: string` - `includes_discoveries_until?: string` - `last_attempted_update_at?: string` - `last_successful_update_at?: string` ### 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 catalogSync = await client.magicCloudNetworking.catalogSyncs.get( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id' }, ); console.log(catalogSync.id); ``` #### Response ```json { "errors": [ { "code": 1001, "message": "message", "documentation_url": "documentation_url", "meta": { "l10n_key": "l10n_key", "loggable_error": "loggable_error", "template_data": {}, "trace_id": "trace_id" }, "source": { "parameter": "parameter", "parameter_value_index": 0, "pointer": "pointer" } } ], "messages": [ { "code": 1001, "message": "message", "documentation_url": "documentation_url", "meta": { "l10n_key": "l10n_key", "loggable_error": "loggable_error", "template_data": {}, "trace_id": "trace_id" }, "source": { "parameter": "parameter", "parameter_value_index": 0, "pointer": "pointer" } } ], "result": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "description": "description", "destination_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "destination_type": "NONE", "last_user_update_at": "last_user_update_at", "name": "name", "policy": "policy", "update_mode": "AUTO", "errors": { "foo": { "code": 1001, "message": "message", "documentation_url": "documentation_url", "meta": { "l10n_key": "l10n_key", "loggable_error": "loggable_error", "template_data": {}, "trace_id": "trace_id" }, "source": { "parameter": "parameter", "parameter_value_index": 0, "pointer": "pointer" } } }, "includes_discoveries_until": "includes_discoveries_until", "last_attempted_update_at": "last_attempted_update_at", "last_successful_update_at": "last_successful_update_at" }, "success": true } ``` ## Create Catalog Sync `client.magicCloudNetworking.catalogSyncs.create(CatalogSyncCreateParamsparams, RequestOptionsoptions?): CatalogSyncCreateResponse` **post** `/accounts/{account_id}/magic/cloud/catalog-syncs` Create a new Catalog Sync (Closed Beta). ### Parameters - `params: CatalogSyncCreateParams` - `account_id: string` Path param - `destination_type: "NONE" | "ZERO_TRUST_LIST"` Body param - `"NONE"` - `"ZERO_TRUST_LIST"` - `name: string` Body param - `update_mode: "AUTO" | "MANUAL"` Body param - `"AUTO"` - `"MANUAL"` - `description?: string` Body param - `policy?: string` Body param - `forwarded?: string` Header param ### Returns - `CatalogSyncCreateResponse` - `id: string` - `description: string` - `destination_id: string` - `destination_type: "NONE" | "ZERO_TRUST_LIST"` - `"NONE"` - `"ZERO_TRUST_LIST"` - `last_user_update_at: string` - `name: string` - `policy: string` - `update_mode: "AUTO" | "MANUAL"` - `"AUTO"` - `"MANUAL"` - `errors?: Record` - `code: 1001 | 1002 | 1003 | 152 more` - `1001` - `1002` - `1003` - `1004` - `1005` - `1006` - `1007` - `1008` - `1009` - `1010` - `1011` - `1012` - `1013` - `1014` - `1015` - `1016` - `1017` - `1018` - `2001` - `2002` - `2003` - `2004` - `2005` - `2006` - `2007` - `2008` - `2009` - `2010` - `2011` - `2012` - `2013` - `2014` - `2015` - `2016` - `2017` - `2018` - `2019` - `2020` - `2021` - `2022` - `3001` - `3002` - `3003` - `3004` - `3005` - `3006` - `3007` - `4001` - `4002` - `4003` - `4004` - `4005` - `4006` - `4007` - `4008` - `4009` - `4010` - `4011` - `4012` - `4013` - `4014` - `4015` - `4016` - `4017` - `4018` - `4019` - `4020` - `4021` - `4022` - `4023` - `5001` - `5002` - `5003` - `5004` - `102000` - `102001` - `102002` - `102003` - `102004` - `102005` - `102006` - `102007` - `102008` - `102009` - `102010` - `102011` - `102012` - `102013` - `102014` - `102015` - `102016` - `102017` - `102018` - `102019` - `102020` - `102021` - `102022` - `102023` - `102024` - `102025` - `102026` - `102027` - `102028` - `102029` - `102030` - `102031` - `102032` - `102033` - `102034` - `102035` - `102036` - `102037` - `102038` - `102039` - `102040` - `102041` - `102042` - `102043` - `102044` - `102045` - `102046` - `102047` - `102048` - `102049` - `102050` - `102051` - `102052` - `102053` - `102054` - `102055` - `102056` - `102057` - `102058` - `102059` - `102060` - `102061` - `102062` - `102063` - `102064` - `102065` - `102066` - `102067` - `102068` - `102069` - `102070` - `102071` - `102072` - `103001` - `103002` - `103003` - `103004` - `103005` - `103006` - `103007` - `103008` - `message: string` - `documentation_url?: string` - `meta?: Meta` - `l10n_key?: string` - `loggable_error?: string` - `template_data?: unknown` - `trace_id?: string` - `source?: Source` - `parameter?: string` - `parameter_value_index?: number` - `pointer?: string` - `includes_discoveries_until?: string` - `last_attempted_update_at?: string` - `last_successful_update_at?: string` ### 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 catalogSync = await client.magicCloudNetworking.catalogSyncs.create({ account_id: 'account_id', destination_type: 'NONE', name: 'name', update_mode: 'AUTO', }); console.log(catalogSync.id); ``` #### Response ```json { "errors": [ { "code": 1001, "message": "message", "documentation_url": "documentation_url", "meta": { "l10n_key": "l10n_key", "loggable_error": "loggable_error", "template_data": {}, "trace_id": "trace_id" }, "source": { "parameter": "parameter", "parameter_value_index": 0, "pointer": "pointer" } } ], "messages": [ { "code": 1001, "message": "message", "documentation_url": "documentation_url", "meta": { "l10n_key": "l10n_key", "loggable_error": "loggable_error", "template_data": {}, "trace_id": "trace_id" }, "source": { "parameter": "parameter", "parameter_value_index": 0, "pointer": "pointer" } } ], "result": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "description": "description", "destination_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "destination_type": "NONE", "last_user_update_at": "last_user_update_at", "name": "name", "policy": "policy", "update_mode": "AUTO", "errors": { "foo": { "code": 1001, "message": "message", "documentation_url": "documentation_url", "meta": { "l10n_key": "l10n_key", "loggable_error": "loggable_error", "template_data": {}, "trace_id": "trace_id" }, "source": { "parameter": "parameter", "parameter_value_index": 0, "pointer": "pointer" } } }, "includes_discoveries_until": "includes_discoveries_until", "last_attempted_update_at": "last_attempted_update_at", "last_successful_update_at": "last_successful_update_at" }, "success": true } ``` ## Update Catalog Sync `client.magicCloudNetworking.catalogSyncs.update(stringsyncId, CatalogSyncUpdateParamsparams, RequestOptionsoptions?): CatalogSyncUpdateResponse` **put** `/accounts/{account_id}/magic/cloud/catalog-syncs/{sync_id}` Update a Catalog Sync (Closed Beta). ### Parameters - `syncId: string` - `params: CatalogSyncUpdateParams` - `account_id: string` Path param - `description?: string` Body param - `name?: string` Body param - `policy?: string` Body param - `update_mode?: "AUTO" | "MANUAL"` Body param - `"AUTO"` - `"MANUAL"` ### Returns - `CatalogSyncUpdateResponse` - `id: string` - `description: string` - `destination_id: string` - `destination_type: "NONE" | "ZERO_TRUST_LIST"` - `"NONE"` - `"ZERO_TRUST_LIST"` - `last_user_update_at: string` - `name: string` - `policy: string` - `update_mode: "AUTO" | "MANUAL"` - `"AUTO"` - `"MANUAL"` - `errors?: Record` - `code: 1001 | 1002 | 1003 | 152 more` - `1001` - `1002` - `1003` - `1004` - `1005` - `1006` - `1007` - `1008` - `1009` - `1010` - `1011` - `1012` - `1013` - `1014` - `1015` - `1016` - `1017` - `1018` - `2001` - `2002` - `2003` - `2004` - `2005` - `2006` - `2007` - `2008` - `2009` - `2010` - `2011` - `2012` - `2013` - `2014` - `2015` - `2016` - `2017` - `2018` - `2019` - `2020` - `2021` - `2022` - `3001` - `3002` - `3003` - `3004` - `3005` - `3006` - `3007` - `4001` - `4002` - `4003` - `4004` - `4005` - `4006` - `4007` - `4008` - `4009` - `4010` - `4011` - `4012` - `4013` - `4014` - `4015` - `4016` - `4017` - `4018` - `4019` - `4020` - `4021` - `4022` - `4023` - `5001` - `5002` - `5003` - `5004` - `102000` - `102001` - `102002` - `102003` - `102004` - `102005` - `102006` - `102007` - `102008` - `102009` - `102010` - `102011` - `102012` - `102013` - `102014` - `102015` - `102016` - `102017` - `102018` - `102019` - `102020` - `102021` - `102022` - `102023` - `102024` - `102025` - `102026` - `102027` - `102028` - `102029` - `102030` - `102031` - `102032` - `102033` - `102034` - `102035` - `102036` - `102037` - `102038` - `102039` - `102040` - `102041` - `102042` - `102043` - `102044` - `102045` - `102046` - `102047` - `102048` - `102049` - `102050` - `102051` - `102052` - `102053` - `102054` - `102055` - `102056` - `102057` - `102058` - `102059` - `102060` - `102061` - `102062` - `102063` - `102064` - `102065` - `102066` - `102067` - `102068` - `102069` - `102070` - `102071` - `102072` - `103001` - `103002` - `103003` - `103004` - `103005` - `103006` - `103007` - `103008` - `message: string` - `documentation_url?: string` - `meta?: Meta` - `l10n_key?: string` - `loggable_error?: string` - `template_data?: unknown` - `trace_id?: string` - `source?: Source` - `parameter?: string` - `parameter_value_index?: number` - `pointer?: string` - `includes_discoveries_until?: string` - `last_attempted_update_at?: string` - `last_successful_update_at?: string` ### 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 catalogSync = await client.magicCloudNetworking.catalogSyncs.update( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id' }, ); console.log(catalogSync.id); ``` #### Response ```json { "errors": [ { "code": 1001, "message": "message", "documentation_url": "documentation_url", "meta": { "l10n_key": "l10n_key", "loggable_error": "loggable_error", "template_data": {}, "trace_id": "trace_id" }, "source": { "parameter": "parameter", "parameter_value_index": 0, "pointer": "pointer" } } ], "messages": [ { "code": 1001, "message": "message", "documentation_url": "documentation_url", "meta": { "l10n_key": "l10n_key", "loggable_error": "loggable_error", "template_data": {}, "trace_id": "trace_id" }, "source": { "parameter": "parameter", "parameter_value_index": 0, "pointer": "pointer" } } ], "result": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "description": "description", "destination_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "destination_type": "NONE", "last_user_update_at": "last_user_update_at", "name": "name", "policy": "policy", "update_mode": "AUTO", "errors": { "foo": { "code": 1001, "message": "message", "documentation_url": "documentation_url", "meta": { "l10n_key": "l10n_key", "loggable_error": "loggable_error", "template_data": {}, "trace_id": "trace_id" }, "source": { "parameter": "parameter", "parameter_value_index": 0, "pointer": "pointer" } } }, "includes_discoveries_until": "includes_discoveries_until", "last_attempted_update_at": "last_attempted_update_at", "last_successful_update_at": "last_successful_update_at" }, "success": true } ``` ## Patch Catalog Sync `client.magicCloudNetworking.catalogSyncs.edit(stringsyncId, CatalogSyncEditParamsparams, RequestOptionsoptions?): CatalogSyncEditResponse` **patch** `/accounts/{account_id}/magic/cloud/catalog-syncs/{sync_id}` Update a Catalog Sync (Closed Beta). ### Parameters - `syncId: string` - `params: CatalogSyncEditParams` - `account_id: string` Path param - `description?: string` Body param - `name?: string` Body param - `policy?: string` Body param - `update_mode?: "AUTO" | "MANUAL"` Body param - `"AUTO"` - `"MANUAL"` ### Returns - `CatalogSyncEditResponse` - `id: string` - `description: string` - `destination_id: string` - `destination_type: "NONE" | "ZERO_TRUST_LIST"` - `"NONE"` - `"ZERO_TRUST_LIST"` - `last_user_update_at: string` - `name: string` - `policy: string` - `update_mode: "AUTO" | "MANUAL"` - `"AUTO"` - `"MANUAL"` - `errors?: Record` - `code: 1001 | 1002 | 1003 | 152 more` - `1001` - `1002` - `1003` - `1004` - `1005` - `1006` - `1007` - `1008` - `1009` - `1010` - `1011` - `1012` - `1013` - `1014` - `1015` - `1016` - `1017` - `1018` - `2001` - `2002` - `2003` - `2004` - `2005` - `2006` - `2007` - `2008` - `2009` - `2010` - `2011` - `2012` - `2013` - `2014` - `2015` - `2016` - `2017` - `2018` - `2019` - `2020` - `2021` - `2022` - `3001` - `3002` - `3003` - `3004` - `3005` - `3006` - `3007` - `4001` - `4002` - `4003` - `4004` - `4005` - `4006` - `4007` - `4008` - `4009` - `4010` - `4011` - `4012` - `4013` - `4014` - `4015` - `4016` - `4017` - `4018` - `4019` - `4020` - `4021` - `4022` - `4023` - `5001` - `5002` - `5003` - `5004` - `102000` - `102001` - `102002` - `102003` - `102004` - `102005` - `102006` - `102007` - `102008` - `102009` - `102010` - `102011` - `102012` - `102013` - `102014` - `102015` - `102016` - `102017` - `102018` - `102019` - `102020` - `102021` - `102022` - `102023` - `102024` - `102025` - `102026` - `102027` - `102028` - `102029` - `102030` - `102031` - `102032` - `102033` - `102034` - `102035` - `102036` - `102037` - `102038` - `102039` - `102040` - `102041` - `102042` - `102043` - `102044` - `102045` - `102046` - `102047` - `102048` - `102049` - `102050` - `102051` - `102052` - `102053` - `102054` - `102055` - `102056` - `102057` - `102058` - `102059` - `102060` - `102061` - `102062` - `102063` - `102064` - `102065` - `102066` - `102067` - `102068` - `102069` - `102070` - `102071` - `102072` - `103001` - `103002` - `103003` - `103004` - `103005` - `103006` - `103007` - `103008` - `message: string` - `documentation_url?: string` - `meta?: Meta` - `l10n_key?: string` - `loggable_error?: string` - `template_data?: unknown` - `trace_id?: string` - `source?: Source` - `parameter?: string` - `parameter_value_index?: number` - `pointer?: string` - `includes_discoveries_until?: string` - `last_attempted_update_at?: string` - `last_successful_update_at?: string` ### 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 response = await client.magicCloudNetworking.catalogSyncs.edit( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id' }, ); console.log(response.id); ``` #### Response ```json { "errors": [ { "code": 1001, "message": "message", "documentation_url": "documentation_url", "meta": { "l10n_key": "l10n_key", "loggable_error": "loggable_error", "template_data": {}, "trace_id": "trace_id" }, "source": { "parameter": "parameter", "parameter_value_index": 0, "pointer": "pointer" } } ], "messages": [ { "code": 1001, "message": "message", "documentation_url": "documentation_url", "meta": { "l10n_key": "l10n_key", "loggable_error": "loggable_error", "template_data": {}, "trace_id": "trace_id" }, "source": { "parameter": "parameter", "parameter_value_index": 0, "pointer": "pointer" } } ], "result": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "description": "description", "destination_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "destination_type": "NONE", "last_user_update_at": "last_user_update_at", "name": "name", "policy": "policy", "update_mode": "AUTO", "errors": { "foo": { "code": 1001, "message": "message", "documentation_url": "documentation_url", "meta": { "l10n_key": "l10n_key", "loggable_error": "loggable_error", "template_data": {}, "trace_id": "trace_id" }, "source": { "parameter": "parameter", "parameter_value_index": 0, "pointer": "pointer" } } }, "includes_discoveries_until": "includes_discoveries_until", "last_attempted_update_at": "last_attempted_update_at", "last_successful_update_at": "last_successful_update_at" }, "success": true } ``` ## Delete Catalog Sync `client.magicCloudNetworking.catalogSyncs.delete(stringsyncId, CatalogSyncDeleteParamsparams, RequestOptionsoptions?): CatalogSyncDeleteResponse` **delete** `/accounts/{account_id}/magic/cloud/catalog-syncs/{sync_id}` Delete a Catalog Sync (Closed Beta). ### Parameters - `syncId: string` - `params: CatalogSyncDeleteParams` - `account_id: string` Path param - `delete_destination?: boolean` Query param ### Returns - `CatalogSyncDeleteResponse` - `id: string` ### 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 catalogSync = await client.magicCloudNetworking.catalogSyncs.delete( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id' }, ); console.log(catalogSync.id); ``` #### Response ```json { "errors": [ { "code": 1001, "message": "message", "documentation_url": "documentation_url", "meta": { "l10n_key": "l10n_key", "loggable_error": "loggable_error", "template_data": {}, "trace_id": "trace_id" }, "source": { "parameter": "parameter", "parameter_value_index": 0, "pointer": "pointer" } } ], "messages": [ { "code": 1001, "message": "message", "documentation_url": "documentation_url", "meta": { "l10n_key": "l10n_key", "loggable_error": "loggable_error", "template_data": {}, "trace_id": "trace_id" }, "source": { "parameter": "parameter", "parameter_value_index": 0, "pointer": "pointer" } } ], "result": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" }, "success": true } ``` ## Run Catalog Sync `client.magicCloudNetworking.catalogSyncs.refresh(stringsyncId, CatalogSyncRefreshParamsparams, RequestOptionsoptions?): CatalogSyncRefreshResponse` **post** `/accounts/{account_id}/magic/cloud/catalog-syncs/{sync_id}/refresh` Refresh a Catalog Sync's destination by running the sync policy against latest resource catalog (Closed Beta). ### Parameters - `syncId: string` - `params: CatalogSyncRefreshParams` - `account_id: string` ### Returns - `CatalogSyncRefreshResponse = string` ### 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 response = await client.magicCloudNetworking.catalogSyncs.refresh( '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { account_id: 'account_id' }, ); console.log(response); ``` #### Response ```json { "errors": [ { "code": 1001, "message": "message", "documentation_url": "documentation_url", "meta": { "l10n_key": "l10n_key", "loggable_error": "loggable_error", "template_data": {}, "trace_id": "trace_id" }, "source": { "parameter": "parameter", "parameter_value_index": 0, "pointer": "pointer" } } ], "messages": [ { "code": 1001, "message": "message", "documentation_url": "documentation_url", "meta": { "l10n_key": "l10n_key", "loggable_error": "loggable_error", "template_data": {}, "trace_id": "trace_id" }, "source": { "parameter": "parameter", "parameter_value_index": 0, "pointer": "pointer" } } ], "result": "result", "success": true } ``` ## Domain Types ### Catalog Sync List Response - `CatalogSyncListResponse` - `id: string` - `description: string` - `destination_id: string` - `destination_type: "NONE" | "ZERO_TRUST_LIST"` - `"NONE"` - `"ZERO_TRUST_LIST"` - `last_user_update_at: string` - `name: string` - `policy: string` - `update_mode: "AUTO" | "MANUAL"` - `"AUTO"` - `"MANUAL"` - `errors?: Record` - `code: 1001 | 1002 | 1003 | 152 more` - `1001` - `1002` - `1003` - `1004` - `1005` - `1006` - `1007` - `1008` - `1009` - `1010` - `1011` - `1012` - `1013` - `1014` - `1015` - `1016` - `1017` - `1018` - `2001` - `2002` - `2003` - `2004` - `2005` - `2006` - `2007` - `2008` - `2009` - `2010` - `2011` - `2012` - `2013` - `2014` - `2015` - `2016` - `2017` - `2018` - `2019` - `2020` - `2021` - `2022` - `3001` - `3002` - `3003` - `3004` - `3005` - `3006` - `3007` - `4001` - `4002` - `4003` - `4004` - `4005` - `4006` - `4007` - `4008` - `4009` - `4010` - `4011` - `4012` - `4013` - `4014` - `4015` - `4016` - `4017` - `4018` - `4019` - `4020` - `4021` - `4022` - `4023` - `5001` - `5002` - `5003` - `5004` - `102000` - `102001` - `102002` - `102003` - `102004` - `102005` - `102006` - `102007` - `102008` - `102009` - `102010` - `102011` - `102012` - `102013` - `102014` - `102015` - `102016` - `102017` - `102018` - `102019` - `102020` - `102021` - `102022` - `102023` - `102024` - `102025` - `102026` - `102027` - `102028` - `102029` - `102030` - `102031` - `102032` - `102033` - `102034` - `102035` - `102036` - `102037` - `102038` - `102039` - `102040` - `102041` - `102042` - `102043` - `102044` - `102045` - `102046` - `102047` - `102048` - `102049` - `102050` - `102051` - `102052` - `102053` - `102054` - `102055` - `102056` - `102057` - `102058` - `102059` - `102060` - `102061` - `102062` - `102063` - `102064` - `102065` - `102066` - `102067` - `102068` - `102069` - `102070` - `102071` - `102072` - `103001` - `103002` - `103003` - `103004` - `103005` - `103006` - `103007` - `103008` - `message: string` - `documentation_url?: string` - `meta?: Meta` - `l10n_key?: string` - `loggable_error?: string` - `template_data?: unknown` - `trace_id?: string` - `source?: Source` - `parameter?: string` - `parameter_value_index?: number` - `pointer?: string` - `includes_discoveries_until?: string` - `last_attempted_update_at?: string` - `last_successful_update_at?: string` ### Catalog Sync Get Response - `CatalogSyncGetResponse` - `id: string` - `description: string` - `destination_id: string` - `destination_type: "NONE" | "ZERO_TRUST_LIST"` - `"NONE"` - `"ZERO_TRUST_LIST"` - `last_user_update_at: string` - `name: string` - `policy: string` - `update_mode: "AUTO" | "MANUAL"` - `"AUTO"` - `"MANUAL"` - `errors?: Record` - `code: 1001 | 1002 | 1003 | 152 more` - `1001` - `1002` - `1003` - `1004` - `1005` - `1006` - `1007` - `1008` - `1009` - `1010` - `1011` - `1012` - `1013` - `1014` - `1015` - `1016` - `1017` - `1018` - `2001` - `2002` - `2003` - `2004` - `2005` - `2006` - `2007` - `2008` - `2009` - `2010` - `2011` - `2012` - `2013` - `2014` - `2015` - `2016` - `2017` - `2018` - `2019` - `2020` - `2021` - `2022` - `3001` - `3002` - `3003` - `3004` - `3005` - `3006` - `3007` - `4001` - `4002` - `4003` - `4004` - `4005` - `4006` - `4007` - `4008` - `4009` - `4010` - `4011` - `4012` - `4013` - `4014` - `4015` - `4016` - `4017` - `4018` - `4019` - `4020` - `4021` - `4022` - `4023` - `5001` - `5002` - `5003` - `5004` - `102000` - `102001` - `102002` - `102003` - `102004` - `102005` - `102006` - `102007` - `102008` - `102009` - `102010` - `102011` - `102012` - `102013` - `102014` - `102015` - `102016` - `102017` - `102018` - `102019` - `102020` - `102021` - `102022` - `102023` - `102024` - `102025` - `102026` - `102027` - `102028` - `102029` - `102030` - `102031` - `102032` - `102033` - `102034` - `102035` - `102036` - `102037` - `102038` - `102039` - `102040` - `102041` - `102042` - `102043` - `102044` - `102045` - `102046` - `102047` - `102048` - `102049` - `102050` - `102051` - `102052` - `102053` - `102054` - `102055` - `102056` - `102057` - `102058` - `102059` - `102060` - `102061` - `102062` - `102063` - `102064` - `102065` - `102066` - `102067` - `102068` - `102069` - `102070` - `102071` - `102072` - `103001` - `103002` - `103003` - `103004` - `103005` - `103006` - `103007` - `103008` - `message: string` - `documentation_url?: string` - `meta?: Meta` - `l10n_key?: string` - `loggable_error?: string` - `template_data?: unknown` - `trace_id?: string` - `source?: Source` - `parameter?: string` - `parameter_value_index?: number` - `pointer?: string` - `includes_discoveries_until?: string` - `last_attempted_update_at?: string` - `last_successful_update_at?: string` ### Catalog Sync Create Response - `CatalogSyncCreateResponse` - `id: string` - `description: string` - `destination_id: string` - `destination_type: "NONE" | "ZERO_TRUST_LIST"` - `"NONE"` - `"ZERO_TRUST_LIST"` - `last_user_update_at: string` - `name: string` - `policy: string` - `update_mode: "AUTO" | "MANUAL"` - `"AUTO"` - `"MANUAL"` - `errors?: Record` - `code: 1001 | 1002 | 1003 | 152 more` - `1001` - `1002` - `1003` - `1004` - `1005` - `1006` - `1007` - `1008` - `1009` - `1010` - `1011` - `1012` - `1013` - `1014` - `1015` - `1016` - `1017` - `1018` - `2001` - `2002` - `2003` - `2004` - `2005` - `2006` - `2007` - `2008` - `2009` - `2010` - `2011` - `2012` - `2013` - `2014` - `2015` - `2016` - `2017` - `2018` - `2019` - `2020` - `2021` - `2022` - `3001` - `3002` - `3003` - `3004` - `3005` - `3006` - `3007` - `4001` - `4002` - `4003` - `4004` - `4005` - `4006` - `4007` - `4008` - `4009` - `4010` - `4011` - `4012` - `4013` - `4014` - `4015` - `4016` - `4017` - `4018` - `4019` - `4020` - `4021` - `4022` - `4023` - `5001` - `5002` - `5003` - `5004` - `102000` - `102001` - `102002` - `102003` - `102004` - `102005` - `102006` - `102007` - `102008` - `102009` - `102010` - `102011` - `102012` - `102013` - `102014` - `102015` - `102016` - `102017` - `102018` - `102019` - `102020` - `102021` - `102022` - `102023` - `102024` - `102025` - `102026` - `102027` - `102028` - `102029` - `102030` - `102031` - `102032` - `102033` - `102034` - `102035` - `102036` - `102037` - `102038` - `102039` - `102040` - `102041` - `102042` - `102043` - `102044` - `102045` - `102046` - `102047` - `102048` - `102049` - `102050` - `102051` - `102052` - `102053` - `102054` - `102055` - `102056` - `102057` - `102058` - `102059` - `102060` - `102061` - `102062` - `102063` - `102064` - `102065` - `102066` - `102067` - `102068` - `102069` - `102070` - `102071` - `102072` - `103001` - `103002` - `103003` - `103004` - `103005` - `103006` - `103007` - `103008` - `message: string` - `documentation_url?: string` - `meta?: Meta` - `l10n_key?: string` - `loggable_error?: string` - `template_data?: unknown` - `trace_id?: string` - `source?: Source` - `parameter?: string` - `parameter_value_index?: number` - `pointer?: string` - `includes_discoveries_until?: string` - `last_attempted_update_at?: string` - `last_successful_update_at?: string` ### Catalog Sync Update Response - `CatalogSyncUpdateResponse` - `id: string` - `description: string` - `destination_id: string` - `destination_type: "NONE" | "ZERO_TRUST_LIST"` - `"NONE"` - `"ZERO_TRUST_LIST"` - `last_user_update_at: string` - `name: string` - `policy: string` - `update_mode: "AUTO" | "MANUAL"` - `"AUTO"` - `"MANUAL"` - `errors?: Record` - `code: 1001 | 1002 | 1003 | 152 more` - `1001` - `1002` - `1003` - `1004` - `1005` - `1006` - `1007` - `1008` - `1009` - `1010` - `1011` - `1012` - `1013` - `1014` - `1015` - `1016` - `1017` - `1018` - `2001` - `2002` - `2003` - `2004` - `2005` - `2006` - `2007` - `2008` - `2009` - `2010` - `2011` - `2012` - `2013` - `2014` - `2015` - `2016` - `2017` - `2018` - `2019` - `2020` - `2021` - `2022` - `3001` - `3002` - `3003` - `3004` - `3005` - `3006` - `3007` - `4001` - `4002` - `4003` - `4004` - `4005` - `4006` - `4007` - `4008` - `4009` - `4010` - `4011` - `4012` - `4013` - `4014` - `4015` - `4016` - `4017` - `4018` - `4019` - `4020` - `4021` - `4022` - `4023` - `5001` - `5002` - `5003` - `5004` - `102000` - `102001` - `102002` - `102003` - `102004` - `102005` - `102006` - `102007` - `102008` - `102009` - `102010` - `102011` - `102012` - `102013` - `102014` - `102015` - `102016` - `102017` - `102018` - `102019` - `102020` - `102021` - `102022` - `102023` - `102024` - `102025` - `102026` - `102027` - `102028` - `102029` - `102030` - `102031` - `102032` - `102033` - `102034` - `102035` - `102036` - `102037` - `102038` - `102039` - `102040` - `102041` - `102042` - `102043` - `102044` - `102045` - `102046` - `102047` - `102048` - `102049` - `102050` - `102051` - `102052` - `102053` - `102054` - `102055` - `102056` - `102057` - `102058` - `102059` - `102060` - `102061` - `102062` - `102063` - `102064` - `102065` - `102066` - `102067` - `102068` - `102069` - `102070` - `102071` - `102072` - `103001` - `103002` - `103003` - `103004` - `103005` - `103006` - `103007` - `103008` - `message: string` - `documentation_url?: string` - `meta?: Meta` - `l10n_key?: string` - `loggable_error?: string` - `template_data?: unknown` - `trace_id?: string` - `source?: Source` - `parameter?: string` - `parameter_value_index?: number` - `pointer?: string` - `includes_discoveries_until?: string` - `last_attempted_update_at?: string` - `last_successful_update_at?: string` ### Catalog Sync Edit Response - `CatalogSyncEditResponse` - `id: string` - `description: string` - `destination_id: string` - `destination_type: "NONE" | "ZERO_TRUST_LIST"` - `"NONE"` - `"ZERO_TRUST_LIST"` - `last_user_update_at: string` - `name: string` - `policy: string` - `update_mode: "AUTO" | "MANUAL"` - `"AUTO"` - `"MANUAL"` - `errors?: Record` - `code: 1001 | 1002 | 1003 | 152 more` - `1001` - `1002` - `1003` - `1004` - `1005` - `1006` - `1007` - `1008` - `1009` - `1010` - `1011` - `1012` - `1013` - `1014` - `1015` - `1016` - `1017` - `1018` - `2001` - `2002` - `2003` - `2004` - `2005` - `2006` - `2007` - `2008` - `2009` - `2010` - `2011` - `2012` - `2013` - `2014` - `2015` - `2016` - `2017` - `2018` - `2019` - `2020` - `2021` - `2022` - `3001` - `3002` - `3003` - `3004` - `3005` - `3006` - `3007` - `4001` - `4002` - `4003` - `4004` - `4005` - `4006` - `4007` - `4008` - `4009` - `4010` - `4011` - `4012` - `4013` - `4014` - `4015` - `4016` - `4017` - `4018` - `4019` - `4020` - `4021` - `4022` - `4023` - `5001` - `5002` - `5003` - `5004` - `102000` - `102001` - `102002` - `102003` - `102004` - `102005` - `102006` - `102007` - `102008` - `102009` - `102010` - `102011` - `102012` - `102013` - `102014` - `102015` - `102016` - `102017` - `102018` - `102019` - `102020` - `102021` - `102022` - `102023` - `102024` - `102025` - `102026` - `102027` - `102028` - `102029` - `102030` - `102031` - `102032` - `102033` - `102034` - `102035` - `102036` - `102037` - `102038` - `102039` - `102040` - `102041` - `102042` - `102043` - `102044` - `102045` - `102046` - `102047` - `102048` - `102049` - `102050` - `102051` - `102052` - `102053` - `102054` - `102055` - `102056` - `102057` - `102058` - `102059` - `102060` - `102061` - `102062` - `102063` - `102064` - `102065` - `102066` - `102067` - `102068` - `102069` - `102070` - `102071` - `102072` - `103001` - `103002` - `103003` - `103004` - `103005` - `103006` - `103007` - `103008` - `message: string` - `documentation_url?: string` - `meta?: Meta` - `l10n_key?: string` - `loggable_error?: string` - `template_data?: unknown` - `trace_id?: string` - `source?: Source` - `parameter?: string` - `parameter_value_index?: number` - `pointer?: string` - `includes_discoveries_until?: string` - `last_attempted_update_at?: string` - `last_successful_update_at?: string` ### Catalog Sync Delete Response - `CatalogSyncDeleteResponse` - `id: string` ### Catalog Sync Refresh Response - `CatalogSyncRefreshResponse = string` # Prebuilt Policies ## List Prebuilt Policies `client.magicCloudNetworking.catalogSyncs.prebuiltPolicies.list(PrebuiltPolicyListParamsparams, RequestOptionsoptions?): SinglePage` **get** `/accounts/{account_id}/magic/cloud/catalog-syncs/prebuilt-policies` List prebuilt catalog sync policies (Closed Beta). ### Parameters - `params: PrebuiltPolicyListParams` - `account_id: string` Path param - `destination_type?: "NONE" | "ZERO_TRUST_LIST"` Query param: Specify type of destination, omit to return all. - `"NONE"` - `"ZERO_TRUST_LIST"` ### Returns - `PrebuiltPolicyListResponse` - `applicable_destinations: Array<"NONE" | "ZERO_TRUST_LIST">` - `"NONE"` - `"ZERO_TRUST_LIST"` - `policy_description: string` - `policy_name: string` - `policy_string: string` ### 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 prebuiltPolicyListResponse of client.magicCloudNetworking.catalogSyncs.prebuiltPolicies.list( { account_id: 'account_id' }, )) { console.log(prebuiltPolicyListResponse.applicable_destinations); } ``` #### Response ```json { "errors": [ { "code": 1001, "message": "message", "documentation_url": "documentation_url", "meta": { "l10n_key": "l10n_key", "loggable_error": "loggable_error", "template_data": {}, "trace_id": "trace_id" }, "source": { "parameter": "parameter", "parameter_value_index": 0, "pointer": "pointer" } } ], "messages": [ { "code": 1001, "message": "message", "documentation_url": "documentation_url", "meta": { "l10n_key": "l10n_key", "loggable_error": "loggable_error", "template_data": {}, "trace_id": "trace_id" }, "source": { "parameter": "parameter", "parameter_value_index": 0, "pointer": "pointer" } } ], "result": [ { "applicable_destinations": [ "NONE" ], "policy_description": "policy_description", "policy_name": "policy_name", "policy_string": "policy_string" } ], "success": true } ``` ## Domain Types ### Prebuilt Policy List Response - `PrebuiltPolicyListResponse` - `applicable_destinations: Array<"NONE" | "ZERO_TRUST_LIST">` - `"NONE"` - `"ZERO_TRUST_LIST"` - `policy_description: string` - `policy_name: string` - `policy_string: string`