Skip to content

adobe/spacecat-api-service

SpaceCat API Service

Provides an HTTP API to interact with SpaceCat data

HTTP API Doc

https://opensource.adobe.com/spacecat-api-service/

Installation

$ npm install @adobe/spacecat-api-service

Usage

See the API documentation.

Development

To set up local development for spacecat-api-service, follow these steps:

  1. Create an .env file in your project root and define the following environment variables with your AWS credentials:
AWS_REGION=your_aws_region
AWS_ACCESS_KEY_ID=your_access_key_id
AWS_SECRET_ACCESS_KEY=your_secret_access_key
  1. Start the development server
npm start

Build

$ npm install

Test

$ npm test

Lint

$ npm run lint

Message Body Formats

Spacecat-api-service queues audit jobs to AUDIT_JOBS_QUEUE to be processed later on.

Output message body format sent to AUDIT_JOBS_QUEUE is:

{
  "type": "string",
  "url": "string",
  "auditContext": "object|optional"
}

Currently, only slackContext property exist in the auditContext:

{
  "slackContext": {
    "channel": "string",
    "thread_ts": "string|optional"
  }
}

Required ENV Variables

Currently, audit worker requires two env variables:

AUDIT_JOBS_QUEUE_URL=url of the queue to send audit jobs to
AUDIT_REPORT_SLACK_CHANNEL_ID=slack channel id to send the audit reports to
RUM_DOMAIN_KEY=global domain key for the rum api
SLACK_BOT_TOKEN=slack bot's token,

Fulfillment worker requires the following env variable:

FULFILLMENT_EVENTS_QUEUE_URL=url of the queue to send fulfillment events to

Organizations controller requires the following env variable:

SLACK_URL_WORKSPACE_EXTERNAL=url of the external Slack workspace, used to generate the Slack channel url

Slack controller requires the following env variables:

IMS_CLIENT_ID=client id for the IMS API
IMS_HOST=host for the IMS API
IMS_CLIENT_CODE=client code for the IMS API
IMS_CLIENT_SECRET=client secret for the IMS API

SLACK_TOKEN_WORKSPACE_EXTERNAL_ELEVATED=Slack token for the external workspace, elevated permissions
SLACK_OPS_CHANNEL_WORKSPACE_EXTERNAL=channel ID to use for operations messages in the external workspace

About

Edge Delivery services experience success as a service automation: SpaceCat + Star Catalogue

Resources

License

Apache-2.0, Apache-2.0 licenses found

Licenses found

Apache-2.0
LICENSE
Apache-2.0
LICENSE.txt

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published