ThingSpeak · Arazzo Workflow

ThingSpeak Decommission Channel

Version 1.0.0

Clear all feed entries from a channel, then delete the channel itself.

1 workflow 1 source API 1 provider
View Spec View on GitHub IoTInternet of ThingsAnalyticsTime SeriesMQTTMATLABSensorsTelemetryArazzoWorkflows

Provider

thingspeak

Workflows

decommission-channel
Clear a channel's feed and then delete the channel.
Clears all entries from the channel feed, then deletes the channel using the user API key.
2 steps inputs: channelId, userApiKey outputs: clearStatus, deleteStatus
1
clearChannelFeed
clearChannelFeed
Delete all feed entries from the channel before removing it.
2
deleteChannel
deleteChannel
Delete the now-empty channel.

Source API Descriptions

Arazzo Workflow Specification

thingspeak-decommission-channel-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: ThingSpeak Decommission Channel
  summary: Clear all feed entries from a channel, then delete the channel itself.
  description: >-
    The teardown flow for retiring an IoT channel. It first clears every feed entry
    from the channel so no stored data lingers, then deletes the channel itself.
    Both operations require the User API Key on the THINGSPEAKAPIKEY header. Every
    step spells out its request inline so the flow can be read and executed without
    opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: channelsApi
  url: ../openapi/thingspeak-channels-api-openapi.yml
  type: openapi
workflows:
- workflowId: decommission-channel
  summary: Clear a channel's feed and then delete the channel.
  description: >-
    Clears all entries from the channel feed, then deletes the channel using the
    user API key.
  inputs:
    type: object
    required:
    - userApiKey
    - channelId
    properties:
      userApiKey:
        type: string
        description: User API Key sent on the THINGSPEAKAPIKEY header.
      channelId:
        type: integer
        description: Numeric id of the channel to clear and delete.
  steps:
  - stepId: clearChannelFeed
    description: >-
      Delete all feed entries from the channel before removing it.
    operationId: clearChannelFeed
    parameters:
    - name: channel_id
      in: path
      value: $inputs.channelId
    - name: THINGSPEAKAPIKEY
      in: header
      value: $inputs.userApiKey
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      clearStatus: $statusCode
  - stepId: deleteChannel
    description: >-
      Delete the now-empty channel.
    operationId: deleteChannel
    parameters:
    - name: channel_id
      in: path
      value: $inputs.channelId
    - name: THINGSPEAKAPIKEY
      in: header
      value: $inputs.userApiKey
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      deleteStatus: $statusCode
  outputs:
    clearStatus: $steps.clearChannelFeed.outputs.clearStatus
    deleteStatus: $steps.deleteChannel.outputs.deleteStatus