Knowledge Base
ObjectID dApp REST API Documentation
General Information
- Base URL: slserver.objectid.io (optoinal on premisis installation available)
- HTTP Method: POST
- Content-Type:
application/json
- Authentication: based on Ed25519 seed
Each endpoint triggers a Move smart contract execution on the IOTA Rebased network. All requests are stateless and self-contained.
controllerCap
, OIDcontrollerCap
, and creditToken
can be obtained through the dApp at https://dapp.objectid.io after successfully acquiring a Domain Linked Verifiable Credential (DLVC) and receiving credit tokens.
Endpoints
POST /create_object
Creates a new object on-chain.
Request Body:
seed
: stringnetwork
: stringcreditToken
: stringOIDcontrollerCap
: stringobject_type
: stringproduct_url
: stringdescription
: stringop_code
: stringimmutable_metadata
: objectmutable_metadata
: objectgeo_location
: string
Response:
jsonCopyEdit{
"success": true,
"txDigest": "0x...",
"newObjectId": "0x..."
}
On failure:
jsonCopyEdit{
"success": false,
"txDigest": "0x...",
"error": "Execution error message"
}
POST /update_object_mutable_metadata
Updates mutable metadata of an object.
Request Body:
seed
: stringnetwork
: stringcreditToken
: stringcontrollerCap
: stringobject
: stringnew_mutable_metadata
: string (JSON stringified)
Response:
jsonCopyEdit{
"success": true,
"txDigest": "0x..."
}
POST /update_owner_did
Updates the owner DID of an object.
Request Body:
seed
: stringnetwork
: stringcreditToken
: stringcontrollerCap
: stringobject
: stringnew_owner_did
: string
Response: as above.
POST /update_agent_did
Updates the agent DID of an object.
Request Body:
seed
: stringnetwork
: stringcreditToken
: stringcontrollerCap
: stringobject
: stringnew_agent_did
: string
Response: same as above.
POST /update_geo_location
Updates the geolocation field.
Request Body:
seed
: stringnetwork
: stringcreditToken
: stringcontrollerCap
: stringobject
: stringnew_location
: string
Response: same as above.
POST /delete_object
Deletes an existing object.
Request Body:
seed
: stringnetwork
: stringcreditToken
: stringcontrollerCap
: stringobject
: string
Response: same as above.
POST /create_event
Creates and links an event to an object.
Request Body:
seed
: stringnetwork
: stringcreditToken
: stringcontrollerCap
: stringobject
: stringevent_type
: stringimmutable_metadata
: stringmutable_metadata
: string
Response: same as above.
POST /update_event_mutable_metadata
Updates the mutable metadata of an event.
Request Body:
seed
: stringnetwork
: stringcreditToken
: stringcontrollerCap
: stringevent
: stringnew_mutable_metadata
: string
Response: same as above.
POST /delete_event
Deletes an event.
Request Body:
seed
: stringnetwork
: stringcreditToken
: stringcontrollerCap
: stringobject
: stringevent
: string
Response: same as above.
POST /create_counter
Creates a counter linked to an object.
Request Body:
seed
: stringnetwork
: stringcreditToken
: stringcontrollerCap
: stringobject
: stringvalue
: numberunit
: stringstep
: numberimmutable_metadata
: stringmutable_metadata
: string
Response: same as above.
POST /delete_counter
Deletes a counter.
Request Body:
seed
: stringnetwork
: stringcreditToken
: stringcontrollerCap
: stringobject
: stringcounter
: string
Response: same as above.
POST /counter_stepup
Increments the counter.
Request Body:
seed
: stringnetwork
: stringcreditToken
: stringcontrollerCap
: stringobject
: stringcounter
: string
Response: same as above.
POST /counter_stepdown
Decrements the counter.
Request Body:
seed
: stringnetwork
: stringcreditToken
: stringcontrollerCap
: stringobjectId
: stringcounter
: string
Response: same as above.
POST /counter_set_value
Sets a counter to a specific value.
Request Body:
seed
: stringnetwork
: stringcreditToken
: stringcontrollerCap
: stringobjectId
: stringcounter
: stringnew_value
: number
Response: same as above.
POST /get_object
Retrieves an object from the chain.
Request Body:
seed
: string (can be"000..."
placeholder)network
: stringobjectId
: string
Response:
jsonCopyEdit{
"success": true,
"objectData": {
// object structure
}
}
POST /get_objects
Retrieves a list of all known objects of a specific type (OIDObject
), using the configured package ID.
Request Body
Field | Type | Description |
---|---|---|
seed | string | Ed25519 seed (can be a placeholder like "000...000" ) |
network | string | IOTA network name (e.g., "testnet" ) |
after | string or null | Object ID cursor for pagination. If null , fetches the first page |
Response
jsonCopyEdit{
"success": true,
"objectsList": [
{
"node": {
"objectId": "0xabc...",
"type": "product",
"creator": "0x123...",
"owner_did": "did:iota:...",
"geo_location": "9C3X+5V Berlin",
...
},
"cursor": "0xabc..."
},
...
]
}
- The
cursor
field (inside eachObjectEdge
) can be used as theafter
parameter in the next request to retrieve the following page. - If
objectsList.length < pageSize
, then the end of the list has been reached.
Example Usage for Pagination
First request:
{
“seed”: “000…”,
“network”: “testnet”,
“after”: null
}
Response:
{
“success”: true,
“objectsList”: [
{ “node”: { … }, “cursor”: “0xabc…” },
…
]
}
Next request:
{
“seed”: “000…”,
“network”: “testnet”,
“after”: “0xabc…”
}
This pagination follows a cursor-based model (not offset-based), ensuring consistent traversal even as data changes.