Script JSON
GET /scripts/:script_hash/json
Authorization
name: project_idtype: apiKeyin: headerdescription: There are multiple token types available based on network you choose when creating a Blockfrost a project, for a list of token types see available networks.
JSON representation of a timelock
script
Request
Path Parameters
script_hash string required
Hash of the script
Example: e1457a0c47dfb7a2f6b8fbb059bdceab163c05d34f195b87b9f2b30e
Responses
- 200
- 400
- 403
- 404
- 418
- 429
- 500
Return the JSON representation of a timelock
script
application/json
Schema
Example (from schema)
Schema
json objectrequired
{
"json": {
"type": "atLeast",
"scripts": [
{
"type": "sig",
"keyHash": "654891a4db2ea44b5263f4079a33efa0358ba90769e3d8f86a4a0f81"
},
{
"type": "sig",
"keyHash": "8685ad48f9bebb8fdb6447abbe140645e0bf743ff98da62e63e2147f"
},
{
"type": "sig",
"keyHash": "cb0f3b3f91693374ff7ce1d473cf6e721c7bab52b0737f04164e5a2d"
}
],
"required": 2
}
}
Bad request
application/json
Schema
Example (from schema)
Schema
status_code integer required
error string required
message string required
{
"status_code": 400,
"error": "Bad Request",
"message": "Backend did not understand your request."
}
Authentication secret is missing or invalid
application/json
Schema
Example (from schema)
Schema
status_code integer required
error string required
message string required
{
"status_code": 403,
"error": "Forbidden",
"message": "Invalid project token."
}
Component not found
application/json
Schema
Example (from schema)
Schema
status_code integer required
error string required
message string required
{
"status_code": 404,
"error": "Not Found",
"message": "The requested component has not been found."
}
IP has been auto-banned for extensive sending of requests after usage limit has been reached
application/json
Schema
Example (from schema)
Schema
status_code integer required
error string required
message string required
{
"status_code": 418,
"error": "Requested Banned",
"message": "IP has been auto-banned for flooding."
}
Usage limit reached
application/json
Schema
Example (from schema)
Schema
status_code integer required
error string required
message string required
{
"status_code": 429,
"error": "Project Over Limit",
"message": "Usage is over limit."
}
Internal Server Error
application/json
Schema
Example (from schema)
Schema
status_code integer required
error string required
message string required
{
"status_code": 500,
"error": "Internal Server Error",
"message": "An unexpected response was received from the backend."
}
GET /scripts/:script_hash/json
Authorization
name: project_idtype: apiKeyin: headerdescription: There are multiple token types available based on network you choose when creating a Blockfrost a project, for a list of token types see available networks.
Request
Request
curl / cURL
curl -L -X GET 'https://cardano-mainnet.blockfrost.io/api/v0/scripts/:script_hash/json' \
-H 'Accept: application/json' \
-H 'project_id: <API_KEY_VALUE>'
python / requests
curl -L -X GET 'https://cardano-mainnet.blockfrost.io/api/v0/scripts/:script_hash/json' \
-H 'Accept: application/json' \
-H 'project_id: <API_KEY_VALUE>'
go / native
curl -L -X GET 'https://cardano-mainnet.blockfrost.io/api/v0/scripts/:script_hash/json' \
-H 'Accept: application/json' \
-H 'project_id: <API_KEY_VALUE>'
nodejs / axios
curl -L -X GET 'https://cardano-mainnet.blockfrost.io/api/v0/scripts/:script_hash/json' \
-H 'Accept: application/json' \
-H 'project_id: <API_KEY_VALUE>'
ruby / Net::HTTP
curl -L -X GET 'https://cardano-mainnet.blockfrost.io/api/v0/scripts/:script_hash/json' \
-H 'Accept: application/json' \
-H 'project_id: <API_KEY_VALUE>'
csharp / RestSharp
curl -L -X GET 'https://cardano-mainnet.blockfrost.io/api/v0/scripts/:script_hash/json' \
-H 'Accept: application/json' \
-H 'project_id: <API_KEY_VALUE>'
php / cURL
curl -L -X GET 'https://cardano-mainnet.blockfrost.io/api/v0/scripts/:script_hash/json' \
-H 'Accept: application/json' \
-H 'project_id: <API_KEY_VALUE>'
java / OkHttp
curl -L -X GET 'https://cardano-mainnet.blockfrost.io/api/v0/scripts/:script_hash/json' \
-H 'Accept: application/json' \
-H 'project_id: <API_KEY_VALUE>'
powershell / RestMethod
curl -L -X GET 'https://cardano-mainnet.blockfrost.io/api/v0/scripts/:script_hash/json' \
-H 'Accept: application/json' \
-H 'project_id: <API_KEY_VALUE>'