Coelevate Documentation
API ReferenceContext Repository

Get staged ops

Returns whole ops of the open changeset, bodies included, for the ids you name.

GET /context/v1/changeset/ops

Returns whole ops of the open changeset, bodies included, for the ids you name. Use it to read what GET changeset leaves out: an upsert's content and the value of a patch's edit. Ops come back in the order you asked for them. Name at most 100 ids; more is a 422. An id that names no op of the open changeset is a 404 naming it, so a missing body is never returned as an empty one.

Requires the context:read scope.

Parameters

ParameterLocationRequiredDescription
idsqueryyesThe op ids to read, comma-separated, from 1 to 100 of them, as GET changeset lists them.

Responses

StatusMeaning
200The request succeeded.
401The token is missing, expired or invalid.
403The token does not carry the scope this operation requires.
404No such project, or the token belongs to a different project.
422The request was not valid: a parameter or the body failed validation.

The 200 response body:

FieldTypeRequiredDescription
opsarray of ChangesetOpyesThe ops asked for, in the order their ids were given, each with its full body.

Shapes

The named shapes used above.

ChangesetOp

One staged op and what has been decided about it.

FieldTypeRequiredDescription
carried_fromstring or nullnoThe changeset the op was carried over from, if it was.
carried_tostring or nullnoThe changeset the op was carried over to, if it was.
cascaded_fromstring or nullnoThe op whose rejection caused this one to be rejected, if any.
conflictstring or nullnoWhy the op cannot merge as it stands, when something it depends on has moved; null otherwise.
decided_atstring or nullnoWhen it was decided.
decided_byobject or nullnoWho decided and why, once someone has; null while the op is undecided.
decisionstringyesWhere review stands: undecided, approved or rejected.
decision_historyarray of objectyesEvery decision made about the op, oldest first.
opobjectyesThe op as it was sent; its op field names the kind. GET changeset leaves out an upsert's content and the value of a patch's edit, which GET changeset/ops returns.
op_idstringyesThe id the service assigned when the op was staged. Use it to remove the op.
reasonstring or nullnoThe reason given for a rejection.
review_keystringyesGroups the ops a reviewer decides together.
seqintegeryesThe op's position in the changeset, in staging order.
staged_atstringyesWhen the op was staged.
staged_byobjectyesWho staged it and why.
statusstringyesThe op's state in the changeset.

Example

curl -sS "$API_URL/context/v1/changeset/ops?ids=$IDS" \
  -H "Authorization: Bearer $TOKEN"