Configurazione
Risorse per la configurazione dei template e placeholders
Create a new template for sending messages to the govio services.
Spedizione Messaggio CIE
Pattern: .*
Segnala la scadenza della proprià C.I.E.
Pattern: [\s\S]*
Scadenza CIE n. ${cie.uppercase}
Pattern: .+
Salve, con la presente la informiamo che in data ${due_date} scadrà la Carta di Identità elettronica numero ${cie.uppercase}.
Pattern: [\s\S]+
Successful operation.
Bad Request.
Required credentials missing.
Agent not authorized for the operation.
Too many requests.
Service Unavailable.
Unexpected error.
POST /templates HTTP/1.1
Host: localhost:10001
GovHub-Consumer-Principal: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 322
{
"name": "Spedizione Messaggio CIE",
"description": "Segnala la scadenza della proprià C.I.E.",
"subject": "Scadenza CIE n. ${cie.uppercase}",
"message_body": "Salve, con la presente la informiamo che in data ${due_date} scadrà la Carta di Identità elettronica numero ${cie.uppercase}.",
"has_payment": true,
"has_due_date": true
}
{
"name": "Spedizione Messaggio CIE",
"description": "Segnala la scadenza della proprià C.I.E.",
"subject": "Scadenza CIE n. ${cie.uppercase}",
"message_body": "Salve, con la presente la informiamo che in data ${due_date} scadrà la Carta di Identità elettronica numero ${cie.uppercase}.",
"has_payment": true,
"has_due_date": true,
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/templates/1"
},
"placeholders": {
"href": "https://govhub.it/govio/templates/1/placeholders"
}
}
}
List the templates used for sending messages to the govio services,sorted by name.
Max number of provided items.
offset (zero-based) of indexed results.
0
generic query.
user_1
Pattern: ^[^\u0000]*$
Direction Sorting field.
desc
Possible values: Successful operation.
Bad Request.
Required credentials missing.
Agent not authorized for the operation.
Too many requests.
Service Unavailable.
Unexpected error.
GET /templates HTTP/1.1
Host: localhost:10001
GovHub-Consumer-Principal: YOUR_API_KEY
Accept: */*
{
"page": {
"offset": 20,
"limit": 25,
"total": 32
},
"items": [
{
"name": "Spedizione Messaggio CIE",
"description": "Segnala la scadenza della proprià C.I.E.",
"subject": "Scadenza CIE n. ${cie.uppercase}",
"message_body": "Salve, con la presente la informiamo che in data ${due_date} scadrà la Carta di Identità elettronica numero ${cie.uppercase}.",
"has_payment": true,
"has_due_date": true,
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/templates/1"
},
"placeholders": {
"href": "https://govhub.it/govio/templates/1/placeholders"
}
}
}
]
}
Reads a service template.
GovIO Template Id.
1
Successful operation.
Bad Request.
Required credentials missing.
Agent not authorized for the operation.
Not Found.
Too many requests.
Service Unavailable.
Unexpected error.
GET /templates/{id} HTTP/1.1
Host: localhost:10001
GovHub-Consumer-Principal: YOUR_API_KEY
Accept: */*
{
"name": "Spedizione Messaggio CIE",
"description": "Segnala la scadenza della proprià C.I.E.",
"subject": "Scadenza CIE n. ${cie.uppercase}",
"message_body": "Salve, con la presente la informiamo che in data ${due_date} scadrà la Carta di Identità elettronica numero ${cie.uppercase}.",
"has_payment": true,
"has_due_date": true,
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/templates/1"
},
"placeholders": {
"href": "https://govhub.it/govio/templates/1/placeholders"
}
}
}
Update template data.
GovIO Template Id.
1
Specified operation.
add
Possible values: jsonPath of the mutating object.
/organizations
Pattern: ^.*$
updating value.
Succsessful operation.
Bad Request.
Required credentials missing.
Agent not authorized for the operation.
Not Found.
Too many requests.
Service Unavailable.
Unexpected error.
PATCH /templates/{id} HTTP/1.1
Host: localhost:10001
GovHub-Consumer-Principal: YOUR_API_KEY
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 47
[
{
"op": "add",
"path": "/name",
"value": "Comune1"
}
]
{
"name": "Spedizione Messaggio CIE",
"description": "Segnala la scadenza della proprià C.I.E.",
"subject": "Scadenza CIE n. ${cie.uppercase}",
"message_body": "Salve, con la presente la informiamo che in data ${due_date} scadrà la Carta di Identità elettronica numero ${cie.uppercase}.",
"has_payment": true,
"has_due_date": true,
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/templates/1"
},
"placeholders": {
"href": "https://govhub.it/govio/templates/1/placeholders"
}
}
}
Associate a placeholder to a template.
GovIO Template Id.
1
GovIO Placeholder Id.
1
Successful operation.
Bad Request.
Required credentials missing.
Agent not authorized for the operation.
Not Found.
Conflict (The entity already exists).
Too many requests.
Service Unavailable.
Unexpected error.
POST /templates/{id}/placeholders HTTP/1.1
Host: localhost:10001
GovHub-Consumer-Principal: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 31
{
"mandatory": true,
"position": 1
}
{
"mandatory": true,
"position": 1,
"placeholder_id": 1,
"_links": {
"placeholder": {
"href": "https://govhub.it/govio/placeholders/1"
},
"template": {
"href": "https://govhub.it/govio/templates/1"
}
},
"_embedded": {
"placeholder": {
"name": "cie",
"description": "Numero carta d'identità elettronica.",
"example": "CA000000AA",
"pattern": "[A-Z]{6}[0-9LMNPQRSTUV]{2}[ABCDEHLMPRST][0-9LMNPQRSTUV]{2}[A-Z][0-9LMNPQRSTUV]{3}[A-Z]",
"type": "string",
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/placeholders/1"
}
}
},
"template": {
"name": "Spedizione Messaggio CIE",
"description": "Segnala la scadenza della proprià C.I.E.",
"subject": "Scadenza CIE n. ${cie.uppercase}",
"message_body": "Salve, con la presente la informiamo che in data ${due_date} scadrà la Carta di Identità elettronica numero ${cie.uppercase}.",
"has_payment": true,
"has_due_date": true,
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/templates/1"
},
"placeholders": {
"href": "https://govhub.it/govio/templates/1/placeholders"
}
}
}
}
}
List the template associated placeholders.
GovIO Template Id.
1
Successful operation.
Bad Request.
Required credentials missing.
Agent not authorized for the operation.
Not Found.
Too many requests.
Service Unavailable.
Unexpected error.
GET /templates/{id}/placeholders HTTP/1.1
Host: localhost:10001
GovHub-Consumer-Principal: YOUR_API_KEY
Accept: */*
{
"items": [
{
"mandatory": true,
"position": 1,
"placeholder_id": 1,
"_links": {
"placeholder": {
"href": "https://govhub.it/govio/placeholders/1"
},
"template": {
"href": "https://govhub.it/govio/templates/1"
}
},
"_embedded": {
"placeholder": {
"name": "cie",
"description": "Numero carta d'identità elettronica.",
"example": "CA000000AA",
"pattern": "[A-Z]{6}[0-9LMNPQRSTUV]{2}[ABCDEHLMPRST][0-9LMNPQRSTUV]{2}[A-Z][0-9LMNPQRSTUV]{3}[A-Z]",
"type": "string",
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/placeholders/1"
}
}
},
"template": {
"name": "Spedizione Messaggio CIE",
"description": "Segnala la scadenza della proprià C.I.E.",
"subject": "Scadenza CIE n. ${cie.uppercase}",
"message_body": "Salve, con la presente la informiamo che in data ${due_date} scadrà la Carta di Identità elettronica numero ${cie.uppercase}.",
"has_payment": true,
"has_due_date": true,
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/templates/1"
},
"placeholders": {
"href": "https://govhub.it/govio/templates/1/placeholders"
}
}
}
}
}
]
}
Updates the whole template placeholder list.
GovIO Template Id.
1
Successful operation.
Bad Request.
Required credentials missing.
Agent not authorized for the operation.
Not Found.
Too many requests.
Service Unavailable.
Unexpected error.
PUT /templates/{id}/placeholders HTTP/1.1
Host: localhost:10001
GovHub-Consumer-Principal: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 167
{
"items": [
{
"mandatory": false,
"position": 0,
"placeholder_id": 1
},
{
"mandatory": false,
"position": 1,
"placeholder_id": 10
},
{
"mandatory": true,
"position": 4,
"placeholder_id": 2
}
]
}
{
"items": [
{
"mandatory": false,
"position": 0,
"placeholder_id": 1
},
{
"mandatory": false,
"position": 1,
"placeholder_id": 10
},
{
"mandatory": true,
"position": 4,
"placeholder_id": 2
}
]
}
Removes the placeholder from the template.
GovIO Template Id.
1
GovIO Placeholder Id.
1
Successful operation.
No content
Bad Request.
Required credentials missing.
Agent not authorized for the operation.
Not Found.
Too many requests.
Service Unavailable.
Unexpected error.
DELETE /templates/{template_id}/placeholders/{placeholder_id} HTTP/1.1
Host: localhost:10001
GovHub-Consumer-Principal: YOUR_API_KEY
Accept: */*
No content
Placeholders can be reused across templates, this endpoints allows to list them.
Max number of provided items.
offset (zero-based) of indexed results.
0
generic query.
user_1
Pattern: ^[^\u0000]*$
Successful operation.
Bad Request.
Required credentials missing.
Agent not authorized for the operation.
Too many requests.
Service Unavailable.
Unexpected error.
GET /placeholders HTTP/1.1
Host: localhost:10001
GovHub-Consumer-Principal: YOUR_API_KEY
Accept: */*
{
"page": {
"offset": 20,
"limit": 25,
"total": 32
},
"items": [
{
"name": "cie",
"description": "Numero carta d'identità elettronica.",
"example": "CA000000AA",
"pattern": "[A-Z]{6}[0-9LMNPQRSTUV]{2}[ABCDEHLMPRST][0-9LMNPQRSTUV]{2}[A-Z][0-9LMNPQRSTUV]{3}[A-Z]",
"type": "string",
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/placeholders/1"
}
}
}
]
}
Placeholders can be reused across templates, this endpoints allows to create one.
cie
Pattern: .+
Numero carta d'identità elettronica.
Pattern: [\s\S]*
CA000000AA
Pattern: [\s\S]+
[A-Z]{6}[0-9LMNPQRSTUV]{2}[ABCDEHLMPRST][0-9LMNPQRSTUV]{2}[A-Z][0-9LMNPQRSTUV]{3}[A-Z]
Pattern: [\s\S]*
Successful operation.
Bad Request.
Required credentials missing.
Agent not authorized for the operation.
Conflict (The entity already exists).
Too many requests.
Service Unavailable.
Unexpected error.
POST /placeholders HTTP/1.1
Host: localhost:10001
GovHub-Consumer-Principal: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 206
{
"name": "cie",
"description": "Numero carta d'identità elettronica.",
"example": "CA000000AA",
"pattern": "[A-Z]{6}[0-9LMNPQRSTUV]{2}[ABCDEHLMPRST][0-9LMNPQRSTUV]{2}[A-Z][0-9LMNPQRSTUV]{3}[A-Z]",
"type": "string"
}
{
"name": "cie",
"description": "Numero carta d'identità elettronica.",
"example": "CA000000AA",
"pattern": "[A-Z]{6}[0-9LMNPQRSTUV]{2}[ABCDEHLMPRST][0-9LMNPQRSTUV]{2}[A-Z][0-9LMNPQRSTUV]{3}[A-Z]",
"type": "string",
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/placeholders/1"
}
}
}
Placeholders can be reused across templates, this endpoints allows to read one of them.
GovIO Placeholder Id.
1
Successful operation.
Bad Request.
Required credentials missing.
Agent not authorized for the operation.
Not Found.
Too many requests.
Service Unavailable.
Unexpected error.
GET /placeholders/{id} HTTP/1.1
Host: localhost:10001
GovHub-Consumer-Principal: YOUR_API_KEY
Accept: */*
{
"name": "cie",
"description": "Numero carta d'identità elettronica.",
"example": "CA000000AA",
"pattern": "[A-Z]{6}[0-9LMNPQRSTUV]{2}[ABCDEHLMPRST][0-9LMNPQRSTUV]{2}[A-Z][0-9LMNPQRSTUV]{3}[A-Z]",
"type": "string",
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/placeholders/1"
}
}
}
Update placeholder data.
GovIO Placeholder Id.
1
Specified operation.
add
Possible values: jsonPath of the mutating object.
/organizations
Pattern: ^.*$
updating value.
Succsessful operation.
Bad Request.
Required credentials missing.
Agent not authorized for the operation.
Not Found.
Too many requests.
Service Unavailable.
Unexpected error.
PATCH /placeholders/{id} HTTP/1.1
Host: localhost:10001
GovHub-Consumer-Principal: YOUR_API_KEY
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 43
[
{
"op": "add",
"path": "/name",
"value": "cie"
}
]
{
"name": "cie",
"description": "Numero carta d'identità elettronica.",
"example": "CA000000AA",
"pattern": "[A-Z]{6}[0-9LMNPQRSTUV]{2}[ABCDEHLMPRST][0-9LMNPQRSTUV]{2}[A-Z][0-9LMNPQRSTUV]{3}[A-Z]",
"type": "string",
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/placeholders/1"
}
}
}
Read and Filter the Govio Service Instanes
Service identifier.
1
Organization identifier.
1
generic query.
user_1
Pattern: ^[^\u0000]*$
filter by status.
Max number of provided items.
offset (zero-based) of indexed results.
0
Direction Sorting field.
desc
Possible values: Successful operation.
Bad Request.
Required credentials missing.
Agent not authorized for the operation.
Too many requests.
Service Unavailable.
Unexpected error.
GET /service-instances HTTP/1.1
Host: localhost:10001
GovHub-Consumer-Principal: YOUR_API_KEY
Accept: */*
{
"page": {
"offset": 20,
"limit": 25,
"total": 32
},
"items": [
{
"service_id": 1,
"organization_id": 1,
"template_id": 1,
"enabled": true,
"io_service_id": "text",
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/service-instances/1"
},
"service": {
"href": "https://govhub.it/govio/services/1"
},
"organization": {
"href": "https://govhub.it/govio/organizations/1"
},
"template": {
"href": "https://govhub.it/govio/templates/1"
}
},
"_embedded": {
"service": {
"id": 1,
"service_name": "SUAP-Integrazione",
"description": "Service for customer management.",
"_links": {
"self": {
"href": "https://govhub.it/govregistry/services/1"
},
"logo": {
"href": "https://govhub.it/govregistry/services/1/logo"
},
"logo_miniature": {
"href": "https://govhub.it/govregistry/services/logo_miniature"
}
}
},
"organization": {
"id": 1,
"legal_name": "Giletti S.R.L.",
"tax_code": "01234567890",
"_links": {
"self": {
"href": "https://govhub.it/govregistry/organizations/1"
},
"logo": {
"href": "https://govhub.it/govregistry/organizations/1/logo"
},
"logo_miniature": {
"href": "https://govhub.it/govregistry/organizations/logo_miniature"
}
}
},
"template": {
"name": "Spedizione Messaggio CIE",
"description": "Segnala la scadenza della proprià C.I.E.",
"subject": "Scadenza CIE n. ${cie.uppercase}",
"message_body": "Salve, con la presente la informiamo che in data ${due_date} scadrà la Carta di Identità elettronica numero ${cie.uppercase}.",
"has_payment": true,
"has_due_date": true,
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/templates/1"
},
"placeholders": {
"href": "https://govhub.it/govio/templates/1/placeholders"
}
}
}
}
}
]
}
An organization can subscribe to a service multiple times, each time with a different message template, then the clients can send messages to the IO service using the service instance.
Successful operation.
Bad Request.
Required credentials missing.
Agent not authorized for the operation.
Not Found.
Too many requests.
Service Unavailable.
Unexpected error.
POST /service-instances HTTP/1.1
Host: localhost:10001
GovHub-Consumer-Principal: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 106
{
"service_id": 1,
"organization_id": 1,
"template_id": 1,
"enabled": true,
"io_service_id": "text",
"apiKey": "text"
}
{
"service_id": 1,
"organization_id": 1,
"template_id": 1,
"enabled": true,
"io_service_id": "text",
"apiKey": "text",
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/service-instances/1"
},
"service": {
"href": "https://govhub.it/govio/services/1"
},
"organization": {
"href": "https://govhub.it/govio/organizations/1"
},
"template": {
"href": "https://govhub.it/govio/templates/1"
}
},
"_embedded": {
"service": {
"id": 1,
"service_name": "SUAP-Integrazione",
"description": "Service for customer management.",
"_links": {
"self": {
"href": "https://govhub.it/govregistry/services/1"
},
"logo": {
"href": "https://govhub.it/govregistry/services/1/logo"
},
"logo_miniature": {
"href": "https://govhub.it/govregistry/services/logo_miniature"
}
}
},
"organization": {
"id": 1,
"legal_name": "Giletti S.R.L.",
"tax_code": "01234567890",
"_links": {
"self": {
"href": "https://govhub.it/govregistry/organizations/1"
},
"logo": {
"href": "https://govhub.it/govregistry/organizations/1/logo"
},
"logo_miniature": {
"href": "https://govhub.it/govregistry/organizations/logo_miniature"
}
}
},
"template": {
"name": "Spedizione Messaggio CIE",
"description": "Segnala la scadenza della proprià C.I.E.",
"subject": "Scadenza CIE n. ${cie.uppercase}",
"message_body": "Salve, con la presente la informiamo che in data ${due_date} scadrà la Carta di Identità elettronica numero ${cie.uppercase}.",
"has_payment": true,
"has_due_date": true,
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/templates/1"
},
"placeholders": {
"href": "https://govhub.it/govio/templates/1/placeholders"
}
}
}
}
}
Returns the specified service instance.
Govio Service Instance Id.
1
Successful operation.
Bad Request.
Required credentials missing.
Agent not authorized for the operation.
Not Found.
Too many requests.
Service Unavailable.
Unexpected error.
GET /service-instances/{id} HTTP/1.1
Host: localhost:10001
GovHub-Consumer-Principal: YOUR_API_KEY
Accept: */*
{
"service_id": 1,
"organization_id": 1,
"template_id": 1,
"enabled": true,
"io_service_id": "text",
"apiKey": "text",
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/service-instances/1"
},
"service": {
"href": "https://govhub.it/govio/services/1"
},
"organization": {
"href": "https://govhub.it/govio/organizations/1"
},
"template": {
"href": "https://govhub.it/govio/templates/1"
}
},
"_embedded": {
"service": {
"id": 1,
"service_name": "SUAP-Integrazione",
"description": "Service for customer management.",
"_links": {
"self": {
"href": "https://govhub.it/govregistry/services/1"
},
"logo": {
"href": "https://govhub.it/govregistry/services/1/logo"
},
"logo_miniature": {
"href": "https://govhub.it/govregistry/services/logo_miniature"
}
}
},
"organization": {
"id": 1,
"legal_name": "Giletti S.R.L.",
"tax_code": "01234567890",
"_links": {
"self": {
"href": "https://govhub.it/govregistry/organizations/1"
},
"logo": {
"href": "https://govhub.it/govregistry/organizations/1/logo"
},
"logo_miniature": {
"href": "https://govhub.it/govregistry/organizations/logo_miniature"
}
}
},
"template": {
"name": "Spedizione Messaggio CIE",
"description": "Segnala la scadenza della proprià C.I.E.",
"subject": "Scadenza CIE n. ${cie.uppercase}",
"message_body": "Salve, con la presente la informiamo che in data ${due_date} scadrà la Carta di Identità elettronica numero ${cie.uppercase}.",
"has_payment": true,
"has_due_date": true,
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/templates/1"
},
"placeholders": {
"href": "https://govhub.it/govio/templates/1/placeholders"
}
}
}
}
}
Only the apiKey can be modified by this operation.
Govio Service Instance Id.
1
Specified operation.
add
Possible values: jsonPath of the mutating object.
/organizations
Pattern: ^.*$
updating value.
Succsessful operation.
Bad Request.
Required credentials missing.
Agent not authorized for the operation.
Not Found.
Conflict (The entity already exists).
Too many requests.
Service Unavailable.
Unexpected error.
PATCH /service-instances/{id} HTTP/1.1
Host: localhost:10001
GovHub-Consumer-Principal: YOUR_API_KEY
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 49
[
{
"op": "add",
"path": "/organizations",
"value": {}
}
]
{
"service_id": 1,
"organization_id": 1,
"template_id": 1,
"enabled": true,
"io_service_id": "text",
"apiKey": "text",
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/service-instances/1"
},
"service": {
"href": "https://govhub.it/govio/services/1"
},
"organization": {
"href": "https://govhub.it/govio/organizations/1"
},
"template": {
"href": "https://govhub.it/govio/templates/1"
}
},
"_embedded": {
"service": {
"id": 1,
"service_name": "SUAP-Integrazione",
"description": "Service for customer management.",
"_links": {
"self": {
"href": "https://govhub.it/govregistry/services/1"
},
"logo": {
"href": "https://govhub.it/govregistry/services/1/logo"
},
"logo_miniature": {
"href": "https://govhub.it/govregistry/services/logo_miniature"
}
}
},
"organization": {
"id": 1,
"legal_name": "Giletti S.R.L.",
"tax_code": "01234567890",
"_links": {
"self": {
"href": "https://govhub.it/govregistry/organizations/1"
},
"logo": {
"href": "https://govhub.it/govregistry/organizations/1/logo"
},
"logo_miniature": {
"href": "https://govhub.it/govregistry/organizations/logo_miniature"
}
}
},
"template": {
"name": "Spedizione Messaggio CIE",
"description": "Segnala la scadenza della proprià C.I.E.",
"subject": "Scadenza CIE n. ${cie.uppercase}",
"message_body": "Salve, con la presente la informiamo che in data ${due_date} scadrà la Carta di Identità elettronica numero ${cie.uppercase}.",
"has_payment": true,
"has_due_date": true,
"id": 1,
"_links": {
"self": {
"href": "https://govhub.it/govio/templates/1"
},
"placeholders": {
"href": "https://govhub.it/govio/templates/1/placeholders"
}
}
}
}
}
Last updated