mirror of https://github.com/dapr/docs.git
updates per mark; change name
Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
This commit is contained in:
parent
0d78befe3f
commit
67f665a4b8
|
@ -30,4 +30,4 @@ Dapr provides the following building blocks:
|
|||
| [**Configuration**]({{< ref "configuration-api-overview.md" >}}) | `/v1.0/configuration` | The Configuration API enables you to retrieve and subscribe to application configuration items for supported configuration stores. This enables an application to retrieve specific configuration information, for example, at start up or when configuration changes are made in the store.
|
||||
| [**Distributed lock**]({{< ref "distributed-lock-api-overview.md" >}}) | `/v1.0-alpha1/lock` | The distributed lock API enables you to take a lock on a resource so that multiple instances of an application can access the resource without conflicts and provide consistency guarantees.
|
||||
| [**Cryptography**]({{< ref "cryptography-overview.md" >}}) | `/v1.0-alpha1/crypto` | The Cryptography API enables you to perform cryptographic operations, such as encrypting and decrypting messages, without exposing keys to your application.
|
||||
| [**Scheduler**]({{< ref "scheduler-overview.md" >}}) | `/v1.0-alpha1/scheduler` | The Scheduler API enables you to schedule and orchestrate jobs at scale in your distributed environment.
|
||||
| [**Jobs**]({{< ref "jobs-overview.md" >}}) | `/v1.0-alpha1/jobs` | The Jobs API enables you to schedule and orchestrate jobs. Example scenarios include: <ul><li>Schedule batch processing jobs to run at 5 PM every business day</li><li>Schedule various maintenance scripts to perform clean-ups</li><li>Schedule ETL jobs to run at specific times (hourly, daily) to fetch new data, process it, and update the data warehouse with the latest information.</li></ul>
|
||||
|
|
|
@ -5,7 +5,7 @@ linkTitle: "Scheduler"
|
|||
description: "Overview of the Dapr scheduler process"
|
||||
---
|
||||
|
||||
The Dapr Scheduler service is used to schedule and orchestrate jobs within your application environment running in [self-hosted mode]({{< ref self-hosted >}}) or on [Kubernetes]({{< ref kubernetes >}}).
|
||||
The Dapr Scheduler service is used to schedule jobs, running in [self-hosted mode]({{< ref self-hosted >}}) or on [Kubernetes]({{< ref kubernetes >}}).
|
||||
|
||||
## Self-hosted mode
|
||||
|
||||
|
@ -15,10 +15,6 @@ The scheduler service Docker container is started automatically as part of `dapr
|
|||
|
||||
The scheduler service is deployed as part of `dapr init -k`, or via the Dapr Helm charts. For more information on running Dapr on Kubernetes, visit the [Kubernetes hosting page]({{< ref kubernetes >}}).
|
||||
|
||||
|
||||
### Examples
|
||||
|
||||
|
||||
## Related links
|
||||
|
||||
[Learn more about the Scheduler API.]({{< ref scheduler_api.md >}})
|
|
@ -54,7 +54,7 @@ Each of these building block APIs is independent, meaning that you can use any n
|
|||
| [**Configuration**]({{< ref "configuration-api-overview.md" >}}) | The configuration API enables you to retrieve and subscribe to application configuration items from configuration stores.
|
||||
| [**Distributed lock**]({{< ref "distributed-lock-api-overview.md" >}}) | The distributed lock API enables your application to acquire a lock for any resource that gives it exclusive access until either the lock is released by the application, or a lease timeout occurs.
|
||||
| [**Cryptography**]({{< ref "cryptography-overview.md" >}}) | The cryptography API provides an abstraction layer on top of security infrastructure such as key vaults. It contains APIs that allow you to perform cryptographic operations, such as encrypting and decrypting messages, without exposing keys to your applications.
|
||||
| [**Scheduler**]({{< ref "scheduler-overview.md" >}}) | The scheduler API is a way to schedule and orchestrate jobs at scale across a distributed computing environment at specific times or intervals.
|
||||
| [**Jobs**]({{< ref "jobs-overview.md" >}}) | The jobs API is a way to schedule jobs at specific times or intervals.
|
||||
|
||||
### Cross-cutting APIs
|
||||
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
type: docs
|
||||
title: "Jobs"
|
||||
linkTitle: "Jobs"
|
||||
weight: 120
|
||||
description: "Manage the scheduling and orchestration of jobs"
|
||||
---
|
|
@ -0,0 +1,30 @@
|
|||
---
|
||||
type: docs
|
||||
title: "How-To: Schedule jobs"
|
||||
linkTitle: "How-To: Schedule jobs"
|
||||
weight: 2000
|
||||
description: "Learn how to use the jobs API to schedule jobs"
|
||||
---
|
||||
|
||||
Now that you've learned what the [jobs building block]({{< ref jobs-overview.md >}}) provides, let's look at an example of how to use the API. The below code example describes an application that schedules and orchestrates XXXX.
|
||||
|
||||
<!--
|
||||
Include a diagram or image, if possible.
|
||||
-->
|
||||
|
||||
<!--
|
||||
Make sure the how-to includes examples for multiple programming languages, OS, or deployment targets, if applicable.
|
||||
-->
|
||||
|
||||
## Configure jobs
|
||||
|
||||
|
||||
<!--
|
||||
Each H2 step should start with a verb/action word.
|
||||
-->
|
||||
|
||||
|
||||
## Next steps
|
||||
|
||||
- [Learn more about the Scheduler control plane service]({{< ref "concepts/dapr-services/scheduler.md" >}})
|
||||
- [Jobs API reference]({{< ref jobs_api.md >}})
|
|
@ -0,0 +1,62 @@
|
|||
---
|
||||
type: docs
|
||||
title: "Jobs overview"
|
||||
linkTitle: "Overview"
|
||||
weight: 1000
|
||||
description: "Overview of the jobs API building block"
|
||||
---
|
||||
|
||||
Many applications require job scheduling, the need to take an action in the future. The jobs API is an orchestrator for scheduling these jobs in the future, either at a specific time or a specific interval.
|
||||
Some typically example scenarios include;
|
||||
- **Automated Database Backups**: Ensure its database is backed up daily to prevent data loss. Schedule a backup script to run every night at 2 AM, which will create a backup of the database and store it in a secure location.
|
||||
- **Regular Data Processing and ETL (Extract, Transform, Load)**: Process and transform raw data from various sources and load it into a data warehouse. Schedule ETL jobs to run at specific times (e.g., hourly, daily) to fetch new data, process it, and update the data warehouse with the latest information.
|
||||
**Email Notifications and Reports**: Receive daily sales reports and weekly performance summaries via email. Schedule a job that generates the required reports and sends them via email at 6 AM every day for daily reports and 8 AM every Monday for weekly summaries.
|
||||
**Maintenance Tasks and System Updates**: Perform regular maintenance tasks such as clearing temporary files, updating software, and checking system health. Schedule various maintenance scripts to run at off-peak hours, such as weekends or late nights, to minimize disruption to users.
|
||||
**Batch Processing for Financial Transactions**: Processes a large number of transactions that need to be batched and settled at the end of each business day. Schedule batch processing jobs to run at 5 PM every business day, aggregating the day’s transactions and performing necessary settlements and reconciliations.
|
||||
Using the jobs API in these scenarios ensures that tasks are performed consistently and reliably without manual intervention, improving efficiency and reducing the risk of errors. The jobs API helps you with scheduling jobs, and internally it is also used by Dapr to schedule actor reminders.
|
||||
|
||||
### Delayed pub/sub
|
||||
|
||||
Use jobs to delay your pub/sub messaging. You can publish a message in a future specific time -- for example, a week from today, or a specific UTC date/time.
|
||||
|
||||
### Scheduled service invocation
|
||||
|
||||
Use jobs with [service invocation]({{< ref service-invocation-overview.md >}}) to schedules method calls between applications.
|
||||
|
||||
|
||||
|
||||
Jobs consist of:
|
||||
- The jobs building block
|
||||
- [The scheduler control plane service]({{< ref "concepts/dapr-services/scheduler.md" >}})
|
||||
|
||||
<img src="/images/scheduler/scheduler-architecture.png" alt="Diagram showing basics of the Scheduler control plane and the Scheduler API">
|
||||
|
||||
## How it works
|
||||
|
||||
The Jobs API is a job orchestrator, not the executor which run the job. The design guarantees *at least once* job execution with a bias towards durability and horizontal scaling over precision. This means:
|
||||
- **Guaranteed:** A job is never invoked *before* the schedule time is due.
|
||||
- **Not guaranteed:** A ceiling time on when the job is invoked *after* the due time is reached.
|
||||
|
||||
All job details and user-associated data for scheduled jobs are stored in an embedded Etcd database in the Scheduler service.
|
||||
|
||||
## Features
|
||||
|
||||
The jobs API provides several features to make it easy for you to schedule jobs.
|
||||
|
||||
### Schedule jobs across multiple replicas
|
||||
|
||||
The Scheduler service enables the scheduling of jobs to scale across multiple replicas, while guaranteeing that a job is only triggered by 1 scheduler service instance.
|
||||
|
||||
### Actor reminders
|
||||
|
||||
Actors have actor reminders, but present some limitations involving scalability. Make reminders scalable by using `SchedulerReminders`.
|
||||
|
||||
## Try out the jobs API
|
||||
|
||||
You can try out the jobs API in your application. After [Dapr is installed]({{< ref install-dapr-cli.md >}}), you can begin using the jobs API, starting with [the How-to: Schedule jobs guide]({{< ref howto-schedule-jobs.md >}}).
|
||||
|
||||
## Next steps
|
||||
|
||||
- [Learn how to use jobs in your environment]({{< ref howto-schedule-jobs.md >}})
|
||||
- [Learn more about the Scheduler control plane service]({{< ref "concepts/dapr-services/scheduler.md" >}})
|
||||
- [Jobs API reference]({{< ref jobs_api.md >}})
|
|
@ -1,7 +0,0 @@
|
|||
---
|
||||
type: docs
|
||||
title: "Scheduler"
|
||||
linkTitle: "Scheduler"
|
||||
weight: 120
|
||||
description: "Manage the scheduling and orchestration of jobs across distributed computing environments"
|
||||
---
|
|
@ -1,30 +0,0 @@
|
|||
---
|
||||
type: docs
|
||||
title: "How-To: Set up a scheduler"
|
||||
linkTitle: "How-To: Set up a scheduler"
|
||||
weight: 2000
|
||||
description: "Learn how to use the scheduler API to schedule jobs"
|
||||
---
|
||||
|
||||
Now that you've learned what the [Dapr scheduler building block]({{< ref scheduler-overview.md >}}) provides, learn how it can work in your environment. The below code example loosely describes an application that schedules and orchestrates an application.
|
||||
|
||||
<!--
|
||||
Include a diagram or image, if possible.
|
||||
-->
|
||||
|
||||
<!--
|
||||
Make sure the how-to includes examples for multiple programming languages, OS, or deployment targets, if applicable.
|
||||
-->
|
||||
|
||||
## Configure the scheduler
|
||||
|
||||
|
||||
<!--
|
||||
Each H2 step should start with a verb/action word.
|
||||
-->
|
||||
|
||||
|
||||
## Next steps
|
||||
|
||||
- [Learn more about the Scheduler control plane service]({{< ref "concepts/dapr-services/scheduler.md" >}})
|
||||
- [Scheduler API reference]({{< ref scheduler_api.md >}})
|
|
@ -1,51 +0,0 @@
|
|||
---
|
||||
type: docs
|
||||
title: "Scheduler overview"
|
||||
linkTitle: "Overview"
|
||||
weight: 1000
|
||||
description: "Overview of the scheduler API building block"
|
||||
---
|
||||
|
||||
The Scheduler API works as an orchestrator for scheduling jobs in the future, either at a specific time or a specific interval. The scheduler helps you with scheduling jobs, including scalable actor reminders.
|
||||
|
||||
The Scheduler consists of two parts that work together to seamlessly schedule jobs across all of Dapr's API building blocks:
|
||||
- The Scheduler building block
|
||||
- [The Scheduler control plane service]({{< ref "concepts/dapr-services/scheduler.md" >}})
|
||||
|
||||
<img src="/images/scheduler/scheduler-architecture.png" alt="Diagram showing basics of the Scheduler control plane and the Scheduler API">
|
||||
|
||||
## How it works
|
||||
|
||||
The Scheduler building block is a job orchestrator, not executor. The design guarantees *at least once* job execution with a bias towards durability and horizontal scaling over precision. This means:
|
||||
- **Guaranteed:** A job is never invoked *before* the schedule is due.
|
||||
- **Not guaranteed:** A ceiling time on when the job is invoked *after* the due time is reached.
|
||||
|
||||
All job details and user-associated data for scheduled jobs are stored in the embedded Etcd.
|
||||
|
||||
## Features
|
||||
|
||||
### Delayed pub/sub
|
||||
|
||||
The Scheduler building block enables you to delay your pub/sub messaging. You can publish a message in a future specific time -- for example, a week from today, or a specific UTC date/time.
|
||||
|
||||
### Scheduled service invocation
|
||||
|
||||
The Scheduler building block provides the [service invocation]({{< ref service-invocation-overview.md >}}) building block with an orchestrator that schedules method calls between applications.
|
||||
|
||||
### Schedule jobs across multiple replicas
|
||||
|
||||
The Scheduler service enables the scheduling of jobs to scale across multiple replicas, while guaranteeing that a job is only triggered by 1 scheduler service instance.
|
||||
|
||||
### Scheduler reminders
|
||||
|
||||
Actors have actor reminders, but present some limitations involving scalability. Make reminders more scalable by using `SchedulerReminders`.
|
||||
|
||||
## Try out the Scheduler
|
||||
|
||||
You can try out the Scheduler building block directly in your application. After [Dapr is installed]({{< ref install-dapr-cli.md >}}), you can begin using the Scheduler API, starting with [the How-to: Set up a Scheduler guide]({{< ref howto-use-scheduler.md >}}).
|
||||
|
||||
## Next steps
|
||||
|
||||
- [Learn how to use the scheduler in your environment]({{< ref howto-use-scheduler.md >}})
|
||||
- [Learn more about the Scheduler control plane service]({{< ref "concepts/dapr-services/scheduler.md" >}})
|
||||
- [Scheduler API reference]({{< ref scheduler_api.md >}})
|
|
@ -21,7 +21,7 @@ Dapr initialization includes:
|
|||
1. Running a **Zipkin container instance** for observability.
|
||||
1. Creating a **default components folder** with component definitions for the above.
|
||||
1. Running a **Dapr placement service container instance** for local actor support.
|
||||
1. Running a **Dapr scheduler service container instance** for job orchestration.
|
||||
1. Running a **Dapr scheduler service container instance** for job scheduling.
|
||||
|
||||
{{% alert title="Kubernetes Development Environment" color="primary" %}}
|
||||
To initialize Dapr in your local or remote **Kubernetes** cluster for development (including the Redis and Zipkin containers listed above), see [how to initialize Dapr for development on Kubernetes]({{<ref "kubernetes-deploy.md#install-dapr-from-the-official-dapr-helm-chart-with-development-flag" >}})
|
||||
|
|
|
@ -15,7 +15,7 @@ description: "List of current alpha and beta APIs"
|
|||
| Bulk Publish | [Bulk publish proto](https://github.com/dapr/dapr/blob/5aba3c9aa4ea9b3f388df125f9c66495b43c5c9e/dapr/proto/runtime/v1/dapr.proto#L59) | `v1.0-alpha1/publish/bulk` | The bulk publish API allows you to publish multiple messages to a topic in a single request. | [Bulk Publish and Subscribe API]({{< ref "pubsub-bulk.md" >}}) | v1.10 |
|
||||
| Bulk Subscribe | [Bulk subscribe proto](https://github.com/dapr/dapr/blob/5aba3c9aa4ea9b3f388df125f9c66495b43c5c9e/dapr/proto/runtime/v1/appcallback.proto#L57) | N/A | The bulk subscribe application callback receives multiple messages from a topic in a single call. | [Bulk Publish and Subscribe API]({{< ref "pubsub-bulk.md" >}}) | v1.10 |
|
||||
| Cryptography | [Crypto proto](https://github.com/dapr/dapr/blob/5aba3c9aa4ea9b3f388df125f9c66495b43c5c9e/dapr/proto/runtime/v1/dapr.proto#L118) | `v1.0-alpha1/crypto` | The cryptography API enables you to perform **high level** cryptography operations for encrypting and decrypting messages. | [Cryptography API]({{< ref "cryptography-overview.md" >}}) | v1.11 |
|
||||
| Scheduler | [Scheduler proto](todo) | `v1.0-alpha1/scheduler` | The scheduler API enables you to schedule and orchestrate jobs in your environment. | [Scheduler API]({{< ref "scheduler-overview.md" >}}) | v1.14 |
|
||||
| Jobs | [Jobs proto](todo) | `v1.0-alpha1/jobs` | The jobs API enables you to schedule and orchestrate jobs. | [Jobs API]({{< ref "jobs-overview.md" >}}) | v1.14 |
|
||||
|
||||
## Beta APIs
|
||||
|
||||
|
|
|
@ -24,4 +24,4 @@ For CLI there is no explicit opt-in, just the version that this was first made a
|
|||
| **Transactional Outbox** | Allows state operations for inserts and updates to be published to a configured pub/sub topic using a single transaction across the state store and the pub/sub | N/A | [Transactional Outbox Feature]({{< ref howto-outbox.md >}}) | v1.12 |
|
||||
| **Component Hot Reloading** | Allows for Dapr-loaded components to be "hot reloaded". A component spec is reloaded when it is created/updated/deleted in Kubernetes or on file when running in self-hosted mode. Ignores changes to actor state stores and workflow backends. | `HotReload`| [Hot Reloading]({{< ref components-concept.md >}}) | v1.13 |
|
||||
| **Subscription Hot Reloading** | Allows for declarative subscriptions to be "hot reloaded". A subscription is reloaded either when it is created/updated/deleted in Kubernetes, or on file in self-hosted mode. In-flight messages are unaffected when reloading. | `HotReload`| [Hot Reloading]({{< ref "subscription-methods.md#declarative-subscriptions" >}}) | v1.14 |
|
||||
| **Scheduler reminders** | While [Scheduler]({{< ref "concepts/dapr-services/scheduler.md" >}}) is deployed by default, scheduler reminders (used for scheduling actor reminders) are enabled through a preview feature and needs a feature flag. | `SchedulerReminders`| [Scheduler reminders]({{< ref "scheduler-overview.md#scheduler-reminders" >}}) | v1.14 |
|
||||
| **Jobs actor reminders** | Whilst the [Scheduler service]({{< ref "concepts/dapr-services/scheduler.md" >}}) is deployed by default, jobs reminders (used for scheduling actor reminders) are enabled through a preview feature and needs a feature flag. | `SchedulerReminders`| [Jobs reminders]({{< ref "scheduler-overview.md#jobs-reminders" >}}) | v1.14 |
|
||||
|
|
|
@ -0,0 +1,133 @@
|
|||
---
|
||||
type: docs
|
||||
title: "Jobs API reference"
|
||||
linkTitle: "Jobs API"
|
||||
description: "Detailed documentation on the jobs API"
|
||||
weight: 1300
|
||||
---
|
||||
|
||||
{{% alert title="Note" color="primary" %}}
|
||||
Jobs is currently in alpha.
|
||||
{{% /alert %}}
|
||||
|
||||
With the jobs API, you can schedule jobs and tasks in the future.
|
||||
|
||||
## Schedule a job
|
||||
|
||||
Schedule a job with a name.
|
||||
|
||||
```
|
||||
$ curl -X POST \
|
||||
http://localhost:3500/v1.0-alpha1/job/schedule/<name> \
|
||||
-H "Content-Type: application/json" \
|
||||
-H 'dapr-app-id: <id>' \
|
||||
-d '{
|
||||
"job": {
|
||||
"data": {
|
||||
"@type": "type.googleapis.com/google.type.Expr",
|
||||
"expression": "<expression>"
|
||||
},
|
||||
"dueTime": "30s"
|
||||
}
|
||||
}'
|
||||
```
|
||||
|
||||
### URL parameters
|
||||
|
||||
Parameter | Description
|
||||
--------- | -----------
|
||||
`name` | Name of the job you're scheduling
|
||||
`data` | A string value and can be any related content. Content is returned when the reminder expires. For example, this may be useful for returning a URL or anything related to the content.
|
||||
`dueTime` | Specifies the time after which the jobs are invoked. Its format should be [time.ParseDuration](https://pkg.go.dev/time#ParseDuration)
|
||||
|
||||
### Request body
|
||||
|
||||
```json
|
||||
{
|
||||
"job": {
|
||||
"data": {
|
||||
"@type": "type.googleapis.com/google.type.Expr",
|
||||
"expression": "cassie87"
|
||||
},
|
||||
"dueTime": "30s"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### HTTP response codes
|
||||
|
||||
Code | Description
|
||||
---- | -----------
|
||||
`202` | Accepted
|
||||
`400` | Request was malformed
|
||||
`500` | Request formatted correctly, error in dapr code or Scheduler control plane service
|
||||
|
||||
### Response content
|
||||
|
||||
The returned response is empty.
|
||||
|
||||
## Get job data
|
||||
|
||||
Get a job with its name.
|
||||
|
||||
```
|
||||
$ curl -X GET http://localhost:3500/v1.0-alpha1/job/<name> -H "Content-Type: application/json" -H 'dapr-app-id: <id>'
|
||||
```
|
||||
|
||||
### URL parameters
|
||||
|
||||
Parameter | Description
|
||||
--------- | -----------
|
||||
`name` | Name of the job you're scheduling
|
||||
|
||||
### HTTP response codes
|
||||
|
||||
Code | Description
|
||||
---- | -----------
|
||||
`202` | Accepted
|
||||
`400` | Request was malformed
|
||||
`500` | Request formatted correctly, error in dapr code or Scheduler control plane service
|
||||
|
||||
### Response content
|
||||
|
||||
The returned response is JSON containing the `name` of the job, the `dueTime` and the`data`.
|
||||
|
||||
```json
|
||||
{
|
||||
"name":"test1",
|
||||
"dueTime":"30s",
|
||||
"data": {
|
||||
"@type":"type.googleapis.com/google.type.Expr",
|
||||
"expression":"expression1"
|
||||
}
|
||||
}
|
||||
```
|
||||
## Delete a job
|
||||
|
||||
Delete a named job.
|
||||
|
||||
```
|
||||
$ curl -X DELETE http://localhost:3500/v1.0-alpha1/job/<name> -H "Content-Type: application/json" -H 'dapr-app-id: <id>'
|
||||
```
|
||||
|
||||
### URL parameters
|
||||
|
||||
Parameter | Description
|
||||
--------- | -----------
|
||||
`name` | Name of the job you're scheduling
|
||||
|
||||
### HTTP response codes
|
||||
|
||||
Code | Description
|
||||
---- | -----------
|
||||
`202` | Accepted
|
||||
`400` | Request was malformed
|
||||
`500` | Request formatted correctly, error in dapr code or Scheduler control plane service
|
||||
|
||||
### Response content
|
||||
|
||||
None.
|
||||
|
||||
## Next steps
|
||||
|
||||
[Jobs API overview]({{< ref jobs-overview.md >}})
|
|
@ -1,121 +0,0 @@
|
|||
---
|
||||
type: docs
|
||||
title: "Scheduler API reference"
|
||||
linkTitle: "Scheduler API"
|
||||
description: "Detailed documentation on the scheduler API"
|
||||
weight: 1300
|
||||
---
|
||||
|
||||
{{% alert title="Note" color="primary" %}}
|
||||
Scheduler is currently in alpha.
|
||||
{{% /alert %}}
|
||||
|
||||
With the Scheduler API, you can orchestrate jobs and tasks in your environment.
|
||||
|
||||
## Schedule a job
|
||||
|
||||
Schedule a job with the given name.
|
||||
|
||||
```
|
||||
POST http://localhost:3500/v1.0-alpha1/job/schedule/<name>
|
||||
```
|
||||
|
||||
### URL parameters
|
||||
|
||||
Parameter | Description
|
||||
--------- | -----------
|
||||
`name` | Job name
|
||||
|
||||
### Request content
|
||||
|
||||
Any request content will be passed to the scheduler as input. The Dapr API passes the content as-is without attempting to interpret it.
|
||||
|
||||
### HTTP response codes
|
||||
|
||||
Code | Description
|
||||
---- | -----------
|
||||
`202` | Accepted
|
||||
`400` | Request was malformed
|
||||
`500` | Request formatted correctly, error in dapr code or Scheduler control plane service
|
||||
|
||||
### Response content
|
||||
|
||||
The API call will provide a response similar to this:
|
||||
|
||||
```json
|
||||
{
|
||||
"job": {
|
||||
"data": {
|
||||
"@type": "type.googleapis.com/google.type.Expr",
|
||||
"expression": "cassie87"
|
||||
},
|
||||
"dueTime": "30s"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Get job data
|
||||
|
||||
Get a job's data with its given name.
|
||||
|
||||
```
|
||||
GET http://localhost:3500/v1.0-alpha1/job/<name>
|
||||
```
|
||||
|
||||
### URL parameters
|
||||
|
||||
Parameter | Description
|
||||
--------- | -----------
|
||||
`name` | Job name
|
||||
|
||||
### HTTP response codes
|
||||
|
||||
Code | Description
|
||||
---- | -----------
|
||||
`202` | Accepted
|
||||
`400` | Request was malformed
|
||||
`500` | Request formatted correctly, error in dapr code or Scheduler control plane service
|
||||
|
||||
### Response content
|
||||
|
||||
The API call will provide a response similar to this:
|
||||
|
||||
```json
|
||||
{
|
||||
"name":"test1",
|
||||
"dueTime":"30s",
|
||||
"data": {
|
||||
"@type":"type.googleapis.com/google.type.Expr",
|
||||
"expression":"expression1"
|
||||
}
|
||||
}
|
||||
```
|
||||
## Delete a job
|
||||
|
||||
Delete a job you've created and scheduled with its given name.
|
||||
|
||||
```
|
||||
DELETE http://localhost:3500/v1.0-alpha1/job/<name>
|
||||
```
|
||||
|
||||
### URL parameters
|
||||
|
||||
Parameter | Description
|
||||
--------- | -----------
|
||||
`name` | Job name
|
||||
|
||||
### HTTP response codes
|
||||
|
||||
Code | Description
|
||||
---- | -----------
|
||||
`202` | Accepted
|
||||
`400` | Request was malformed
|
||||
`500` | Request formatted correctly, error in dapr code or Scheduler control plane service
|
||||
|
||||
### Response content
|
||||
|
||||
None.
|
||||
|
||||
## Next steps
|
||||
|
||||
[Scheduler API overview]({{< ref scheduler-overview.md >}})
|
Loading…
Reference in New Issue