Common Operations
Register an Invoker
Steps to perform operation
- Create public and private key at invoker
-
Register of Invoker at CCF:
- Send POST to http://{CAPIF_HOSTNAME}:{CAPIF_HTTP_PORT}/register
- Body invoker register body
-
Obtain Access Token:
- Send POST to http://{CAPIF_HOSTNAME}/getauth
- Body invoker getauth body
-
Onboard Invoker:
* Send POST to https://{CAPIF_HOSTNAME}/api-invoker-management/v1/onboardedInvokers * Reference Request Body: invoker onboarding body * "onboardingInformation"->"apiInvokerPublicKey": must contain public key generated by Invoker. * Send at Authorization Header the Bearer access_token obtained previously (Authorization:Bearer ${access_token})
Checks to ensure onboarding
-
Response to Register:
- 201 Created
-
Response to Get Auth:
- 200 OK
- access_token returned.
-
Response to Onboard request must accomplish:
- 201 Created
- Response Body must follow APIInvokerEnrolmentDetails data structure with:
- apiInvokerId
- onboardingInformation->apiInvokerCertificate must contain the public key signed.
- Response Header Location must be received with URI to new resource created, following this structure: {apiRoot}/api-invoker-management/{apiVersion}/onboardedInvokers/{onboardingId}
Register a Provider
Steps to Perform operation
- Create public and private key at provider for provider itself and each function (apf, aef and amf)
-
Register of Provider at CCF:
- Send POST to http://{CAPIF_HOSTNAME}:{CAPIF_HTTP_PORT}/register
- body provider register body
-
Obtain Access Token:
- Send POST to http://{CAPIF_HOSTNAME}/getauth
- Body provider getauth body
-
Register Provider:
- Send POST https://{CAPIF_HOSTNAME}/api-provider-management/v1/registrations
- body provider request body
- Send at Authorization Header the Bearer access_token obtained previously (Authorization:Bearer ${access_token})
- Store each cert in a file with according name.
Checks to ensure provider registration
-
Response to Register:
- 201 Created
-
Response to Get Auth:
- 200 OK
- access_token returned.
-
Register Provider at Provider Management:
- 201 Created response.
- body returned must accomplish APIProviderEnrolmentDetails data structure.
- For each apiProvFuncs, we must check:
- apiProvFuncId is set
- apiProvCert under regInfo is set properly
- Location Header must contain the new resource URL {apiRoot}/api-provider-management/v1/registrations/{registrationId}