Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions specification/schema/DatasetFulfillment/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# DatasetFulfillment

Access provisioning details for a fulfilled dataset order — extending [`schema:DataDownload`](https://schema.org/DataDownload) with Beckn-specific attributes for access method, signed URLs, download windows, and (in v1.1+) stream credential delivery.

Carried as `performanceAttributes` or `fulfillmentAttributes` in beckn messages — typically on the BPP side in `on_confirm` / `on_status` once the buyer has confirmed and credentials are ready.

## Versions

| Version | Status | Highlights |
|---|---|---|
| [v1.0](./v1.0) | Stable | Base schema: `accessMethod` (5 values), signed `accessUrl`, access window (`accessStart`/`accessEnd`), download counters, support contact. |
| [v1.1](./v1.1) | Stable | Adds `streamConnection` — polymorphic credential delivery object for `MQTT`, `KAFKA`, `API`, and `DATA_LAKE` access methods. Relaxes required fields so only `accessMethod` is mandatory. Adds `credentialExpiresAt` for short-lived credential rotation via `update`. Fully backward-compatible with v1.0. |

## File layout

Each version folder contains:

- `attributes.yaml` — OpenAPI 3.1 component schema, the canonical structural definition
- `schema.json` — self-contained JSON Schema (draft 2020-12) for runtime validation
- `context.jsonld` — JSON-LD term mappings (each version inherits from the version below)
- `vocab.jsonld` — RDF property declarations
- `README.md` — version notes and examples

Cross-version concerns (namespace prefixes, class IRI mappings, `rdfs:Class` declarations) live in the parent [`schema/context.jsonld`](../context.jsonld) and [`schema/vocab.jsonld`](../vocab.jsonld) and are inherited by each version.

## Canonical URLs (after publish)

```
https://schema.beckn.io/DatasetFulfillment/v1.0/{attributes.yaml,schema.json,context.jsonld,vocab.jsonld}
https://schema.beckn.io/DatasetFulfillment/v1.1/{attributes.yaml,schema.json,context.jsonld,vocab.jsonld}
```
46 changes: 46 additions & 0 deletions specification/schema/DatasetFulfillment/v1.0/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# DatasetFulfillment — v1.0

Base schema for delivering a dataset to a buyer who has confirmed an order. Extends [`schema:DataDownload`](https://schema.org/DataDownload) with Beckn-specific access-window and download-counter attributes.

Carried by the BPP as `performanceAttributes` (or `fulfillmentAttributes`) in `on_confirm` / `on_status` once the buyer has paid and the BPP is ready to deliver.

## Required fields

| Field | Notes |
|---|---|
| `fulfillment:accessMethod` | One of `DOWNLOAD`, `API`, `STREAM`, `DATA_ROOM`, `SFTP`. |
| `fulfillment:accessUrl` | Signed or time-limited URL for retrieval. |
| `fulfillment:accessStart` | ISO 8601 date-time when access opens. |
| `fulfillment:accessEnd` | ISO 8601 date-time when access closes. |

## Fulfillment example — `DOWNLOAD`

```json
{
"@context": "https://schema.beckn.io/DatasetFulfillment/v1.0/context.jsonld",
"@type": "DatasetFulfillment",
"fulfillment:accessMethod": "DOWNLOAD",
"fulfillment:accessUrl": "https://bucket.s3.ap-south-1.amazonaws.com/rainprob-mh-march-2026.parquet?X-Amz-Signature=...",
"fulfillment:accessStart": "2026-04-01T09:00:00Z",
"fulfillment:accessEnd": "2026-04-08T09:00:00Z",
"fulfillment:format": "Parquet",
"fulfillment:fileSizeBytes": 47185920,
"fulfillment:maxDownloads": 3,
"fulfillment:downloadsUsed": 0,
"fulfillment:supportEmail": "support@example.com",
"fulfillment:termsUrl": "https://example.com/dataset-terms",
"fulfillment:attributionText": "© 2026 Example Provider. Licensed under CC-BY-4.0."
}
```

## Notes

- `accessUrl` MUST be short-lived. The BPP signs the URL with a window expressed by `accessStart`/`accessEnd`; outside that window the URL returns 403/404.
- `maxDownloads` is an advisory hint; enforcement is at the signing layer.
- Beckn messages are signed but not encrypted — treat `accessUrl` like a bearer token. Don't put credentials in the URL beyond what's needed for the pre-signed mechanism.

## Canonical URL

```
https://schema.beckn.io/DatasetFulfillment/v1.0/context.jsonld
```
19 changes: 19 additions & 0 deletions specification/schema/DatasetFulfillment/v1.0/context.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"@context": [
"https://schema.beckn.io/schema/context.jsonld",
{
"@version": 1.1,
"fulfillment:accessMethod": "fulfillment:accessMethod",
"fulfillment:accessUrl": "fulfillment:accessUrl",
"fulfillment:accessStart": "fulfillment:accessStart",
"fulfillment:accessEnd": "fulfillment:accessEnd",
"fulfillment:format": "fulfillment:format",
"fulfillment:fileSizeBytes": "fulfillment:fileSizeBytes",
"fulfillment:maxDownloads": "fulfillment:maxDownloads",
"fulfillment:downloadsUsed": "fulfillment:downloadsUsed",
"fulfillment:supportEmail": "fulfillment:supportEmail",
"fulfillment:termsUrl": "fulfillment:termsUrl",
"fulfillment:attributionText": "fulfillment:attributionText"
}
]
}
33 changes: 33 additions & 0 deletions specification/schema/DatasetFulfillment/v1.0/schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://schema.beckn.io/DatasetFulfillment/v1.0/schema.json",
"title": "DatasetFulfillment",
"description": "Access provisioning details for a fulfilled dataset order. Delivery method plus credentials or signed URLs required to retrieve the data. Carried as performanceAttributes / fulfillmentAttributes in beckn messages.",
"type": "object",
"additionalProperties": true,
"required": [
"fulfillment:accessMethod",
"fulfillment:accessUrl",
"fulfillment:accessStart",
"fulfillment:accessEnd"
],
"properties": {
"@context": { "type": "string", "format": "uri" },
"@type": { "type": "string" },
"fulfillment:accessMethod": {
"type": "string",
"description": "Access method code (DOWNLOAD, API, STREAM, DATA_ROOM, SFTP).",
"enum": ["DOWNLOAD", "API", "STREAM", "DATA_ROOM", "SFTP"]
},
"fulfillment:accessUrl": { "type": "string", "format": "uri" },
"fulfillment:accessStart": { "type": "string", "format": "date-time" },
"fulfillment:accessEnd": { "type": "string", "format": "date-time" },
"fulfillment:format": { "type": "string" },
"fulfillment:fileSizeBytes": { "type": "integer" },
"fulfillment:maxDownloads": { "type": "integer" },
"fulfillment:downloadsUsed": { "type": "integer" },
"fulfillment:supportEmail": { "type": "string", "format": "email" },
"fulfillment:termsUrl": { "type": "string", "format": "uri" },
"fulfillment:attributionText": { "type": "string" }
}
}
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
{
"@context": {
"@version": 1.1,
"schema": "https://schema.org/",
"fulfillment": "https://beckn.org/schema/dataset-fulfillment#",
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"xsd": "http://www.w3.org/2001/XMLSchema#"
"rdfs": "http://www.w3.org/2000/01/rdf-schema#"
},
"@graph": [
{
"@id": "fulfillment:DatasetFulfillment",
"@type": "rdfs:Class",
"rdfs:label": "DatasetFulfillment",
"rdfs:comment": "Access provisioning details for a fulfilled dataset order.",
"rdfs:subClassOf": {
"@id": "schema:DataDownload"
}
},
{
"@id": "fulfillment:accessMethod",
"@type": "rdf:Property",
Expand Down Expand Up @@ -85,4 +74,3 @@
}
]
}

