Change Requests

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

List all change requests

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
spaceIdstringRequired

The unique id of the space

Query parameters
pagestringOptional

Identifier of the page results to fetch.

limitnumber · max: 1000Optional

The number of results per page

statusstring · enumOptional

If defined, only change requests matching this status will be returned.

Default: openPossible values:
creatorstringOptional

If defined, only change requests created by this user will be returned.

contributorstringOptional

If defined, only change requests with contributions from this user will be returned.

requestedReviewerstringOptional

If defined, only change requests with a requested reviewer for this user will be returned.

conversationsIssuesClusterstringOptional

If defined, only change requests associated with this conversations issues cluster will be returned.

orderBystring · enumOptional

The field to sort change requests by. Defaults to 'updatedAt'.

Default: updatedAtPossible values:
Responses
200

List of the space's change requests

application/json
get
/spaces/{spaceId}/change-requests
200

List of the space's change requests

Create a change request

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
spaceIdstringRequired

The unique id of the space

Body
subjectstringOptional

Subject of the change-request

Other propertiesanyOptional
Responses
post
/spaces/{spaceId}/change-requests
201

Change Request Created

Merge a change request

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
spaceIdstringRequired

The unique id of the space

changeRequestIdstringRequired

The unique ID of the change request or its number identifier in the space

Responses
200

OK

application/json
post
/spaces/{spaceId}/change-requests/{changeRequestId}/merge
200

OK

Pull primary content into the change request

post
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
spaceIdstringRequired

The unique id of the space

changeRequestIdstringRequired

The unique ID of the change request or its number identifier in the space

Responses
200

OK

application/json
post
/spaces/{spaceId}/change-requests/{changeRequestId}/update
200

OK

Get a change request the latest content revision

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
spaceIdstringRequired

The unique id of the space

changeRequestIdstringRequired

The unique ID of the change request or its number identifier in the space

Query parameters
metadatabooleanOptional

If false is passed, "git" mutable metadata will not returned. Passing false can optimize performances of the lookup.

Default: true
computedbooleanOptional

If false is passed, content will not be computed

Default: true
Responses
200

OK

application/json
Responseone of
or
or
or
or
get
/spaces/{spaceId}/change-requests/{changeRequestId}/content
200

OK

List all change request files

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
spaceIdstringRequired

The unique id of the space

changeRequestIdstringRequired

The unique ID of the change request or its number identifier in the space

Query parameters
pagestringOptional

Identifier of the page results to fetch.

limitnumber · max: 1000Optional

The number of results per page

metadatabooleanOptional

If false is passed, "git" mutable metadata will not returned. Passing false can optimize performances of the lookup.

Default: true
computedbooleanOptional

If false is passed, content will not be computed

Default: true
Responses
200

OK

application/json
get
/spaces/{spaceId}/change-requests/{changeRequestId}/content/files
200

OK

Get a change request page by its path

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
spaceIdstringRequired

The unique id of the space

changeRequestIdstringRequired

The unique ID of the change request or its number identifier in the space

pagePathstringRequired

The path of the page in the revision.

Query parameters
formatstring · enumOptional

Output format for the content.

Possible values:
evaluatedone ofOptional

Controls whether the document should be evaluated.

  • When set to true, the entire document will be evaluated.
  • When set to deterministic-only, only expressions that depend exclusively on deterministic inputs will be evaluated.
Default: false
booleanOptional
or
string · enumOptionalPossible values:
dereferencedone ofOptional

Controls whether the document should be deferenced (eference to other content will be resolved and expanded).

  • When set to true, the entire document will be deferenced
  • When set to reusable-contents, only reusable contents will be deferenced.
Default: false
booleanOptional
or
string · enumOptionalPossible values:
metadatabooleanOptional

If false is passed, "git" mutable metadata will not returned. Passing false can optimize performances of the lookup.

Default: true
computedbooleanOptional

If false is passed, content will not be computed

Default: true
Responses
200

OK

application/json
Responseone of
or
get
/spaces/{spaceId}/change-requests/{changeRequestId}/content/path/{pagePath}
200

OK

Get a change request page by its ID

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
spaceIdstringRequired

The unique id of the space

changeRequestIdstringRequired

The unique ID of the change request or its number identifier in the space

pageIdstringRequired

The unique id of the page

Query parameters
formatstring · enumOptional

Output format for the content.

Possible values:
evaluatedone ofOptional

Controls whether the document should be evaluated.

  • When set to true, the entire document will be evaluated.
  • When set to deterministic-only, only expressions that depend exclusively on deterministic inputs will be evaluated.
Default: false
booleanOptional
or
string · enumOptionalPossible values:
dereferencedone ofOptional

Controls whether the document should be deferenced (eference to other content will be resolved and expanded).

  • When set to true, the entire document will be deferenced
  • When set to reusable-contents, only reusable contents will be deferenced.
Default: false
booleanOptional
or
string · enumOptionalPossible values:
metadatabooleanOptional

If false is passed, "git" mutable metadata will not returned. Passing false can optimize performances of the lookup.

Default: true
computedbooleanOptional

If false is passed, content will not be computed

Default: true
Responses
200

OK

application/json
Responseone of
or
or
or
get
/spaces/{spaceId}/change-requests/{changeRequestId}/content/page/{pageId}
200

OK

Was this helpful?