@meshery/schemas 1.3.124 → 1.3.125

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/cloudApi.d.mts +14 -14
  2. package/dist/cloudApi.d.ts +14 -14
  3. package/dist/constructs/v1alpha1/core/Core.d.ts +22 -0
  4. package/dist/constructs/v1alpha1/core/CoreSchema.js +1 -1
  5. package/dist/constructs/v1alpha1/core/CoreSchema.mjs +1 -1
  6. package/dist/constructs/v1beta1/feature/Feature.d.ts +3 -3
  7. package/dist/constructs/v1beta1/feature/FeatureSchema.js +1 -1
  8. package/dist/constructs/v1beta1/feature/FeatureSchema.mjs +1 -1
  9. package/dist/constructs/v1beta2/core/Core.d.ts +52 -1
  10. package/dist/constructs/v1beta2/core/CoreSchema.js +1 -1
  11. package/dist/constructs/v1beta2/core/CoreSchema.mjs +1 -1
  12. package/dist/constructs/v1beta2/user/User.d.ts +60 -2
  13. package/dist/constructs/v1beta2/user/UserSchema.js +1 -1
  14. package/dist/constructs/v1beta2/user/UserSchema.mjs +1 -1
  15. package/dist/constructs/v1beta3/connection/Connection.d.ts +92 -5
  16. package/dist/constructs/v1beta3/connection/ConnectionSchema.js +5 -5
  17. package/dist/constructs/v1beta3/connection/ConnectionSchema.mjs +5 -5
  18. package/dist/constructs/v1beta3/content_item/ContentItem.d.ts +90 -3
  19. package/dist/constructs/v1beta3/content_item/ContentItemSchema.js +6 -6
  20. package/dist/constructs/v1beta3/content_item/ContentItemSchema.mjs +6 -6
  21. package/dist/constructs/v1beta3/event/Event.d.ts +60 -2
  22. package/dist/constructs/v1beta3/event/EventSchema.js +3 -3
  23. package/dist/constructs/v1beta3/event/EventSchema.mjs +3 -3
  24. package/dist/constructs/v1beta3/request/Request.d.ts +5 -5
  25. package/dist/constructs/v1beta3/request/RequestSchema.js +5 -5
  26. package/dist/constructs/v1beta3/request/RequestSchema.mjs +5 -5
  27. package/dist/constructs/v1beta3/schedule/Schedule.d.ts +90 -3
  28. package/dist/constructs/v1beta3/schedule/ScheduleSchema.js +5 -5
  29. package/dist/constructs/v1beta3/schedule/ScheduleSchema.mjs +5 -5
  30. package/dist/index.d.mts +53 -2
  31. package/dist/index.d.ts +53 -2
  32. package/dist/mesheryApi.d.mts +2 -2
  33. package/dist/mesheryApi.d.ts +2 -2
  34. package/package.json +1 -1
@@ -3,13 +3,13 @@ authenticated session, optionally filtered by workspace or status. Each
3
3
  schedule carries its live claim, when one is held. The live claim names
4
4
  the connection (typically a desktop app install) that is currently
5
5
  running the schedule.
6
- `,parameters:[{name:"X-Current-Orgid",in:"header",required:false,description:"Organization the call acts in, by ID (a UUID). When present, the server resolves the session organization from it instead of the caller's selected organization, and runs its membership and permission checks there. A caller who is not a live member of the named organization receives the same 404 as an unknown resource. Omitted, the caller's selected organization applies.",schema:{type:"string",minLength:36,maxLength:36,pattern:"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"}},{name:"page",in:"query",description:"Get responses by page",schema:{type:"integer",minimum:0}},{name:"pageSize",in:"query",description:"Number of items per page.",schema:{type:"integer",minimum:1}},{name:"search",in:"query",description:"Get responses that match search param value",schema:{type:"string"}},{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}},{name:"workspaceId",in:"query",required:false,description:"Only schedules linked to this workspace.",schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},{name:"status",in:"query",required:false,description:"Only schedules in this status.",schema:{type:"string",description:"Lifecycle status of a schedule. `pending`: created, not yet\ndue-scheduled. `scheduled`: waiting for its due time. `assigned`:\ndesignated for a particular worker but not yet claimed. `claimed`: a\nworker holds the claim and has not started. `running`: the claim\nholder is executing it. `retrying`: the last attempt failed and\nanother is due. `completed`, `failed` and `cancelled` are terminal\nfor a run-once schedule; a recurring schedule returns to `scheduled`\nwhen its claim is released with a `completed` outcome.\n",enum:["pending","scheduled","assigned","claimed","running","retrying","completed","failed","cancelled"]}}],responses:{200:{description:"Schedules page",content:{"application/json":{schema:{type:"object",description:"Paginated collection of schedules.",required:["page","pageSize","totalCount","schedules"],properties:{page:{type:"integer",description:"Current page number of the result set.",minimum:0},pageSize:{type:"integer",description:"Number of items per page.",minimum:1},totalCount:{type:"integer",description:"Total number of items available.",minimum:0},schedules:{type:"array",items:{"x-go-type":"Schedule",$schema:"http://json-schema.org/draft-07/schema#",title:"Schedule Schema",description:"Server-returned schedule. A schedule is a job: an action to run, what it\nacts on (`targetType`, `targetId`) and its parameters, when it is due\n(`runAt`, `nextRunAt`, `recurrence` in `timezone`), its retry budget and\nits outcome. Schedules belong to an organization and may be linked to a\nworkspace. A worker takes a schedule through the generic `claim`\nconstruct (`POST /api/claims` with `resourceType` `schedule`); there is\nno schedule-specific claim route. While the claim is live no other worker\ncan take the schedule, and a claim past its `expiresAt` is stale so the\nschedule is claimable again. Releasing the claim records the run's\noutcome on the schedule in the same transaction (see `status`). The\n`claim` and the status values `assigned`, `claimed` and `running` are\nserver-managed. Pausing is data, not an operation: a client sets `paused`\n(and optionally `pauseReason`) on create or update, and the server\nrecords `pausedAt` and `pausedBy`. Fields marked readOnly are\nserver-managed and ignored on input.\n",type:"object",additionalProperties:false,required:["id","organizationId","name","action","enabled","timezone","status","retryCount","maxRetries","visibility","createdAt","updatedAt"],properties:{id:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},readOnly:true,"x-order":1},organizationId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},readOnly:true,"x-go-name":"OrganizationID","x-oapi-codegen-extra-tags":{db:"organization_id"},"x-order":2},workspaceId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-oapi-codegen-extra-tags":{db:"workspace_id",json:"workspaceId,omitempty"},"x-order":3},createdBy:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},readOnly:true,"x-go-name":"CreatedBy","x-oapi-codegen-extra-tags":{db:"owner"},"x-order":4},name:{type:"string",description:"Human-readable name for the schedule.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"name"},"x-order":5},action:{type:"string",description:"The action the worker runs when it holds the schedule's claim, for example a command name.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"action"},"x-order":6},targetType:{"x-oapi-codegen-extra-tags":{db:"target_type",json:"targetType,omitempty"},"x-order":7,type:"string",description:"Type of the resource the schedule acts on, named the way a claim's\n`resourceType` is (lowercase snake_case construct name, for example\n`content_item` or `profile`). A server verifies the target types it\nserves and refuses others with 400. Set together with `targetId` or\nnot at all.\n",pattern:"^[a-z][a-z0-9_]*$",minLength:1,maxLength:64},targetId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"TargetID","x-oapi-codegen-extra-tags":{db:"target_id",json:"targetId,omitempty"},"x-order":8},params:{type:"object",description:"Action parameters, stored as a JSON blob. What the schedule acts on belongs in `targetType` and `targetId`, not here.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"params"},"x-order":9},enabled:{type:"boolean",description:"Whether the schedule is eligible to run. A disabled schedule is never claimed.",default:true,"x-oapi-codegen-extra-tags":{db:"enabled"},"x-order":10},runAt:{type:"string",format:"date-time",description:"Time the schedule first becomes due.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"run_at"},"x-order":11},nextRunAt:{type:"string",format:"date-time",description:"Next time the schedule becomes due. Null when it is never due again.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"next_run"},"x-order":12},recurrence:{"x-oapi-codegen-extra-tags":{db:"recurrence"},"x-order":13,type:"string",description:"How the schedule repeats once it has run. Empty, `once` and `none`\nmean run once. `hourly` repeats every hour; `daily`, `weekly` and\n`monthly` repeat at the same wall-clock time one calendar day, week\nor month later in the schedule's `timezone`, so a daily schedule\nkeeps its local time across daylight-saving changes. `every:<n>`\nrepeats every `n` minutes (1 to 999999). Occurrences are counted\nfrom `runAt` (else from the current `nextRunAt`); the next due time\nis the first occurrence after the run is released, so missed runs\nare not replayed.\n",pattern:"^(|once|none|hourly|daily|weekly|monthly|every:[1-9][0-9]{0,5})$",maxLength:255,default:""},timezone:{"x-oapi-codegen-extra-tags":{db:"timezone"},"x-order":14,type:"string",description:"IANA time zone name (for example `UTC` or `America/Chicago`) in which\n`daily`, `weekly` and `monthly` recurrences keep their wall-clock\ntime. Instants (`runAt`, `nextRunAt`) are always absolute. The server\nrefuses a name it does not know with 400.\n",minLength:1,maxLength:64,pattern:"^[A-Za-z][A-Za-z0-9_+-]*(/[A-Za-z0-9_+-]+)*$",default:"UTC"},status:{type:"string",description:"Lifecycle status of a schedule. `pending`: created, not yet\ndue-scheduled. `scheduled`: waiting for its due time. `assigned`:\ndesignated for a particular worker but not yet claimed. `claimed`: a\nworker holds the claim and has not started. `running`: the claim\nholder is executing it. `retrying`: the last attempt failed and\nanother is due. `completed`, `failed` and `cancelled` are terminal\nfor a run-once schedule; a recurring schedule returns to `scheduled`\nwhen its claim is released with a `completed` outcome.\n",enum:["pending","scheduled","assigned","claimed","running","retrying","completed","failed","cancelled"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":15},retryCount:{type:"integer",description:"Attempts already retried for the current run.",minimum:0,default:0,"x-oapi-codegen-extra-tags":{db:"retry_count"},"x-order":16},maxRetries:{type:"integer",description:"Maximum retries before the run is marked failed.",minimum:0,default:0,"x-oapi-codegen-extra-tags":{db:"max_retries"},"x-order":17},retryDelayMinutes:{type:"integer",description:"Minutes to wait before a retry becomes due.",minimum:0,default:0,"x-oapi-codegen-extra-tags":{db:"retry_delay_minutes"},"x-order":18},lastRunAt:{type:"string",format:"date-time",description:"Time the most recent attempt ended (the release time of its claim). Server-managed.",nullable:true,readOnly:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"last_run"},"x-order":19},lastError:{type:"string",description:"Error reported by the most recent attempt; empty after a successful one. Server-managed.",maxLength:5e3,readOnly:true,"x-oapi-codegen-extra-tags":{db:"last_error"},"x-order":20},claim:{"x-go-type":"*claimv1beta3.Claim","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta3/claim",name:"claimv1beta3"},description:"The schedule's live claim, when one is held. A read-only view of the claim construct; omitted when the schedule is unclaimed.",readOnly:true,"x-oapi-codegen-extra-tags":{db:"-",json:"claim,omitempty"},"x-order":21,$schema:"http://json-schema.org/draft-07/schema#",title:"Claim Schema",type:"object",additionalProperties:false,required:["id","organizationId","resourceType","resourceId","status","claimedAt","expiresAt","createdAt","updatedAt"],properties:{id:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-order":1},organizationId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OrganizationID","x-oapi-codegen-extra-tags":{db:"organization_id"},"x-order":2},resourceType:{type:"string",description:"Type of the claimed resource, the construct name in snake_case, for example `content_item` or `schedule`.",minLength:1,maxLength:64,"x-oapi-codegen-extra-tags":{db:"resource_type"},"x-order":3},resourceId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-oapi-codegen-extra-tags":{db:"resource_id"},"x-order":4},claimantConnectionId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"ClaimantConnectionID","x-oapi-codegen-extra-tags":{db:"claimant_connection_id",json:"claimantConnectionId,omitempty"},"x-order":5},claimantUserId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"ClaimantUserID","x-oapi-codegen-extra-tags":{db:"claimant_user_id",json:"claimantUserId,omitempty"},"x-order":6},status:{type:"string",description:"Lifecycle of the claim. `active` while held, `released` once the holder (or a member allowed to release it) lets it go, `expired` once `expiresAt` passed without a renewal or the holding connection was deleted. Expiry is evaluated when the claim is read, so a claim never reads `active` past its `expiresAt`.\n",enum:["active","released","expired"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":7},claimedAt:{description:"Time the claim was taken.","x-oapi-codegen-extra-tags":{db:"claimed_at"},"x-order":8,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},expiresAt:{description:"Time the claim lapses unless the holder renews it. Always set by the server; a claim past this time is stale.","x-oapi-codegen-extra-tags":{db:"expires_at"},"x-order":9,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},renewedAt:{type:"string",format:"date-time",description:"Time of the last renewal. Null until the claim is first renewed.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"renewed_at"},"x-order":10},releasedAt:{type:"string",format:"date-time",description:"Time the claim was released. Null while the claim is active or after it expired.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"released_at"},"x-order":11},outcome:{type:"string",description:"What the releaser reported when the claim was released: `completed` when the work behind it finished, `failed` when it was attempted and did not succeed, `cancelled` when it was let go without the work being done (including a release by another member). Omitted while the claim is active and on an expired claim.\n",enum:["completed","failed","cancelled"],"x-oapi-codegen-extra-tags":{db:"outcome",json:"outcome,omitempty"},"x-order":12},outcomeError:{type:"string",description:"Error reported with a `failed` outcome. Omitted otherwise.",maxLength:5e3,"x-oapi-codegen-extra-tags":{db:"outcome_error",json:"outcomeError,omitempty"},"x-order":13},outcomeEventId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OutcomeEventID","x-oapi-codegen-extra-tags":{db:"outcome_event_id",json:"outcomeEventId,omitempty"},"x-order":14},releasedBy:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"ReleasedBy","x-oapi-codegen-extra-tags":{db:"released_by",json:"releasedBy,omitempty"},"x-order":15},createdAt:{description:"Timestamp of claim creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":16,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last claim modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":17,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}},pausedAt:{type:"string",format:"date-time",description:"Time the schedule was paused. Null when the schedule is not paused. Server-managed.",nullable:true,readOnly:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"paused_at"},"x-order":22},pausedBy:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},readOnly:true,"x-oapi-codegen-extra-tags":{db:"paused_by",json:"pausedBy,omitempty"},"x-order":23},pauseReason:{type:"string",description:"Reason given for pausing the schedule, set with `paused` on create or update. Empty when not paused.",maxLength:1e3,"x-oapi-codegen-extra-tags":{db:"pause_reason"},"x-order":24},createdAt:{description:"Timestamp of schedule creation.",readOnly:true,"x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":25,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last schedule modification.",readOnly:true,"x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":26,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deletedAt:{type:"string",format:"date-time",description:"Timestamp when the schedule was soft-deleted. Null while live.",nullable:true,readOnly:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"deleted_at"},"x-order":27},posture:{"x-go-type":"*posturev1beta3.Posture","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta3/posture",name:"posturev1beta3"},description:`Optional Posture this schedule runs under, resolved above the
6
+ `,parameters:[{name:"X-Current-Orgid",in:"header",required:false,description:"Organization the call acts in, by ID (a UUID). When present, the server resolves the session organization from it instead of the caller's selected organization, and runs its membership and permission checks there. A caller who is not a live member of the named organization receives the same 404 as an unknown resource. Omitted, a path or query `orgId` the operation takes names the organization when sent; otherwise the caller's selected organization applies when it is not nil; otherwise the server defaults among the caller's live organizations, using the only one when exactly one qualifies. When the call needs an acting organization and several qualify, an operation that declares the OrganizationSelectionRequired response answers 409 `organization_selection_required`. The resolution order is in docs/mcp-operation-contract.md, the organization selector.",schema:{type:"string",minLength:36,maxLength:36,pattern:"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"}},{name:"page",in:"query",description:"Get responses by page",schema:{type:"integer",minimum:0}},{name:"pageSize",in:"query",description:"Number of items per page.",schema:{type:"integer",minimum:1}},{name:"search",in:"query",description:"Get responses that match search param value",schema:{type:"string"}},{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}},{name:"workspaceId",in:"query",required:false,description:"Only schedules linked to this workspace.",schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},{name:"status",in:"query",required:false,description:"Only schedules in this status.",schema:{type:"string",description:"Lifecycle status of a schedule. `pending`: created, not yet\ndue-scheduled. `scheduled`: waiting for its due time. `assigned`:\ndesignated for a particular worker but not yet claimed. `claimed`: a\nworker holds the claim and has not started. `running`: the claim\nholder is executing it. `retrying`: the last attempt failed and\nanother is due. `completed`, `failed` and `cancelled` are terminal\nfor a run-once schedule; a recurring schedule returns to `scheduled`\nwhen its claim is released with a `completed` outcome.\n",enum:["pending","scheduled","assigned","claimed","running","retrying","completed","failed","cancelled"]}}],responses:{200:{description:"Schedules page",content:{"application/json":{schema:{type:"object",description:"Paginated collection of schedules.",required:["page","pageSize","totalCount","schedules"],properties:{page:{type:"integer",description:"Current page number of the result set.",minimum:0},pageSize:{type:"integer",description:"Number of items per page.",minimum:1},totalCount:{type:"integer",description:"Total number of items available.",minimum:0},schedules:{type:"array",items:{"x-go-type":"Schedule",$schema:"http://json-schema.org/draft-07/schema#",title:"Schedule Schema",description:"Server-returned schedule. A schedule is a job: an action to run, what it\nacts on (`targetType`, `targetId`) and its parameters, when it is due\n(`runAt`, `nextRunAt`, `recurrence` in `timezone`), its retry budget and\nits outcome. Schedules belong to an organization and may be linked to a\nworkspace. A worker takes a schedule through the generic `claim`\nconstruct (`POST /api/claims` with `resourceType` `schedule`); there is\nno schedule-specific claim route. While the claim is live no other worker\ncan take the schedule, and a claim past its `expiresAt` is stale so the\nschedule is claimable again. Releasing the claim records the run's\noutcome on the schedule in the same transaction (see `status`). The\n`claim` and the status values `assigned`, `claimed` and `running` are\nserver-managed. Pausing is data, not an operation: a client sets `paused`\n(and optionally `pauseReason`) on create or update, and the server\nrecords `pausedAt` and `pausedBy`. Fields marked readOnly are\nserver-managed and ignored on input.\n",type:"object",additionalProperties:false,required:["id","organizationId","name","action","enabled","timezone","status","retryCount","maxRetries","visibility","createdAt","updatedAt"],properties:{id:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},readOnly:true,"x-order":1},organizationId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},readOnly:true,"x-go-name":"OrganizationID","x-oapi-codegen-extra-tags":{db:"organization_id"},"x-order":2},workspaceId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-oapi-codegen-extra-tags":{db:"workspace_id",json:"workspaceId,omitempty"},"x-order":3},createdBy:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},readOnly:true,"x-go-name":"CreatedBy","x-oapi-codegen-extra-tags":{db:"owner"},"x-order":4},name:{type:"string",description:"Human-readable name for the schedule.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"name"},"x-order":5},action:{type:"string",description:"The action the worker runs when it holds the schedule's claim, for example a command name.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"action"},"x-order":6},targetType:{"x-oapi-codegen-extra-tags":{db:"target_type",json:"targetType,omitempty"},"x-order":7,type:"string",description:"Type of the resource the schedule acts on, named the way a claim's\n`resourceType` is (lowercase snake_case construct name, for example\n`content_item` or `profile`). A server verifies the target types it\nserves and refuses others with 400. Set together with `targetId` or\nnot at all.\n",pattern:"^[a-z][a-z0-9_]*$",minLength:1,maxLength:64},targetId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"TargetID","x-oapi-codegen-extra-tags":{db:"target_id",json:"targetId,omitempty"},"x-order":8},params:{type:"object",description:"Action parameters, stored as a JSON blob. What the schedule acts on belongs in `targetType` and `targetId`, not here.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"params"},"x-order":9},enabled:{type:"boolean",description:"Whether the schedule is eligible to run. A disabled schedule is never claimed.",default:true,"x-oapi-codegen-extra-tags":{db:"enabled"},"x-order":10},runAt:{type:"string",format:"date-time",description:"Time the schedule first becomes due.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"run_at"},"x-order":11},nextRunAt:{type:"string",format:"date-time",description:"Next time the schedule becomes due. Null when it is never due again.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"next_run"},"x-order":12},recurrence:{"x-oapi-codegen-extra-tags":{db:"recurrence"},"x-order":13,type:"string",description:"How the schedule repeats once it has run. Empty, `once` and `none`\nmean run once. `hourly` repeats every hour; `daily`, `weekly` and\n`monthly` repeat at the same wall-clock time one calendar day, week\nor month later in the schedule's `timezone`, so a daily schedule\nkeeps its local time across daylight-saving changes. `every:<n>`\nrepeats every `n` minutes (1 to 999999). Occurrences are counted\nfrom `runAt` (else from the current `nextRunAt`); the next due time\nis the first occurrence after the run is released, so missed runs\nare not replayed.\n",pattern:"^(|once|none|hourly|daily|weekly|monthly|every:[1-9][0-9]{0,5})$",maxLength:255,default:""},timezone:{"x-oapi-codegen-extra-tags":{db:"timezone"},"x-order":14,type:"string",description:"IANA time zone name (for example `UTC` or `America/Chicago`) in which\n`daily`, `weekly` and `monthly` recurrences keep their wall-clock\ntime. Instants (`runAt`, `nextRunAt`) are always absolute. The server\nrefuses a name it does not know with 400.\n",minLength:1,maxLength:64,pattern:"^[A-Za-z][A-Za-z0-9_+-]*(/[A-Za-z0-9_+-]+)*$",default:"UTC"},status:{type:"string",description:"Lifecycle status of a schedule. `pending`: created, not yet\ndue-scheduled. `scheduled`: waiting for its due time. `assigned`:\ndesignated for a particular worker but not yet claimed. `claimed`: a\nworker holds the claim and has not started. `running`: the claim\nholder is executing it. `retrying`: the last attempt failed and\nanother is due. `completed`, `failed` and `cancelled` are terminal\nfor a run-once schedule; a recurring schedule returns to `scheduled`\nwhen its claim is released with a `completed` outcome.\n",enum:["pending","scheduled","assigned","claimed","running","retrying","completed","failed","cancelled"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":15},retryCount:{type:"integer",description:"Attempts already retried for the current run.",minimum:0,default:0,"x-oapi-codegen-extra-tags":{db:"retry_count"},"x-order":16},maxRetries:{type:"integer",description:"Maximum retries before the run is marked failed.",minimum:0,default:0,"x-oapi-codegen-extra-tags":{db:"max_retries"},"x-order":17},retryDelayMinutes:{type:"integer",description:"Minutes to wait before a retry becomes due.",minimum:0,default:0,"x-oapi-codegen-extra-tags":{db:"retry_delay_minutes"},"x-order":18},lastRunAt:{type:"string",format:"date-time",description:"Time the most recent attempt ended (the release time of its claim). Server-managed.",nullable:true,readOnly:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"last_run"},"x-order":19},lastError:{type:"string",description:"Error reported by the most recent attempt; empty after a successful one. Server-managed.",maxLength:5e3,readOnly:true,"x-oapi-codegen-extra-tags":{db:"last_error"},"x-order":20},claim:{"x-go-type":"*claimv1beta3.Claim","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta3/claim",name:"claimv1beta3"},description:"The schedule's live claim, when one is held. A read-only view of the claim construct; omitted when the schedule is unclaimed.",readOnly:true,"x-oapi-codegen-extra-tags":{db:"-",json:"claim,omitempty"},"x-order":21,$schema:"http://json-schema.org/draft-07/schema#",title:"Claim Schema",type:"object",additionalProperties:false,required:["id","organizationId","resourceType","resourceId","status","claimedAt","expiresAt","createdAt","updatedAt"],properties:{id:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-order":1},organizationId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OrganizationID","x-oapi-codegen-extra-tags":{db:"organization_id"},"x-order":2},resourceType:{type:"string",description:"Type of the claimed resource, the construct name in snake_case, for example `content_item` or `schedule`.",minLength:1,maxLength:64,"x-oapi-codegen-extra-tags":{db:"resource_type"},"x-order":3},resourceId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-oapi-codegen-extra-tags":{db:"resource_id"},"x-order":4},claimantConnectionId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"ClaimantConnectionID","x-oapi-codegen-extra-tags":{db:"claimant_connection_id",json:"claimantConnectionId,omitempty"},"x-order":5},claimantUserId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"ClaimantUserID","x-oapi-codegen-extra-tags":{db:"claimant_user_id",json:"claimantUserId,omitempty"},"x-order":6},status:{type:"string",description:"Lifecycle of the claim. `active` while held, `released` once the holder (or a member allowed to release it) lets it go, `expired` once `expiresAt` passed without a renewal or the holding connection was deleted. Expiry is evaluated when the claim is read, so a claim never reads `active` past its `expiresAt`.\n",enum:["active","released","expired"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":7},claimedAt:{description:"Time the claim was taken.","x-oapi-codegen-extra-tags":{db:"claimed_at"},"x-order":8,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},expiresAt:{description:"Time the claim lapses unless the holder renews it. Always set by the server; a claim past this time is stale.","x-oapi-codegen-extra-tags":{db:"expires_at"},"x-order":9,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},renewedAt:{type:"string",format:"date-time",description:"Time of the last renewal. Null until the claim is first renewed.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"renewed_at"},"x-order":10},releasedAt:{type:"string",format:"date-time",description:"Time the claim was released. Null while the claim is active or after it expired.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"released_at"},"x-order":11},outcome:{type:"string",description:"What the releaser reported when the claim was released: `completed` when the work behind it finished, `failed` when it was attempted and did not succeed, `cancelled` when it was let go without the work being done (including a release by another member). Omitted while the claim is active and on an expired claim.\n",enum:["completed","failed","cancelled"],"x-oapi-codegen-extra-tags":{db:"outcome",json:"outcome,omitempty"},"x-order":12},outcomeError:{type:"string",description:"Error reported with a `failed` outcome. Omitted otherwise.",maxLength:5e3,"x-oapi-codegen-extra-tags":{db:"outcome_error",json:"outcomeError,omitempty"},"x-order":13},outcomeEventId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OutcomeEventID","x-oapi-codegen-extra-tags":{db:"outcome_event_id",json:"outcomeEventId,omitempty"},"x-order":14},releasedBy:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"ReleasedBy","x-oapi-codegen-extra-tags":{db:"released_by",json:"releasedBy,omitempty"},"x-order":15},createdAt:{description:"Timestamp of claim creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":16,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last claim modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":17,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}},pausedAt:{type:"string",format:"date-time",description:"Time the schedule was paused. Null when the schedule is not paused. Server-managed.",nullable:true,readOnly:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"paused_at"},"x-order":22},pausedBy:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},readOnly:true,"x-oapi-codegen-extra-tags":{db:"paused_by",json:"pausedBy,omitempty"},"x-order":23},pauseReason:{type:"string",description:"Reason given for pausing the schedule, set with `paused` on create or update. Empty when not paused.",maxLength:1e3,"x-oapi-codegen-extra-tags":{db:"pause_reason"},"x-order":24},createdAt:{description:"Timestamp of schedule creation.",readOnly:true,"x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":25,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last schedule modification.",readOnly:true,"x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":26,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deletedAt:{type:"string",format:"date-time",description:"Timestamp when the schedule was soft-deleted. Null while live.",nullable:true,readOnly:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"deleted_at"},"x-order":27},posture:{"x-go-type":"*posturev1beta3.Posture","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta3/posture",name:"posturev1beta3"},description:`Optional Posture this schedule runs under, resolved above the
7
7
  profile x platform resolution and below an explicit per-run flag.
