POST · Inspecter

Feedback : Inspecter. Paramètres, accès et exemples de réponse.

Rédigé par Red Blue

Mis à jour le

Feedback

POST /api/v1/feedback/read

operationId : feedback_native_read

Accès

Permission

Consentements OAuth

OAuth : délégation d’un équipier pour l’API

feedback.read

api:connect, feedback:read

KHONY_ORIGIN est l’origine HTTPS de votre application Khony, sans chemin final. Remplacez les identifiants de l’exemple par ceux de vos ressources autorisées. Les données de réponse ci-dessous illustrent le format ; elles ne sont pas le résultat d’un appel à votre organisation.

Champs du corps JSON

Nom

Emplacement

Requis

Type et contraintes

productId

JSON

Oui

string

request

JSON

Oui

object

contentCursor

JSON

Non

object

Variantes de la requête

Sélecteur

Valeur

Autres champs requis dans request

request.view

"comments"

postId

request.view

"voters"

postId

request.view

"people"

query

request.view

"assignees"

Aucun autre champ imposé

request.view

"merge"

postId

request.view

"views"

Aucun autre champ imposé

request.view

"filters"

Aucun autre champ imposé

request.view

"counts"

Aucun autre champ imposé

request.view

"list"

Aucun autre champ imposé

request.view

"suggestions"

query

Choisissez une variante et respectez son schéma complet : les contraintes des champs optionnels et les unions imbriquées restent applicables.

Exemple de requête

Shell
curl --request POST "$KHONY_ORIGIN/api/v1/feedback/read" \
  --header "Authorization: Bearer $KHONY_ACCESS_TOKEN" \
  --header 'Content-Type: application/json' \
  --data-raw '{
  "productId": "product_01k3w8d7vhe008000000000001",
  "request": {
    "view": "comments",
    "postId": "post_01k3w8d7vhe008000000000001",
    "limit": 20,
    "includeInternal": false
  }
}'
Shell

Réponse de succès · HTTP 200

