RESOURCES

API DOCUMENTATION

API INTEGRATION

CopyStrong API

Getting Started
The CopyStrong API is a JSON based a RESTful API.
 
This means that resources are represented as JSON dictionaries and you use a different HTTP verb to do your standard CRUD operations on them:
 
POST: Create new resources.
GET: Retrieve a resource.
PATCH: Update existing resources.
DELETE: Delete existing resources.
The Basics
The CopyStrong API allows you to interact with our system programmatically from your own application. Using the API you interact with Resources such as:
  • Media
  • Configuration
  • Users
  • Files
  • Folder
The API attempts to conform to the RESTful design principles.
You interact with the resources exposed via the API by accessing resource collection and element URIs using the HTTP verbs (GET, POST, PUT, and DELETE). 
HTTP Methods

The CopyStrong API supports HTTP methods for interacting with resources:

GET - Make a GET request to retrieve data. GET requests will never cause an update or change to your data because they’re safe and idempotent. 

POST - Use a POST request to create new resources.  For example, make a POST request to a collection endpoint (like /lists) where the body of your request JSON is a new list. 

PUT - Use a PUT request to create or update a resource. 

DELETE - Make a DELETE request to remove a resource.

SSL

We give a valid, signed certificate for all API methods. If you’re manually coding submit URLs, change http to https in the URL, and make sure your connection library supports HTTPS.

API Resource Map

API Resource Map
Resource
All API's  accept and respond with JSON format data.
CopyStrong's API's use 4 HTTP verbs, GET, POST, PUT, DELETE
 
GET: retrieve resource data from server.
POST: send data to server without id.
PUT: send data to server with id.
DELETE: ask delete to server.
                       
RoutefunctionGET POSTPUTDELETE
/api/user/:user id (user) O O
/api/user/:user/password O
/api/user/:user/avatar O
/api/user/:user/media-bulk-delete O
/api/user/:user/media-bulk-clone O
/api/user/:user/file collection(file) O O
/api/user/:user/file/:file id (file) O O O
/api/user/:user/folder collection(folder) O O
/api/user/:user/folder/:folder id (folder) O O O
/api/user/:user/category collection (category) O O
/api/user/:user/category/:category id (category) O O O
/api/user/:user/domain collection (domain) O O
/api/user/:user/domain/:domain id (domain) O
/api/user/:user/domain/:domain/config collection (config) O O
/api/user/:user/domain/:domain/config/:config id (config) O O O
/api/placement collection (placement) O

API Docs

Doc Collection
A collection of documentation resources. Documentation resources provide parsable API documentation for all resources exposed by the API. You can retrieve ALL API docs in one request by grabbing the contents of this collection.

Authorization

Secure Parameters

Every direct post must contain a set of cryptographically-signed secure parameters.

The secure parameters are necessary in order to: Authenticate the request so that CopyStrong can verify it comes from a trusted source (since anyone on the internet can post to Direct endpoints) Allow you to send tamper-proof data along with the request Specify a Redirection URI (or override your default).

What is oAuth?

OAuth is an open standard for authorization, commonly used as a way for Internet users to log in to third party websites using their Google, Facebook, Microsoft, Twitter, One Network, etc. accounts without exposing their password. Generally, OAuth provides to clients a "secure delegated access" to server resources on behalf of a resource owner. It specifies a process for resource owners to authorize third-party access to their server resources without sharing their credentials.

Designed specifically to work with Hypertext Transfer Protocol (HTTP), OAuth essentially allows access tokens to be issued to third-party clients by an authorization server, with the approval of the resource owner. The third party then uses the access token to access the protected resources hosted by the resource server. 

User

Users

url: /api/user/:user

                   
urlVERBUsage Data FieldsData Example
/api/user/:user PUT Edit the user profile email, firstName, lastName, phone, address, address2, city, state, zip, county, company, jobTitle, badge {"jobTItle": "developer"}
/api/user/:user GET Get the user profile n/a