8
8
  Omitted when the schedule has no override: it then runs under whatever
9
9
  profile x platform, configuration, environment, account or default
10
10
  resolves to, exactly as before. Any value outside the Posture
11
11
  enum is refused with 400.
12
- `,"x-oapi-codegen-extra-tags":{db:"posture",json:"posture,omitempty"},"x-order":28,$schema:"http://json-schema.org/draft-07/schema#",title:"Posture Schema",type:"string",enum:["cautious","standard","brisk"]},visibility:{description:"Visibility of the schedule: `public` (the default) allows completed runs\nto appear on the unauthenticated public activity feed (subject to user\npreferences), `org` restricts visibility to members of the schedule's\norganization, and `private` restricts it to the schedule owner.\n",default:"public","x-oapi-codegen-extra-tags":{db:"visibility"},"x-order":29,type:"string",enum:["public","org","private"]}}},description:"Schedules included on this page of results."}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},429:{description:"Too many requests - the caller exceeded the server's per-user request rate for this route family. Wait the number of seconds in `Retry-After` before retrying.",headers:{"Retry-After":{description:"Number of seconds the caller must wait before retrying.",required:true,schema:{type:"integer",minimum:1}}},content:{"application/json":{schema:{type:"object",description:"A MeshKit error answered as a JSON body. `error` is the sentence the caller is shown; MeshKit's long description is never serialized. Use the `MeshkitError400`, `MeshkitError403`, `MeshkitError404`, `MeshkitError409`, `MeshkitError429`, `MeshkitError500` and `MeshkitError502` responses for an operation whose server answers its refusals this way.",required:["error"],additionalProperties:false,properties:{error:{type:"string",minLength:1,description:"The sentence the caller is shown."},code:{type:"string",minLength:1,description:"MeshKit error code, a component-scoped identifier allocated by the emitting service (e.g. `<component>-<number>`); it is not a stable part of this contract. Omitted for an error that is not a MeshKit error."},severity:{type:"string",description:"MeshKit severity name. Omitted when MeshKit reports none.",enum:["emergency","alert","critical","fatal"]},probableCause:{type:"array",description:"MeshKit's probable causes of the error.",items:{type:"string"}},suggestedRemediation:{type:"array",description:"MeshKit's suggested remediations for the error.",items:{type:"string"}}}}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}},post:{"x-internal":["cloud"],tags:["schedules"],summary:"Create a schedule",operationId:"createSchedule",parameters:[{name:"Idempotency-Key",in:"header",required:false,description:"Client-chosen key that makes a create safe to retry. The server keeps the organization, the user, the key, a hash of the request and the final response for 24 hours. Only a final response that is not a 5xx is stored. The server answers a 5xx only after it has rolled back the write; a 5xx it answers is not stored and releases the key's claim, so a retry with the same key is processed as new. A response the server has committed is final and is stored, even if a gateway in front of the server later fails the client's connection. A retry with the same key and the same request hash returns the stored response without creating anything again. A retry with the same key and a different request hash answers 422 and creates nothing. A retry with the same key that arrives while the earlier request with that key is still being processed answers 409 with the body `code` `idempotency_key_in_flight` and creates nothing. Once the first request has finished without a 5xx, a retry receives the stored response; after a 5xx, a retry is processed as new. Precedence: while the first request with a key is in flight, every retry with that key answers 409 whatever its body; only once the first request has finished does a retry with a different body answer 422. The in-flight claim of a request that never finished expires 24 hours after it was taken, the same TTL as the stored response; no shorter in-flight lease applies. A retry after that expiry is processed as new. Omitted, the create is not deduplicated. Use a fresh random value (a UUID) per intended create.",schema:{type:"string",minLength:1,maxLength:255}}],description:"Creates a schedule in the organization of the authenticated session,\nowned by the session user (`createdBy`). `status` accepts only\n`pending`, `scheduled` and `cancelled`; omitted, the server picks\n`scheduled` when the schedule has a due time and `pending` otherwise.\n`nextRunAt` defaults to `runAt`. A `targetId` must name a live\nresource of `targetType` in the organization, else 400. Send\n`paused: true` to create the schedule already paused. `visibility`\ndefaults to `public`.\nThe optional `Idempotency-Key` header makes the create safe to\nretry: within 24 hours the same key with the same request hash\nreturns the first response without creating another schedule, and\nthe same key with a different request hash answers 422 and creates\nnothing. A retry with the same key that arrives while the first request\nwith that key is still being processed answers 409 and creates nothing.\nOnce the first request has finished without a 5xx, a retry receives the\nstored response; after a 5xx, a retry is processed as new.\n",requestBody:{required:true,content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Payload for creating or updating a schedule. Contains only\nclient-settable fields; the owning `organizationId`, `createdBy`, the\nclaim, `pausedAt`, `pausedBy`, `lastRunAt`, `lastError` and the\ntimestamps are server-managed and refused as unknown fields. Pausing\nis a field, not an operation: `paused` pauses or resumes the\nschedule. `status` accepts only `pending`, `scheduled` and\n`cancelled` here (otherwise 400); the other values are set by the\nserver as the schedule is claimed and released.\n",required:["name","action"],properties:{id:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-oapi-codegen-extra-tags":{json:"id,omitempty"}},workspaceId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-oapi-codegen-extra-tags":{json:"workspaceId,omitempty"}},name:{type:"string",description:"Human-readable name for the schedule.",minLength:1,maxLength:255},action:{type:"string",description:"The action the worker runs, for example a command name.",minLength:1,maxLength:255},targetType:{"x-oapi-codegen-extra-tags":{json:"targetType,omitempty"},type:"string",description:"Type of the resource the schedule acts on, named the way a claim's\n`resourceType` is (lowercase snake_case construct name, for example\n`content_item` or `profile`). A server verifies the target types it\nserves and refuses others with 400. Set together with `targetId` or\nnot at all.\n",pattern:"^[a-z][a-z0-9_]*$",minLength:1,maxLength:64},targetId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"TargetID","x-oapi-codegen-extra-tags":{json:"targetId,omitempty"}},params:{type:"object",description:"Action parameters, stored as a JSON blob.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true},enabled:{type:"boolean",description:"Whether the schedule is eligible to run.",default:true},runAt:{type:"string",format:"date-time",description:"Time the schedule first becomes due.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"}},nextRunAt:{type:"string",format:"date-time",description:"Next time the schedule becomes due. Omitted on create, it defaults to `runAt`; omitted on update, it is kept. Send null for never due again.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"}},recurrence:{type:"string",description:"How the schedule repeats once it has run. Empty, `once` and `none`\nmean run once. `hourly` repeats every hour; `daily`, `weekly` and\n`monthly` repeat at the same wall-clock time one calendar day, week\nor month later in the schedule's `timezone`, so a daily schedule\nkeeps its local time across daylight-saving changes. `every:<n>`\nrepeats every `n` minutes (1 to 999999). Occurrences are counted\nfrom `runAt` (else from the current `nextRunAt`); the next due time\nis the first occurrence after the run is released, so missed runs\nare not replayed.\n",pattern:"^(|once|none|hourly|daily|weekly|monthly|every:[1-9][0-9]{0,5})$",maxLength:255,default:""},timezone:{type:"string",description:"IANA time zone name (for example `UTC` or `America/Chicago`) in which\n`daily`, `weekly` and `monthly` recurrences keep their wall-clock\ntime. Instants (`runAt`, `nextRunAt`) are always absolute. The server\nrefuses a name it does not know with 400.\n",minLength:1,maxLength:64,pattern:"^[A-Za-z][A-Za-z0-9_+-]*(/[A-Za-z0-9_+-]+)*$",default:"UTC"},status:{type:"string",description:"Lifecycle status of a schedule. `pending`: created, not yet\ndue-scheduled. `scheduled`: waiting for its due time. `assigned`:\ndesignated for a particular worker but not yet claimed. `claimed`: a\nworker holds the claim and has not started. `running`: the claim\nholder is executing it. `retrying`: the last attempt failed and\nanother is due. `completed`, `failed` and `cancelled` are terminal\nfor a run-once schedule; a recurring schedule returns to `scheduled`\nwhen its claim is released with a `completed` outcome.\n",enum:["pending","scheduled","assigned","claimed","running","retrying","completed","failed","cancelled"]},retryCount:{type:"integer",description:"Retries used so far for the current run, for example 0 to re-arm a schedule. Omitted on update, it is kept.",minimum:0},maxRetries:{type:"integer",description:"Maximum retries before the run is marked failed.",minimum:0,default:0},retryDelayMinutes:{type:"integer",description:"Minutes to wait before a retry becomes due.",minimum:0,default:0},paused:{type:"boolean",description:"`true` pauses the schedule so it is never claimed; `false`\nresumes it. Omit to leave the pause unchanged. The server records\n`pausedAt` and `pausedBy`.\n"},pauseReason:{type:"string",description:"Reason for pausing; stored only while `paused` is true and cleared on resume.",maxLength:1e3},posture:{"x-go-type":"*posturev1beta3.Posture","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta3/posture",name:"posturev1beta3"},description:`Optional Posture this schedule runs under, resolved above
12
+ `,"x-oapi-codegen-extra-tags":{db:"posture",json:"posture,omitempty"},"x-order":28,$schema:"http://json-schema.org/draft-07/schema#",title:"Posture Schema",type:"string",enum:["cautious","standard","brisk"]},visibility:{description:"Visibility of the schedule: `public` (the default) allows completed runs\nto appear on the unauthenticated public activity feed (subject to user\npreferences), `org` restricts visibility to members of the schedule's\norganization, and `private` restricts it to the schedule owner.\n",default:"public","x-oapi-codegen-extra-tags":{db:"visibility"},"x-order":29,type:"string",enum:["public","org","private"]}}},description:"Schedules included on this page of results."}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},409:{description:"Conflict - the call needs an organization, none was named, and more than one of the caller's organizations qualifies. Pass one of `choices[].id` as `X-Current-Orgid` (the `organizationId` tool argument). The body's `code` is `organization_selection_required`.",content:{"application/json":{schema:{type:"object",description:"The call needs an acting organization, the caller named none, and more than one of the caller's live organizations qualifies. Nothing was done by this request. Repeat it naming one of `choices` as `X-Current-Orgid` (the `organizationId` tool argument).",required:["code","message","choices"],additionalProperties:false,properties:{code:{type:"string",description:"Machine-readable reason. Always `organization_selection_required` for this body.",enum:["organization_selection_required"]},message:{type:"string",minLength:1,description:"The sentence the caller is shown."},choices:{type:"array",minItems:2,description:"The caller's own live organizations the call could act in. Pass one `id` as `X-Current-Orgid`.",items:{type:"object",description:"An organization the call could act in. Same fields as AvailableOrganization.",required:["id","name","description"],additionalProperties:false,properties:{id:{type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},description:"Organization ID.","x-go-name":"ID"},name:{type:"string",description:"Name of the organization."},description:{type:"string",description:"Description of the organization."}}}}}}}}},429:{description:"Too many requests - the caller exceeded the server's per-user request rate for this route family. Wait the number of seconds in `Retry-After` before retrying.",headers:{"Retry-After":{description:"Number of seconds the caller must wait before retrying.",required:true,schema:{type:"integer",minimum:1}}},content:{"application/json":{schema:{type:"object",description:"A MeshKit error answered as a JSON body. `error` is the sentence the caller is shown; MeshKit's long description is never serialized. Use the `MeshkitError400`, `MeshkitError403`, `MeshkitError404`, `MeshkitError409`, `MeshkitError429`, `MeshkitError500` and `MeshkitError502` responses for an operation whose server answers its refusals this way.",required:["error"],additionalProperties:false,properties:{error:{type:"string",minLength:1,description:"The sentence the caller is shown."},code:{type:"string",minLength:1,description:"MeshKit error code, a component-scoped identifier allocated by the emitting service (e.g. `<component>-<number>`); it is not a stable part of this contract. Omitted for an error that is not a MeshKit error."},severity:{type:"string",description:"MeshKit severity name. Omitted when MeshKit reports none.",enum:["emergency","alert","critical","fatal"]},probableCause:{type:"array",description:"MeshKit's probable causes of the error.",items:{type:"string"}},suggestedRemediation:{type:"array",description:"MeshKit's suggested remediations for the error.",items:{type:"string"}}}}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}},post:{"x-internal":["cloud"],tags:["schedules"],summary:"Create a schedule",operationId:"createSchedule",parameters:[{name:"Idempotency-Key",in:"header",required:false,description:"Client-chosen key that makes a create safe to retry. The server keeps the organization, the user, the key, a hash of the request and the final response for 24 hours. Only a final response that is not a 5xx is stored. The server answers a 5xx only after it has rolled back the write; a 5xx it answers is not stored and releases the key's claim, so a retry with the same key is processed as new. A response the server has committed is final and is stored, even if a gateway in front of the server later fails the client's connection. A retry with the same key and the same request hash returns the stored response without creating anything again. A retry with the same key and a different request hash answers 422 and creates nothing. A retry with the same key that arrives while the earlier request with that key is still being processed answers 409 with the body `code` `idempotency_key_in_flight` and creates nothing. Once the first request has finished without a 5xx, a retry receives the stored response; after a 5xx, a retry is processed as new. Precedence: while the first request with a key is in flight, every retry with that key answers 409 whatever its body; only once the first request has finished does a retry with a different body answer 422. The in-flight claim of a request that never finished expires 24 hours after it was taken, the same TTL as the stored response; no shorter in-flight lease applies. A retry after that expiry is processed as new. Omitted, the create is not deduplicated. Use a fresh random value (a UUID) per intended create.",schema:{type:"string",minLength:1,maxLength:255}}],description:"Creates a schedule in the organization of the authenticated session,\nowned by the session user (`createdBy`). `status` accepts only\n`pending`, `scheduled` and `cancelled`; omitted, the server picks\n`scheduled` when the schedule has a due time and `pending` otherwise.\n`nextRunAt` defaults to `runAt`. A `targetId` must name a live\nresource of `targetType` in the organization, else 400. Send\n`paused: true` to create the schedule already paused. `visibility`\ndefaults to `public`.\nThe optional `Idempotency-Key` header makes the create safe to\nretry: within 24 hours the same key with the same request hash\nreturns the first response without creating another schedule, and\nthe same key with a different request hash answers 422 and creates\nnothing. A retry with the same key that arrives while the first request\nwith that key is still being processed answers 409 and creates nothing.\nOnce the first request has finished without a 5xx, a retry receives the\nstored response; after a 5xx, a retry is processed as new.\n",requestBody:{required:true,content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Payload for creating or updating a schedule. Contains only\nclient-settable fields; the owning `organizationId`, `createdBy`, the\nclaim, `pausedAt`, `pausedBy`, `lastRunAt`, `lastError` and the\ntimestamps are server-managed and refused as unknown fields. Pausing\nis a field, not an operation: `paused` pauses or resumes the\nschedule. `status` accepts only `pending`, `scheduled` and\n`cancelled` here (otherwise 400); the other values are set by the\nserver as the schedule is claimed and released.\n",required:["name","action"],properties:{id:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-oapi-codegen-extra-tags":{json:"id,omitempty"}},workspaceId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-oapi-codegen-extra-tags":{json:"workspaceId,omitempty"}},name:{type:"string",description:"Human-readable name for the schedule.",minLength:1,maxLength:255},action:{type:"string",description:"The action the worker runs, for example a command name.",minLength:1,maxLength:255},targetType:{"x-oapi-codegen-extra-tags":{json:"targetType,omitempty"},type:"string",description:"Type of the resource the schedule acts on, named the way a claim's\n`resourceType` is (lowercase snake_case construct name, for example\n`content_item` or `profile`). A server verifies the target types it\nserves and refuses others with 400. Set together with `targetId` or\nnot at all.\n",pattern:"^[a-z][a-z0-9_]*$",minLength:1,maxLength:64},targetId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"TargetID","x-oapi-codegen-extra-tags":{json:"targetId,omitempty"}},params:{type:"object",description:"Action parameters, stored as a JSON blob.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true},enabled:{type:"boolean",description:"Whether the schedule is eligible to run.",default:true},runAt:{type:"string",format:"date-time",description:"Time the schedule first becomes due.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"}},nextRunAt:{type:"string",format:"date-time",description:"Next time the schedule becomes due. Omitted on create, it defaults to `runAt`; omitted on update, it is kept. Send null for never due again.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"}},recurrence:{type:"string",description:"How the schedule repeats once it has run. Empty, `once` and `none`\nmean run once. `hourly` repeats every hour; `daily`, `weekly` and\n`monthly` repeat at the same wall-clock time one calendar day, week\nor month later in the schedule's `timezone`, so a daily schedule\nkeeps its local time across daylight-saving changes. `every:<n>`\nrepeats every `n` minutes (1 to 999999). Occurrences are counted\nfrom `runAt` (else from the current `nextRunAt`); the next due time\nis the first occurrence after the run is released, so missed runs\nare not replayed.\n",pattern:"^(|once|none|hourly|daily|weekly|monthly|every:[1-9][0-9]{0,5})$",maxLength:255,default:""},timezone:{type:"string",description:"IANA time zone name (for example `UTC` or `America/Chicago`) in which\n`daily`, `weekly` and `monthly` recurrences keep their wall-clock\ntime. Instants (`runAt`, `nextRunAt`) are always absolute. The server\nrefuses a name it does not know with 400.\n",minLength:1,maxLength:64,pattern:"^[A-Za-z][A-Za-z0-9_+-]*(/[A-Za-z0-9_+-]+)*$",default:"UTC"},status:{type:"string",description:"Lifecycle status of a schedule. `pending`: created, not yet\ndue-scheduled. `scheduled`: waiting for its due time. `assigned`:\ndesignated for a particular worker but not yet claimed. `claimed`: a\nworker holds the claim and has not started. `running`: the claim\nholder is executing it. `retrying`: the last attempt failed and\nanother is due. `completed`, `failed` and `cancelled` are terminal\nfor a run-once schedule; a recurring schedule returns to `scheduled`\nwhen its claim is released with a `completed` outcome.\n",enum:["pending","scheduled","assigned","claimed","running","retrying","completed","failed","cancelled"]},retryCount:{type:"integer",description:"Retries used so far for the current run, for example 0 to re-arm a schedule. Omitted on update, it is kept.",minimum:0},maxRetries:{type:"integer",description:"Maximum retries before the run is marked failed.",minimum:0,default:0},retryDelayMinutes:{type:"integer",description:"Minutes to wait before a retry becomes due.",minimum:0,default:0},paused:{type:"boolean",description:"`true` pauses the schedule so it is never claimed; `false`\nresumes it. Omit to leave the pause unchanged. The server records\n`pausedAt` and `pausedBy`.\n"},pauseReason:{type:"string",description:"Reason for pausing; stored only while `paused` is true and cleared on resume.",maxLength:1e3},posture:{"x-go-type":"*posturev1beta3.Posture","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta3/posture",name:"posturev1beta3"},description:`Optional Posture this schedule runs under, resolved above
13
13
  the profile x platform resolution and below an explicit per-run
