Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format readme #2

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 47 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,55 +1,64 @@
# Compliance 360 Import (Simple batch import)

## Introduction
The Compliance 360 Import application is a sample application that demonstrates importing data into Compliance 360
in the simplest manner. It's focus is for third-party partners who intend on automating the importing of data into
a compliance 360 client organization on a regular basis. It first requires that the given C360 client organization
perform relevant integration configurations to permit this operation.
in the simplest manner. It's focus is for third-party partners who intend on automating the importing of data into
a compliance 360 client organization on a regular basis. It first requires that the given C360 client organization
perform relevant integration configurations to permit this operation.

NOTE: This application is intended as a sample only.

## Configuration

The C360 client organization must first do the following:

1. Create an Integration definition within the C360 website
2. This Integration will need configurations defined for it. Typically:
a. Unique identifier field (e.g. Import Id). This field can be used to supply a unique value to prevent duplicates.
b. Default Module Type (if other than 'Default')
c. Default Workflow Template
d. Default Division/Folder
e. Field Mappings (as needed)
- Unique identifier field (e.g. Import Id). This field can be used to supply a unique value to prevent duplicates.
- Default Module Type (if other than 'Default')
- Default Workflow Template
- Default Division/Folder
- Field Mappings (as needed)
3. Relay the following values for use in this application:
a. Organization
b. ApplicationKey
- Organization
- ApplicationKey
4. Relay the following target field information for use in this application:
a. Target C360 module name (e.g. Incidents)
b. Target C360 component name (e.g. Incident)
c. Target field names (e.g. Name, Description, etc.)
- Target C360 module name (e.g. Incidents)
- Target C360 component name (e.g. Incident)
- Target field names (e.g. Name, Description, etc.)

## Field Mappings

C360 module components 'generally' have consistent fields and names from C360 client organization to
C360 client organization. However, C360 is highly customizable. Therefore it should be anticipated
that field names 'could' differ. If it is critical to code to a standard specification this can be
accommodated by configuring field mappings within the Integration definition. Each client organization
can configure mappings as needed. These would map an incoming field name to a client field name. No
mapping is required when the field names match.

# Project Setup
The application is written in C# and is a .NET Core 2.0 based application. To build and run this application:
1. Ensure that you have the .Net Core Command-Line interface (CLI) tools installed.
## Project Setup

The application is written in C# and is a .NET Core 2.0 based application. To build and run this application:

1. Ensure that you have the .Net Core Command-Line interface (CLI) tools installed.
2. Clone the repository.
3. From the command line run the following:
```
-- from the Compliance360.Import directory.
dotnet restore
dotnet build
```
```bash
# Run from the Compliance360.Import directory:
dotnet restore
dotnet build
```

## Running the Application

# Running the Application
To run the app from the command lime:
```

```bash
dotnet run ./bin/Debug/netcoreapp2.0/Compliance360.Import.dll [options]
```

The following lists the required command line options:

| Option | Description |
| ------ | ----------- |
| --filepath | The path to the *.CSV file to import |
Expand All @@ -59,16 +68,18 @@ The following lists the required command line options:
| --module | The module name of the target C360 Module. |
| --component | The component name of the target C360 component. |

The command line options are in specified in the format: {option}[space]{value}.
The command line options are in specified in the format: {option}[space]{value}.
```
Example:
--baseuri https://secure.compliance360.com --organization testorg --integrationkey DDIICZ1UORHTFNO5E8JTAVTEBWYH3ZGU9Y0JUPLKQHT --module inicidents --component incident --filepath Incidents-Incident-data.csv
Example:
--baseuri https://secure.compliance360.com --organization testorg --integrationkey DDIICZ1UORHTFNO5E8JTAVTEBWYH3ZGU9Y0JUPLKQHT --module inicidents --component incident --filepath Incidents-Incident-data.csv
```

# Processing Overview
## Processing Overview

In general, this application posts all data to C360 in a single http request. The data to input is provided in the body of the authentication request in a simple json structure.
```
Example:

```json
Example:
{
"Incidents":
{
Expand All @@ -84,15 +95,18 @@ Example:
"Name": "Sample Incident 02",
"Resp. Party": "David Brown",
"Description": "Description for Sample Incident 01"
}
}
]
}
}
```
```

For convenience, this sample application reads data from a csv file and transforms it in to the above json structure.

# API Documentation
## API Documentation

C360 APIs are documented in the [OpenAPI Specification](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md) format and can be found here:

1. [Security API](https://github.com/SAIGlobal/compliance360-security-api)
2. [Metadata API](https://github.com/SAIGlobal/compliance360-metadata-api)
3. [Data API](https://github.com/SAIGlobal/compliance360-data-api)
3. [Data API](https://github.com/SAIGlobal/compliance360-data-api)