اکتورها
اکتورها با حالت ماندگار، از هر کدام یک نمونه در یک زمان.
/v1/actors/configWhether actors are served#
available: whether actor namespaces can be made and their actors reached here; meters: the usage meters.
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- همهٔ نقشها
پاسخ
200object
availablebooleanmetersstring[]
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 500 | internal: an unexpected failure |
نمونه
curl "https://api.ibel.ai/v1/actors/config" \
-H "Authorization: Bearer $KEY"/v1/actors/namespacesThe team's actor namespaces#
Every project's namespaces by name, or one project's with project.
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- همهٔ نقشها
پارامترها
anyanyany
پاسخ
200object
namespacesActorNamespace[]idstringans_…namestringprojectobject | nullidstringnamestring
labelstringwhat the namespace is known by inside the platform (from its id)
classstringthe class its actors are instances of
functionobject | nullthe function or app whose code holds the class (another project's as
<project>/<name>); null while it is deletedidstringnamestringkindstringone of
function,app
bindingstringthe binding name the defining function gets it by (
env.<binding>)created_atstring (date-time)
next_cursorstring | nulllimitsobjectnamespacesintegerthe namespaces a team may hold
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | Bad request: bad_param, bad_cursor |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
نمونه
curl "https://api.ibel.ai/v1/actors/namespaces" \
-H "Authorization: Bearer $KEY"/v1/projects/{project}/actors/namespacesA project's actor namespaces#
The project's namespaces, by name.
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- همهٔ نقشها
پارامترها
anyanyany
پاسخ
200object
namespacesActorNamespace[]idstringans_…namestringprojectobject | nullidstringnamestring
labelstringwhat the namespace is known by inside the platform (from its id)
classstringthe class its actors are instances of
functionobject | nullthe function or app whose code holds the class (another project's as
<project>/<name>); null while it is deletedidstringnamestringkindstringone of
function,app
bindingstringthe binding name the defining function gets it by (
env.<binding>)created_atstring (date-time)
next_cursorstring | null
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | Bad request: bad_param, bad_cursor |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
نمونه
curl "https://api.ibel.ai/v1/projects/my-api/actors/namespaces" \
-H "Authorization: Bearer $KEY"/v1/projects/{project}/actors/namespacesCreate an actor namespace#
A namespace of the project: its actors are instances of class, exported by the code of function (a function or app of the project). That function gets the binding without a line; another function binds it with [[actor]].
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- مالک، ادمین، توسعهدهنده
پارامترها
any
بدنهٔ درخواستapplication/json
namestringالزامیlowercase letters, digits and single hyphens, 1 to 63 characters; unique in the project (any case)
classstringالزامیthe name of the class the function exports
pattern
^[A-Za-z_$][A-Za-z0-9_$]{0,127}$functionstringالزامیa function or app of the project, by name (any case) or id
پاسخ
201ActorNamespace
idstringans_…namestringprojectobject | nullidstringnamestring
labelstringwhat the namespace is known by inside the platform (from its id)
classstringthe class its actors are instances of
functionobject | nullthe function or app whose code holds the class (another project's as
<project>/<name>); null while it is deletedidstringnamestringkindstringone of
function,app
bindingstringthe binding name the defining function gets it by (
env.<binding>)created_atstring (date-time)storage_keptbooleantrue when a namespace of this name was deleted in the project within the grace (before its
storage_kept_until); its actors and their storage are this one's
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | Bad request: bad_json, bad_request, bad_name, bad_class, bad_function |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden, limit |
| 404 | Not found: not_found |
| 409 | Conflict: name_taken |
| 500 | internal: an unexpected failure |
| 503 | Unavailable: actors_unavailable |
نمونه
curl -X POST "https://api.ibel.ai/v1/projects/my-api/actors/namespaces" \
-H "Authorization: Bearer $KEY" \
-d '{"name":"my-api","class":"…","function":"…"}'/v1/projects/{project}/actors/namespaces/{name}One actor namespace#
The namespace, with the functions and apps whose live version binds it (bound_by).
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- همهٔ نقشها
پارامترها
anynamestringمسیرالزامیthe namespace's name in the project (any case) or its id (
ans_…)
پاسخ
200ActorNamespace
idstringans_…namestringprojectobject | nullidstringnamestring
labelstringwhat the namespace is known by inside the platform (from its id)
classstringthe class its actors are instances of
functionobject | nullthe function or app whose code holds the class (another project's as
<project>/<name>); null while it is deletedidstringnamestringkindstringone of
function,app
bindingstringthe binding name the defining function gets it by (
env.<binding>)created_atstring (date-time)bound_byobject[]idstringnamestringkindstringone of
function,app
availableboolean
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
نمونه
curl "https://api.ibel.ai/v1/projects/my-api/actors/namespaces/my-api" \
-H "Authorization: Bearer $KEY"/v1/projects/{project}/actors/namespaces/{name}Delete an actor namespace#
Its actors stop at once. Their storage is kept until storage_kept_until (about a day): a namespace created by the same name in the project before then gets its actors back with their storage (storage_kept: true); after that it is deleted and a new one starts empty. Refused while a live version binds it (409 bound).
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- مالک، ادمین، توسعهدهنده
- تایید دوم
- با نشست داشبورد، عامل دوم در ۱۰ دقیقهٔ اخیر لازم است؛ کلید API نیازی ندارد.
پارامترها
anynamestringمسیرالزامیthe namespace's name in the project (any case) or its id (
ans_…)
پاسخ
200object
idstringnamestringdeletedbooleanstorage_kept_untilstring (date-time)until when a namespace created by the same name in the project gets this one's actors and storage back
خطاها
| وضعیت | توضیح |
|---|---|
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden, step_up_required |
| 404 | Not found: not_found |
| 409 | Conflict: bound |
| 500 | internal: an unexpected failure |
نمونه
curl -X DELETE "https://api.ibel.ai/v1/projects/my-api/actors/namespaces/my-api" \
-H "Authorization: Bearer $KEY"/v1/projects/{project}/actors/namespaces/{name}Change an actor namespace#
Its class or its function. The actors keep their storage; the next call runs the new class or function.
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- مالک، ادمین، توسعهدهنده
پارامترها
anynamestringمسیرالزامیthe namespace's name in the project (any case) or its id (
ans_…)
بدنهٔ درخواستapplication/json
classstringpattern
^[A-Za-z_$][A-Za-z0-9_$]{0,127}$functionstringa function or app of the project, by name (any case) or id
پاسخ
200ActorNamespace
idstringans_…namestringprojectobject | nullidstringnamestring
labelstringwhat the namespace is known by inside the platform (from its id)
classstringthe class its actors are instances of
functionobject | nullthe function or app whose code holds the class (another project's as
<project>/<name>); null while it is deletedidstringnamestringkindstringone of
function,app
bindingstringthe binding name the defining function gets it by (
env.<binding>)created_atstring (date-time)
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | Bad request: bad_json, bad_class, bad_function, nothing |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | Not allowed: forbidden |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
نمونه
curl -X PATCH "https://api.ibel.ai/v1/projects/my-api/actors/namespaces/my-api" \
-H "Authorization: Bearer $KEY" \
-d '{"class":"…","function":"…"}'/v1/projects/{project}/actors/namespaces/{name}/usageAn actor namespace's usage#
Calls, run time, storage reads and writes per day (Tehran), and their cost at list price once the meters have prices (priced).
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- همهٔ نقشها
پارامترها
anynamestringمسیرالزامیthe namespace's name in the project (any case) or its id (
ans_…)daysintegerکوئریdays back
1–90 · default
30
پاسخ
200ActorUsage
projectobjectidstringnamestring
namespaceobjectidstringnamestring
daysintegerfromstring (date-time)tostring (date-time)requestsintegercpu_msintegerreadsintegerwritesintegerper_dayobject[]daystringrequestsintegercpu_msintegerreadsintegerwritesinteger
metersobject[]list_rialsintegerpricedbooleanfalse until the meters have prices (to set)
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | Bad request: bad_param |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
نمونه
curl "https://api.ibel.ai/v1/projects/my-api/actors/namespaces/my-api/usage" \
-H "Authorization: Bearer $KEY"/v1/projects/{project}/actors/namespaces/{name}/auditWho changed an actor namespace#
Its audit entries, newest first.
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- همهٔ نقشها
پارامترها
anynamestringمسیرالزامیthe namespace's name in the project (any case) or its id (
ans_…)beforestringکوئریonly entries older than this entry id
anyany
پاسخ
200ResourceAudit
entriesobject[]الزامیidstringالزامیatstring (date-time)الزامیactorstring | nullactionstringالزامیtargetstringالزامیdetailobjectwhat changed; never a value or a credential
nextstring | nullالزامیpass as ?before= for the next page
next_cursorstring | nullsend as
cursorfor the next page; null on the last page
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | Bad request: bad_param, bad_cursor |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
نمونه
curl "https://api.ibel.ai/v1/projects/my-api/actors/namespaces/my-api/audit" \
-H "Authorization: Bearer $KEY"/v1/projects/{project}/actors/usageA project's actor usage#
Every namespace of the project together, per day (Tehran).
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- همهٔ نقشها
پارامترها
anydaysintegerکوئریdays back
1–90 · default
30
پاسخ
200ActorUsage
projectobjectidstringnamestring
namespaceobjectidstringnamestring
daysintegerfromstring (date-time)tostring (date-time)requestsintegercpu_msintegerreadsintegerwritesintegerper_dayobject[]daystringrequestsintegercpu_msintegerreadsintegerwritesinteger
metersobject[]list_rialsintegerpricedbooleanfalse until the meters have prices (to set)
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | Bad request: bad_param |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | Not found: not_found |
| 500 | internal: an unexpected failure |
نمونه
curl "https://api.ibel.ai/v1/projects/my-api/actors/usage" \
-H "Authorization: Bearer $KEY"/v1/actors/usageThe team's actor usage#
Every namespace of every project together (the team view), or one project's with project, per day (Tehran). project in the answer is the project asked for, or null.
- دسترسی
- کلید API یا نشست داشبورد
- نقشها
- همهٔ نقشها
پارامترها
anydaysintegerکوئریhow many days back: 1 to 90 (default 30)
1–90 · default
30
پاسخ
200ActorUsage
projectobjectidstringnamestring
namespaceobjectidstringnamestring
daysintegerfromstring (date-time)tostring (date-time)requestsintegercpu_msintegerreadsintegerwritesintegerper_dayobject[]daystringrequestsintegercpu_msintegerreadsintegerwritesinteger
metersobject[]list_rialsintegerpricedbooleanfalse until the meters have prices (to set)
خطاها
| وضعیت | توضیح |
|---|---|
| 400 | Bad request: bad_param |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 404 | Not found: not_found (no such project) |
| 500 | internal: an unexpected failure |
نمونه
curl "https://api.ibel.ai/v1/actors/usage" \
-H "Authorization: Bearer $KEY"