Claim Hooks
This route creates a claim hook. Claim hooks are an atomic action that will be performed when a boost is claimed
Authorizations
Body
hookone ofRequired
or
Responses
200
Successful response
application/json
Responsestring
400
Invalid input data
application/json
401
Authorization not provided
application/json
403
Insufficient access
application/json
500
Internal server error
application/json
post
POST /api/claim-hook/create HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 390
{
"hook": {
"type": "GRANT_PERMISSIONS",
"data": {
"claimUri": "text",
"targetUri": "text",
"permissions": {
"role": "text",
"canEdit": true,
"canIssue": true,
"canRevoke": true,
"canManagePermissions": true,
"canIssueChildren": "text",
"canCreateChildren": "text",
"canEditChildren": "text",
"canRevokeChildren": "text",
"canManageChildrenPermissions": "text",
"canManageChildrenProfiles": false,
"canViewAnalytics": true
}
}
}
}
text
This route gets claim hooks attached to a given boost
Authorizations
Body
limitnumberOptionalDefault:
25
cursorstringOptional
sortstringOptional
uristringRequired
Responses
200
Successful response
application/json
400
Invalid input data
application/json
401
Authorization not provided
application/json
403
Insufficient access
application/json
500
Internal server error
application/json
post
POST /api/claim-hook/get HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 431
{
"limit": 25,
"cursor": "text",
"sort": "text",
"query": {
"type": "text",
"data": {
"claimUri": "text",
"targetUri": "text",
"permissions": {
"role": "text",
"canEdit": true,
"canIssue": true,
"canRevoke": true,
"canManagePermissions": true,
"canIssueChildren": "text",
"canCreateChildren": "text",
"canEditChildren": "text",
"canRevokeChildren": "text",
"canManageChildrenPermissions": "text",
"canManageChildrenProfiles": true,
"canViewAnalytics": true
}
}
},
"uri": "text"
}
{
"cursor": "text",
"hasMore": true,
"records": [
{
"id": "text",
"createdAt": "text",
"updatedAt": "text",
"type": "GRANT_PERMISSIONS",
"data": {
"claimUri": "text",
"targetUri": "text",
"permissions": {
"role": "text",
"canEdit": true,
"canIssue": true,
"canRevoke": true,
"canManagePermissions": true,
"canIssueChildren": "text",
"canCreateChildren": "text",
"canEditChildren": "text",
"canRevokeChildren": "text",
"canManageChildrenPermissions": "text",
"canManageChildrenProfiles": false,
"canViewAnalytics": true
}
}
}
]
}
This route deletes a claim hook
Authorizations
Body
idstringRequired
Responses
200
Successful response
application/json
Responseboolean
400
Invalid input data
application/json
401
Authorization not provided
application/json
403
Insufficient access
application/json
500
Internal server error
application/json
post
POST /api/claim-hook/update HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 13
{
"id": "text"
}
true
Was this helpful?