# Requests ## List Requests `client.cloudforceOne.requests.list(RequestListParamsparams, RequestOptionsoptions?): SinglePage` **post** `/accounts/{account_id}/cloudforce-one/requests` Lists Cloudforce One intelligence requests with filtering and pagination. ### Parameters - `params: RequestListParams` - `account_id: string` Path param: Identifier. - `page: number` Body param: Page number of results. - `per_page: number` Body param: Number of results per page. - `completed_after?: string` Body param: Retrieve requests completed after this time. - `completed_before?: string` Body param: Retrieve requests completed before this time. - `created_after?: string` Body param: Retrieve requests created after this time. - `created_before?: string` Body param: Retrieve requests created before this time. - `request_type?: string` Body param: Requested information from request. - `sort_by?: string` Body param: Field to sort results by. - `sort_order?: "asc" | "desc"` Body param: Sort order (asc or desc). - `"asc"` - `"desc"` - `status?: "open" | "accepted" | "reported" | 3 more` Body param: Request Status. - `"open"` - `"accepted"` - `"reported"` - `"approved"` - `"completed"` - `"declined"` ### Returns - `ListItem` - `id: string` UUID. - `created: string` Request creation time. - `priority: "routine" | "high" | "urgent"` - `"routine"` - `"high"` - `"urgent"` - `request: string` Requested information from request. - `summary: string` Brief description of the request. - `tlp: "clear" | "amber" | "amber-strict" | 2 more` The CISA defined Traffic Light Protocol (TLP). - `"clear"` - `"amber"` - `"amber-strict"` - `"green"` - `"red"` - `updated: string` Request last updated time. - `completed?: string` Request completion time. - `message_tokens?: number` Tokens for the request messages. - `readable_id?: string` Readable Request ID. - `status?: "open" | "accepted" | "reported" | 3 more` Request Status. - `"open"` - `"accepted"` - `"reported"` - `"approved"` - `"completed"` - `"declined"` - `tokens?: number` Tokens for the request. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiEmail: process.env['CLOUDFLARE_EMAIL'], // This is the default and can be omitted apiKey: process.env['CLOUDFLARE_API_KEY'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const listItem of client.cloudforceOne.requests.list({ account_id: '023e105f4ecef8ad9ca31a8372d0c353', page: 0, per_page: 10, })) { console.log(listItem.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", "created": "2022-04-01T00:00:00Z", "priority": "routine", "request": "Victomology", "summary": "DoS attack", "tlp": "clear", "updated": "2022-04-01T00:00:00Z", "completed": "2024-01-01T00:00:00Z", "message_tokens": 16, "readable_id": "RFI-2022-000001", "status": "open", "tokens": 0 } ] } ``` ## Get a Request `client.cloudforceOne.requests.get(stringrequestId, RequestGetParamsparams, RequestOptionsoptions?): Item` **get** `/accounts/{account_id}/cloudforce-one/requests/{request_id}` Retrieves details for a specific Cloudforce One intelligence request. ### Parameters - `requestId: string` UUID. - `params: RequestGetParams` - `account_id: string` Identifier. ### Returns - `Item` - `id: string` UUID. - `content: string` Request content. - `created: string` - `priority: string` - `request: string` Requested information from request. - `summary: string` Brief description of the request. - `tlp: "clear" | "amber" | "amber-strict" | 2 more` The CISA defined Traffic Light Protocol (TLP). - `"clear"` - `"amber"` - `"amber-strict"` - `"green"` - `"red"` - `updated: string` - `completed?: string` - `message_tokens?: number` Tokens for the request messages. - `readable_id?: string` Readable Request ID. - `status?: "open" | "accepted" | "reported" | 3 more` Request Status. - `"open"` - `"accepted"` - `"reported"` - `"approved"` - `"completed"` - `"declined"` - `tokens?: number` Tokens for the request. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiEmail: process.env['CLOUDFLARE_EMAIL'], // This is the default and can be omitted apiKey: process.env['CLOUDFLARE_API_KEY'], // This is the default and can be omitted }); const item = await client.cloudforceOne.requests.get('f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(item.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", "content": "What regions were most effected by the recent DoS?", "created": "2022-04-01T05:20:00Z", "priority": "2022-04-01T05:20:00Z", "request": "Victomology", "summary": "DoS attack", "tlp": "clear", "updated": "2022-04-01T05:20:00Z", "completed": "2022-04-01T05:20:00Z", "message_tokens": 1, "readable_id": "RFI-2022-000001", "status": "open", "tokens": 16 } } ``` ## Create a New Request. `client.cloudforceOne.requests.create(RequestCreateParamsparams, RequestOptionsoptions?): Item` **post** `/accounts/{account_id}/cloudforce-one/requests/new` Creating a request adds the request into the Cloudforce One queue for analysis. In addition to the content, a short title, type, priority, and releasability should be provided. If one is not provided, a default will be assigned. ### Parameters - `params: RequestCreateParams` - `account_id: string` Path param: Identifier. - `content?: string` Body param: Request content. - `priority?: string` Body param: Priority for analyzing the request. - `request_type?: string` Body param: Requested information from request. - `summary?: string` Body param: Brief description of the request. - `tlp?: "clear" | "amber" | "amber-strict" | 2 more` Body param: The CISA defined Traffic Light Protocol (TLP). - `"clear"` - `"amber"` - `"amber-strict"` - `"green"` - `"red"` ### Returns - `Item` - `id: string` UUID. - `content: string` Request content. - `created: string` - `priority: string` - `request: string` Requested information from request. - `summary: string` Brief description of the request. - `tlp: "clear" | "amber" | "amber-strict" | 2 more` The CISA defined Traffic Light Protocol (TLP). - `"clear"` - `"amber"` - `"amber-strict"` - `"green"` - `"red"` - `updated: string` - `completed?: string` - `message_tokens?: number` Tokens for the request messages. - `readable_id?: string` Readable Request ID. - `status?: "open" | "accepted" | "reported" | 3 more` Request Status. - `"open"` - `"accepted"` - `"reported"` - `"approved"` - `"completed"` - `"declined"` - `tokens?: number` Tokens for the request. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiEmail: process.env['CLOUDFLARE_EMAIL'], // This is the default and can be omitted apiKey: process.env['CLOUDFLARE_API_KEY'], // This is the default and can be omitted }); const item = await client.cloudforceOne.requests.create({ account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(item.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", "content": "What regions were most effected by the recent DoS?", "created": "2022-04-01T05:20:00Z", "priority": "2022-04-01T05:20:00Z", "request": "Victomology", "summary": "DoS attack", "tlp": "clear", "updated": "2022-04-01T05:20:00Z", "completed": "2022-04-01T05:20:00Z", "message_tokens": 1, "readable_id": "RFI-2022-000001", "status": "open", "tokens": 16 } } ``` ## Update a Request `client.cloudforceOne.requests.update(stringrequestId, RequestUpdateParamsparams, RequestOptionsoptions?): Item` **put** `/accounts/{account_id}/cloudforce-one/requests/{request_id}` Updating a request alters the request in the Cloudforce One queue. This API may be used to update any attributes of the request after the initial submission. Only fields that you choose to update need to be add to the request body. ### Parameters - `requestId: string` UUID. - `params: RequestUpdateParams` - `account_id: string` Path param: Identifier. - `content?: string` Body param: Request content. - `priority?: string` Body param: Priority for analyzing the request. - `request_type?: string` Body param: Requested information from request. - `summary?: string` Body param: Brief description of the request. - `tlp?: "clear" | "amber" | "amber-strict" | 2 more` Body param: The CISA defined Traffic Light Protocol (TLP). - `"clear"` - `"amber"` - `"amber-strict"` - `"green"` - `"red"` ### Returns - `Item` - `id: string` UUID. - `content: string` Request content. - `created: string` - `priority: string` - `request: string` Requested information from request. - `summary: string` Brief description of the request. - `tlp: "clear" | "amber" | "amber-strict" | 2 more` The CISA defined Traffic Light Protocol (TLP). - `"clear"` - `"amber"` - `"amber-strict"` - `"green"` - `"red"` - `updated: string` - `completed?: string` - `message_tokens?: number` Tokens for the request messages. - `readable_id?: string` Readable Request ID. - `status?: "open" | "accepted" | "reported" | 3 more` Request Status. - `"open"` - `"accepted"` - `"reported"` - `"approved"` - `"completed"` - `"declined"` - `tokens?: number` Tokens for the request. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiEmail: process.env['CLOUDFLARE_EMAIL'], // This is the default and can be omitted apiKey: process.env['CLOUDFLARE_API_KEY'], // This is the default and can be omitted }); const item = await client.cloudforceOne.requests.update('f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(item.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", "content": "What regions were most effected by the recent DoS?", "created": "2022-04-01T05:20:00Z", "priority": "2022-04-01T05:20:00Z", "request": "Victomology", "summary": "DoS attack", "tlp": "clear", "updated": "2022-04-01T05:20:00Z", "completed": "2022-04-01T05:20:00Z", "message_tokens": 1, "readable_id": "RFI-2022-000001", "status": "open", "tokens": 16 } } ``` ## Delete a Request `client.cloudforceOne.requests.delete(stringrequestId, RequestDeleteParamsparams, RequestOptionsoptions?): RequestDeleteResponse` **delete** `/accounts/{account_id}/cloudforce-one/requests/{request_id}` Deletes a Cloudforce One intelligence request and all associated data. ### Parameters - `requestId: string` UUID. - `params: RequestDeleteParams` - `account_id: string` Identifier. ### Returns - `RequestDeleteResponse` - `errors: Array` - `code: number` - `message: string` - `documentation_url?: string` - `source?: Source` - `pointer?: string` - `messages: Array` - `code: number` - `message: string` - `documentation_url?: string` - `source?: Source` - `pointer?: string` - `success: true` Whether the API call was successful. - `true` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiEmail: process.env['CLOUDFLARE_EMAIL'], // This is the default and can be omitted apiKey: process.env['CLOUDFLARE_API_KEY'], // This is the default and can be omitted }); const request = await client.cloudforceOne.requests.delete('f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(request.errors); ``` #### 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 } ``` ## Get Request Quota `client.cloudforceOne.requests.quota(RequestQuotaParamsparams, RequestOptionsoptions?): Quota` **get** `/accounts/{account_id}/cloudforce-one/requests/quota` Retrieves quota usage for Cloudforce One standard requests. ### Parameters - `params: RequestQuotaParams` - `account_id: string` Identifier. ### Returns - `Quota` - `anniversary_date?: string` Anniversary date is when annual quota limit is refreshed. - `quarter_anniversary_date?: string` Quarter anniversary date is when quota limit is refreshed each quarter. - `quota?: number` Tokens for the quarter. - `remaining?: number` Tokens remaining for the quarter. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiEmail: process.env['CLOUDFLARE_EMAIL'], // This is the default and can be omitted apiKey: process.env['CLOUDFLARE_API_KEY'], // This is the default and can be omitted }); const quota = await client.cloudforceOne.requests.quota({ account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(quota.anniversary_date); ``` #### 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": { "anniversary_date": "2022-04-01T00:00:00Z", "quarter_anniversary_date": "2022-04-01T00:00:00Z", "quota": 120, "remaining": 64 } } ``` ## Get Request Types `client.cloudforceOne.requests.types(RequestTypesParamsparams, RequestOptionsoptions?): SinglePage` **get** `/accounts/{account_id}/cloudforce-one/requests/types` Lists available request types for Cloudforce One intelligence requests. ### Parameters - `params: RequestTypesParams` - `account_id: string` Identifier. ### Returns - `RequestTypesResponse = string` Request Types. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiEmail: process.env['CLOUDFLARE_EMAIL'], // This is the default and can be omitted apiKey: process.env['CLOUDFLARE_API_KEY'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const requestTypesResponse of client.cloudforceOne.requests.types({ account_id: '023e105f4ecef8ad9ca31a8372d0c353', })) { console.log(requestTypesResponse); } ``` #### 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": [ "Indicators of Compromise", "Victomology" ] } ``` ## Get Request Priority, Status, and TLP constants `client.cloudforceOne.requests.constants(RequestConstantsParamsparams, RequestOptionsoptions?): RequestConstants` **get** `/accounts/{account_id}/cloudforce-one/requests/constants` Retrieves constant values used in Cloudforce One requests, including valid statuses and types. ### Parameters - `params: RequestConstantsParams` - `account_id: string` Identifier. ### Returns - `RequestConstants` - `priority?: Array<"routine" | "high" | "urgent">` - `"routine"` - `"high"` - `"urgent"` - `status?: Array<"open" | "accepted" | "reported" | 3 more>` - `"open"` - `"accepted"` - `"reported"` - `"approved"` - `"completed"` - `"declined"` - `tlp?: Array<"clear" | "amber" | "amber-strict" | 2 more>` - `"clear"` - `"amber"` - `"amber-strict"` - `"green"` - `"red"` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiEmail: process.env['CLOUDFLARE_EMAIL'], // This is the default and can be omitted apiKey: process.env['CLOUDFLARE_API_KEY'], // This is the default and can be omitted }); const requestConstants = await client.cloudforceOne.requests.constants({ account_id: '023e105f4ecef8ad9ca31a8372d0c353', }); console.log(requestConstants.priority); ``` #### 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": { "priority": [ "routine", "high", "urgent" ], "status": [ "open", "accepted", "reported", "approved", "completed", "declined" ], "tlp": [ "clear", "green", "amber", "amber-strict", "red" ] } } ``` ## Domain Types ### Item - `Item` - `id: string` UUID. - `content: string` Request content. - `created: string` - `priority: string` - `request: string` Requested information from request. - `summary: string` Brief description of the request. - `tlp: "clear" | "amber" | "amber-strict" | 2 more` The CISA defined Traffic Light Protocol (TLP). - `"clear"` - `"amber"` - `"amber-strict"` - `"green"` - `"red"` - `updated: string` - `completed?: string` - `message_tokens?: number` Tokens for the request messages. - `readable_id?: string` Readable Request ID. - `status?: "open" | "accepted" | "reported" | 3 more` Request Status. - `"open"` - `"accepted"` - `"reported"` - `"approved"` - `"completed"` - `"declined"` - `tokens?: number` Tokens for the request. ### List Item - `ListItem` - `id: string` UUID. - `created: string` Request creation time. - `priority: "routine" | "high" | "urgent"` - `"routine"` - `"high"` - `"urgent"` - `request: string` Requested information from request. - `summary: string` Brief description of the request. - `tlp: "clear" | "amber" | "amber-strict" | 2 more` The CISA defined Traffic Light Protocol (TLP). - `"clear"` - `"amber"` - `"amber-strict"` - `"green"` - `"red"` - `updated: string` Request last updated time. - `completed?: string` Request completion time. - `message_tokens?: number` Tokens for the request messages. - `readable_id?: string` Readable Request ID. - `status?: "open" | "accepted" | "reported" | 3 more` Request Status. - `"open"` - `"accepted"` - `"reported"` - `"approved"` - `"completed"` - `"declined"` - `tokens?: number` Tokens for the request. ### Quota - `Quota` - `anniversary_date?: string` Anniversary date is when annual quota limit is refreshed. - `quarter_anniversary_date?: string` Quarter anniversary date is when quota limit is refreshed each quarter. - `quota?: number` Tokens for the quarter. - `remaining?: number` Tokens remaining for the quarter. ### Request Constants - `RequestConstants` - `priority?: Array<"routine" | "high" | "urgent">` - `"routine"` - `"high"` - `"urgent"` - `status?: Array<"open" | "accepted" | "reported" | 3 more>` - `"open"` - `"accepted"` - `"reported"` - `"approved"` - `"completed"` - `"declined"` - `tlp?: Array<"clear" | "amber" | "amber-strict" | 2 more>` - `"clear"` - `"amber"` - `"amber-strict"` - `"green"` - `"red"` ### Request Types - `RequestTypes = Array` ### Request Delete Response - `RequestDeleteResponse` - `errors: Array` - `code: number` - `message: string` - `documentation_url?: string` - `source?: Source` - `pointer?: string` - `messages: Array` - `code: number` - `message: string` - `documentation_url?: string` - `source?: Source` - `pointer?: string` - `success: true` Whether the API call was successful. - `true` ### Request Types Response - `RequestTypesResponse = string` Request Types. # Message ## List Request Messages `client.cloudforceOne.requests.message.get(stringrequestId, MessageGetParamsparams, RequestOptionsoptions?): SinglePage` **post** `/accounts/{account_id}/cloudforce-one/requests/{request_id}/message` Lists messages in a Cloudforce One intelligence request conversation. ### Parameters - `requestId: string` UUID. - `params: MessageGetParams` - `account_id: string` Path param: Identifier. - `page: number` Body param: Page number of results. - `per_page: number` Body param: Number of results per page. - `after?: string` Body param: Retrieve mes ges created after this time. - `before?: string` Body param: Retrieve messages created before this time. - `sort_by?: string` Body param: Field to sort results by. - `sort_order?: "asc" | "desc"` Body param: Sort order (asc or desc). - `"asc"` - `"desc"` ### Returns - `Message` - `id: number` Message ID. - `author: string` Author of message. - `content: string` Content of message. - `is_follow_on_request: boolean` Whether the message is a follow-on request. - `updated: string` Defines the message last updated time. - `created?: string` Defines the message creation time. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiEmail: process.env['CLOUDFLARE_EMAIL'], // This is the default and can be omitted apiKey: process.env['CLOUDFLARE_API_KEY'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const message of client.cloudforceOne.requests.message.get( 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { account_id: '023e105f4ecef8ad9ca31a8372d0c353', page: 0, per_page: 10, }, )) { console.log(message.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": 0, "author": "user@domain.com", "content": "Can you elaborate on the type of DoS that occurred?", "is_follow_on_request": true, "updated": "2022-01-01T00:00:00Z", "created": "2022-01-01T00:00:00Z" } ] } ``` ## Create a New Request Message `client.cloudforceOne.requests.message.create(stringrequestId, MessageCreateParamsparams, RequestOptionsoptions?): Message` **post** `/accounts/{account_id}/cloudforce-one/requests/{request_id}/message/new` Adds a message to a Cloudforce One intelligence request conversation. ### Parameters - `requestId: string` UUID. - `params: MessageCreateParams` - `account_id: string` Path param: Identifier. - `content?: string` Body param: Content of message. ### Returns - `Message` - `id: number` Message ID. - `author: string` Author of message. - `content: string` Content of message. - `is_follow_on_request: boolean` Whether the message is a follow-on request. - `updated: string` Defines the message last updated time. - `created?: string` Defines the message creation time. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiEmail: process.env['CLOUDFLARE_EMAIL'], // This is the default and can be omitted apiKey: process.env['CLOUDFLARE_API_KEY'], // This is the default and can be omitted }); const message = await client.cloudforceOne.requests.message.create( 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, ); console.log(message.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": 0, "author": "user@domain.com", "content": "Can you elaborate on the type of DoS that occurred?", "is_follow_on_request": true, "updated": "2022-01-01T00:00:00Z", "created": "2022-01-01T00:00:00Z" } } ``` ## Update a Request Message `client.cloudforceOne.requests.message.update(stringrequestId, numbermessageId, MessageUpdateParamsparams, RequestOptionsoptions?): Message` **put** `/accounts/{account_id}/cloudforce-one/requests/{request_id}/message/{message_id}` Updates a message in a Cloudforce One intelligence request thread. ### Parameters - `requestId: string` UUID. - `messageId: number` - `params: MessageUpdateParams` - `account_id: string` Path param: Identifier. - `content?: string` Body param: Content of message. ### Returns - `Message` - `id: number` Message ID. - `author: string` Author of message. - `content: string` Content of message. - `is_follow_on_request: boolean` Whether the message is a follow-on request. - `updated: string` Defines the message last updated time. - `created?: string` Defines the message creation time. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiEmail: process.env['CLOUDFLARE_EMAIL'], // This is the default and can be omitted apiKey: process.env['CLOUDFLARE_API_KEY'], // This is the default and can be omitted }); const message = await client.cloudforceOne.requests.message.update( 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', 0, { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, ); console.log(message.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": 0, "author": "user@domain.com", "content": "Can you elaborate on the type of DoS that occurred?", "is_follow_on_request": true, "updated": "2022-01-01T00:00:00Z", "created": "2022-01-01T00:00:00Z" } } ``` ## Delete a Request Message `client.cloudforceOne.requests.message.delete(stringrequestId, numbermessageId, MessageDeleteParamsparams, RequestOptionsoptions?): MessageDeleteResponse` **delete** `/accounts/{account_id}/cloudforce-one/requests/{request_id}/message/{message_id}` Removes a message from a Cloudforce One intelligence request thread. ### Parameters - `requestId: string` UUID. - `messageId: number` - `params: MessageDeleteParams` - `account_id: string` Identifier. ### Returns - `MessageDeleteResponse` - `errors: Array` - `code: number` - `message: string` - `documentation_url?: string` - `source?: Source` - `pointer?: string` - `messages: Array` - `code: number` - `message: string` - `documentation_url?: string` - `source?: Source` - `pointer?: string` - `success: true` Whether the API call was successful. - `true` ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiEmail: process.env['CLOUDFLARE_EMAIL'], // This is the default and can be omitted apiKey: process.env['CLOUDFLARE_API_KEY'], // This is the default and can be omitted }); const message = await client.cloudforceOne.requests.message.delete( 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', 0, { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, ); console.log(message.errors); ``` #### 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 } ``` ## Domain Types ### Message - `Message` - `id: number` Message ID. - `author: string` Author of message. - `content: string` Content of message. - `is_follow_on_request: boolean` Whether the message is a follow-on request. - `updated: string` Defines the message last updated time. - `created?: string` Defines the message creation time. ### Message Delete Response - `MessageDeleteResponse` - `errors: Array` - `code: number` - `message: string` - `documentation_url?: string` - `source?: Source` - `pointer?: string` - `messages: Array` - `code: number` - `message: string` - `documentation_url?: string` - `source?: Source` - `pointer?: string` - `success: true` Whether the API call was successful. - `true` # Priority ## Get a Priority Intelligence Requirement `client.cloudforceOne.requests.priority.get(stringpriorityId, PriorityGetParamsparams, RequestOptionsoptions?): Item` **get** `/accounts/{account_id}/cloudforce-one/requests/priority/{priority_id}` Retrieves a specific priority intelligence request from Cloudforce One. ### Parameters - `priorityId: string` UUID. - `params: PriorityGetParams` - `account_id: string` Identifier. ### Returns - `Item` - `id: string` UUID. - `content: string` Request content. - `created: string` - `priority: string` - `request: string` Requested information from request. - `summary: string` Brief description of the request. - `tlp: "clear" | "amber" | "amber-strict" | 2 more` The CISA defined Traffic Light Protocol (TLP). - `"clear"` - `"amber"` - `"amber-strict"` - `"green"` - `"red"` - `updated: string` - `completed?: string` - `message_tokens?: number` Tokens for the request messages. - `readable_id?: string` Readable Request ID. - `status?: "open" | "accepted" | "reported" | 3 more` Request Status. - `"open"` - `"accepted"` - `"reported"` - `"approved"` - `"completed"` - `"declined"` - `tokens?: number` Tokens for the request. ### Example ```node import Cloudflare from 'cloudflare'; const client = new Cloudflare({ apiEmail: process.env['CLOUDFLARE_EMAIL'], // This is the default and can be omitted apiKey: process.env['CLOUDFLARE_API_KEY'], // This is the default and can be omitted }); const item = await client.cloudforceOne.requests.priority.get( 'f174e90a-fafe-4643-bbbc-4a0ed4fc8415', { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, ); console.log(item.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", "content": "What regions were most effected by the recent DoS?", "created": "2022-04-01T05:20:00Z", "priority": "2022-04-01T05:20:00Z", "request": "Victomology", "summary": "DoS attack", "tlp": "clear", "updated": "2022-04-01T05:20:00Z", "completed": "2022-04-01T05:20:00Z", "message_tokens": 1, "readable_id": "RFI-2022-000001", "status": "open", "tokens": 16 } } ``` ## Create a New Priority Intelligence Requirement `client.cloudforceOne.requests.priority.create(PriorityCreateParamsparams, RequestOptionsoptions?): Priority` **post** `/accounts/{account_id}/cloudforce-one/requests/priority/new` Creates a new priority intelligence request in Cloudforce One. ### Parameters - `params: PriorityCreateParams` - `account_id: string` Path param: Identifier. - `labels: Array