Skip to content

Latest commit

 

History

History
242 lines (163 loc) · 7.11 KB

File metadata and controls

242 lines (163 loc) · 7.11 KB

AnnouncementsApi

All URIs are relative to https://app.launchdarkly.com

Method HTTP request Description
createAnnouncementPublic POST /api/v2/announcements Create an announcement
deleteAnnouncementPublic DELETE /api/v2/announcements/{announcementId} Delete an announcement
getAnnouncementsPublic GET /api/v2/announcements Get announcements
updateAnnouncementPublic PATCH /api/v2/announcements/{announcementId} Update an announcement

createAnnouncementPublic

AnnouncementResponse createAnnouncementPublic(createAnnouncementBody)

Create an announcement

Example

import {
    AnnouncementsApi,
    Configuration,
    CreateAnnouncementBody
} from 'launchdarkly-api-typescript';

const configuration = new Configuration();
const apiInstance = new AnnouncementsApi(configuration);

let createAnnouncementBody: CreateAnnouncementBody; //Announcement request body

const { status, data } = await apiInstance.createAnnouncementPublic(
    createAnnouncementBody
);

Parameters

Name Type Description Notes
createAnnouncementBody CreateAnnouncementBody Announcement request body

Return type

AnnouncementResponse

Authorization

ApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 Created announcement -
400 Bad request -
403 Forbidden -
404 Not found -
409 Conflict -
500 Internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteAnnouncementPublic

deleteAnnouncementPublic()

Delete an announcement

Example

import {
    AnnouncementsApi,
    Configuration
} from 'launchdarkly-api-typescript';

const configuration = new Configuration();
const apiInstance = new AnnouncementsApi(configuration);

let announcementId: string; // (default to undefined)

const { status, data } = await apiInstance.deleteAnnouncementPublic(
    announcementId
);

Parameters

Name Type Description Notes
announcementId [string] defaults to undefined

Return type

void (empty response body)

Authorization

ApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
204 No content -
404 Not found -
500 Internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getAnnouncementsPublic

GetAnnouncementsPublic200Response getAnnouncementsPublic()

Get announcements

Example

import {
    AnnouncementsApi,
    Configuration
} from 'launchdarkly-api-typescript';

const configuration = new Configuration();
const apiInstance = new AnnouncementsApi(configuration);

let status: 'active' | 'inactive' | 'scheduled'; //Filter announcements by status. (optional) (default to undefined)
let limit: number; //The number of announcements to return. (optional) (default to undefined)
let offset: number; //Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. (optional) (default to undefined)

const { status, data } = await apiInstance.getAnnouncementsPublic(
    status,
    limit,
    offset
);

Parameters

Name Type Description Notes
status [**'active' 'inactive' 'scheduled'**]Array<'active' | 'inactive' | 'scheduled'>
limit [number] The number of announcements to return. (optional) defaults to undefined
offset [number] Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. (optional) defaults to undefined

Return type

GetAnnouncementsPublic200Response

Authorization

ApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Announcement response -
400 Bad request -
403 Forbidden -
404 Not found -
429 Rate limit exceeded -
500 Internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateAnnouncementPublic

AnnouncementResponse updateAnnouncementPublic(announcementPatchOperation)

Update an announcement

Example

import {
    AnnouncementsApi,
    Configuration
} from 'launchdarkly-api-typescript';

const configuration = new Configuration();
const apiInstance = new AnnouncementsApi(configuration);

let announcementId: string; // (default to undefined)
let announcementPatchOperation: Array<AnnouncementPatchOperation>; //Update announcement request body

const { status, data } = await apiInstance.updateAnnouncementPublic(
    announcementId,
    announcementPatchOperation
);

Parameters

Name Type Description Notes
announcementPatchOperation Array Update announcement request body
announcementId [string] defaults to undefined

Return type

AnnouncementResponse

Authorization

ApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Updated announcement -
400 Bad request -
403 Forbidden -
404 Not found -
409 Conflict -
500 Internal server error -

[Back to top] [Back to API list] [Back to Model list] [Back to README]