Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Build Status


The /Status endpoint for each Build lets you retrieve the status of that Build. We recommend using this endpoint to poll for the status, rather than the /Builds endpoint.


BuildStatus Properties

buildstatus-properties page anchor
Resource properties
sidtype: SID<ZB>Not PII

The unique string that we created to identify the Build resource.


service_sidtype: SID<ZS>Not PII

The SID of the Service that the Build resource is associated with.


statustype: enum<STRING>Not PII

The status of the Build. Can be: building, completed, or failed.

Possible values:
buildingcompletedfailed

urltype: string<URI>Not PII

The absolute URL of the Build Status resource.


Fetch a BuildStatus resource

fetch-a-buildstatus-resource page anchor
GET https://serverless.twilio.com/v1/Services/{ServiceSid}/Builds/{Sid}/Status

Parameters

fetch-parameters page anchor
URI parameters
ServiceSidtype: stringNot PII
Path Parameter

The SID of the Service to fetch the Build resource from.


Sidtype: SID<ZB>Not PII
Path Parameter

The SID of the Build resource to fetch.

Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_12
// Download the helper library from https://www.twilio.com/docs/node/install
_12
// Find your Account SID and Auth Token at twilio.com/console
_12
// and set the environment variables. See http://twil.io/secure
_12
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_12
const authToken = process.env.TWILIO_AUTH_TOKEN;
_12
const client = require('twilio')(accountSid, authToken);
_12
_12
client.serverless.v1.services('ZSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_12
.builds('ZBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
_12
.buildStatus()
_12
.fetch()
_12
.then(build_status => console.log(build_status.sid));

Output

_10
{
_10
"sid": "ZBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"service_sid": "ZSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"status": "completed",
_10
"url": "https://serverless.twilio.com/v1/Services/ZSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Builds/ZB00000000000000000000000000000000/Status"
_10
}


Rate this page: