https://github.com/folio-org/mod-vendors
CRUD APIs used to manage EDI FTPs.
Collection of edi-ftp items.
Get list of EDI FTPs
GET /vendor-storage/edi-ftps
A query expressed as a CQL string (see dev.folio.org/reference/glossary#cql) using valid searchable fields. The first example below shows the general form of a full CQL query, but those fields might not be relevant in this context.
with valid searchable fields: for example code
Example:
(username=="ab*" or personal.firstName=="ab*" or personal.lastName=="ab*") and active=="true" sortby personal.lastName personal.firstName barcode
["code", "MEDGRANT", "="]
Skip over a number of elements by specifying an offset value for the query
Example:
0
Limit the number of elements returned in the response
Example:
10
Requested language. Optional. [lang=en]
Returns a list of edi-ftp items
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "collection of EDI FTP records",
"type": "object",
"properties": {
"edi_ftps": {
"description": "The list of EDI FTPs in this collection",
"type": "array",
"id": "edi_ftps",
"items": {
"type": "object",
"$ref": "edi_ftp.json"
}
},
"total_records": {
"description": "The number of EDI FTP records returned in this collection",
"type": "integer"
},
"first": {
"description": "The index of the first object in the collection",
"type": "integer"
},
"last": {
"description": "The index of the last object in the collection",
"type": "integer"
}
},
"additionalProperties": false,
"required": [
"edi_ftps",
"total_records"
]
}
Example:
{
"edi_ftps": [
{
"id": "588b5c42-8634-4af7-bc9b-5e0116ed96b6",
"ftp_format": "SFTP",
"server_address": "http://127.0.0.1",
"username": "edi_username",
"password": "edi_password",
"ftp_mode": "ASCII",
"ftp_conn_mode": "Active",
"ftp_port": "22",
"order_directory": "/path/to/order/directory",
"invoice_directory": "/path/to/invoice/directory",
"notes": "My FTP notes"
}
],
"total_records": 1,
"first": 1,
"last": 1
}
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Media type: text/plain
Type: any
Example:
unable to list edi-ftps -- malformed parameter 'query', syntax error at column 6
Not authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to list edi-ftps -- unauthorized
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Create a new edi-ftp item.
POST /vendor-storage/edi-ftps
Requested language. Optional. [lang=en]
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "An FTP record for a vendor EDI",
"type": "object",
"properties": {
"id": {
"description": "The unique id of this category",
"type": ["string", "null"],
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"ftp_format": {
"description": "The FTP format for this EDI",
"type": "string"
},
"server_address": {
"description": "The server address for this EDI",
"type": "string",
"pattern": "^([Hh][Tt][Tt][Pp]|[Ff][Tt][Pp])([Ss])?://.+$"
},
"username": {
"description": "The login username for this EDI",
"type": "string"
},
"password": {
"description": "The login password for this EDI",
"type": "string"
},
"ftp_mode": {
"description": "The FTP mode for this EDI",
"type": "string"
},
"ftp_conn_mode": {
"description": "The FTP connection mode for this EDI",
"type": "string"
},
"ftp_port": {
"description": "The port for this EDI",
"type": "string"
},
"order_directory": {
"description": "The order directory for this EDI",
"type": "string"
},
"invoice_directory": {
"description": "The invoice directory for this EDI",
"type": "string"
},
"notes": {
"description": "The notes for this EDI",
"type": "string"
}
},
"additionalProperties": false
}
Example:
{
"ftp_format": "SFTP",
"server_address": "http://127.0.0.1",
"username": "edi_username",
"password": "edi_password",
"ftp_mode": "ASCII",
"ftp_conn_mode": "Active",
"ftp_port": "22",
"order_directory": "/path/to/order/directory",
"invoice_directory": "/path/to/invoice/directory",
"notes": "My FTP notes"
}
Returns a newly created item, with server-controlled fields like 'id' populated
URI to the created edi-ftp item
Media type: application/json
Type: any
Example:
{
"ftp_format": "SFTP",
"server_address": "http://127.0.0.1",
"username": "edi_username",
"password": "edi_password",
"ftp_mode": "ASCII",
"ftp_conn_mode": "Active",
"ftp_port": "22",
"order_directory": "/path/to/order/directory",
"invoice_directory": "/path/to/invoice/directory",
"notes": "My FTP notes"
}
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Media type: text/plain
Type: any
Example:
"unable to add edi-ftp -- malformed JSON at 13:3"
Not authorized to perform requested action
Media type: text/plain
Type: any
Example:
unable to create edi-ftps -- unauthorized
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
Retrieve edi-ftp item with given {edi-ftpId}
GET /vendor-storage/edi-ftps/{id}
The UUID of a EDI FTPs
Requested language. Optional. [lang=en]
Returns item with a given ID
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "An FTP record for a vendor EDI",
"type": "object",
"properties": {
"id": {
"description": "The unique id of this category",
"type": ["string", "null"],
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"ftp_format": {
"description": "The FTP format for this EDI",
"type": "string"
},
"server_address": {
"description": "The server address for this EDI",
"type": "string",
"pattern": "^([Hh][Tt][Tt][Pp]|[Ff][Tt][Pp])([Ss])?://.+$"
},
"username": {
"description": "The login username for this EDI",
"type": "string"
},
"password": {
"description": "The login password for this EDI",
"type": "string"
},
"ftp_mode": {
"description": "The FTP mode for this EDI",
"type": "string"
},
"ftp_conn_mode": {
"description": "The FTP connection mode for this EDI",
"type": "string"
},
"ftp_port": {
"description": "The port for this EDI",
"type": "string"
},
"order_directory": {
"description": "The order directory for this EDI",
"type": "string"
},
"invoice_directory": {
"description": "The invoice directory for this EDI",
"type": "string"
},
"notes": {
"description": "The notes for this EDI",
"type": "string"
}
},
"additionalProperties": false
}
Example:
{
"id": "588b5c42-8634-4af7-bc9b-5e0116ed96b6",
"ftp_format": "SFTP",
"server_address": "http://127.0.0.1",
"username": "edi_username",
"password": "edi_password",
"ftp_mode": "ASCII",
"ftp_conn_mode": "Active",
"ftp_port": "22",
"order_directory": "/path/to/order/directory",
"invoice_directory": "/path/to/invoice/directory",
"notes": "My FTP notes"
}
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"edi-ftp not found"
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator
Delete edi-ftp item with given {edi-ftpId}
DELETE /vendor-storage/edi-ftps/{id}
The UUID of a EDI FTPs
Requested language. Optional. [lang=en]
Item deleted successfully
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Media type: text/plain
Type: any
Example:
"unable to delete edi-ftp -- constraint violation"
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"edi-ftp not found"
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
Internal server error, contact administrator
Update edi-ftp item with given {edi-ftpId}
PUT /vendor-storage/edi-ftps/{id}
The UUID of a EDI FTPs
Requested language. Optional. [lang=en]
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "An FTP record for a vendor EDI",
"type": "object",
"properties": {
"id": {
"description": "The unique id of this category",
"type": ["string", "null"],
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"ftp_format": {
"description": "The FTP format for this EDI",
"type": "string"
},
"server_address": {
"description": "The server address for this EDI",
"type": "string",
"pattern": "^([Hh][Tt][Tt][Pp]|[Ff][Tt][Pp])([Ss])?://.+$"
},
"username": {
"description": "The login username for this EDI",
"type": "string"
},
"password": {
"description": "The login password for this EDI",
"type": "string"
},
"ftp_mode": {
"description": "The FTP mode for this EDI",
"type": "string"
},
"ftp_conn_mode": {
"description": "The FTP connection mode for this EDI",
"type": "string"
},
"ftp_port": {
"description": "The port for this EDI",
"type": "string"
},
"order_directory": {
"description": "The order directory for this EDI",
"type": "string"
},
"invoice_directory": {
"description": "The invoice directory for this EDI",
"type": "string"
},
"notes": {
"description": "The notes for this EDI",
"type": "string"
}
},
"additionalProperties": false
}
Example:
{
"id": "588b5c42-8634-4af7-bc9b-5e0116ed96b6",
"ftp_format": "SFTP",
"server_address": "http://127.0.0.1",
"username": "edi_username",
"password": "edi_password",
"ftp_mode": "ASCII",
"ftp_conn_mode": "Active",
"ftp_port": "22",
"order_directory": "/path/to/order/directory",
"invoice_directory": "/path/to/invoice/directory",
"notes": "My FTP notes"
}
Item successfully updated
Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response.
Media type: text/plain
Type: any
Example:
"unable to update edi-ftp -- malformed JSON at 13:4"
Item with a given ID not found
Media type: text/plain
Type: any
Example:
"edi-ftp not found"
Internal server error, e.g. due to misconfiguration
Media type: text/plain
Type: any
Example:
internal server error, contact administrator