Skip to content
Start here

Create a New Request.

client.CloudforceOne.Requests.New(ctx, params) (*Item, error)
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.

Security

API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
Cloudforce One Write
ParametersExpand Collapse
params RequestNewParams
AccountID param.Field[string]

Path param: Identifier.

maxLength32
Content param.Field[string]optional

Body param: Request content.

Priority param.Field[string]optional

Body param: Priority for analyzing the request.

RequestType param.Field[string]optional

Body param: Requested information from request.

Summary param.Field[string]optional

Body param: Brief description of the request.

TLP param.Field[RequestNewParamsTLP]optional

Body param: The CISA defined Traffic Light Protocol (TLP).

const RequestNewParamsTLPClear RequestNewParamsTLP = "clear"
const RequestNewParamsTLPAmber RequestNewParamsTLP = "amber"
const RequestNewParamsTLPAmberStrict RequestNewParamsTLP = "amber-strict"
const RequestNewParamsTLPGreen RequestNewParamsTLP = "green"
const RequestNewParamsTLPRed RequestNewParamsTLP = "red"
ReturnsExpand Collapse
type Item struct{…}
ID string

UUID.

maxLength36
Content string

Request content.

Created Time
formatdate-time
Priority Time
formatdate-time
Request string

Requested information from request.

Summary string

Brief description of the request.

TLP ItemTLP

The CISA defined Traffic Light Protocol (TLP).

One of the following:
const ItemTLPClear ItemTLP = "clear"
const ItemTLPAmber ItemTLP = "amber"
const ItemTLPAmberStrict ItemTLP = "amber-strict"
const ItemTLPGreen ItemTLP = "green"
const ItemTLPRed ItemTLP = "red"
Updated Time
formatdate-time
Completed Timeoptional
formatdate-time
MessageTokens int64optional

Tokens for the request messages.

ReadableID stringoptional

Readable Request ID.

Status ItemStatusoptional

Request Status.

One of the following:
const ItemStatusOpen ItemStatus = "open"
const ItemStatusAccepted ItemStatus = "accepted"
const ItemStatusReported ItemStatus = "reported"
const ItemStatusApproved ItemStatus = "approved"
const ItemStatusCompleted ItemStatus = "completed"
const ItemStatusDeclined ItemStatus = "declined"
Tokens int64optional

Tokens for the request.

Create a New Request.

package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/cloudforce_one"
  "github.com/cloudflare/cloudflare-go/option"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIKey("144c9defac04969c7bfad8efaa8ea194"),
    option.WithAPIEmail("user@example.com"),
  )
  item, err := client.CloudforceOne.Requests.New(context.TODO(), cloudforce_one.RequestNewParams{
    AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", item.ID)
}
{
  "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
  }
}
Returns Examples
{
  "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
  }
}