2 changes: 1 addition & 1 deletion specification/schema/DatasetFulfillment/v1.1/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# DatasetFulfillment — v1.1

Extends [v1](../v1/attributes.yaml) with `fulfillment:streamConnection` — a credential delivery object for streaming transport access methods (MQTT, Kafka, REST API, cloud data lake). Fully backward-compatible — all v1 fields remain.
Extends [v1.0](../v1.0/attributes.yaml) with `fulfillment:streamConnection` — a credential delivery object for streaming transport access methods (MQTT, Kafka, REST API, cloud data lake). Fully backward-compatible — all v1.0 fields remain.

## What's new in v1.1

Expand Down
102 changes: 44 additions & 58 deletions specification/schema/DatasetFulfillment/v1.1/context.jsonld
Original file line number Diff line number Diff line change
@@ -1,64 +1,50 @@
{
"@context": {
"@version": 1.1,
"schema": "https://schema.org/",
"fulfillment": "./vocab.jsonld#",
"@context": [
"https://schema.beckn.io/DatasetFulfillment/v1.0/context.jsonld",
{
"@version": 1.1,
"fulfillment:streamConnection": "fulfillment:streamConnection",
"fulfillment:credentialExpiresAt": "fulfillment:credentialExpiresAt",

"DatasetFulfillment": "fulfillment:DatasetFulfillment",
"fulfillment:brokerUri": "fulfillment:brokerUri",
"fulfillment:topic": "fulfillment:topic",
"fulfillment:qos": "fulfillment:qos",
"fulfillment:clientId": "fulfillment:clientId",
"fulfillment:username": "fulfillment:username",
"fulfillment:password": "fulfillment:password",
"fulfillment:tlsCaCert": "fulfillment:tlsCaCert",
"fulfillment:sessionExpiry": "fulfillment:sessionExpiry",

"fulfillment:accessMethod": "fulfillment:accessMethod",
"fulfillment:accessUrl": "fulfillment:accessUrl",
"fulfillment:accessStart": "fulfillment:accessStart",
"fulfillment:accessEnd": "fulfillment:accessEnd",
"fulfillment:format": "fulfillment:format",
"fulfillment:fileSizeBytes": "fulfillment:fileSizeBytes",
"fulfillment:maxDownloads": "fulfillment:maxDownloads",
"fulfillment:downloadsUsed": "fulfillment:downloadsUsed",
"fulfillment:supportEmail": "fulfillment:supportEmail",
"fulfillment:termsUrl": "fulfillment:termsUrl",
"fulfillment:attributionText": "fulfillment:attributionText",
"fulfillment:bootstrapServers": "fulfillment:bootstrapServers",
"fulfillment:topicName": "fulfillment:topicName",
"fulfillment:consumerGroupId": "fulfillment:consumerGroupId",
"fulfillment:saslMechanism": "fulfillment:saslMechanism",
"fulfillment:saslUsername": "fulfillment:saslUsername",
"fulfillment:saslPassword": "fulfillment:saslPassword",
"fulfillment:schemaRegistryUrl": "fulfillment:schemaRegistryUrl",
"fulfillment:schemaRegistryUsername": "fulfillment:schemaRegistryUsername",
"fulfillment:schemaRegistryPassword": "fulfillment:schemaRegistryPassword",
"fulfillment:startOffset": "fulfillment:startOffset",

"fulfillment:streamConnection": "fulfillment:streamConnection",
"fulfillment:credentialExpiresAt": "fulfillment:credentialExpiresAt",
"fulfillment:apiEndpoint": "fulfillment:apiEndpoint",
"fulfillment:apiDocUrl": "fulfillment:apiDocUrl",
"fulfillment:authScheme": "fulfillment:authScheme",
"fulfillment:bearerToken": "fulfillment:bearerToken",
"fulfillment:apiKey": "fulfillment:apiKey",
"fulfillment:rateLimitRpm": "fulfillment:rateLimitRpm",

"fulfillment:brokerUri": "fulfillment:brokerUri",
"fulfillment:topic": "fulfillment:topic",
"fulfillment:qos": "fulfillment:qos",
"fulfillment:clientId": "fulfillment:clientId",
"fulfillment:username": "fulfillment:username",
"fulfillment:password": "fulfillment:password",
"fulfillment:tlsCaCert": "fulfillment:tlsCaCert",
"fulfillment:sessionExpiry": "fulfillment:sessionExpiry",

"fulfillment:bootstrapServers": "fulfillment:bootstrapServers",
"fulfillment:topicName": "fulfillment:topicName",
"fulfillment:consumerGroupId": "fulfillment:consumerGroupId",
"fulfillment:saslMechanism": "fulfillment:saslMechanism",
"fulfillment:saslUsername": "fulfillment:saslUsername",
"fulfillment:saslPassword": "fulfillment:saslPassword",
"fulfillment:schemaRegistryUrl": "fulfillment:schemaRegistryUrl",
"fulfillment:schemaRegistryUsername": "fulfillment:schemaRegistryUsername",
"fulfillment:schemaRegistryPassword": "fulfillment:schemaRegistryPassword",
"fulfillment:startOffset": "fulfillment:startOffset",

"fulfillment:apiEndpoint": "fulfillment:apiEndpoint",
"fulfillment:apiDocUrl": "fulfillment:apiDocUrl",
"fulfillment:authScheme": "fulfillment:authScheme",
"fulfillment:bearerToken": "fulfillment:bearerToken",
"fulfillment:apiKey": "fulfillment:apiKey",
"fulfillment:rateLimitRpm": "fulfillment:rateLimitRpm",

"fulfillment:cloudProvider": "fulfillment:cloudProvider",
"fulfillment:accessType": "fulfillment:accessType",
"fulfillment:bucket": "fulfillment:bucket",
"fulfillment:storagePrefix": "fulfillment:storagePrefix",
"fulfillment:presignedUrl": "fulfillment:presignedUrl",
"fulfillment:accessKeyId": "fulfillment:accessKeyId",
"fulfillment:secretAccessKey": "fulfillment:secretAccessKey",
"fulfillment:sessionToken": "fulfillment:sessionToken",
"fulfillment:sasToken": "fulfillment:sasToken",
"fulfillment:storageRegion": "fulfillment:storageRegion",
"fulfillment:fileFormat": "fulfillment:fileFormat",
"fulfillment:partitionPattern": "fulfillment:partitionPattern"
}
"fulfillment:cloudProvider": "fulfillment:cloudProvider",
"fulfillment:accessType": "fulfillment:accessType",
"fulfillment:bucket": "fulfillment:bucket",
"fulfillment:storagePrefix": "fulfillment:storagePrefix",
"fulfillment:presignedUrl": "fulfillment:presignedUrl",
"fulfillment:accessKeyId": "fulfillment:accessKeyId",
"fulfillment:secretAccessKey": "fulfillment:secretAccessKey",
"fulfillment:sessionToken": "fulfillment:sessionToken",
"fulfillment:sasToken": "fulfillment:sasToken",
"fulfillment:storageRegion": "fulfillment:storageRegion",
"fulfillment:fileFormat": "fulfillment:fileFormat",
"fulfillment:partitionPattern": "fulfillment:partitionPattern"
}
]
}
Loading