Golioth Cohorts API

The Cohorts API from Golioth — 2 operation(s) for cohorts.

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

golioth-cohorts-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Golioth Management Access Cohorts API
  version: '1.0'
  description: 'Golioth IoT Device Management REST API. Authenticate with project-scoped API keys passed in the x-api-key header. Upstream OpenAPI: https://api.golioth.io/openapi.json'
servers:
- url: https://api.golioth.io
security:
- API Key: []
  Bearer: []
tags:
- name: Cohorts
paths:
  /v1/organizations/{organizationId}/projects/{projectId}/cohorts:
    get:
      operationId: Cohorts_List
      parameters:
      - in: path
        name: organizationId
        required: true
        schema:
          type: string
      - in: path
        name: projectId
        required: true
        schema:
          type: string
      - in: query
        name: page
        schema:
          format: int64
          type: integer
      - in: query
        name: perPage
        schema:
          format: int64
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/goliothListCohortResponse'
          description: A successful response.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
          description: An unexpected error response.
      tags:
      - Cohorts
    post:
      operationId: Cohorts_Create
      parameters:
      - in: path
        name: organizationId
        required: true
        schema:
          type: string
      - in: path
        name: projectId
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/goliothCohortsCreateBody'
        required: true
        x-originalParamName: body
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/goliothCreateCohortResponse'
          description: A successful response.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
          description: An unexpected error response.
      tags:
      - Cohorts
  /v1/organizations/{organizationId}/projects/{projectId}/cohorts/{cohortId}:
    delete:
      operationId: Cohorts_Delete
      parameters:
      - in: path
        name: organizationId
        required: true
        schema:
          type: string
      - in: path
        name: projectId
        required: true
        schema:
          type: string
      - in: path
        name: cohortId
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/goliothDeleteCohortResponse'
          description: A successful response.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
          description: An unexpected error response.
      tags:
      - Cohorts
    get:
      operationId: Cohorts_Get
      parameters:
      - in: path
        name: organizationId
        required: true
        schema:
          type: string
      - in: path
        name: projectId
        required: true
        schema:
          type: string
      - in: path
        name: cohortId
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/goliothGetCohortResponse'
          description: A successful response.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
          description: An unexpected error response.
      tags:
      - Cohorts
    put:
      operationId: Cohorts_Update
      parameters:
      - in: path
        name: organizationId
        required: true
        schema:
          type: string
      - in: path
        name: projectId
        required: true
        schema:
          type: string
      - in: path
        name: cohortId
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/goliothCohortUpdate'
        required: true
        x-originalParamName: update
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/goliothUpdateCohortResponse'
          description: A successful response.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
          description: An unexpected error response.
      tags:
      - Cohorts
components:
  schemas:
    goliothListCohortResponse:
      properties:
        list:
          items:
            $ref: '#/components/schemas/goliothCohort'
          type: array
        page:
          format: int64
          type: integer
        perPage:
          format: int64
          type: integer
        total:
          format: int64
          type: integer
      type: object
    protobufAny:
      additionalProperties: {}
      properties:
        '@type':
          type: string
      type: object
    goliothCohortsCreateBody:
      properties:
        name:
          type: string
      type: object
    goliothCreateCohortResponse:
      properties:
        data:
          $ref: '#/components/schemas/goliothCohort'
      type: object
    goliothUpdateCohortResponse:
      properties:
        data:
          $ref: '#/components/schemas/goliothCohort'
      type: object
    goliothGetCohortResponse:
      properties:
        data:
          $ref: '#/components/schemas/goliothCohort'
      type: object
    goliothDeleteCohortResponse:
      type: object
    goliothCohort:
      properties:
        activeDeploymentId:
          type: string
        cohortId:
          type: string
        createdAt:
          format: date-time
          type: string
        deviceCount:
          format: int64
          type: integer
        name:
          type: string
        updatedAt:
          format: date-time
          type: string
      type: object
    goliothCohortUpdate:
      properties:
        name:
          type: string
      type: object
    rpcStatus:
      properties:
        code:
          format: int32
          type: integer
        details:
          items:
            $ref: '#/components/schemas/protobufAny'
          type: array
        message:
          type: string
      type: object
  securitySchemes:
    API Key:
      in: header
      name: x-api-key
      type: apiKey
    Bearer:
      in: header
      name: Authorization
      type: apiKey
externalDocs:
  description: golioth API
  url: https://docs.golioth.io