EndpointsPlay Modules

Complete a play module upload

POST/v2/play_modules/upload/complete

Validates an uploaded WebAssembly module and records an immutable version. The play module must already be registered; matching content and associations return the existing version.

Authorization

BearerAuth
AuthorizationBearer <token>

Bearer token issued by Softmax

In: header

Request Body

application/json

Uploaded module metadata and associations.

name*Name

Registered play module name.

Match^[a-z][a-z0-9_]{0,31}$
Length1 <= length <= 32
content_hash*Content Hash

SHA-256 digest of the uploaded module.

Match^[0-9a-f]{64}$
player_id?|

Player associated with this version, if any.

policy_version_id?|

Policy version whose playbook includes this module, if any.

curl -X POST "https://softmax.com/api/observatory/v2/play_modules/upload/complete" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "content_hash": "string"  }'
{  "version": {    "id": "string",    "play_module_id": "string",    "name": "string",    "version": 0,    "content_hash": "string",    "size_bytes": 0,    "contract_version": "string",    "manifest": {},    "player_id": "string",    "policy_version_id": "7cd41427-f4be-4006-ab17-5ead7f8f8446",    "created_at": "2019-08-24T14:15:22Z"  }}