Crowd.dev Member Affiliations API API
API endpoints for managing project affiliations, including listing and bulk updating affiliation relationships within a profile.
API endpoints for managing project affiliations, including listing and bulk updating affiliation relationships within a profile.
openapi: 3.0.3
info:
title: CDP → Akrites External Advisories Member Affiliations API API
version: 0.1.0
description: 'Read-only external API exposing CDP package security data to the Akrites service. Authenticated via Auth0 M2M client-credentials — CDP only verifies the resulting access token; the assertion exchange happens entirely between Akrites and Auth0.
Packages, Advisories and Contacts endpoints are implemented. Blast Radius is specced separately and not yet built.
TODO: scopes below (read:packages, read:stewardships) are the existing internal CDP UI scopes, reused here for now. Swap for a dedicated cdp:packages:read scope once Akrites gets its own Auth0 M2M scopes per the akrites-external draft contract.
'
servers:
- url: https://cm.lfx.dev/api/v1
description: Production
security:
- M2MBearer:
- read:packages
- read:stewardships
tags:
- name: Member Affiliations API
description: API endpoints for managing project affiliations, including listing and bulk updating affiliation relationships within a profile.
paths:
/member/{memberId}/affiliation:
get:
security:
- BearerAuth: []
tags:
- Member Affiliations API
summary: List Project Affiliations
description: Retrieve a list of project affiliations for a specific profile
parameters:
- name: memberId
in: path
required: true
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Affiliation'
'400':
description: Bad request
'404':
description: Member not found
patch:
security:
- BearerAuth: []
tags:
- Member Affiliations API
summary: Update Multiple Project Affiliations
description: Bulk update project affiliations for a specific profile
parameters:
- name: memberId
in: path
required: true
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- affiliations
properties:
affiliations:
type: array
items:
type: object
required:
- organizationId
- segmentId
properties:
organizationId:
type: string
description: Organization ID associated with this affiliation
segmentId:
type: string
description: ID of the segment
dateEnd:
type: string
format: date-time
description: End date of the affiliation
dateStart:
type: string
format: date-time
description: Start date of the affiliation
responses:
'200':
description: Affiliations updated successfully
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Affiliation'
'400':
description: Bad request
'404':
description: Member not found
components:
schemas:
Affiliation:
type: object
properties:
id:
type: string
example: 550e8400-e29b-41d4-a716-446655440000
description: Unique identifier for the affiliation
organizationId:
type: string
example: 550e8400-e29b-41d4-a716-446655440000
description: Organization ID associated with this affiliation
organizationLogo:
type: string
example: https://avatars.githubusercontent.com/u/1040002?v=4
description: URL of the organization's logo
organizationName:
type: string
example: The Linux Foundation
description: Name of the organization
segmentId:
type: string
example: 550e8400-e29b-41d4-a716-446655440000
description: ID of the segment
segmentName:
type: string
example: Kubernetes
description: Name of the segment
segmentParentName:
type: string
example: Cloud Native Computing Foundation
description: Name of the parent segment
segmentSlug:
type: string
example: kubernetes
description: Slug identifier for the segment
dateStart:
type: string
example: '2023-01-01T00:00:00.000Z'
format: date-time
description: Start date of the affiliation
dateEnd:
type: string
example: '2024-01-01T00:00:00.000Z'
format: date-time
description: End date of the affiliation
securitySchemes:
M2MBearer:
type: oauth2
description: 'Auth0 machine-to-machine client-credentials flow. Akrites exchanges its client ID/secret with Auth0 for a JWT and sends it as `Authorization: Bearer <token>`; CDP only verifies the resulting token.
'
flows:
clientCredentials:
tokenUrl: https://linuxfoundation.auth0.com/oauth/token
scopes:
read:packages: Read package detail
read:stewardships: Read package stewardship data
read:maintainer-roles: Read security contacts (interim scope for Contacts; see the Contacts tag)