Restore a published version onto the draft
curl --request POST \
--url https://judged.systems/api/packs/{packId}/restore \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"versionId": "<string>"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({versionId: '<string>'})
};
fetch('https://judged.systems/api/packs/{packId}/restore', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://judged.systems/api/packs/{packId}/restore"
payload = { "versionId": "<string>" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"name": "<string>",
"liveVersionId": "<string>",
"draftVersionId": "<string>",
"document": {
"questions": [
{
"type": "choice",
"id": "<string>",
"name": "<string>",
"instructions": "<string>",
"criteria": {},
"review": {
"minSelectedProbability": 0.5
}
}
]
},
"liveDocument": {
"questions": [
{
"type": "choice",
"id": "<string>",
"name": "<string>",
"instructions": "<string>",
"criteria": {},
"review": {
"minSelectedProbability": 0.5
}
}
]
},
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"issues": [
{}
]
}Packs
Restore a published version onto the draft
Requires packs:write. versionId must be a published version of this pack.
POST
/
api
/
packs
/
{packId}
/
restore
Restore a published version onto the draft
curl --request POST \
--url https://judged.systems/api/packs/{packId}/restore \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"versionId": "<string>"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({versionId: '<string>'})
};
fetch('https://judged.systems/api/packs/{packId}/restore', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://judged.systems/api/packs/{packId}/restore"
payload = { "versionId": "<string>" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"name": "<string>",
"liveVersionId": "<string>",
"draftVersionId": "<string>",
"document": {
"questions": [
{
"type": "choice",
"id": "<string>",
"name": "<string>",
"instructions": "<string>",
"criteria": {},
"review": {
"minSelectedProbability": 0.5
}
}
]
},
"liveDocument": {
"questions": [
{
"type": "choice",
"id": "<string>",
"name": "<string>",
"instructions": "<string>",
"criteria": {},
"review": {
"minSelectedProbability": 0.5
}
}
]
},
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": "<string>",
"issues": [
{}
]
}Authorizations
apiKeybearerAuth
Path Parameters
Body
application/json
Minimum string length:
1