Lifecycle scripts

List Lifecycle Scripts

get

Get all lifecycle scripts visible to user in a project

Authorizations
Query parameters
next_cursorany ofOptional
anyOptional
or
nullOptional
sort_bystring · enum | nullableOptionalPossible values:
sort_dirstring · enum | nullableOptionalPossible values:
projectstringRequired
limitinteger | nullableOptional
Responses
200
Successful Response
application/json
get
GET /v2/lifecycle-scripts HTTP/1.1
Host: api.mithril.ai
Authorization: Bearer fkey_<key>
Accept: */*
{
  "data": [
    {
      "fid": "text",
      "name": "text",
      "description": "text",
      "content_url": "https://example.com",
      "project": "proj_abc123456",
      "created_at": "2024-01-01T00:00:00Z",
      "created_by": "user_abc123456",
      "last_modified_at": "2024-01-01T00:00:00Z",
      "last_modified_by": "user_abc123456",
      "scope": "PROJECT"
    }
  ],
  "next_cursor": "text"
}

Create Lifecycle Script

post

Create a new lifecycle script

Authorizations
Body
projectstringRequiredExample: proj_abc123456
namestring · min: 1Required
contentstring · min: 1Required
descriptionstring | nullableOptionalDefault: ""
scopestring · enumOptionalDefault: PROJECTPossible values:
Responses
201
Successful Response
application/json
post
POST /v2/lifecycle-scripts HTTP/1.1
Host: api.mithril.ai
Authorization: Bearer fkey_<key>
Content-Type: application/json
Accept: */*
Content-Length: 94

{
  "project": "proj_abc123456",
  "name": "text",
  "content": "text",
  "description": "",
  "scope": "PROJECT"
}
{
  "fid": "text",
  "name": "text",
  "description": "text",
  "content_url": "https://example.com",
  "project": "proj_abc123456",
  "created_at": "2024-01-01T00:00:00Z",
  "created_by": "user_abc123456",
  "last_modified_at": "2024-01-01T00:00:00Z",
  "last_modified_by": "user_abc123456",
  "scope": "PROJECT"
}

Get Lifecycle Script Content

get
Authorizations
Path parameters
ls_fidstringRequired
Responses
200
Successful Response
application/json
Responseany
get
GET /v2/lifecycle-scripts/{ls_fid}/content HTTP/1.1
Host: api.mithril.ai
Authorization: Bearer fkey_<key>
Accept: */*

No content

Delete Lifecycle Script

delete
Authorizations
Path parameters
ls_fidstringRequired
Responses
204
Successful Response
delete
DELETE /v2/lifecycle-scripts/{ls_fid} HTTP/1.1
Host: api.mithril.ai
Authorization: Bearer fkey_<key>
Accept: */*

No content

Update Lifecycle Script

patch
Authorizations
Path parameters
ls_fidstringRequired
Body
namestring | nullableOptional
descriptionstring | nullableOptional
scopestring · enum | nullableOptionalPossible values:
Responses
200
Successful Response
application/json
patch
PATCH /v2/lifecycle-scripts/{ls_fid} HTTP/1.1
Host: api.mithril.ai
Authorization: Bearer fkey_<key>
Content-Type: application/json
Accept: */*
Content-Length: 54

{
  "name": "text",
  "description": "text",
  "scope": "PROJECT"
}
{
  "fid": "text",
  "name": "text",
  "description": "text",
  "content_url": "https://example.com",
  "project": "proj_abc123456",
  "created_at": "2024-01-01T00:00:00Z",
  "created_by": "user_abc123456",
  "last_modified_at": "2024-01-01T00:00:00Z",
  "last_modified_by": "user_abc123456",
  "scope": "PROJECT"
}