Skip to content

Commit

Permalink
add api in yaml format #ausdigital-dcp/12
Browse files Browse the repository at this point in the history
  • Loading branch information
kshychko committed Mar 20, 2017
1 parent b1bd639 commit 7a4ea95
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions docs/1.0/api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
swagger: '2.0'
info:
version: "1.0"
title: Digital Capability Locator (DCL) interface specification
description: |
The "Digital Capability Lookup" (DCL) specification defines a DNS based method to discover which DCP(SMP) is the authoritative source for a given business

API uses JWT authorization, JWT issuer must be added to whitelist on DCL implementation. It's passed as a header `Authorization: JWT XXX`, where XXX value provided by your IDP.

host: "dcp.testpoint.io"
schemes:
- "https"
# will be prefixed to all paths
basePath: "/api/v0"
produces:
- "application/json"
parameters:
participantIdUrlParameter:
name: participant_id
in: path
description: string representation
required: true
type: string
default: "urn:oasis:names:tc:ebcore:partyid-type:iso6523:0151::22341388307"
paths:
/demo_auth/:
get:
tags:
- "auth"
summary: "Get base user information with authentication enabled"
description: "Check if OIDC JWT token is correct"
operationId: "DemoAuth"
responses:
"200":
description: "The JWT is correct"
"401":
description: "Wrong auth parameters"

/dcl/{participant_id}:
put:
tags:
- "DCL"
summary: Update DCP value
description: Updates DNS NAPTR record with new DCP value for given business/participant
operationId: DclPut
parameters:
- $ref: "#/parameters/participantIdUrlParameter"
- description: New DCP info
in: body
name: body
required: true
schema:
properties:
dcp:
description: "new DCP hostname (for example, dcp.testpoint.io)"
type: "string"
format: string
responses:
"200":
description: Success
"401":
description: Wrong Auth Header
"404":
description: Participant Not found
"500":
description: Internal server error

0 comments on commit 7a4ea95

Please sign in to comment.