Ask or search…
K
Comment on page

Change Requests

A change request in GitBook is the entity of a revision to a space in progress.

GET a list of Change Requests in a space

get
https://api.gitbook.com/v1
/spaces/{spaceId}/change-requests
List change requests for a space.
Parameters
Path
spaceId*
string
The unique id of the space
Query
page
string
Identifier of the page results to fetch.
limit
number
The number of results per page
status
string
If defined, only change requests matching this status will be returned
Responses
200: OK
List of the space's change requests
default
Unexpected Error

POST a new Change Request in a space

post
https://api.gitbook.com/v1
/spaces/{spaceId}/change-requests
Create a new change request for a space.
Parameters
Path
spaceId*
string
The unique id of the space
Body
Example
Schema
{
"subject": "string"
}
Responses
201: Created
Change Request Created
default
Unexpected Error

POST a merge for a specific Change Request

post
https://api.gitbook.com/v1
/spaces/{spaceId}/change-requests/{changeRequestId}/merge
Merge a change request in the primary content of a space.
Parameters
Path
spaceId*
string
The unique id of the space
changeRequestId*
string
The unique ID of the change request or its number identifier in the space
Responses
200: OK
OK
default
Unexpected Error

POST updates to Change Request with primary content

post
https://api.gitbook.com/v1
/spaces/{spaceId}/change-requests/{changeRequestId}/update
Update a change-request with changes from primary content.
Parameters
Path
spaceId*
string
The unique id of the space
changeRequestId*
string
The unique ID of the change request or its number identifier in the space
Responses
200: OK
OK
default
Unexpected Error

GET content in a Change Request

get
https://api.gitbook.com/v1
/spaces/{spaceId}/change-requests/{changeRequestId}/content
Get the latest content revision for a change request.
Parameters
Path
spaceId*
string
The unique id of the space
changeRequestId*
string
The unique ID of the change request or its number identifier in the space
Responses
200: OK
OK
default
Unexpected Error

GET files in a Change Request

get
https://api.gitbook.com/v1
/spaces/{spaceId}/change-requests/{changeRequestId}/content/files
List all files in a change request content
Parameters
Path
spaceId*
string
The unique id of the space
changeRequestId*
string
The unique ID of the change request or its number identifier in the space
Query
page
string
Identifier of the page results to fetch.
limit
number
The number of results per page
Responses
200: OK
OK
default
Unexpected Error

POST content to a Change Request

post
https://api.gitbook.com/v1
/spaces/{spaceId}/change-requests/{changeRequestId}/content/import
Import content in a change request.
Parameters
Path
spaceId*
string
The unique id of the space
changeRequestId*
string
The unique ID of the change request or its number identifier in the space
Body
Example
Schema
{
"url": "string",
"source": "website"
}
Responses
201: Created
Content imported in a new revision
default
Unexpected Error

GET a page in a Change Request by it's path

get
https://api.gitbook.com/v1
/spaces/{spaceId}/change-requests/{changeRequestId}/content/path/{pagePath}
Get a page by its path in a change request.
Parameters
Path
spaceId*
string
The unique id of the space
changeRequestId*
string
The unique ID of the change request or its number identifier in the space
pagePath*
string
The path of the page in the revision.
Query
format
string
Output format for the content.
Responses
200: OK
OK
default
Unexpected Error

GET a page in a Change Request by it's ID

get
https://api.gitbook.com/v1
/spaces/{spaceId}/change-requests/{changeRequestId}/content/page/{pageId}
Get a page by its ID in a change request.
Parameters
Path
spaceId*
string
The unique id of the space
changeRequestId*
string
The unique ID of the change request or its number identifier in the space
pageId*
string
The unique id of the page
Query
format
string
Output format for the content.
Responses
200: OK
OK
default
Unexpected Error

POST external content to a page in a Change Request by it's ID

post
https://api.gitbook.com/v1
/spaces/{spaceId}/change-requests/{changeRequestId}/content/page/{pageId}/import
Import external content into a page of a change-request by its ID.
Parameters
Path
spaceId*
string
The unique id of the space
changeRequestId*
string
The unique ID of the change request or its number identifier in the space
pageId*
string
The unique id of the page
Body
Example
Schema
{
"url": "string",
"source": "website"
}
Responses
201: Created
Content imported in a new revision
default
Unexpected Error
Last modified 5mo ago