Post Metadata
Introduction
This API is responsible for posting metadata for a given Consumer ID. Here, users can post metadata under global namespace as well as API specific namespace. If partial metadata are present for a particualar API, then global namespace serves as the fallback config provider for the remaining metadata.
cURL
curl --location 'https://api.signzy.app/api/v3/metahub/post-metadata' \
--header 'Authorization: <Access-Token>' \
--header 'Content-Type: application/json' \
--data '{
"consumerId": "consumer123",
"global": {
"callbacks": [
{
"url": "https://client-global-callback.url",
"authType": "key-auth",
"headers": [
{
"key": "Authorization",
"value": "QWERTYUIOP"
}
]
}
]
},
"apis": [
{
"apiName": "/gstr-analytics/create-request",
"metadata": {
"callbacks": [
{
"url": "https://client-api-specific-callback.url",
"authType": "key-auth",
"headers": [
{
"key": "Authorization",
"value": "ZXCVBNM"
}
]
}
]
}
}
]
}'Request Headers
Key | Value |
|---|---|
Authorization | shared by Signzy |
Content-type | application/json |
Request Body
{
"consumerId": "consumer123",
"global": {
"callbacks": [
{
"url": "https://client-global-callback.url",
"authType": "key-auth",
"headers": [
{
"key": "Authorization",
"value": "QWERTYUIOP"
}
]
}
]
},
"apis": [
{
"apiName": "/gstr-analytics/create-request",
"metadata": {
"callbacks": [
{
"url": "https://client-api-specific-callback.url",
"authType": "key-auth",
"headers": [
{
"key": "Authorization",
"value": "QWERTYUIOP"
}
]
}
]
}
}
]
}PARAMETERS | DESCRIPTION | TYPE | VALUE (COMPULSORY OR OPTIONAL) |
|---|---|---|---|
consumerId | A unique id shared by Signzy during onboarding of the client | String | COMPULSORY |
global | Fallback metadata config | Object | COMPULSORY |
apis | API specific metadata config | List of Object | OPTIONAL |
apiName | Name of the API | String | COMPULSORY |
metadata | Metadata for the API | Object | COMPULSORY |
logoUrls | Url of the consumer logo | List of String | OPTIONAL |
domainNames | List of Domain names that have to be whitelisted in Signzy | List of String | OPTIONAL |
callbacks | List of callback configs | List of Object | OPTIONAL |
url | Url of the callback | String | COMPULSORY |
authType | Authentication type | String | COMPULSORY |
headers | Necessary headers required for the Auth type | List of Object | COMPULSORY |
key | Header key name | String | COMPULSORY |
value | Header key value | String | COMPULSORY |
Response Data
{
"result": {
"consumerId": "consumer123",
"message": "Metadata has been successfully stored"
}
}PARAMETERS | DESCRIPTION | TYPE | VALUE (COMPULSORY OR OPTIONAL) |
|---|---|---|---|
result | This parameter contains the actual output. | Object | COMPULSORY |
consumerId | A unique id shared by Signzy during onboarding of the client | String | COMPULSORY |
message | It indicates whether metadata has been successfully stored or not | String | COMPULSORY |
Sample Status Codes And Messages
{
"error": {
"reason": "VALIDATION_ERROR",
"status": 400,
"message": "\"global.callbacks[0].url\" is required",
"type": "Bad Request",
"statusCode": 400,
"name": "error"
}
}
1. Datatype validation issues errors, eg: \"consumerId\" must be a string
2. Missing required parameters, eg: \"global\" is required
3. \"apiName\" must adhere to the following pattern - /^(\/[a-zA-Z0-9-]+)+$/
4. \"callbacks[n].url\" must be a valid uri
5. \"authType\" must be one of [key-auth, basic-auth, bearer-auth]