API Package Documentation

Move API Package Documentation

Changed on

This api allows the user to move a document within the document tree using the parameters parent_document_id and index. If parent_document_id is not provided, the document will be placed at the top level of the document tree. index represents a zero-indexed document order relative to its siblings under the same parent. For example, if we want to put the document at top level in first position we would send parent_document_id: null and index: 0. This api also supports using a negative index to count backwards from the end of the document list, which means you can put the document in last position by using index: -1.

post/v3/api-packages/{packageId}/documents/{documentId}/move

Request

  • Base URL
    https://global.api.konghq.com
  • Auth
    • HTTP bearer
    • or HTTP bearer
    • or HTTP bearer
    • or HTTP bearer

Path parameters

packageId, string uuid required
Example:9f5061ce-78f6-4452-9108-ad7c02821fd5

The UUID API Package identifier

documentId, string uuid required
Example:de5c9818-be5c-42e6-b514-e3d4bc30ddeb

The document identifier related to the API

Request body

MoveDocumentRequestPayload required

move document request payload

parent_document_id, string uuid

parent document id

index, integer

index of the document in the parent document's children

Example request

{
  "parent_document_id": "dd4e1b98-3629-4dd3-acc0-759a726ffee2",
  "index": 1
}

Response

Document for the API Package was moved successfully.

Changes

    • warning

      added the new 401.00 enum value to the status response property for the response status

    • warning

      added the new 403.00 enum value to the status response property for the response status

    • warning

      added the new 404.00 enum value to the status response property for the response status

    1 more change in this revision