Replan an activity
curl --request POST \
--url https://platform.kodexa.ai/api/activities/{id}/replan \
--header 'x-api-key: <api-key>'import requests
url = "https://platform.kodexa.ai/api/activities/{id}/replan"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://platform.kodexa.ai/api/activities/{id}/replan', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://platform.kodexa.ai/api/activities/{id}/replan",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://platform.kodexa.ai/api/activities/{id}/replan"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://platform.kodexa.ai/api/activities/{id}/replan")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.kodexa.ai/api/activities/{id}/replan")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"activityPlanId": "<string>",
"badges": "<unknown>",
"changeSequence": 123,
"completedOn": "2023-11-07T05:31:56Z",
"completedWorkUnits": 123,
"createdOn": "2023-11-07T05:31:56Z",
"currentSequence": 123,
"deleteUserEmail": "<string>",
"deleteUserId": "<string>",
"deleted": true,
"deletedDate": "2023-11-07T05:31:56Z",
"description": "<string>",
"errorDetails": "<string>",
"failedWorkUnits": 123,
"id": "<string>",
"inputs": "<unknown>",
"lifecycleState": "<string>",
"metadata": "<unknown>",
"organization": {
"archived": true,
"authGroupLink": {
"authGroup": "<string>"
},
"changeSequence": 123,
"createdOn": "2023-11-07T05:31:56Z",
"defaultToPrivateTemplates": true,
"description": "Document processing organization for Acme Corp.",
"enterpriseOrganization": true,
"features": {},
"hasImage": true,
"id": "550e8400-e29b-41d4-a716-446655440000",
"memory": {
"orderedDashboards": [
"<string>"
]
},
"name": "Acme Corp",
"organizationStatus": "ACTIVE",
"properties": {},
"publicAccess": true,
"searchText": "<string>",
"slug": "acme-corp",
"stripeCustomerId": "<string>",
"supportAccess": true,
"supportAccessExpiresAt": "2023-11-07T05:31:56Z",
"updatedOn": "2023-11-07T05:31:56Z",
"uuid": "550e8400e29b41d4a716446655440000"
},
"organizationId": "<string>",
"parentActivityId": "<string>",
"priority": 123,
"projectId": "<string>",
"replacedByActivityId": "<string>",
"runningWorkUnits": 123,
"startedByIntakeId": "<string>",
"startedByTriggerId": "<string>",
"startedOn": "2023-11-07T05:31:56Z",
"steps": [
{
"activityId": "<string>",
"agentId": "<string>",
"agentRuntimeId": "<string>",
"agentSessionId": "<string>",
"approvalCriteria": "<unknown>",
"approvalOutcome": "<string>",
"approverRole": "<string>",
"bridgeActions": "<unknown>",
"bridgeResult": "<unknown>",
"bypass": true,
"changeSequence": 123,
"childTaskId": "<string>",
"completedActionUuid": "<string>",
"completedDocFamilyIds": "<unknown>",
"completedOn": "2023-11-07T05:31:56Z",
"conditionExpression": "<unknown>",
"createdOn": "2023-11-07T05:31:56Z",
"currentDocFamilyId": "<string>",
"description": "<string>",
"disableCache": true,
"endpointName": "<string>",
"enrichment": "<unknown>",
"errorDetails": "<unknown>",
"executionId": "<string>",
"id": "<string>",
"includeDocument": "<unknown>",
"insertedAt": "2023-11-07T05:31:56Z",
"insertedById": "<string>",
"joinPolicy": "<string>",
"llmModelName": "<string>",
"logGroup": "<string>",
"logStream": "<string>",
"mappedOutput": "<unknown>",
"maxParallel": 123,
"maxStepsToInsert": 123,
"moduleRef": "<string>",
"moduleRefs": "<unknown>",
"name": "<string>",
"options": "<unknown>",
"organization": {
"archived": true,
"authGroupLink": {
"authGroup": "<string>"
},
"changeSequence": 123,
"createdOn": "2023-11-07T05:31:56Z",
"defaultToPrivateTemplates": true,
"description": "Document processing organization for Acme Corp.",
"enterpriseOrganization": true,
"features": {},
"hasImage": true,
"id": "550e8400-e29b-41d4-a716-446655440000",
"memory": {
"orderedDashboards": [
"<string>"
]
},
"name": "Acme Corp",
"organizationStatus": "ACTIVE",
"properties": {},
"publicAccess": true,
"searchText": "<string>",
"slug": "acme-corp",
"stripeCustomerId": "<string>",
"supportAccess": true,
"supportAccessExpiresAt": "2023-11-07T05:31:56Z",
"updatedOn": "2023-11-07T05:31:56Z",
"uuid": "550e8400e29b41d4a716446655440000"
},
"organizationId": "<string>",
"outputMapping": "<unknown>",
"perDocument": true,
"plannerContext": "<unknown>",
"prompt": "<string>",
"promptActions": "<unknown>",
"promptBody": "<string>",
"promptRendered": "<string>",
"promptResult": "<unknown>",
"promptTemplateRef": "<string>",
"promptVariables": "<unknown>",
"requestBody": "<unknown>",
"requestHeaders": "<unknown>",
"requestPath": "<unknown>",
"requestQuery": "<unknown>",
"requestScript": "<string>",
"result": "<unknown>",
"scriptActions": "<unknown>",
"scriptBody": "<string>",
"scriptResult": "<unknown>",
"scriptSidecars": "<unknown>",
"sequence": 123,
"serviceBridgeRef": "<string>",
"skipReason": "<string>",
"slug": "<string>",
"startedOn": "2023-11-07T05:31:56Z",
"status": "<string>",
"taskData": "<unknown>",
"taskStatusSlug": "<string>",
"taskTemplateRef": "<string>",
"timeoutSeconds": 123,
"treatAsError": "<string>",
"type": "<string>",
"updatedOn": "2023-11-07T05:31:56Z",
"uuid": "<string>",
"waitForCompletion": true
}
],
"title": "<string>",
"totalWorkUnits": 123,
"triggerKind": "<string>",
"triggerMetadata": "<unknown>",
"updatedOn": "2023-11-07T05:31:56Z",
"uuid": "<string>",
"version": 123
}Activities
Replan an activity
Creates a new instance of the activity using the same plan, inputs, and trigger metadata; marks the source activity as REPLANNED.
POST
/
api
/
activities
/
{id}
/
replan
Replan an activity
curl --request POST \
--url https://platform.kodexa.ai/api/activities/{id}/replan \
--header 'x-api-key: <api-key>'import requests
url = "https://platform.kodexa.ai/api/activities/{id}/replan"
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
fetch('https://platform.kodexa.ai/api/activities/{id}/replan', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://platform.kodexa.ai/api/activities/{id}/replan",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://platform.kodexa.ai/api/activities/{id}/replan"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://platform.kodexa.ai/api/activities/{id}/replan")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.kodexa.ai/api/activities/{id}/replan")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"activityPlanId": "<string>",
"badges": "<unknown>",
"changeSequence": 123,
"completedOn": "2023-11-07T05:31:56Z",
"completedWorkUnits": 123,
"createdOn": "2023-11-07T05:31:56Z",
"currentSequence": 123,
"deleteUserEmail": "<string>",
"deleteUserId": "<string>",
"deleted": true,
"deletedDate": "2023-11-07T05:31:56Z",
"description": "<string>",
"errorDetails": "<string>",
"failedWorkUnits": 123,
"id": "<string>",
"inputs": "<unknown>",
"lifecycleState": "<string>",
"metadata": "<unknown>",
"organization": {
"archived": true,
"authGroupLink": {
"authGroup": "<string>"
},
"changeSequence": 123,
"createdOn": "2023-11-07T05:31:56Z",
"defaultToPrivateTemplates": true,
"description": "Document processing organization for Acme Corp.",
"enterpriseOrganization": true,
"features": {},
"hasImage": true,
"id": "550e8400-e29b-41d4-a716-446655440000",
"memory": {
"orderedDashboards": [
"<string>"
]
},
"name": "Acme Corp",
"organizationStatus": "ACTIVE",
"properties": {},
"publicAccess": true,
"searchText": "<string>",
"slug": "acme-corp",
"stripeCustomerId": "<string>",
"supportAccess": true,
"supportAccessExpiresAt": "2023-11-07T05:31:56Z",
"updatedOn": "2023-11-07T05:31:56Z",
"uuid": "550e8400e29b41d4a716446655440000"
},
"organizationId": "<string>",
"parentActivityId": "<string>",
"priority": 123,
"projectId": "<string>",
"replacedByActivityId": "<string>",
"runningWorkUnits": 123,
"startedByIntakeId": "<string>",
"startedByTriggerId": "<string>",
"startedOn": "2023-11-07T05:31:56Z",
"steps": [
{
"activityId": "<string>",
"agentId": "<string>",
"agentRuntimeId": "<string>",
"agentSessionId": "<string>",
"approvalCriteria": "<unknown>",
"approvalOutcome": "<string>",
"approverRole": "<string>",
"bridgeActions": "<unknown>",
"bridgeResult": "<unknown>",
"bypass": true,
"changeSequence": 123,
"childTaskId": "<string>",
"completedActionUuid": "<string>",
"completedDocFamilyIds": "<unknown>",
"completedOn": "2023-11-07T05:31:56Z",
"conditionExpression": "<unknown>",
"createdOn": "2023-11-07T05:31:56Z",
"currentDocFamilyId": "<string>",
"description": "<string>",
"disableCache": true,
"endpointName": "<string>",
"enrichment": "<unknown>",
"errorDetails": "<unknown>",
"executionId": "<string>",
"id": "<string>",
"includeDocument": "<unknown>",
"insertedAt": "2023-11-07T05:31:56Z",
"insertedById": "<string>",
"joinPolicy": "<string>",
"llmModelName": "<string>",
"logGroup": "<string>",
"logStream": "<string>",
"mappedOutput": "<unknown>",
"maxParallel": 123,
"maxStepsToInsert": 123,
"moduleRef": "<string>",
"moduleRefs": "<unknown>",
"name": "<string>",
"options": "<unknown>",
"organization": {
"archived": true,
"authGroupLink": {
"authGroup": "<string>"
},
"changeSequence": 123,
"createdOn": "2023-11-07T05:31:56Z",
"defaultToPrivateTemplates": true,
"description": "Document processing organization for Acme Corp.",
"enterpriseOrganization": true,
"features": {},
"hasImage": true,
"id": "550e8400-e29b-41d4-a716-446655440000",
"memory": {
"orderedDashboards": [
"<string>"
]
},
"name": "Acme Corp",
"organizationStatus": "ACTIVE",
"properties": {},
"publicAccess": true,
"searchText": "<string>",
"slug": "acme-corp",
"stripeCustomerId": "<string>",
"supportAccess": true,
"supportAccessExpiresAt": "2023-11-07T05:31:56Z",
"updatedOn": "2023-11-07T05:31:56Z",
"uuid": "550e8400e29b41d4a716446655440000"
},
"organizationId": "<string>",
"outputMapping": "<unknown>",
"perDocument": true,
"plannerContext": "<unknown>",
"prompt": "<string>",
"promptActions": "<unknown>",
"promptBody": "<string>",
"promptRendered": "<string>",
"promptResult": "<unknown>",
"promptTemplateRef": "<string>",
"promptVariables": "<unknown>",
"requestBody": "<unknown>",
"requestHeaders": "<unknown>",
"requestPath": "<unknown>",
"requestQuery": "<unknown>",
"requestScript": "<string>",
"result": "<unknown>",
"scriptActions": "<unknown>",
"scriptBody": "<string>",
"scriptResult": "<unknown>",
"scriptSidecars": "<unknown>",
"sequence": 123,
"serviceBridgeRef": "<string>",
"skipReason": "<string>",
"slug": "<string>",
"startedOn": "2023-11-07T05:31:56Z",
"status": "<string>",
"taskData": "<unknown>",
"taskStatusSlug": "<string>",
"taskTemplateRef": "<string>",
"timeoutSeconds": 123,
"treatAsError": "<string>",
"type": "<string>",
"updatedOn": "2023-11-07T05:31:56Z",
"uuid": "<string>",
"waitForCompletion": true
}
],
"title": "<string>",
"totalWorkUnits": 123,
"triggerKind": "<string>",
"triggerMetadata": "<unknown>",
"updatedOn": "2023-11-07T05:31:56Z",
"uuid": "<string>",
"version": 123
}Authorizations
x-api-keybearerAuth
API key for authentication. Create one from the Kodexa platform UI under Settings > Access Tokens.
Path Parameters
Unique identifier (UUID) of the resource.
Response
Replanned activity
An organization is the top-level tenant in Kodexa. All projects, stores, and resources belong to an organization.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I