14
14
  flag. Omit to inherit: the schedule then runs under whatever
15
15
  profile x platform, configuration, environment, account or
@@ -20,13 +20,13 @@ Omitted when the schedule has no override: it then runs under whatever
20
20
  profile x platform, configuration, environment, account or default
21
21
  resolves to, exactly as before. Any value outside the Posture
22
22
  enum is refused with 400.
23
- `,"x-oapi-codegen-extra-tags":{db:"posture",json:"posture,omitempty"},"x-order":28,$schema:"http://json-schema.org/draft-07/schema#",title:"Posture Schema",type:"string",enum:["cautious","standard","brisk"]},visibility:{description:"Visibility of the schedule: `public` (the default) allows completed runs\nto appear on the unauthenticated public activity feed (subject to user\npreferences), `org` restricts visibility to members of the schedule's\norganization, and `private` restricts it to the schedule owner.\n",default:"public","x-oapi-codegen-extra-tags":{db:"visibility"},"x-order":29,type:"string",enum:["public","org","private"]}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},409:{description:"Conflict - an earlier request with the same Idempotency-Key is still being processed. Nothing is created by this request. Once the first request has finished without a 5xx, a retry receives the stored response; after a 5xx, a retry is processed as new. The body's `code` is `idempotency_key_in_flight`.",content:{"application/json":{schema:{type:"object",description:"A retry whose Idempotency-Key is still in flight. Nothing was created by this request. Once the first request has finished without a 5xx, a retry receives the stored response; after a 5xx, a retry is processed as new.",required:["code","message"],additionalProperties:false,properties:{code:{type:"string",description:"Machine-readable reason. Always `idempotency_key_in_flight` for this body.",enum:["idempotency_key_in_flight"]},message:{type:"string",minLength:1,description:"The sentence the caller is shown."}}}}}},422:{description:"Unprocessable - the Idempotency-Key was already used with a different request body",content:{"text/plain":{schema:{type:"string"}}}},429:{description:"Too many requests - the caller exceeded the server's per-user request rate for this route family. Wait the number of seconds in `Retry-After` before retrying.",headers:{"Retry-After":{description:"Number of seconds the caller must wait before retrying.",required:true,schema:{type:"integer",minimum:1}}},content:{"application/json":{schema:{type:"object",description:"A MeshKit error answered as a JSON body. `error` is the sentence the caller is shown; MeshKit's long description is never serialized. Use the `MeshkitError400`, `MeshkitError403`, `MeshkitError404`, `MeshkitError409`, `MeshkitError429`, `MeshkitError500` and `MeshkitError502` responses for an operation whose server answers its refusals this way.",required:["error"],additionalProperties:false,properties:{error:{type:"string",minLength:1,description:"The sentence the caller is shown."},code:{type:"string",minLength:1,description:"MeshKit error code, a component-scoped identifier allocated by the emitting service (e.g. `<component>-<number>`); it is not a stable part of this contract. Omitted for an error that is not a MeshKit error."},severity:{type:"string",description:"MeshKit severity name. Omitted when MeshKit reports none.",enum:["emergency","alert","critical","fatal"]},probableCause:{type:"array",description:"MeshKit's probable causes of the error.",items:{type:"string"}},suggestedRemediation:{type:"array",description:"MeshKit's suggested remediations for the error.",items:{type:"string"}}}}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/schedules/{scheduleId}":{get:{"x-internal":["cloud"],tags:["schedules"],summary:"Get a schedule by ID",operationId:"getScheduleById","x-mcp":{expose:true,title:"Get a schedule by ID",scope:"schedule:read",description:"Read-only. Returns the schedule in the organization of the authenticated session. If a worker currently holds it, the result includes the live claim, which names the connection (typically a desktop app install) that is running it."},description:"Returns the schedule with its live claim, when one is held, and its\nentity tag in the `ETag` header.\n",parameters:[{name:"scheduleId",in:"path",description:"Schedule ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},{name:"X-Current-Orgid",in:"header",required:false,description:"Organization the call acts in, by ID (a UUID). When present, the server resolves the session organization from it instead of the caller's selected organization, and runs its membership and permission checks there. A caller who is not a live member of the named organization receives the same 404 as an unknown resource. Omitted, the caller's selected organization applies.",schema:{type:"string",minLength:36,maxLength:36,pattern:"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"}}],responses:{200:{description:"Schedule response",headers:{ETag:{description:"Strong entity tag of the schedule. It changes whenever the schedule changes; send it back as `If-Match` to make updateSchedule conditional.",schema:{type:"string"}}},content:{"application/json":{schema:{$schema:"http://json-schema.org/draft-07/schema#",title:"Schedule Schema",description:"Server-returned schedule. A schedule is a job: an action to run, what it\nacts on (`targetType`, `targetId`) and its parameters, when it is due\n(`runAt`, `nextRunAt`, `recurrence` in `timezone`), its retry budget and\nits outcome. Schedules belong to an organization and may be linked to a\nworkspace. A worker takes a schedule through the generic `claim`\nconstruct (`POST /api/claims` with `resourceType` `schedule`); there is\nno schedule-specific claim route. While the claim is live no other worker\ncan take the schedule, and a claim past its `expiresAt` is stale so the\nschedule is claimable again. Releasing the claim records the run's\noutcome on the schedule in the same transaction (see `status`). The\n`claim` and the status values `assigned`, `claimed` and `running` are\nserver-managed. Pausing is data, not an operation: a client sets `paused`\n(and optionally `pauseReason`) on create or update, and the server\nrecords `pausedAt` and `pausedBy`. Fields marked readOnly are\nserver-managed and ignored on input.\n",type:"object",additionalProperties:false,required:["id","organizationId","name","action","enabled","timezone","status","retryCount","maxRetries","visibility","createdAt","updatedAt"],properties:{id:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},readOnly:true,"x-order":1},organizationId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},readOnly:true,"x-go-name":"OrganizationID","x-oapi-codegen-extra-tags":{db:"organization_id"},"x-order":2},workspaceId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-oapi-codegen-extra-tags":{db:"workspace_id",json:"workspaceId,omitempty"},"x-order":3},createdBy:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},readOnly:true,"x-go-name":"CreatedBy","x-oapi-codegen-extra-tags":{db:"owner"},"x-order":4},name:{type:"string",description:"Human-readable name for the schedule.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"name"},"x-order":5},action:{type:"string",description:"The action the worker runs when it holds the schedule's claim, for example a command name.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"action"},"x-order":6},targetType:{"x-oapi-codegen-extra-tags":{db:"target_type",json:"targetType,omitempty"},"x-order":7,type:"string",description:"Type of the resource the schedule acts on, named the way a claim's\n`resourceType` is (lowercase snake_case construct name, for example\n`content_item` or `profile`). A server verifies the target types it\nserves and refuses others with 400. Set together with `targetId` or\nnot at all.\n",pattern:"^[a-z][a-z0-9_]*$",minLength:1,maxLength:64},targetId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"TargetID","x-oapi-codegen-extra-tags":{db:"target_id",json:"targetId,omitempty"},"x-order":8},params:{type:"object",description:"Action parameters, stored as a JSON blob. What the schedule acts on belongs in `targetType` and `targetId`, not here.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"params"},"x-order":9},enabled:{type:"boolean",description:"Whether the schedule is eligible to run. A disabled schedule is never claimed.",default:true,"x-oapi-codegen-extra-tags":{db:"enabled"},"x-order":10},runAt:{type:"string",format:"date-time",description:"Time the schedule first becomes due.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"run_at"},"x-order":11},nextRunAt:{type:"string",format:"date-time",description:"Next time the schedule becomes due. Null when it is never due again.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"next_run"},"x-order":12},recurrence:{"x-oapi-codegen-extra-tags":{db:"recurrence"},"x-order":13,type:"string",description:"How the schedule repeats once it has run. Empty, `once` and `none`\nmean run once. `hourly` repeats every hour; `daily`, `weekly` and\n`monthly` repeat at the same wall-clock time one calendar day, week\nor month later in the schedule's `timezone`, so a daily schedule\nkeeps its local time across daylight-saving changes. `every:<n>`\nrepeats every `n` minutes (1 to 999999). Occurrences are counted\nfrom `runAt` (else from the current `nextRunAt`); the next due time\nis the first occurrence after the run is released, so missed runs\nare not replayed.\n",pattern:"^(|once|none|hourly|daily|weekly|monthly|every:[1-9][0-9]{0,5})$",maxLength:255,default:""},timezone:{"x-oapi-codegen-extra-tags":{db:"timezone"},"x-order":14,type:"string",description:"IANA time zone name (for example `UTC` or `America/Chicago`) in which\n`daily`, `weekly` and `monthly` recurrences keep their wall-clock\ntime. Instants (`runAt`, `nextRunAt`) are always absolute. The server\nrefuses a name it does not know with 400.\n",minLength:1,maxLength:64,pattern:"^[A-Za-z][A-Za-z0-9_+-]*(/[A-Za-z0-9_+-]+)*$",default:"UTC"},status:{type:"string",description:"Lifecycle status of a schedule. `pending`: created, not yet\ndue-scheduled. `scheduled`: waiting for its due time. `assigned`:\ndesignated for a particular worker but not yet claimed. `claimed`: a\nworker holds the claim and has not started. `running`: the claim\nholder is executing it. `retrying`: the last attempt failed and\nanother is due. `completed`, `failed` and `cancelled` are terminal\nfor a run-once schedule; a recurring schedule returns to `scheduled`\nwhen its claim is released with a `completed` outcome.\n",enum:["pending","scheduled","assigned","claimed","running","retrying","completed","failed","cancelled"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":15},retryCount:{type:"integer",description:"Attempts already retried for the current run.",minimum:0,default:0,"x-oapi-codegen-extra-tags":{db:"retry_count"},"x-order":16},maxRetries:{type:"integer",description:"Maximum retries before the run is marked failed.",minimum:0,default:0,"x-oapi-codegen-extra-tags":{db:"max_retries"},"x-order":17},retryDelayMinutes:{type:"integer",description:"Minutes to wait before a retry becomes due.",minimum:0,default:0,"x-oapi-codegen-extra-tags":{db:"retry_delay_minutes"},"x-order":18},lastRunAt:{type:"string",format:"date-time",description:"Time the most recent attempt ended (the release time of its claim). Server-managed.",nullable:true,readOnly:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"last_run"},"x-order":19},lastError:{type:"string",description:"Error reported by the most recent attempt; empty after a successful one. Server-managed.",maxLength:5e3,readOnly:true,"x-oapi-codegen-extra-tags":{db:"last_error"},"x-order":20},claim:{"x-go-type":"*claimv1beta3.Claim","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta3/claim",name:"claimv1beta3"},description:"The schedule's live claim, when one is held. A read-only view of the claim construct; omitted when the schedule is unclaimed.",readOnly:true,"x-oapi-codegen-extra-tags":{db:"-",json:"claim,omitempty"},"x-order":21,$schema:"http://json-schema.org/draft-07/schema#",title:"Claim Schema",type:"object",additionalProperties:false,required:["id","organizationId","resourceType","resourceId","status","claimedAt","expiresAt","createdAt","updatedAt"],properties:{id:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-order":1},organizationId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OrganizationID","x-oapi-codegen-extra-tags":{db:"organization_id"},"x-order":2},resourceType:{type:"string",description:"Type of the claimed resource, the construct name in snake_case, for example `content_item` or `schedule`.",minLength:1,maxLength:64,"x-oapi-codegen-extra-tags":{db:"resource_type"},"x-order":3},resourceId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-oapi-codegen-extra-tags":{db:"resource_id"},"x-order":4},claimantConnectionId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"ClaimantConnectionID","x-oapi-codegen-extra-tags":{db:"claimant_connection_id",json:"claimantConnectionId,omitempty"},"x-order":5},claimantUserId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"ClaimantUserID","x-oapi-codegen-extra-tags":{db:"claimant_user_id",json:"claimantUserId,omitempty"},"x-order":6},status:{type:"string",description:"Lifecycle of the claim. `active` while held, `released` once the holder (or a member allowed to release it) lets it go, `expired` once `expiresAt` passed without a renewal or the holding connection was deleted. Expiry is evaluated when the claim is read, so a claim never reads `active` past its `expiresAt`.\n",enum:["active","released","expired"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":7},claimedAt:{description:"Time the claim was taken.","x-oapi-codegen-extra-tags":{db:"claimed_at"},"x-order":8,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},expiresAt:{description:"Time the claim lapses unless the holder renews it. Always set by the server; a claim past this time is stale.","x-oapi-codegen-extra-tags":{db:"expires_at"},"x-order":9,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},renewedAt:{type:"string",format:"date-time",description:"Time of the last renewal. Null until the claim is first renewed.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"renewed_at"},"x-order":10},releasedAt:{type:"string",format:"date-time",description:"Time the claim was released. Null while the claim is active or after it expired.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"released_at"},"x-order":11},outcome:{type:"string",description:"What the releaser reported when the claim was released: `completed` when the work behind it finished, `failed` when it was attempted and did not succeed, `cancelled` when it was let go without the work being done (including a release by another member). Omitted while the claim is active and on an expired claim.\n",enum:["completed","failed","cancelled"],"x-oapi-codegen-extra-tags":{db:"outcome",json:"outcome,omitempty"},"x-order":12},outcomeError:{type:"string",description:"Error reported with a `failed` outcome. Omitted otherwise.",maxLength:5e3,"x-oapi-codegen-extra-tags":{db:"outcome_error",json:"outcomeError,omitempty"},"x-order":13},outcomeEventId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OutcomeEventID","x-oapi-codegen-extra-tags":{db:"outcome_event_id",json:"outcomeEventId,omitempty"},"x-order":14},releasedBy:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"ReleasedBy","x-oapi-codegen-extra-tags":{db:"released_by",json:"releasedBy,omitempty"},"x-order":15},createdAt:{description:"Timestamp of claim creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":16,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last claim modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":17,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}},pausedAt:{type:"string",format:"date-time",description:"Time the schedule was paused. Null when the schedule is not paused. Server-managed.",nullable:true,readOnly:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"paused_at"},"x-order":22},pausedBy:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},readOnly:true,"x-oapi-codegen-extra-tags":{db:"paused_by",json:"pausedBy,omitempty"},"x-order":23},pauseReason:{type:"string",description:"Reason given for pausing the schedule, set with `paused` on create or update. Empty when not paused.",maxLength:1e3,"x-oapi-codegen-extra-tags":{db:"pause_reason"},"x-order":24},createdAt:{description:"Timestamp of schedule creation.",readOnly:true,"x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":25,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last schedule modification.",readOnly:true,"x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":26,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deletedAt:{type:"string",format:"date-time",description:"Timestamp when the schedule was soft-deleted. Null while live.",nullable:true,readOnly:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"deleted_at"},"x-order":27},posture:{"x-go-type":"*posturev1beta3.Posture","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta3/posture",name:"posturev1beta3"},description:`Optional Posture this schedule runs under, resolved above the
23
+ `,"x-oapi-codegen-extra-tags":{db:"posture",json:"posture,omitempty"},"x-order":28,$schema:"http://json-schema.org/draft-07/schema#",title:"Posture Schema",type:"string",enum:["cautious","standard","brisk"]},visibility:{description:"Visibility of the schedule: `public` (the default) allows completed runs\nto appear on the unauthenticated public activity feed (subject to user\npreferences), `org` restricts visibility to members of the schedule's\norganization, and `private` restricts it to the schedule owner.\n",default:"public","x-oapi-codegen-extra-tags":{db:"visibility"},"x-order":29,type:"string",enum:["public","org","private"]}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},409:{description:"Conflict - an earlier request with the same Idempotency-Key is still being processed. Nothing is created by this request. Once the first request has finished without a 5xx, a retry receives the stored response; after a 5xx, a retry is processed as new. The body's `code` is `idempotency_key_in_flight`.",content:{"application/json":{schema:{type:"object",description:"A retry whose Idempotency-Key is still in flight. Nothing was created by this request. Once the first request has finished without a 5xx, a retry receives the stored response; after a 5xx, a retry is processed as new.",required:["code","message"],additionalProperties:false,properties:{code:{type:"string",description:"Machine-readable reason. Always `idempotency_key_in_flight` for this body.",enum:["idempotency_key_in_flight"]},message:{type:"string",minLength:1,description:"The sentence the caller is shown."}}}}}},422:{description:"Unprocessable - the Idempotency-Key was already used with a different request body",content:{"text/plain":{schema:{type:"string"}}}},429:{description:"Too many requests - the caller exceeded the server's per-user request rate for this route family. Wait the number of seconds in `Retry-After` before retrying.",headers:{"Retry-After":{description:"Number of seconds the caller must wait before retrying.",required:true,schema:{type:"integer",minimum:1}}},content:{"application/json":{schema:{type:"object",description:"A MeshKit error answered as a JSON body. `error` is the sentence the caller is shown; MeshKit's long description is never serialized. Use the `MeshkitError400`, `MeshkitError403`, `MeshkitError404`, `MeshkitError409`, `MeshkitError429`, `MeshkitError500` and `MeshkitError502` responses for an operation whose server answers its refusals this way.",required:["error"],additionalProperties:false,properties:{error:{type:"string",minLength:1,description:"The sentence the caller is shown."},code:{type:"string",minLength:1,description:"MeshKit error code, a component-scoped identifier allocated by the emitting service (e.g. `<component>-<number>`); it is not a stable part of this contract. Omitted for an error that is not a MeshKit error."},severity:{type:"string",description:"MeshKit severity name. Omitted when MeshKit reports none.",enum:["emergency","alert","critical","fatal"]},probableCause:{type:"array",description:"MeshKit's probable causes of the error.",items:{type:"string"}},suggestedRemediation:{type:"array",description:"MeshKit's suggested remediations for the error.",items:{type:"string"}}}}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}},"/api/schedules/{scheduleId}":{get:{"x-internal":["cloud"],tags:["schedules"],summary:"Get a schedule by ID",operationId:"getScheduleById","x-mcp":{expose:true,title:"Get a schedule by ID",scope:"schedule:read",description:"Read-only. Returns the schedule in the organization of the authenticated session. If a worker currently holds it, the result includes the live claim, which names the connection (typically a desktop app install) that is running it."},description:"Returns the schedule with its live claim, when one is held, and its\nentity tag in the `ETag` header.\n",parameters:[{name:"scheduleId",in:"path",description:"Schedule ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},{name:"X-Current-Orgid",in:"header",required:false,description:"Organization the call acts in, by ID (a UUID). When present, the server resolves the session organization from it instead of the caller's selected organization, and runs its membership and permission checks there. A caller who is not a live member of the named organization receives the same 404 as an unknown resource. Omitted, a path or query `orgId` the operation takes names the organization when sent; otherwise the caller's selected organization applies when it is not nil; otherwise the server defaults among the caller's live organizations, using the only one when exactly one qualifies. When the call needs an acting organization and several qualify, an operation that declares the OrganizationSelectionRequired response answers 409 `organization_selection_required`. The resolution order is in docs/mcp-operation-contract.md, the organization selector.",schema:{type:"string",minLength:36,maxLength:36,pattern:"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"}}],responses:{200:{description:"Schedule response",headers:{ETag:{description:"Strong entity tag of the schedule. It changes whenever the schedule changes; send it back as `If-Match` to make updateSchedule conditional.",schema:{type:"string"}}},content:{"application/json":{schema:{$schema:"http://json-schema.org/draft-07/schema#",title:"Schedule Schema",description:"Server-returned schedule. A schedule is a job: an action to run, what it\nacts on (`targetType`, `targetId`) and its parameters, when it is due\n(`runAt`, `nextRunAt`, `recurrence` in `timezone`), its retry budget and\nits outcome. Schedules belong to an organization and may be linked to a\nworkspace. A worker takes a schedule through the generic `claim`\nconstruct (`POST /api/claims` with `resourceType` `schedule`); there is\nno schedule-specific claim route. While the claim is live no other worker\ncan take the schedule, and a claim past its `expiresAt` is stale so the\nschedule is claimable again. Releasing the claim records the run's\noutcome on the schedule in the same transaction (see `status`). The\n`claim` and the status values `assigned`, `claimed` and `running` are\nserver-managed. Pausing is data, not an operation: a client sets `paused`\n(and optionally `pauseReason`) on create or update, and the server\nrecords `pausedAt` and `pausedBy`. Fields marked readOnly are\nserver-managed and ignored on input.\n",type:"object",additionalProperties:false,required:["id","organizationId","name","action","enabled","timezone","status","retryCount","maxRetries","visibility","createdAt","updatedAt"],properties:{id:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},readOnly:true,"x-order":1},organizationId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},readOnly:true,"x-go-name":"OrganizationID","x-oapi-codegen-extra-tags":{db:"organization_id"},"x-order":2},workspaceId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-oapi-codegen-extra-tags":{db:"workspace_id",json:"workspaceId,omitempty"},"x-order":3},createdBy:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},readOnly:true,"x-go-name":"CreatedBy","x-oapi-codegen-extra-tags":{db:"owner"},"x-order":4},name:{type:"string",description:"Human-readable name for the schedule.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"name"},"x-order":5},action:{type:"string",description:"The action the worker runs when it holds the schedule's claim, for example a command name.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"action"},"x-order":6},targetType:{"x-oapi-codegen-extra-tags":{db:"target_type",json:"targetType,omitempty"},"x-order":7,type:"string",description:"Type of the resource the schedule acts on, named the way a claim's\n`resourceType` is (lowercase snake_case construct name, for example\n`content_item` or `profile`). A server verifies the target types it\nserves and refuses others with 400. Set together with `targetId` or\nnot at all.\n",pattern:"^[a-z][a-z0-9_]*$",minLength:1,maxLength:64},targetId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"TargetID","x-oapi-codegen-extra-tags":{db:"target_id",json:"targetId,omitempty"},"x-order":8},params:{type:"object",description:"Action parameters, stored as a JSON blob. What the schedule acts on belongs in `targetType` and `targetId`, not here.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"params"},"x-order":9},enabled:{type:"boolean",description:"Whether the schedule is eligible to run. A disabled schedule is never claimed.",default:true,"x-oapi-codegen-extra-tags":{db:"enabled"},"x-order":10},runAt:{type:"string",format:"date-time",description:"Time the schedule first becomes due.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"run_at"},"x-order":11},nextRunAt:{type:"string",format:"date-time",description:"Next time the schedule becomes due. Null when it is never due again.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"next_run"},"x-order":12},recurrence:{"x-oapi-codegen-extra-tags":{db:"recurrence"},"x-order":13,type:"string",description:"How the schedule repeats once it has run. Empty, `once` and `none`\nmean run once. `hourly` repeats every hour; `daily`, `weekly` and\n`monthly` repeat at the same wall-clock time one calendar day, week\nor month later in the schedule's `timezone`, so a daily schedule\nkeeps its local time across daylight-saving changes. `every:<n>`\nrepeats every `n` minutes (1 to 999999). Occurrences are counted\nfrom `runAt` (else from the current `nextRunAt`); the next due time\nis the first occurrence after the run is released, so missed runs\nare not replayed.\n",pattern:"^(|once|none|hourly|daily|weekly|monthly|every:[1-9][0-9]{0,5})$",maxLength:255,default:""},timezone:{"x-oapi-codegen-extra-tags":{db:"timezone"},"x-order":14,type:"string",description:"IANA time zone name (for example `UTC` or `America/Chicago`) in which\n`daily`, `weekly` and `monthly` recurrences keep their wall-clock\ntime. Instants (`runAt`, `nextRunAt`) are always absolute. The server\nrefuses a name it does not know with 400.\n",minLength:1,maxLength:64,pattern:"^[A-Za-z][A-Za-z0-9_+-]*(/[A-Za-z0-9_+-]+)*$",default:"UTC"},status:{type:"string",description:"Lifecycle status of a schedule. `pending`: created, not yet\ndue-scheduled. `scheduled`: waiting for its due time. `assigned`:\ndesignated for a particular worker but not yet claimed. `claimed`: a\nworker holds the claim and has not started. `running`: the claim\nholder is executing it. `retrying`: the last attempt failed and\nanother is due. `completed`, `failed` and `cancelled` are terminal\nfor a run-once schedule; a recurring schedule returns to `scheduled`\nwhen its claim is released with a `completed` outcome.\n",enum:["pending","scheduled","assigned","claimed","running","retrying","completed","failed","cancelled"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":15},retryCount:{type:"integer",description:"Attempts already retried for the current run.",minimum:0,default:0,"x-oapi-codegen-extra-tags":{db:"retry_count"},"x-order":16},maxRetries:{type:"integer",description:"Maximum retries before the run is marked failed.",minimum:0,default:0,"x-oapi-codegen-extra-tags":{db:"max_retries"},"x-order":17},retryDelayMinutes:{type:"integer",description:"Minutes to wait before a retry becomes due.",minimum:0,default:0,"x-oapi-codegen-extra-tags":{db:"retry_delay_minutes"},"x-order":18},lastRunAt:{type:"string",format:"date-time",description:"Time the most recent attempt ended (the release time of its claim). Server-managed.",nullable:true,readOnly:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"last_run"},"x-order":19},lastError:{type:"string",description:"Error reported by the most recent attempt; empty after a successful one. Server-managed.",maxLength:5e3,readOnly:true,"x-oapi-codegen-extra-tags":{db:"last_error"},"x-order":20},claim:{"x-go-type":"*claimv1beta3.Claim","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta3/claim",name:"claimv1beta3"},description:"The schedule's live claim, when one is held. A read-only view of the claim construct; omitted when the schedule is unclaimed.",readOnly:true,"x-oapi-codegen-extra-tags":{db:"-",json:"claim,omitempty"},"x-order":21,$schema:"http://json-schema.org/draft-07/schema#",title:"Claim Schema",type:"object",additionalProperties:false,required:["id","organizationId","resourceType","resourceId","status","claimedAt","expiresAt","createdAt","updatedAt"],properties:{id:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-order":1},organizationId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OrganizationID","x-oapi-codegen-extra-tags":{db:"organization_id"},"x-order":2},resourceType:{type:"string",description:"Type of the claimed resource, the construct name in snake_case, for example `content_item` or `schedule`.",minLength:1,maxLength:64,"x-oapi-codegen-extra-tags":{db:"resource_type"},"x-order":3},resourceId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-oapi-codegen-extra-tags":{db:"resource_id"},"x-order":4},claimantConnectionId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"ClaimantConnectionID","x-oapi-codegen-extra-tags":{db:"claimant_connection_id",json:"claimantConnectionId,omitempty"},"x-order":5},claimantUserId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"ClaimantUserID","x-oapi-codegen-extra-tags":{db:"claimant_user_id",json:"claimantUserId,omitempty"},"x-order":6},status:{type:"string",description:"Lifecycle of the claim. `active` while held, `released` once the holder (or a member allowed to release it) lets it go, `expired` once `expiresAt` passed without a renewal or the holding connection was deleted. Expiry is evaluated when the claim is read, so a claim never reads `active` past its `expiresAt`.\n",enum:["active","released","expired"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":7},claimedAt:{description:"Time the claim was taken.","x-oapi-codegen-extra-tags":{db:"claimed_at"},"x-order":8,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},expiresAt:{description:"Time the claim lapses unless the holder renews it. Always set by the server; a claim past this time is stale.","x-oapi-codegen-extra-tags":{db:"expires_at"},"x-order":9,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},renewedAt:{type:"string",format:"date-time",description:"Time of the last renewal. Null until the claim is first renewed.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"renewed_at"},"x-order":10},releasedAt:{type:"string",format:"date-time",description:"Time the claim was released. Null while the claim is active or after it expired.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"released_at"},"x-order":11},outcome:{type:"string",description:"What the releaser reported when the claim was released: `completed` when the work behind it finished, `failed` when it was attempted and did not succeed, `cancelled` when it was let go without the work being done (including a release by another member). Omitted while the claim is active and on an expired claim.\n",enum:["completed","failed","cancelled"],"x-oapi-codegen-extra-tags":{db:"outcome",json:"outcome,omitempty"},"x-order":12},outcomeError:{type:"string",description:"Error reported with a `failed` outcome. Omitted otherwise.",maxLength:5e3,"x-oapi-codegen-extra-tags":{db:"outcome_error",json:"outcomeError,omitempty"},"x-order":13},outcomeEventId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OutcomeEventID","x-oapi-codegen-extra-tags":{db:"outcome_event_id",json:"outcomeEventId,omitempty"},"x-order":14},releasedBy:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"ReleasedBy","x-oapi-codegen-extra-tags":{db:"released_by",json:"releasedBy,omitempty"},"x-order":15},createdAt:{description:"Timestamp of claim creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":16,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last claim modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":17,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}},pausedAt:{type:"string",format:"date-time",description:"Time the schedule was paused. Null when the schedule is not paused. Server-managed.",nullable:true,readOnly:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"paused_at"},"x-order":22},pausedBy:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},readOnly:true,"x-oapi-codegen-extra-tags":{db:"paused_by",json:"pausedBy,omitempty"},"x-order":23},pauseReason:{type:"string",description:"Reason given for pausing the schedule, set with `paused` on create or update. Empty when not paused.",maxLength:1e3,"x-oapi-codegen-extra-tags":{db:"pause_reason"},"x-order":24},createdAt:{description:"Timestamp of schedule creation.",readOnly:true,"x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":25,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last schedule modification.",readOnly:true,"x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":26,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deletedAt:{type:"string",format:"date-time",description:"Timestamp when the schedule was soft-deleted. Null while live.",nullable:true,readOnly:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"deleted_at"},"x-order":27},posture:{"x-go-type":"*posturev1beta3.Posture","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta3/posture",name:"posturev1beta3"},description:`Optional Posture this schedule runs under, resolved above the
24
24
  profile x platform resolution and below an explicit per-run flag.
