Skip to content

Commit

Permalink
Introduce services (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
bergundy authored May 2, 2024
1 parent a1ef391 commit b879be4
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ is ready.

An operation is addressed using three components:

- The containing service, a URL prefix (e.g. `http://api.mycompany.com/v1/myservice/`)
- [Operation Name](#operation-name)
- [Operation ID](#operation-id)
- The containing endpoint, a URL prefix (e.g. `http://api.mycompany.com/services/`)
- Service Name - A grouping of operations (e.g. `payments.v1`)
- Operation Name - A unique name for the given (e.g. `charge`)
- Operation ID - A unique ID assigned by the handler as a response to a [StartOperation](#start-operation) request.

Both the name and ID MUST not be empty and may contain any arbitrary character sequence as long as they're encoded into
the URL.
The service name, operation name, and operation ID MUST not be empty and may contain any arbitrary character sequence as
long as they're encoded into the URL.

## Schema Definitions

Expand Down Expand Up @@ -79,7 +80,7 @@ Start an arbitrary length operation.
The response of the operation may be delivered synchronously (inline), or asynchronously, via a provided callback or the
[Get Operation Result](#get-operation-result) endpoint.

**Path**: `/{operation}`
**Path**: `/{service}/{operation}`

**Method**: `POST`

Expand Down Expand Up @@ -142,7 +143,7 @@ The operation may later complete as canceled or any other outcome.
Handlers should ignore multiple cancelations of the same operation and return successfully if cancelation was already
requested.

**Path**: `/{operation}/{operation_id}/cancel`
**Path**: `/{service}/{operation}/{operation_id}/cancel`

**Method**: `POST`

Expand All @@ -164,7 +165,7 @@ requested.

Retrieve operation result.

**Path**: `/{operation}/{operation_id}/result`
**Path**: `/{service}/{operation}/{operation_id}/result`

**Method**: `GET`

Expand Down Expand Up @@ -222,7 +223,7 @@ Retrieve operation result.

Retrieve operation details.

**Path**: `/{operation}/{operation_id}`
**Path**: `/{service}/{operation}/{operation_id}`

**Method**: `GET`

Expand Down

0 comments on commit b879be4

Please sign in to comment.