User Special Functions:                    
urlVERBUsage Data FieldsData Example
/api/user/:user/avatar POST upload avatar file, name multi-part formdata
/api/user/:user/password POST change password password, comapre {"password": "newpassword", "compare":"newpassword"}
User
                   
urlVERBUsage Data FieldsData Example
/api/user/:user/media-bulk-delete POST bulk delete files ids {"ids": [1,2,3]}
/api/user/:user/media-bulk-clone POST bulk clone files ids {"ids": [1,2,3]}

File

API Files

GET /user/:user/file

Example:http://api.copystrong.com/api/user/1/file

  • Default: page=1, perPage=10
  • Acceptable Parameters:  Page, perPage, term (search term, look up for file name), folder (numeric id), category (numeric id), usage (ad or image), start, end, period.
  • Start/end are quite flexible. javascript epoch time, unix timestamp, string (such as "Jan 08 2016") are all acceptable. 
  • Also, user can send period param, such as period=today, period=this_week, period=this_month.

Examples Of Parameters:

http://api.copystrong.com/api/user/1/file?term=delta

http://api.copystrong.com/api/user/1/file?perPage=20

File Parameters

url: /api/user/:user/file

Example 1: https://api.copystrong.com/api/user/1/file

Example 2: https://api.copystrong.com/api/user/1/file?term=delta

                   
urlVERBUsage Data FieldsData Example Params
/api/user/:user/file GET list of files page, perPage, term(search words), folder (numeric), category (numeric), usage (ad or image), start, end, period
/api/user/:user/file POST upload new file file, name mult-part formdata

url: /api/user/:user/file/:file

Example: https://api.copystrong.com/api/user/1/file/47

                   
urlVERBUsage Data FieldsData Example
/api/user/:user/file/:file GET retrieve one file information
/api/user/:user/file/:file PUT edit one file label, mediaUsage, mediaFolder {"label": "new name", "mediaFolder": 3, "mediaUsage": "ad"}
/api/user/:user/file/:file DELETE delete file

Folder

API Folder

url: /api/user/:user/folder

Example: https://api.copystrong.com/api/user/1/folder

                   
urlVERBUsage Data FieldsData Example Params
/api/user/:user/folder GET list of folders page, perPage
/api/user/:user/folder POST create new folder name {"name":"new_folder"}

url: /api/user/:user/folder/:folder

Example: https://api.copystrong.com/api/user/1/folder/21

                   
urlVERBUsage Data FieldsData Example
/api/user/:user/folder/:folder GET retrieve one folder information
/api/user/:user/folder/:folder PUT edit one folder (name only) name {"name":"changed_folder"}
/api/user/:user/folder/:folder DELETE delete folder

Category

API Categories

url: /api/user/:user/category

Example: https://api.copystrong.com/api/user/1/category

                   
urlVERBUsage Data FieldsData Example Params
/api/user/:user/category GET list of categories page, perPage
/api/user/:user/category PUT create new category(name only) category {"category":"new_category"}

url: /api/user/:user/category/:category

                   
urlVERBUsage Data FieldsData Example
/api/user/:user/category/:category GET retrieve one category information
/api/user/:user/category/:category PUT edit one category (name only) category {"category":"changed_category"}
/api/user/:user/category/:category DELETE delete category

Domain

API Domains

api/user/:user/domain

Example: https://api.copystrong.com/api/user/1/domain

url VERB Usage Data Fields Data Example Params Responses
api/user/:user/domain GET Get list of domains by user View response
api/user/:user/domain POST Add one user domain

api/user/:user/domain

Example: https://api.copystrong.com/api/user/1/domain

url VERB Usage Data Fields Data Example Responses
api/domain/:domain/visit GET Get visit number by domain View response
api/domain/:domain/device/:device/visit GET Get visit number by device profile View response
api/user/:user/domain/:id GET Get detail of one domain View response
api/user/:user/domain/:id PUT Edit one user domain. Restrictions
api/user/:user/domain/:id DELETE Remove one user domain

