Lifecycle scripts

List Lifecycle Scripts

get

Get all lifecycle scripts visible to user in a project

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
next_cursorany | nullableOptional
sort_bystring · enum | nullableOptionalPossible values:
sort_dirstring · enum | nullableOptionalPossible values:
projectstringRequired
limitinteger | nullableOptional
Responses
200

Successful Response

application/json
get
/v2/lifecycle-scripts
GET /v2/lifecycle-scripts?project=text HTTP/1.1
Host: api.mithril.ai
Authorization: Bearer YOUR_SECRET_TOKEN
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
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
projectstringRequiredExample: proj_abc123456
namestring · min: 1Required
contentstring · min: 1Required
descriptionstring | nullableOptional
scopestring · enumOptionalDefault: PROJECTPossible values:
Responses
post
/v2/lifecycle-scripts
POST /v2/lifecycle-scripts HTTP/1.1
Host: api.mithril.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 98

{
  "project": "proj_abc123456",
  "name": "text",
  "content": "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"
}

Get Lifecycle Script Content

get
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
ls_fidstringRequired
Responses
200

Successful Response

application/json
Responseany
get
/v2/lifecycle-scripts/{ls_fid}/content
GET /v2/lifecycle-scripts/{ls_fid}/content HTTP/1.1
Host: api.mithril.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Delete Lifecycle Script

delete
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
ls_fidstringRequired
Responses
delete
/v2/lifecycle-scripts/{ls_fid}
DELETE /v2/lifecycle-scripts/{ls_fid} HTTP/1.1
Host: api.mithril.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Update Lifecycle Script

patch
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
ls_fidstringRequired
Body
namestring | nullableOptional
descriptionstring | nullableOptional
scopestring · enum | nullableOptionalPossible values:
Responses
200

Successful Response

application/json
patch
/v2/lifecycle-scripts/{ls_fid}
PATCH /v2/lifecycle-scripts/{ls_fid} HTTP/1.1
Host: api.mithril.ai
Authorization: Bearer YOUR_SECRET_TOKEN
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"
}

Last updated