JSON
{
  "content": "{\"postId\":\"post_01k3w8d7vhe008000000000001\",\"comments\":[],\"parents\":[],\"total\":0,\"nextCursor\":null,\"reset\":false}",
  "nextCursor": null
}
JSON
Schéma complet du corps JSON
JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "productId": {
      "type": "string",
      "pattern": "^product_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "request": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "view": {
              "type": "string",
              "const": "comments"
            },
            "postId": {
              "$ref": "#/$defs/__schema0"
            },
            "cursor": {
              "$ref": "#/$defs/__schema1"
            },
            "limit": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            },
            "includeInternal": {
              "default": false,
              "type": "boolean"
            }
          },
          "required": [
            "view",
            "postId"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "view": {
              "type": "string",
              "const": "voters"
            },
            "postId": {
              "$ref": "#/$defs/__schema0"
            },
            "after": {
              "type": "string",
              "pattern": "^vote_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
            }
          },
          "required": [
            "view",
            "postId"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "view": {
              "type": "string",
              "const": "people"
            },
            "query": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160
            }
          },
          "required": [
            "view",
            "query"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "view": {
              "type": "string",
              "const": "assignees"
            },
            "query": {
              "default": "",
              "type": "string",
              "maxLength": 160
            },
            "cursor": {
              "$ref": "#/$defs/__schema1"
            },
            "limit": {
              "default": 40,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          "required": [
            "view"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "view": {
              "type": "string",
              "const": "merge"
            },
            "postId": {
              "$ref": "#/$defs/__schema0"
            },
            "targetPostId": {
              "$ref": "#/$defs/__schema0"
            }
          },
          "required": [
            "view",
            "postId"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "view": {
              "type": "string",
              "const": "views"
            },
            "cursor": {
              "type": "string",
              "pattern": "^feedback_saved_view_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
            }
          },
          "required": [
            "view"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "view": {
              "type": "string",
              "const": "filters"
            }
          },
          "required": [
            "view"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "view": {
              "type": "string",
              "const": "counts"
            }
          },
          "required": [
            "view"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "view": {
              "type": "string",
              "const": "list"
            },
            "filters": {
              "default": {},
              "type": "object",
              "properties": {
                "boardIds": {
                  "maxItems": 100,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/__schema2"
                  }
                },
                "tagIds": {
                  "maxItems": 100,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/__schema3"
                  }
                },
                "tagMatch": {
                  "type": "string",
                  "enum": [
                    "any",
                    "all"
                  ]
                },
                "statuses": {
                  "maxItems": 5,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/__schema4"
                  }
                },
                "sort": {
                  "type": "string",
                  "enum": [
                    "recent",
                    "oldest",
                    "votes"
                  ]
                },
                "sources": {
                  "maxItems": 5,
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/__schema5"
                  }
                },
                "dateField": {
                  "type": "string",
                  "enum": [
                    "created",
                    "updated"
                  ]
                },
                "dateFrom": {
                  "type": "string",
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                },
                "dateTo": {
                  "type": "string",
                  "format": "date",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
                },
                "minVotes": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 100000000
                },
                "minRequesters": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 100000000
                },
                "minInsights": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 100000000
                }
              }
            },
            "query": {
              "type": "string",
              "maxLength": 160
            },
            "cursor": {
              "$ref": "#/$defs/__schema1"
            },
            "limit": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            },
            "sort": {
              "default": "recent",
              "type": "string",
              "enum": [
                "recent",
                "oldest",
                "votes"
              ]
            }
          },
          "required": [
            "view"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "view": {
              "type": "string",
              "const": "suggestions"
            },
            "query": {
              "type": "string",
              "minLength": 6,
              "maxLength": 160
            },
            "excludePostId": {
              "$ref": "#/$defs/__schema0"
            }
          },
          "required": [
            "view",
            "query"
          ],
          "additionalProperties": false
        }
      ]
    },
    "contentCursor": {
      "type": "object",
      "properties": {
        "offset": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "hash": {
          "type": "string",
          "minLength": 64,
          "maxLength": 64
        }
      },
      "required": [
        "offset",
        "hash"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "productId",
    "request"
  ],
  "additionalProperties": false,
  "$defs": {
    "__schema0": {
      "type": "string",
      "pattern": "^post_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema1": {
      "type": "string",
      "minLength": 1,
      "maxLength": 4096
    },
    "__schema2": {
      "type": "string",
      "pattern": "^board_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema3": {
      "type": "string",
      "pattern": "^tag_[0-7][0123456789abcdefghjkmnpqrstvwxyz]{25}$"
    },
    "__schema4": {
      "type": "string",
      "enum": [
        "new",
        "in_review",
        "planned",
        "completed",
        "closed"
      ]
    },
    "__schema5": {
      "type": "string",
      "enum": [
        "portal",
        "widget",
        "internal",
        "api",
        "import"
      ]
    }
  }
}
JSON
Schéma complet de la réponse
JSON
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "content": {
      "type": "string"
    },
    "nextCursor": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "offset": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            },
            "hash": {
              "type": "string",
              "minLength": 64,
              "maxLength": 64
            }
          },
          "required": [
            "offset",
            "hash"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "content",
    "nextCursor"
  ],
  "additionalProperties": false
}
JSON

Refus et reprise

Les statuts documentés pour cette opération sont 400, 401, 402, 403, 404, 409, 428, 429, 500, 503. Identifiez la cause avec error.code et, lorsqu’il est présent, error.reason. Une réponse 409 peut demander une relecture de révision ou signaler une commande incompatible ; une réponse 428 demande une confirmation humaine. Ne rejouez une écriture que selon son contrat.

Notes du contrat
JSON
{
  "description": "Dedicated API OAuth api:connect and the stated Feedback scope, actual delegated teammate, current organization/product consent and native role. Existing organization keys do not acquire these operations. Every admission consumes an API request. Select comments/voters/people/assignees/merge/views/filters/counts/list. Native visibility, same-product parents, current revisions, reaction state, assignment membership and personal ownership apply. Merge previews/state require administrator. Comment documents preserve the complete native article JSON, author IDs are explicit and private emails/storage keys/signed URLs are excluded. Concatenate content fragments with contentCursor until nextCursor=null, then parse JSON. Native list pagination uses request.cursor; changed content or selection invalidates a continuation. Similarity uses feedback_suggest separately."
}
JSON