Configuration

API Configuration

url: /api/user/:user/domain/:domain/config

Example:https://api.copystrong.com/api/user/1/domain/1/config

                   
urlVERBUsage Data FieldsData Example Params
/api/user/:user/domain/:domain/config GET list of configs page, perPage, scope, term
/api/user/:user/domain/:domain/config POST create new config

url: /api/user/:user/domain/:domain/config

Example: https://api.copystrong.com/api/user/1/domain/1/config/1

                   
urlVERBUsage Data FieldsData Example
/api/user/:user/domain/:domain/config/:config GET retrieve one config information
/api/user/:user/domain/:domain/config/:config PUT edit one config
/api/user/:user/domain/:domain/config/:config DELETE delete config

API User Annotation

API User Annotation

url:api/user/:user/annotation

Example:https://api.copystrong.com/api/user/1/annotation

url VERB Usage Data Fields Data Example Params Responses
api/user/:user/annotation GET List of annotation by user View response
api/user/:user/annotation Add new one

url:api/user/:user/annotation/:id

Example: https://api.copystrong.com/api/user/1/annotation/1

url VERB Usage Data Fields Data Example Params Responses
api/user/:user/annotation/:annotation GET Detail of singal annotation View response
api/user/:user/annotation/:annotation PUT Edit existing one
api/user/:user/annotation/:annotation DELETE Remove existing one

API Device Annotation

Device Annotation

api/user/:user/device/:device/annotation

Example: https://api.copystrong.com/api/user/1/device/1/annotation

url VERB Usage Data Fields Data Example Params Responses
api/user/:user/device/:device/annotation GET List of existing annotations by user & device View response
api/user/:user/device/:device/annotation POST Add one annotation

api/user/:user/device/:device/annotation/:id

Example: https://api.copystrong.com/api/user/1/device/1/annotation/1

url VERB Usage Data Fields Data Example Params Responses
api/user/:user/device/:device/annotation/:annotation GET Detail of one existing View response
api/user/:user/device/:device/annotation/:annotation PUT Edit one existing
api/user/:user/device/:device/annotation/:annotation DELETE Remove existing one

API User

API User

api/user/:id/account

Example: https://api.copystrong.com/api/user/1/account

url VERB Usage Data Fields Data Example Params
api/user/:id/account GET Detail of one user account
api/user/:id/password POST Edit password of a user

api/user/:id

Example: https://api.copystrong.com/api/user/1

url VERB Usage Data Fields Data Example Params Responses
api/user/:id GET Detail of one user account View response
api/user/:id PUT Edit user information
api/user/:id/avatar POST Edit avatar of a user
api/user/:id/deploy GET Get the deploy code for basic configuration View response
api/user/:id/deploy GET Send the config id, get deploy code for advanced
api/user/:id/verification POST Send the url info, get verified for correct deployment.

API Domains

API Domains

api/user/:user/domain

Example: https://api.copystrong.com/api/user/1/domain

url VERB Usage Data Fields Data Example Params Responses
api/user/:user/domain GET Get list of domains by user View response
api/user/:user/domain POST Add one user domain

api/user/:user/domain

Example: https://api.copystrong.com/api/user/1/domain

url VERB Usage Data Fields Data Example Responses
api/domain/:domain/visit GET Get visit number by domain View response
api/domain/:domain/device/:device/visit GET Get visit number by device profile View response
api/user/:user/domain/:id GET Get detail of one domain View response
api/user/:user/domain/:id PUT Edit one user domain. Restrictions
api/user/:user/domain/:id DELETE Remove one user domain
 

TroubleTicket

  • We have speedy responses - nobody likes to wait when experiencing an issue. Leaving a ticket provides your fastest response, you can call and speak to us as well, but we prefer you go through our ticket system so we can ensure your representative is made aware of the situation and you are provided personalized service from someone on your dedicated team.
  • Drop files here or