25
25
  Omitted when the schedule has no override: it then runs under whatever
26
26
  profile x platform, configuration, environment, account or default
27
27
  resolves to, exactly as before. Any value outside the Posture
28
28
  enum is refused with 400.
29
- `,"x-oapi-codegen-extra-tags":{db:"posture",json:"posture,omitempty"},"x-order":28,$schema:"http://json-schema.org/draft-07/schema#",title:"Posture Schema",type:"string",enum:["cautious","standard","brisk"]},visibility:{description:"Visibility of the schedule: `public` (the default) allows completed runs\nto appear on the unauthenticated public activity feed (subject to user\npreferences), `org` restricts visibility to members of the schedule's\norganization, and `private` restricts it to the schedule owner.\n",default:"public","x-oapi-codegen-extra-tags":{db:"visibility"},"x-order":29,type:"string",enum:["public","org","private"]}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},429:{description:"Too many requests - the caller exceeded the server's per-user request rate for this route family. Wait the number of seconds in `Retry-After` before retrying.",headers:{"Retry-After":{description:"Number of seconds the caller must wait before retrying.",required:true,schema:{type:"integer",minimum:1}}},content:{"application/json":{schema:{type:"object",description:"A MeshKit error answered as a JSON body. `error` is the sentence the caller is shown; MeshKit's long description is never serialized. Use the `MeshkitError400`, `MeshkitError403`, `MeshkitError404`, `MeshkitError409`, `MeshkitError429`, `MeshkitError500` and `MeshkitError502` responses for an operation whose server answers its refusals this way.",required:["error"],additionalProperties:false,properties:{error:{type:"string",minLength:1,description:"The sentence the caller is shown."},code:{type:"string",minLength:1,description:"MeshKit error code, a component-scoped identifier allocated by the emitting service (e.g. `<component>-<number>`); it is not a stable part of this contract. Omitted for an error that is not a MeshKit error."},severity:{type:"string",description:"MeshKit severity name. Omitted when MeshKit reports none.",enum:["emergency","alert","critical","fatal"]},probableCause:{type:"array",description:"MeshKit's probable causes of the error.",items:{type:"string"}},suggestedRemediation:{type:"array",description:"MeshKit's suggested remediations for the error.",items:{type:"string"}}}}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}},put:{"x-internal":["cloud"],tags:["schedules"],summary:"Update a schedule",operationId:"updateSchedule",description:"Updates the client-settable fields present in the payload; an\nomitted optional field keeps its stored value, and `null` clears a\nnullable one (`workspaceId`, `runAt`, `nextRunAt`, and `targetType`\nwith `targetId`). `status` accepts only\n`pending`, `scheduled` and `cancelled`. Pause or resume the schedule\nby setting `paused` (with an optional `pauseReason`); the server then\nrecords `pausedAt` and `pausedBy`. Pausing a paused schedule keeps\nits original `pausedAt`; omitting `paused` leaves the pause\nunchanged. The optional `If-Match` header makes the write\nconditional on the entity tag the schedule carried when it was read:\nwhen it no longer matches, the request is refused with 412 and\nnothing is written. Without `If-Match` the write is unconditional.\n",parameters:[{name:"scheduleId",in:"path",description:"Schedule ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},{name:"If-Match",in:"header",required:false,description:"Entity tag of the schedule as last read, from the `ETag` header of getScheduleById, createSchedule or updateSchedule. When present the write applies only if it still matches; otherwise 412.",schema:{type:"string",maxLength:255}}],requestBody:{required:true,content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Payload for creating or updating a schedule. Contains only\nclient-settable fields; the owning `organizationId`, `createdBy`, the\nclaim, `pausedAt`, `pausedBy`, `lastRunAt`, `lastError` and the\ntimestamps are server-managed and refused as unknown fields. Pausing\nis a field, not an operation: `paused` pauses or resumes the\nschedule. `status` accepts only `pending`, `scheduled` and\n`cancelled` here (otherwise 400); the other values are set by the\nserver as the schedule is claimed and released.\n",required:["name","action"],properties:{id:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-oapi-codegen-extra-tags":{json:"id,omitempty"}},workspaceId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-oapi-codegen-extra-tags":{json:"workspaceId,omitempty"}},name:{type:"string",description:"Human-readable name for the schedule.",minLength:1,maxLength:255},action:{type:"string",description:"The action the worker runs, for example a command name.",minLength:1,maxLength:255},targetType:{"x-oapi-codegen-extra-tags":{json:"targetType,omitempty"},type:"string",description:"Type of the resource the schedule acts on, named the way a claim's\n`resourceType` is (lowercase snake_case construct name, for example\n`content_item` or `profile`). A server verifies the target types it\nserves and refuses others with 400. Set together with `targetId` or\nnot at all.\n",pattern:"^[a-z][a-z0-9_]*$",minLength:1,maxLength:64},targetId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"TargetID","x-oapi-codegen-extra-tags":{json:"targetId,omitempty"}},params:{type:"object",description:"Action parameters, stored as a JSON blob.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true},enabled:{type:"boolean",description:"Whether the schedule is eligible to run.",default:true},runAt:{type:"string",format:"date-time",description:"Time the schedule first becomes due.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"}},nextRunAt:{type:"string",format:"date-time",description:"Next time the schedule becomes due. Omitted on create, it defaults to `runAt`; omitted on update, it is kept. Send null for never due again.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"}},recurrence:{type:"string",description:"How the schedule repeats once it has run. Empty, `once` and `none`\nmean run once. `hourly` repeats every hour; `daily`, `weekly` and\n`monthly` repeat at the same wall-clock time one calendar day, week\nor month later in the schedule's `timezone`, so a daily schedule\nkeeps its local time across daylight-saving changes. `every:<n>`\nrepeats every `n` minutes (1 to 999999). Occurrences are counted\nfrom `runAt` (else from the current `nextRunAt`); the next due time\nis the first occurrence after the run is released, so missed runs\nare not replayed.\n",pattern:"^(|once|none|hourly|daily|weekly|monthly|every:[1-9][0-9]{0,5})$",maxLength:255,default:""},timezone:{type:"string",description:"IANA time zone name (for example `UTC` or `America/Chicago`) in which\n`daily`, `weekly` and `monthly` recurrences keep their wall-clock\ntime. Instants (`runAt`, `nextRunAt`) are always absolute. The server\nrefuses a name it does not know with 400.\n",minLength:1,maxLength:64,pattern:"^[A-Za-z][A-Za-z0-9_+-]*(/[A-Za-z0-9_+-]+)*$",default:"UTC"},status:{type:"string",description:"Lifecycle status of a schedule. `pending`: created, not yet\ndue-scheduled. `scheduled`: waiting for its due time. `assigned`:\ndesignated for a particular worker but not yet claimed. `claimed`: a\nworker holds the claim and has not started. `running`: the claim\nholder is executing it. `retrying`: the last attempt failed and\nanother is due. `completed`, `failed` and `cancelled` are terminal\nfor a run-once schedule; a recurring schedule returns to `scheduled`\nwhen its claim is released with a `completed` outcome.\n",enum:["pending","scheduled","assigned","claimed","running","retrying","completed","failed","cancelled"]},retryCount:{type:"integer",description:"Retries used so far for the current run, for example 0 to re-arm a schedule. Omitted on update, it is kept.",minimum:0},maxRetries:{type:"integer",description:"Maximum retries before the run is marked failed.",minimum:0,default:0},retryDelayMinutes:{type:"integer",description:"Minutes to wait before a retry becomes due.",minimum:0,default:0},paused:{type:"boolean",description:"`true` pauses the schedule so it is never claimed; `false`\nresumes it. Omit to leave the pause unchanged. The server records\n`pausedAt` and `pausedBy`.\n"},pauseReason:{type:"string",description:"Reason for pausing; stored only while `paused` is true and cleared on resume.",maxLength:1e3},posture:{"x-go-type":"*posturev1beta3.Posture","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta3/posture",name:"posturev1beta3"},description:`Optional Posture this schedule runs under, resolved above
29
+ `,"x-oapi-codegen-extra-tags":{db:"posture",json:"posture,omitempty"},"x-order":28,$schema:"http://json-schema.org/draft-07/schema#",title:"Posture Schema",type:"string",enum:["cautious","standard","brisk"]},visibility:{description:"Visibility of the schedule: `public` (the default) allows completed runs\nto appear on the unauthenticated public activity feed (subject to user\npreferences), `org` restricts visibility to members of the schedule's\norganization, and `private` restricts it to the schedule owner.\n",default:"public","x-oapi-codegen-extra-tags":{db:"visibility"},"x-order":29,type:"string",enum:["public","org","private"]}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},409:{description:"Conflict - the call needs an organization, none was named, and more than one of the caller's organizations qualifies. Pass one of `choices[].id` as `X-Current-Orgid` (the `organizationId` tool argument). The body's `code` is `organization_selection_required`.",content:{"application/json":{schema:{type:"object",description:"The call needs an acting organization, the caller named none, and more than one of the caller's live organizations qualifies. Nothing was done by this request. Repeat it naming one of `choices` as `X-Current-Orgid` (the `organizationId` tool argument).",required:["code","message","choices"],additionalProperties:false,properties:{code:{type:"string",description:"Machine-readable reason. Always `organization_selection_required` for this body.",enum:["organization_selection_required"]},message:{type:"string",minLength:1,description:"The sentence the caller is shown."},choices:{type:"array",minItems:2,description:"The caller's own live organizations the call could act in. Pass one `id` as `X-Current-Orgid`.",items:{type:"object",description:"An organization the call could act in. Same fields as AvailableOrganization.",required:["id","name","description"],additionalProperties:false,properties:{id:{type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},description:"Organization ID.","x-go-name":"ID"},name:{type:"string",description:"Name of the organization."},description:{type:"string",description:"Description of the organization."}}}}}}}}},429:{description:"Too many requests - the caller exceeded the server's per-user request rate for this route family. Wait the number of seconds in `Retry-After` before retrying.",headers:{"Retry-After":{description:"Number of seconds the caller must wait before retrying.",required:true,schema:{type:"integer",minimum:1}}},content:{"application/json":{schema:{type:"object",description:"A MeshKit error answered as a JSON body. `error` is the sentence the caller is shown; MeshKit's long description is never serialized. Use the `MeshkitError400`, `MeshkitError403`, `MeshkitError404`, `MeshkitError409`, `MeshkitError429`, `MeshkitError500` and `MeshkitError502` responses for an operation whose server answers its refusals this way.",required:["error"],additionalProperties:false,properties:{error:{type:"string",minLength:1,description:"The sentence the caller is shown."},code:{type:"string",minLength:1,description:"MeshKit error code, a component-scoped identifier allocated by the emitting service (e.g. `<component>-<number>`); it is not a stable part of this contract. Omitted for an error that is not a MeshKit error."},severity:{type:"string",description:"MeshKit severity name. Omitted when MeshKit reports none.",enum:["emergency","alert","critical","fatal"]},probableCause:{type:"array",description:"MeshKit's probable causes of the error.",items:{type:"string"}},suggestedRemediation:{type:"array",description:"MeshKit's suggested remediations for the error.",items:{type:"string"}}}}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}},put:{"x-internal":["cloud"],tags:["schedules"],summary:"Update a schedule",operationId:"updateSchedule",description:"Updates the client-settable fields present in the payload; an\nomitted optional field keeps its stored value, and `null` clears a\nnullable one (`workspaceId`, `runAt`, `nextRunAt`, and `targetType`\nwith `targetId`). `status` accepts only\n`pending`, `scheduled` and `cancelled`. Pause or resume the schedule\nby setting `paused` (with an optional `pauseReason`); the server then\nrecords `pausedAt` and `pausedBy`. Pausing a paused schedule keeps\nits original `pausedAt`; omitting `paused` leaves the pause\nunchanged. The optional `If-Match` header makes the write\nconditional on the entity tag the schedule carried when it was read:\nwhen it no longer matches, the request is refused with 412 and\nnothing is written. Without `If-Match` the write is unconditional.\n",parameters:[{name:"scheduleId",in:"path",description:"Schedule ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},{name:"If-Match",in:"header",required:false,description:"Entity tag of the schedule as last read, from the `ETag` header of getScheduleById, createSchedule or updateSchedule. When present the write applies only if it still matches; otherwise 412.",schema:{type:"string",maxLength:255}}],requestBody:{required:true,content:{"application/json":{schema:{type:"object",additionalProperties:false,description:"Payload for creating or updating a schedule. Contains only\nclient-settable fields; the owning `organizationId`, `createdBy`, the\nclaim, `pausedAt`, `pausedBy`, `lastRunAt`, `lastError` and the\ntimestamps are server-managed and refused as unknown fields. Pausing\nis a field, not an operation: `paused` pauses or resumes the\nschedule. `status` accepts only `pending`, `scheduled` and\n`cancelled` here (otherwise 400); the other values are set by the\nserver as the schedule is claimed and released.\n",required:["name","action"],properties:{id:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-oapi-codegen-extra-tags":{json:"id,omitempty"}},workspaceId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-oapi-codegen-extra-tags":{json:"workspaceId,omitempty"}},name:{type:"string",description:"Human-readable name for the schedule.",minLength:1,maxLength:255},action:{type:"string",description:"The action the worker runs, for example a command name.",minLength:1,maxLength:255},targetType:{"x-oapi-codegen-extra-tags":{json:"targetType,omitempty"},type:"string",description:"Type of the resource the schedule acts on, named the way a claim's\n`resourceType` is (lowercase snake_case construct name, for example\n`content_item` or `profile`). A server verifies the target types it\nserves and refuses others with 400. Set together with `targetId` or\nnot at all.\n",pattern:"^[a-z][a-z0-9_]*$",minLength:1,maxLength:64},targetId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"TargetID","x-oapi-codegen-extra-tags":{json:"targetId,omitempty"}},params:{type:"object",description:"Action parameters, stored as a JSON blob.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true},enabled:{type:"boolean",description:"Whether the schedule is eligible to run.",default:true},runAt:{type:"string",format:"date-time",description:"Time the schedule first becomes due.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"}},nextRunAt:{type:"string",format:"date-time",description:"Next time the schedule becomes due. Omitted on create, it defaults to `runAt`; omitted on update, it is kept. Send null for never due again.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"}},recurrence:{type:"string",description:"How the schedule repeats once it has run. Empty, `once` and `none`\nmean run once. `hourly` repeats every hour; `daily`, `weekly` and\n`monthly` repeat at the same wall-clock time one calendar day, week\nor month later in the schedule's `timezone`, so a daily schedule\nkeeps its local time across daylight-saving changes. `every:<n>`\nrepeats every `n` minutes (1 to 999999). Occurrences are counted\nfrom `runAt` (else from the current `nextRunAt`); the next due time\nis the first occurrence after the run is released, so missed runs\nare not replayed.\n",pattern:"^(|once|none|hourly|daily|weekly|monthly|every:[1-9][0-9]{0,5})$",maxLength:255,default:""},timezone:{type:"string",description:"IANA time zone name (for example `UTC` or `America/Chicago`) in which\n`daily`, `weekly` and `monthly` recurrences keep their wall-clock\ntime. Instants (`runAt`, `nextRunAt`) are always absolute. The server\nrefuses a name it does not know with 400.\n",minLength:1,maxLength:64,pattern:"^[A-Za-z][A-Za-z0-9_+-]*(/[A-Za-z0-9_+-]+)*$",default:"UTC"},status:{type:"string",description:"Lifecycle status of a schedule. `pending`: created, not yet\ndue-scheduled. `scheduled`: waiting for its due time. `assigned`:\ndesignated for a particular worker but not yet claimed. `claimed`: a\nworker holds the claim and has not started. `running`: the claim\nholder is executing it. `retrying`: the last attempt failed and\nanother is due. `completed`, `failed` and `cancelled` are terminal\nfor a run-once schedule; a recurring schedule returns to `scheduled`\nwhen its claim is released with a `completed` outcome.\n",enum:["pending","scheduled","assigned","claimed","running","retrying","completed","failed","cancelled"]},retryCount:{type:"integer",description:"Retries used so far for the current run, for example 0 to re-arm a schedule. Omitted on update, it is kept.",minimum:0},maxRetries:{type:"integer",description:"Maximum retries before the run is marked failed.",minimum:0,default:0},retryDelayMinutes:{type:"integer",description:"Minutes to wait before a retry becomes due.",minimum:0,default:0},paused:{type:"boolean",description:"`true` pauses the schedule so it is never claimed; `false`\nresumes it. Omit to leave the pause unchanged. The server records\n`pausedAt` and `pausedBy`.\n"},pauseReason:{type:"string",description:"Reason for pausing; stored only while `paused` is true and cleared on resume.",maxLength:1e3},posture:{"x-go-type":"*posturev1beta3.Posture","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta3/posture",name:"posturev1beta3"},description:`Optional Posture this schedule runs under, resolved above
30
30
  the profile x platform resolution and below an explicit per-run
