For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/fr/api/latest/forms/publish-a-form-version.md. A documentation index is available at /llms.txt.
Language
Datadog site

Publish a form version

WARNINGNote: This endpoint is in preview and is subject to change. If you have any feedback, contact Datadog support.
POSThttps://api.datadoghq.com/api/v2/forms/{form_id}/publishhttps://api.us3.datadoghq.com/api/v2/forms/{form_id}/publishhttps://api.us5.datadoghq.com/api/v2/forms/{form_id}/publishhttps://api.datadoghq.eu/api/v2/forms/{form_id}/publishhttps://api.ap1.datadoghq.com/api/v2/forms/{form_id}/publishhttps://api.ap2.datadoghq.com/api/v2/forms/{form_id}/publishhttps://api.uk1.datadoghq.com/api/v2/forms/{form_id}/publishhttps://api.ddog-gov.com/api/v2/forms/{form_id}/publishhttps://api.us2.ddog-gov.com/api/v2/forms/{form_id}/publish

Présentation

Publish a specific version of a form, making it available for submissions.

Arguments

Paramètres du chemin

Name
Type
Description
form_id [required]
string

The ID of the form.

Requête

Body Data (required)

Champ
Type
Description
data [required]
object

The data for publishing a form version.

Réponse

OK

A response containing a single form publication.

Champ
Type
Description
data [required]
object

A form publication resource object.

Exemple de code

# Path parameters
export form_id="22f6006a-2302-4926-9396-d2dfcf7b0b34"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/forms/${form_id}/publish" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "version": 1
    },
    "type": "form_publications"
  }
}
EOF
# Path parameters
export form_id="22f6006a-2302-4926-9396-d2dfcf7b0b34"

# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/forms/${form_id}/publish" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "version": 1
    },
    "type": "form_publications"
  }
}
EOF
# Path parameters
export form_id="22f6006a-2302-4926-9396-d2dfcf7b0b34"

# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/forms/${form_id}/publish" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "version": 1
    },
    "type": "form_publications"
  }
}
EOF
# Path parameters
export form_id="22f6006a-2302-4926-9396-d2dfcf7b0b34"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/forms/${form_id}/publish" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "version": 1
    },
    "type": "form_publications"
  }
}
EOF
# Path parameters
export form_id="22f6006a-2302-4926-9396-d2dfcf7b0b34"

# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/forms/${form_id}/publish" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "version": 1
    },
    "type": "form_publications"
  }
}
EOF
# Path parameters
export form_id="22f6006a-2302-4926-9396-d2dfcf7b0b34"

# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/forms/${form_id}/publish" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "version": 1
    },
    "type": "form_publications"
  }
}
EOF
# Path parameters
export form_id="22f6006a-2302-4926-9396-d2dfcf7b0b34"

# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/forms/${form_id}/publish" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "version": 1
    },
    "type": "form_publications"
  }
}
EOF
# Path parameters
export form_id="22f6006a-2302-4926-9396-d2dfcf7b0b34"

# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/forms/${form_id}/publish" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "version": 1
    },
    "type": "form_publications"
  }
}
EOF
# Path parameters
export form_id="22f6006a-2302-4926-9396-d2dfcf7b0b34"

# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/forms/${form_id}/publish" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "version": 1
    },
    "type": "form_publications"
  }
}
EOF