31
31
  flag. Omit to inherit: the schedule then runs under whatever
32
32
  profile x platform, configuration, environment, account or
@@ -62,7 +62,7 @@ email addresses, real names, or raw metadata. Public profile fields are
62
62
  resolved at read time for every served owner (live, active, and
63
63
  shareActivityPublicly on).
64
64
  `,required:["userId","platform","roleResult","completedAt","visibility"],properties:{userId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"UserID","x-order":1},platform:{type:"string",description:"Social platform the schedule ran on.",enum:["linkedin","x","reddit","hacker-news","slack","bluesky","github"],"x-order":2},roleResult:{type:"string",description:"One-line role and result summary from the completed run.",minLength:3,maxLength:120,"x-order":3},completedAt:{description:"Time the schedule run completed; feed is ordered newest first.","x-order":4,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},visibility:{type:"string",description:"Always `public` in this feed.",enum:["public"],default:"public","x-order":5},displayName:{type:"string",description:`The same value PublicUser.username carries for the owner. Never email. Resolved for every served owner; omitted when empty.
65
- `,maxLength:200,"x-oapi-codegen-extra-tags":{json:"displayName,omitempty"},"x-order":6},avatarUrl:{type:"string",format:"uri",description:"Public avatar URL; resolved for every served owner, omitted when empty.",maxLength:500,"x-go-name":"AvatarURL","x-oapi-codegen-extra-tags":{json:"avatarUrl,omitempty"},"x-order":7},organizationName:{type:"string",description:"Public organization name; omitted when organization memberships are not public to an anonymous caller.",maxLength:255,"x-oapi-codegen-extra-tags":{json:"organizationName,omitempty"},"x-order":8},publicProfileUrl:{type:"string",format:"uri",description:"HTTPS URL of the user's public profile.",pattern:"^https://",maxLength:2048,"x-go-name":"PublicProfileURL","x-oapi-codegen-extra-tags":{json:"publicProfileUrl,omitempty"},"x-order":9}}}}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},429:{description:"Too many requests - the caller exceeded the server's per-user request rate for this route family. Wait the number of seconds in `Retry-After` before retrying.",headers:{"Retry-After":{description:"Number of seconds the caller must wait before retrying.",required:true,schema:{type:"integer",minimum:1}}},content:{"application/json":{schema:{type:"object",description:"A MeshKit error answered as a JSON body. `error` is the sentence the caller is shown; MeshKit's long description is never serialized. Use the `MeshkitError400`, `MeshkitError403`, `MeshkitError404`, `MeshkitError409`, `MeshkitError429`, `MeshkitError500` and `MeshkitError502` responses for an operation whose server answers its refusals this way.",required:["error"],additionalProperties:false,properties:{error:{type:"string",minLength:1,description:"The sentence the caller is shown."},code:{type:"string",minLength:1,description:"MeshKit error code, a component-scoped identifier allocated by the emitting service (e.g. `<component>-<number>`); it is not a stable part of this contract. Omitted for an error that is not a MeshKit error."},severity:{type:"string",description:"MeshKit severity name. Omitted when MeshKit reports none.",enum:["emergency","alert","critical","fatal"]},probableCause:{type:"array",description:"MeshKit's probable causes of the error.",items:{type:"string"}},suggestedRemediation:{type:"array",description:"MeshKit's suggested remediations for the error.",items:{type:"string"}}}}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}}},components:{securitySchemes:{jwt:{type:"http",scheme:"Bearer [REDACTED]",bearerFormat:"JWT"}},responses:{400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},422:{description:"Unprocessable - the Idempotency-Key was already used with a different request body",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}},IdempotencyKeyInFlight:{description:"Conflict - an earlier request with the same Idempotency-Key is still being processed. Nothing is created by this request. Once the first request has finished without a 5xx, a retry receives the stored response; after a 5xx, a retry is processed as new. The body's `code` is `idempotency_key_in_flight`.",content:{"application/json":{schema:{type:"object",description:"A retry whose Idempotency-Key is still in flight. Nothing was created by this request. Once the first request has finished without a 5xx, a retry receives the stored response; after a 5xx, a retry is processed as new.",required:["code","message"],additionalProperties:false,properties:{code:{type:"string",description:"Machine-readable reason. Always `idempotency_key_in_flight` for this body.",enum:["idempotency_key_in_flight"]},message:{type:"string",minLength:1,description:"The sentence the caller is shown."}}}}}},MeshkitError429:{description:"Too many requests - the caller exceeded the server's per-user request rate for this route family. Wait the number of seconds in `Retry-After` before retrying.",headers:{"Retry-After":{description:"Number of seconds the caller must wait before retrying.",required:true,schema:{type:"integer",minimum:1}}},content:{"application/json":{schema:{type:"object",description:"A MeshKit error answered as a JSON body. `error` is the sentence the caller is shown; MeshKit's long description is never serialized. Use the `MeshkitError400`, `MeshkitError403`, `MeshkitError404`, `MeshkitError409`, `MeshkitError429`, `MeshkitError500` and `MeshkitError502` responses for an operation whose server answers its refusals this way.",required:["error"],additionalProperties:false,properties:{error:{type:"string",minLength:1,description:"The sentence the caller is shown."},code:{type:"string",minLength:1,description:"MeshKit error code, a component-scoped identifier allocated by the emitting service (e.g. `<component>-<number>`); it is not a stable part of this contract. Omitted for an error that is not a MeshKit error."},severity:{type:"string",description:"MeshKit severity name. Omitted when MeshKit reports none.",enum:["emergency","alert","critical","fatal"]},probableCause:{type:"array",description:"MeshKit's probable causes of the error.",items:{type:"string"}},suggestedRemediation:{type:"array",description:"MeshKit's suggested remediations for the error.",items:{type:"string"}}}}}}}},headers:{ScheduleETag:{description:"Strong entity tag of the schedule. It changes whenever the schedule changes; send it back as `If-Match` to make updateSchedule conditional.",schema:{type:"string"}}},parameters:{currentOrgId:{name:"X-Current-Orgid",in:"header",required:false,description:"Organization the call acts in, by ID (a UUID). When present, the server resolves the session organization from it instead of the caller's selected organization, and runs its membership and permission checks there. A caller who is not a live member of the named organization receives the same 404 as an unknown resource. Omitted, the caller's selected organization applies.",schema:{type:"string",minLength:36,maxLength:36,pattern:"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"}},idempotencyKey:{name:"Idempotency-Key",in:"header",required:false,description:"Client-chosen key that makes a create safe to retry. The server keeps the organization, the user, the key, a hash of the request and the final response for 24 hours. Only a final response that is not a 5xx is stored. The server answers a 5xx only after it has rolled back the write; a 5xx it answers is not stored and releases the key's claim, so a retry with the same key is processed as new. A response the server has committed is final and is stored, even if a gateway in front of the server later fails the client's connection. A retry with the same key and the same request hash returns the stored response without creating anything again. A retry with the same key and a different request hash answers 422 and creates nothing. A retry with the same key that arrives while the earlier request with that key is still being processed answers 409 with the body `code` `idempotency_key_in_flight` and creates nothing. Once the first request has finished without a 5xx, a retry receives the stored response; after a 5xx, a retry is processed as new. Precedence: while the first request with a key is in flight, every retry with that key answers 409 whatever its body; only once the first request has finished does a retry with a different body answer 422. The in-flight claim of a request that never finished expires 24 hours after it was taken, the same TTL as the stored response; no shorter in-flight lease applies. A retry after that expiry is processed as new. Omitted, the create is not deduplicated. Use a fresh random value (a UUID) per intended create.",schema:{type:"string",minLength:1,maxLength:255}},ifMatch:{name:"If-Match",in:"header",required:false,description:"Entity tag of the schedule as last read, from the `ETag` header of getScheduleById, createSchedule or updateSchedule. When present the write applies only if it still matches; otherwise 412.",schema:{type:"string",maxLength:255}},scheduleId:{name:"scheduleId",in:"path",description:"Schedule ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},workspaceId:{name:"workspaceId",in:"path",description:"Workspace ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},workspaceIdQuery:{name:"workspaceId",in:"query",required:false,description:"Only schedules linked to this workspace.",schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},statusQuery:{name:"status",in:"query",required:false,description:"Only schedules in this status.",schema:{type:"string",description:"Lifecycle status of a schedule. `pending`: created, not yet\ndue-scheduled. `scheduled`: waiting for its due time. `assigned`:\ndesignated for a particular worker but not yet claimed. `claimed`: a\nworker holds the claim and has not started. `running`: the claim\nholder is executing it. `retrying`: the last attempt failed and\nanother is due. `completed`, `failed` and `cancelled` are terminal\nfor a run-once schedule; a recurring schedule returns to `scheduled`\nwhen its claim is released with a `completed` outcome.\n",enum:["pending","scheduled","assigned","claimed","running","retrying","completed","failed","cancelled"]}},page:{name:"page",in:"query",description:"Get responses by page",schema:{type:"integer",minimum:0}},pageSize:{name:"pageSize",in:"query",description:"Number of items per page.",schema:{type:"integer",minimum:1}},search:{name:"search",in:"query",description:"Get responses that match search param value",schema:{type:"string"}},order:{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}}},schemas:{Schedule:{$schema:"http://json-schema.org/draft-07/schema#",title:"Schedule Schema",description:"Server-returned schedule. A schedule is a job: an action to run, what it\nacts on (`targetType`, `targetId`) and its parameters, when it is due\n(`runAt`, `nextRunAt`, `recurrence` in `timezone`), its retry budget and\nits outcome. Schedules belong to an organization and may be linked to a\nworkspace. A worker takes a schedule through the generic `claim`\nconstruct (`POST /api/claims` with `resourceType` `schedule`); there is\nno schedule-specific claim route. While the claim is live no other worker\ncan take the schedule, and a claim past its `expiresAt` is stale so the\nschedule is claimable again. Releasing the claim records the run's\noutcome on the schedule in the same transaction (see `status`). The\n`claim` and the status values `assigned`, `claimed` and `running` are\nserver-managed. Pausing is data, not an operation: a client sets `paused`\n(and optionally `pauseReason`) on create or update, and the server\nrecords `pausedAt` and `pausedBy`. Fields marked readOnly are\nserver-managed and ignored on input.\n",type:"object",additionalProperties:false,required:["id","organizationId","name","action","enabled","timezone","status","retryCount","maxRetries","visibility","createdAt","updatedAt"],properties:{id:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},readOnly:true,"x-order":1},organizationId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},readOnly:true,"x-go-name":"OrganizationID","x-oapi-codegen-extra-tags":{db:"organization_id"},"x-order":2},workspaceId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-oapi-codegen-extra-tags":{db:"workspace_id",json:"workspaceId,omitempty"},"x-order":3},createdBy:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},readOnly:true,"x-go-name":"CreatedBy","x-oapi-codegen-extra-tags":{db:"owner"},"x-order":4},name:{type:"string",description:"Human-readable name for the schedule.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"name"},"x-order":5},action:{type:"string",description:"The action the worker runs when it holds the schedule's claim, for example a command name.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"action"},"x-order":6},targetType:{"x-oapi-codegen-extra-tags":{db:"target_type",json:"targetType,omitempty"},"x-order":7,type:"string",description:"Type of the resource the schedule acts on, named the way a claim's\n`resourceType` is (lowercase snake_case construct name, for example\n`content_item` or `profile`). A server verifies the target types it\nserves and refuses others with 400. Set together with `targetId` or\nnot at all.\n",pattern:"^[a-z][a-z0-9_]*$",minLength:1,maxLength:64},targetId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"TargetID","x-oapi-codegen-extra-tags":{db:"target_id",json:"targetId,omitempty"},"x-order":8},params:{type:"object",description:"Action parameters, stored as a JSON blob. What the schedule acts on belongs in `targetType` and `targetId`, not here.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"params"},"x-order":9},enabled:{type:"boolean",description:"Whether the schedule is eligible to run. A disabled schedule is never claimed.",default:true,"x-oapi-codegen-extra-tags":{db:"enabled"},"x-order":10},runAt:{type:"string",format:"date-time",description:"Time the schedule first becomes due.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"run_at"},"x-order":11},nextRunAt:{type:"string",format:"date-time",description:"Next time the schedule becomes due. Null when it is never due again.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"next_run"},"x-order":12},recurrence:{"x-oapi-codegen-extra-tags":{db:"recurrence"},"x-order":13,type:"string",description:"How the schedule repeats once it has run. Empty, `once` and `none`\nmean run once. `hourly` repeats every hour; `daily`, `weekly` and\n`monthly` repeat at the same wall-clock time one calendar day, week\nor month later in the schedule's `timezone`, so a daily schedule\nkeeps its local time across daylight-saving changes. `every:<n>`\nrepeats every `n` minutes (1 to 999999). Occurrences are counted\nfrom `runAt` (else from the current `nextRunAt`); the next due time\nis the first occurrence after the run is released, so missed runs\nare not replayed.\n",pattern:"^(|once|none|hourly|daily|weekly|monthly|every:[1-9][0-9]{0,5})$",maxLength:255,default:""},timezone:{"x-oapi-codegen-extra-tags":{db:"timezone"},"x-order":14,type:"string",description:"IANA time zone name (for example `UTC` or `America/Chicago`) in which\n`daily`, `weekly` and `monthly` recurrences keep their wall-clock\ntime. Instants (`runAt`, `nextRunAt`) are always absolute. The server\nrefuses a name it does not know with 400.\n",minLength:1,maxLength:64,pattern:"^[A-Za-z][A-Za-z0-9_+-]*(/[A-Za-z0-9_+-]+)*$",default:"UTC"},status:{type:"string",description:"Lifecycle status of a schedule. `pending`: created, not yet\ndue-scheduled. `scheduled`: waiting for its due time. `assigned`:\ndesignated for a particular worker but not yet claimed. `claimed`: a\nworker holds the claim and has not started. `running`: the claim\nholder is executing it. `retrying`: the last attempt failed and\nanother is due. `completed`, `failed` and `cancelled` are terminal\nfor a run-once schedule; a recurring schedule returns to `scheduled`\nwhen its claim is released with a `completed` outcome.\n",enum:["pending","scheduled","assigned","claimed","running","retrying","completed","failed","cancelled"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":15},retryCount:{type:"integer",description:"Attempts already retried for the current run.",minimum:0,default:0,"x-oapi-codegen-extra-tags":{db:"retry_count"},"x-order":16},maxRetries:{type:"integer",description:"Maximum retries before the run is marked failed.",minimum:0,default:0,"x-oapi-codegen-extra-tags":{db:"max_retries"},"x-order":17},retryDelayMinutes:{type:"integer",description:"Minutes to wait before a retry becomes due.",minimum:0,default:0,"x-oapi-codegen-extra-tags":{db:"retry_delay_minutes"},"x-order":18},lastRunAt:{type:"string",format:"date-time",description:"Time the most recent attempt ended (the release time of its claim). Server-managed.",nullable:true,readOnly:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"last_run"},"x-order":19},lastError:{type:"string",description:"Error reported by the most recent attempt; empty after a successful one. Server-managed.",maxLength:5e3,readOnly:true,"x-oapi-codegen-extra-tags":{db:"last_error"},"x-order":20},claim:{"x-go-type":"*claimv1beta3.Claim","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta3/claim",name:"claimv1beta3"},description:"The schedule's live claim, when one is held. A read-only view of the claim construct; omitted when the schedule is unclaimed.",readOnly:true,"x-oapi-codegen-extra-tags":{db:"-",json:"claim,omitempty"},"x-order":21,$schema:"http://json-schema.org/draft-07/schema#",title:"Claim Schema",type:"object",additionalProperties:false,required:["id","organizationId","resourceType","resourceId","status","claimedAt","expiresAt","createdAt","updatedAt"],properties:{id:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-order":1},organizationId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OrganizationID","x-oapi-codegen-extra-tags":{db:"organization_id"},"x-order":2},resourceType:{type:"string",description:"Type of the claimed resource, the construct name in snake_case, for example `content_item` or `schedule`.",minLength:1,maxLength:64,"x-oapi-codegen-extra-tags":{db:"resource_type"},"x-order":3},resourceId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-oapi-codegen-extra-tags":{db:"resource_id"},"x-order":4},claimantConnectionId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"ClaimantConnectionID","x-oapi-codegen-extra-tags":{db:"claimant_connection_id",json:"claimantConnectionId,omitempty"},"x-order":5},claimantUserId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"ClaimantUserID","x-oapi-codegen-extra-tags":{db:"claimant_user_id",json:"claimantUserId,omitempty"},"x-order":6},status:{type:"string",description:"Lifecycle of the claim. `active` while held, `released` once the holder (or a member allowed to release it) lets it go, `expired` once `expiresAt` passed without a renewal or the holding connection was deleted. Expiry is evaluated when the claim is read, so a claim never reads `active` past its `expiresAt`.\n",enum:["active","released","expired"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":7},claimedAt:{description:"Time the claim was taken.","x-oapi-codegen-extra-tags":{db:"claimed_at"},"x-order":8,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},expiresAt:{description:"Time the claim lapses unless the holder renews it. Always set by the server; a claim past this time is stale.","x-oapi-codegen-extra-tags":{db:"expires_at"},"x-order":9,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},renewedAt:{type:"string",format:"date-time",description:"Time of the last renewal. Null until the claim is first renewed.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"renewed_at"},"x-order":10},releasedAt:{type:"string",format:"date-time",description:"Time the claim was released. Null while the claim is active or after it expired.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"released_at"},"x-order":11},outcome:{type:"string",description:"What the releaser reported when the claim was released: `completed` when the work behind it finished, `failed` when it was attempted and did not succeed, `cancelled` when it was let go without the work being done (including a release by another member). Omitted while the claim is active and on an expired claim.\n",enum:["completed","failed","cancelled"],"x-oapi-codegen-extra-tags":{db:"outcome",json:"outcome,omitempty"},"x-order":12},outcomeError:{type:"string",description:"Error reported with a `failed` outcome. Omitted otherwise.",maxLength:5e3,"x-oapi-codegen-extra-tags":{db:"outcome_error",json:"outcomeError,omitempty"},"x-order":13},outcomeEventId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OutcomeEventID","x-oapi-codegen-extra-tags":{db:"outcome_event_id",json:"outcomeEventId,omitempty"},"x-order":14},releasedBy:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"ReleasedBy","x-oapi-codegen-extra-tags":{db:"released_by",json:"releasedBy,omitempty"},"x-order":15},createdAt:{description:"Timestamp of claim creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":16,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last claim modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":17,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}},pausedAt:{type:"string",format:"date-time",description:"Time the schedule was paused. Null when the schedule is not paused. Server-managed.",nullable:true,readOnly:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"paused_at"},"x-order":22},pausedBy:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},readOnly:true,"x-oapi-codegen-extra-tags":{db:"paused_by",json:"pausedBy,omitempty"},"x-order":23},pauseReason:{type:"string",description:"Reason given for pausing the schedule, set with `paused` on create or update. Empty when not paused.",maxLength:1e3,"x-oapi-codegen-extra-tags":{db:"pause_reason"},"x-order":24},createdAt:{description:"Timestamp of schedule creation.",readOnly:true,"x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":25,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last schedule modification.",readOnly:true,"x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":26,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deletedAt:{type:"string",format:"date-time",description:"Timestamp when the schedule was soft-deleted. Null while live.",nullable:true,readOnly:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"deleted_at"},"x-order":27},posture:{"x-go-type":"*posturev1beta3.Posture","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta3/posture",name:"posturev1beta3"},description:`Optional Posture this schedule runs under, resolved above the
65
+ `,maxLength:200,"x-oapi-codegen-extra-tags":{json:"displayName,omitempty"},"x-order":6},avatarUrl:{type:"string",format:"uri",description:"Public avatar URL; resolved for every served owner, omitted when empty.",maxLength:500,"x-go-name":"AvatarURL","x-oapi-codegen-extra-tags":{json:"avatarUrl,omitempty"},"x-order":7},organizationName:{type:"string",description:"Public organization name; omitted when organization memberships are not public to an anonymous caller.",maxLength:255,"x-oapi-codegen-extra-tags":{json:"organizationName,omitempty"},"x-order":8},publicProfileUrl:{type:"string",format:"uri",description:"HTTPS URL of the user's public profile.",pattern:"^https://",maxLength:2048,"x-go-name":"PublicProfileURL","x-oapi-codegen-extra-tags":{json:"publicProfileUrl,omitempty"},"x-order":9}}}}}}}}},400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},429:{description:"Too many requests - the caller exceeded the server's per-user request rate for this route family. Wait the number of seconds in `Retry-After` before retrying.",headers:{"Retry-After":{description:"Number of seconds the caller must wait before retrying.",required:true,schema:{type:"integer",minimum:1}}},content:{"application/json":{schema:{type:"object",description:"A MeshKit error answered as a JSON body. `error` is the sentence the caller is shown; MeshKit's long description is never serialized. Use the `MeshkitError400`, `MeshkitError403`, `MeshkitError404`, `MeshkitError409`, `MeshkitError429`, `MeshkitError500` and `MeshkitError502` responses for an operation whose server answers its refusals this way.",required:["error"],additionalProperties:false,properties:{error:{type:"string",minLength:1,description:"The sentence the caller is shown."},code:{type:"string",minLength:1,description:"MeshKit error code, a component-scoped identifier allocated by the emitting service (e.g. `<component>-<number>`); it is not a stable part of this contract. Omitted for an error that is not a MeshKit error."},severity:{type:"string",description:"MeshKit severity name. Omitted when MeshKit reports none.",enum:["emergency","alert","critical","fatal"]},probableCause:{type:"array",description:"MeshKit's probable causes of the error.",items:{type:"string"}},suggestedRemediation:{type:"array",description:"MeshKit's suggested remediations for the error.",items:{type:"string"}}}}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}}}}}},components:{securitySchemes:{jwt:{type:"http",scheme:"Bearer [REDACTED]",bearerFormat:"JWT"}},responses:{400:{description:"Invalid request body or request param",content:{"text/plain":{schema:{type:"string"}}}},401:{description:"Expired JWT token used or insufficient privilege",content:{"text/plain":{schema:{type:"string"}}}},404:{description:"Result not found",content:{"text/plain":{schema:{type:"string"}}}},422:{description:"Unprocessable - the Idempotency-Key was already used with a different request body",content:{"text/plain":{schema:{type:"string"}}}},500:{description:"Internal server error",content:{"text/plain":{schema:{type:"string"}}}},OrganizationSelectionRequired:{description:"Conflict - the call needs an organization, none was named, and more than one of the caller's organizations qualifies. Pass one of `choices[].id` as `X-Current-Orgid` (the `organizationId` tool argument). The body's `code` is `organization_selection_required`.",content:{"application/json":{schema:{type:"object",description:"The call needs an acting organization, the caller named none, and more than one of the caller's live organizations qualifies. Nothing was done by this request. Repeat it naming one of `choices` as `X-Current-Orgid` (the `organizationId` tool argument).",required:["code","message","choices"],additionalProperties:false,properties:{code:{type:"string",description:"Machine-readable reason. Always `organization_selection_required` for this body.",enum:["organization_selection_required"]},message:{type:"string",minLength:1,description:"The sentence the caller is shown."},choices:{type:"array",minItems:2,description:"The caller's own live organizations the call could act in. Pass one `id` as `X-Current-Orgid`.",items:{type:"object",description:"An organization the call could act in. Same fields as AvailableOrganization.",required:["id","name","description"],additionalProperties:false,properties:{id:{type:"string",format:"uuid","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},description:"Organization ID.","x-go-name":"ID"},name:{type:"string",description:"Name of the organization."},description:{type:"string",description:"Description of the organization."}}}}}}}}},IdempotencyKeyInFlight:{description:"Conflict - an earlier request with the same Idempotency-Key is still being processed. Nothing is created by this request. Once the first request has finished without a 5xx, a retry receives the stored response; after a 5xx, a retry is processed as new. The body's `code` is `idempotency_key_in_flight`.",content:{"application/json":{schema:{type:"object",description:"A retry whose Idempotency-Key is still in flight. Nothing was created by this request. Once the first request has finished without a 5xx, a retry receives the stored response; after a 5xx, a retry is processed as new.",required:["code","message"],additionalProperties:false,properties:{code:{type:"string",description:"Machine-readable reason. Always `idempotency_key_in_flight` for this body.",enum:["idempotency_key_in_flight"]},message:{type:"string",minLength:1,description:"The sentence the caller is shown."}}}}}},MeshkitError429:{description:"Too many requests - the caller exceeded the server's per-user request rate for this route family. Wait the number of seconds in `Retry-After` before retrying.",headers:{"Retry-After":{description:"Number of seconds the caller must wait before retrying.",required:true,schema:{type:"integer",minimum:1}}},content:{"application/json":{schema:{type:"object",description:"A MeshKit error answered as a JSON body. `error` is the sentence the caller is shown; MeshKit's long description is never serialized. Use the `MeshkitError400`, `MeshkitError403`, `MeshkitError404`, `MeshkitError409`, `MeshkitError429`, `MeshkitError500` and `MeshkitError502` responses for an operation whose server answers its refusals this way.",required:["error"],additionalProperties:false,properties:{error:{type:"string",minLength:1,description:"The sentence the caller is shown."},code:{type:"string",minLength:1,description:"MeshKit error code, a component-scoped identifier allocated by the emitting service (e.g. `<component>-<number>`); it is not a stable part of this contract. Omitted for an error that is not a MeshKit error."},severity:{type:"string",description:"MeshKit severity name. Omitted when MeshKit reports none.",enum:["emergency","alert","critical","fatal"]},probableCause:{type:"array",description:"MeshKit's probable causes of the error.",items:{type:"string"}},suggestedRemediation:{type:"array",description:"MeshKit's suggested remediations for the error.",items:{type:"string"}}}}}}}},headers:{ScheduleETag:{description:"Strong entity tag of the schedule. It changes whenever the schedule changes; send it back as `If-Match` to make updateSchedule conditional.",schema:{type:"string"}}},parameters:{currentOrgId:{name:"X-Current-Orgid",in:"header",required:false,description:"Organization the call acts in, by ID (a UUID). When present, the server resolves the session organization from it instead of the caller's selected organization, and runs its membership and permission checks there. A caller who is not a live member of the named organization receives the same 404 as an unknown resource. Omitted, a path or query `orgId` the operation takes names the organization when sent; otherwise the caller's selected organization applies when it is not nil; otherwise the server defaults among the caller's live organizations, using the only one when exactly one qualifies. When the call needs an acting organization and several qualify, an operation that declares the OrganizationSelectionRequired response answers 409 `organization_selection_required`. The resolution order is in docs/mcp-operation-contract.md, the organization selector.",schema:{type:"string",minLength:36,maxLength:36,pattern:"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"}},idempotencyKey:{name:"Idempotency-Key",in:"header",required:false,description:"Client-chosen key that makes a create safe to retry. The server keeps the organization, the user, the key, a hash of the request and the final response for 24 hours. Only a final response that is not a 5xx is stored. The server answers a 5xx only after it has rolled back the write; a 5xx it answers is not stored and releases the key's claim, so a retry with the same key is processed as new. A response the server has committed is final and is stored, even if a gateway in front of the server later fails the client's connection. A retry with the same key and the same request hash returns the stored response without creating anything again. A retry with the same key and a different request hash answers 422 and creates nothing. A retry with the same key that arrives while the earlier request with that key is still being processed answers 409 with the body `code` `idempotency_key_in_flight` and creates nothing. Once the first request has finished without a 5xx, a retry receives the stored response; after a 5xx, a retry is processed as new. Precedence: while the first request with a key is in flight, every retry with that key answers 409 whatever its body; only once the first request has finished does a retry with a different body answer 422. The in-flight claim of a request that never finished expires 24 hours after it was taken, the same TTL as the stored response; no shorter in-flight lease applies. A retry after that expiry is processed as new. Omitted, the create is not deduplicated. Use a fresh random value (a UUID) per intended create.",schema:{type:"string",minLength:1,maxLength:255}},ifMatch:{name:"If-Match",in:"header",required:false,description:"Entity tag of the schedule as last read, from the `ETag` header of getScheduleById, createSchedule or updateSchedule. When present the write applies only if it still matches; otherwise 412.",schema:{type:"string",maxLength:255}},scheduleId:{name:"scheduleId",in:"path",description:"Schedule ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},workspaceId:{name:"workspaceId",in:"path",description:"Workspace ID",required:true,schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},workspaceIdQuery:{name:"workspaceId",in:"query",required:false,description:"Only schedules linked to this workspace.",schema:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"}}},statusQuery:{name:"status",in:"query",required:false,description:"Only schedules in this status.",schema:{type:"string",description:"Lifecycle status of a schedule. `pending`: created, not yet\ndue-scheduled. `scheduled`: waiting for its due time. `assigned`:\ndesignated for a particular worker but not yet claimed. `claimed`: a\nworker holds the claim and has not started. `running`: the claim\nholder is executing it. `retrying`: the last attempt failed and\nanother is due. `completed`, `failed` and `cancelled` are terminal\nfor a run-once schedule; a recurring schedule returns to `scheduled`\nwhen its claim is released with a `completed` outcome.\n",enum:["pending","scheduled","assigned","claimed","running","retrying","completed","failed","cancelled"]}},page:{name:"page",in:"query",description:"Get responses by page",schema:{type:"integer",minimum:0}},pageSize:{name:"pageSize",in:"query",description:"Number of items per page.",schema:{type:"integer",minimum:1}},search:{name:"search",in:"query",description:"Get responses that match search param value",schema:{type:"string"}},order:{name:"order",in:"query",description:"Get ordered responses",schema:{type:"string"}}},schemas:{Schedule:{$schema:"http://json-schema.org/draft-07/schema#",title:"Schedule Schema",description:"Server-returned schedule. A schedule is a job: an action to run, what it\nacts on (`targetType`, `targetId`) and its parameters, when it is due\n(`runAt`, `nextRunAt`, `recurrence` in `timezone`), its retry budget and\nits outcome. Schedules belong to an organization and may be linked to a\nworkspace. A worker takes a schedule through the generic `claim`\nconstruct (`POST /api/claims` with `resourceType` `schedule`); there is\nno schedule-specific claim route. While the claim is live no other worker\ncan take the schedule, and a claim past its `expiresAt` is stale so the\nschedule is claimable again. Releasing the claim records the run's\noutcome on the schedule in the same transaction (see `status`). The\n`claim` and the status values `assigned`, `claimed` and `running` are\nserver-managed. Pausing is data, not an operation: a client sets `paused`\n(and optionally `pauseReason`) on create or update, and the server\nrecords `pausedAt` and `pausedBy`. Fields marked readOnly are\nserver-managed and ignored on input.\n",type:"object",additionalProperties:false,required:["id","organizationId","name","action","enabled","timezone","status","retryCount","maxRetries","visibility","createdAt","updatedAt"],properties:{id:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},readOnly:true,"x-order":1},organizationId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},readOnly:true,"x-go-name":"OrganizationID","x-oapi-codegen-extra-tags":{db:"organization_id"},"x-order":2},workspaceId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-oapi-codegen-extra-tags":{db:"workspace_id",json:"workspaceId,omitempty"},"x-order":3},createdBy:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},readOnly:true,"x-go-name":"CreatedBy","x-oapi-codegen-extra-tags":{db:"owner"},"x-order":4},name:{type:"string",description:"Human-readable name for the schedule.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"name"},"x-order":5},action:{type:"string",description:"The action the worker runs when it holds the schedule's claim, for example a command name.",minLength:1,maxLength:255,"x-oapi-codegen-extra-tags":{db:"action"},"x-order":6},targetType:{"x-oapi-codegen-extra-tags":{db:"target_type",json:"targetType,omitempty"},"x-order":7,type:"string",description:"Type of the resource the schedule acts on, named the way a claim's\n`resourceType` is (lowercase snake_case construct name, for example\n`content_item` or `profile`). A server verifies the target types it\nserves and refuses others with 400. Set together with `targetId` or\nnot at all.\n",pattern:"^[a-z][a-z0-9_]*$",minLength:1,maxLength:64},targetId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"TargetID","x-oapi-codegen-extra-tags":{db:"target_id",json:"targetId,omitempty"},"x-order":8},params:{type:"object",description:"Action parameters, stored as a JSON blob. What the schedule acts on belongs in `targetType` and `targetId`, not here.","x-go-type":"core.Map","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-go-type-skip-optional-pointer":true,"x-oapi-codegen-extra-tags":{db:"params"},"x-order":9},enabled:{type:"boolean",description:"Whether the schedule is eligible to run. A disabled schedule is never claimed.",default:true,"x-oapi-codegen-extra-tags":{db:"enabled"},"x-order":10},runAt:{type:"string",format:"date-time",description:"Time the schedule first becomes due.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"run_at"},"x-order":11},nextRunAt:{type:"string",format:"date-time",description:"Next time the schedule becomes due. Null when it is never due again.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"next_run"},"x-order":12},recurrence:{"x-oapi-codegen-extra-tags":{db:"recurrence"},"x-order":13,type:"string",description:"How the schedule repeats once it has run. Empty, `once` and `none`\nmean run once. `hourly` repeats every hour; `daily`, `weekly` and\n`monthly` repeat at the same wall-clock time one calendar day, week\nor month later in the schedule's `timezone`, so a daily schedule\nkeeps its local time across daylight-saving changes. `every:<n>`\nrepeats every `n` minutes (1 to 999999). Occurrences are counted\nfrom `runAt` (else from the current `nextRunAt`); the next due time\nis the first occurrence after the run is released, so missed runs\nare not replayed.\n",pattern:"^(|once|none|hourly|daily|weekly|monthly|every:[1-9][0-9]{0,5})$",maxLength:255,default:""},timezone:{"x-oapi-codegen-extra-tags":{db:"timezone"},"x-order":14,type:"string",description:"IANA time zone name (for example `UTC` or `America/Chicago`) in which\n`daily`, `weekly` and `monthly` recurrences keep their wall-clock\ntime. Instants (`runAt`, `nextRunAt`) are always absolute. The server\nrefuses a name it does not know with 400.\n",minLength:1,maxLength:64,pattern:"^[A-Za-z][A-Za-z0-9_+-]*(/[A-Za-z0-9_+-]+)*$",default:"UTC"},status:{type:"string",description:"Lifecycle status of a schedule. `pending`: created, not yet\ndue-scheduled. `scheduled`: waiting for its due time. `assigned`:\ndesignated for a particular worker but not yet claimed. `claimed`: a\nworker holds the claim and has not started. `running`: the claim\nholder is executing it. `retrying`: the last attempt failed and\nanother is due. `completed`, `failed` and `cancelled` are terminal\nfor a run-once schedule; a recurring schedule returns to `scheduled`\nwhen its claim is released with a `completed` outcome.\n",enum:["pending","scheduled","assigned","claimed","running","retrying","completed","failed","cancelled"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":15},retryCount:{type:"integer",description:"Attempts already retried for the current run.",minimum:0,default:0,"x-oapi-codegen-extra-tags":{db:"retry_count"},"x-order":16},maxRetries:{type:"integer",description:"Maximum retries before the run is marked failed.",minimum:0,default:0,"x-oapi-codegen-extra-tags":{db:"max_retries"},"x-order":17},retryDelayMinutes:{type:"integer",description:"Minutes to wait before a retry becomes due.",minimum:0,default:0,"x-oapi-codegen-extra-tags":{db:"retry_delay_minutes"},"x-order":18},lastRunAt:{type:"string",format:"date-time",description:"Time the most recent attempt ended (the release time of its claim). Server-managed.",nullable:true,readOnly:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"last_run"},"x-order":19},lastError:{type:"string",description:"Error reported by the most recent attempt; empty after a successful one. Server-managed.",maxLength:5e3,readOnly:true,"x-oapi-codegen-extra-tags":{db:"last_error"},"x-order":20},claim:{"x-go-type":"*claimv1beta3.Claim","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta3/claim",name:"claimv1beta3"},description:"The schedule's live claim, when one is held. A read-only view of the claim construct; omitted when the schedule is unclaimed.",readOnly:true,"x-oapi-codegen-extra-tags":{db:"-",json:"claim,omitempty"},"x-order":21,$schema:"http://json-schema.org/draft-07/schema#",title:"Claim Schema",type:"object",additionalProperties:false,required:["id","organizationId","resourceType","resourceId","status","claimedAt","expiresAt","createdAt","updatedAt"],properties:{id:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-order":1},organizationId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OrganizationID","x-oapi-codegen-extra-tags":{db:"organization_id"},"x-order":2},resourceType:{type:"string",description:"Type of the claimed resource, the construct name in snake_case, for example `content_item` or `schedule`.",minLength:1,maxLength:64,"x-oapi-codegen-extra-tags":{db:"resource_type"},"x-order":3},resourceId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-oapi-codegen-extra-tags":{db:"resource_id"},"x-order":4},claimantConnectionId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"ClaimantConnectionID","x-oapi-codegen-extra-tags":{db:"claimant_connection_id",json:"claimantConnectionId,omitempty"},"x-order":5},claimantUserId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"ClaimantUserID","x-oapi-codegen-extra-tags":{db:"claimant_user_id",json:"claimantUserId,omitempty"},"x-order":6},status:{type:"string",description:"Lifecycle of the claim. `active` while held, `released` once the holder (or a member allowed to release it) lets it go, `expired` once `expiresAt` passed without a renewal or the holding connection was deleted. Expiry is evaluated when the claim is read, so a claim never reads `active` past its `expiresAt`.\n",enum:["active","released","expired"],"x-oapi-codegen-extra-tags":{db:"status"},"x-order":7},claimedAt:{description:"Time the claim was taken.","x-oapi-codegen-extra-tags":{db:"claimed_at"},"x-order":8,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},expiresAt:{description:"Time the claim lapses unless the holder renews it. Always set by the server; a claim past this time is stale.","x-oapi-codegen-extra-tags":{db:"expires_at"},"x-order":9,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},renewedAt:{type:"string",format:"date-time",description:"Time of the last renewal. Null until the claim is first renewed.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"renewed_at"},"x-order":10},releasedAt:{type:"string",format:"date-time",description:"Time the claim was released. Null while the claim is active or after it expired.",nullable:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"released_at"},"x-order":11},outcome:{type:"string",description:"What the releaser reported when the claim was released: `completed` when the work behind it finished, `failed` when it was attempted and did not succeed, `cancelled` when it was let go without the work being done (including a release by another member). Omitted while the claim is active and on an expired claim.\n",enum:["completed","failed","cancelled"],"x-oapi-codegen-extra-tags":{db:"outcome",json:"outcome,omitempty"},"x-order":12},outcomeError:{type:"string",description:"Error reported with a `failed` outcome. Omitted otherwise.",maxLength:5e3,"x-oapi-codegen-extra-tags":{db:"outcome_error",json:"outcomeError,omitempty"},"x-order":13},outcomeEventId:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"OutcomeEventID","x-oapi-codegen-extra-tags":{db:"outcome_event_id",json:"outcomeEventId,omitempty"},"x-order":14},releasedBy:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},"x-go-name":"ReleasedBy","x-oapi-codegen-extra-tags":{db:"released_by",json:"releasedBy,omitempty"},"x-order":15},createdAt:{description:"Timestamp of claim creation.","x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":16,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last claim modification.","x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":17,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true}}},pausedAt:{type:"string",format:"date-time",description:"Time the schedule was paused. Null when the schedule is not paused. Server-managed.",nullable:true,readOnly:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"paused_at"},"x-order":22},pausedBy:{type:"string",format:"uuid",description:"A Universally Unique Identifier used to uniquely identify entities in Meshery. The UUID core definition is used across different schemas.","x-go-type":"uuid.UUID","x-go-type-import":{path:"github.com/gofrs/uuid"},readOnly:true,"x-oapi-codegen-extra-tags":{db:"paused_by",json:"pausedBy,omitempty"},"x-order":23},pauseReason:{type:"string",description:"Reason given for pausing the schedule, set with `paused` on create or update. Empty when not paused.",maxLength:1e3,"x-oapi-codegen-extra-tags":{db:"pause_reason"},"x-order":24},createdAt:{description:"Timestamp of schedule creation.",readOnly:true,"x-oapi-codegen-extra-tags":{db:"created_at"},"x-order":25,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},updatedAt:{description:"Timestamp of last schedule modification.",readOnly:true,"x-oapi-codegen-extra-tags":{db:"updated_at"},"x-order":26,type:"string",format:"date-time","x-go-type-skip-optional-pointer":true},deletedAt:{type:"string",format:"date-time",description:"Timestamp when the schedule was soft-deleted. Null while live.",nullable:true,readOnly:true,"x-go-type":"core.NullTime","x-go-type-import":{path:"github.com/meshery/schemas/models/core",name:"core"},"x-oapi-codegen-extra-tags":{db:"deleted_at"},"x-order":27},posture:{"x-go-type":"*posturev1beta3.Posture","x-go-type-import":{path:"github.com/meshery/schemas/models/v1beta3/posture",name:"posturev1beta3"},description:`Optional Posture this schedule runs under, resolved above the
66
66
  profile x platform resolution and below an explicit per-run flag.
67
67
  Omitted when the schedule has no override: it then runs under whatever
68
68
  profile x platform, configuration, environment, account or default