npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

dptool

v1.10.0

Published

CLI tool to interact with Dataporten APIs

Downloads

55

Readme

dptool

Dataporten Command Line Tool

Install

npm install -g dptool

Configure (se internal documentation)

dptool configure xxxx-xxxx-xxx xxxx-xxxx-xxxx

Usage

 dptool configure [id] [secret]          Configure your CLI client.
 dptool auth                             Authenticate user.

 dptool me                               About me (userinfo).
 dptool groups me                        List my groups.

 dptool clients all                      List all clients.
 dptool clients mine                     List my clients.
 dptool clients get [id]                 Get specific client
 dptool clients delete [id]              Delete specific client
 dptool clients create -f [filename]     Register new client
 dptool clients update [id] -f [filename] Update existing client

 dptool apis all                         List all APIs.
 dptool apis mine                        List my APIS.
 dptool apis get [id]                    Get specific API
 dptool apis delete [id]                 Delete specific API
 dptool apis create -f [filename]        Register new API
 dptool apis update [id] -f [filename]   Update existing API

 dptool orgs list                        List organizations.
 dptool orgs get [orgid]                 Show organization
 dptool orgs create -f [filename]        Create organization
 dptool orgs update [orgid] -f [filename] Update organization
 dptool orgs service add [orgid] [srv]   Add service for an org
 dptool orgs service remove [orgid] [srv] Remove service for an org
 dptool orgs logo get [orgid] -o [file]  Get logo and store to disk
 dptool orgs logo set [orgid] -f [file]  Upload logo from disk
        [srv] may be one of auth, pilot, avtale 
 dptool orgs roles [orgid]               List roles for an organization
 dptool orgs setrole [orgid] [identity] [roles]  Set roles for a user
        roles may be admin, mercantile, technical
 dptool orgs removerole [orgid] [identity]       Remove roles for a user
 dptool orgs ldap_status [feideid]       Check ldap status for the org by looking up the specified feideid
 dptool orgs peoplesearch [realm] [searchterm] [--sameorg]  Test people search for an organization. Use --sameorg to pretent to be in the same organization

 dptool token [id] [secret]              Custom request to just get a token for a specific client_id and secret.
                           Make sure to configure redirect_uri for this client: http://127.0.0.1:12012/callback

 dptool gk [id] [path]                   Perform a GET request to a gatekeeper endpoint
                                          Example: dptool gk testapi /foo --configset clientx

 dptool version                          Get details about the deployed versions of Dataporten

 options: 
    --json     Print all info instead of simple listings..
    --pretty   Pretty print JSON with colours..
    --o [file] Output JSON to file
    --configset [set] Read from .dptool-config-[set].json 
    --sort [field]    Sort by specific field
    --reverse         Reverse sort
    --limit [num]     Limit rows

 experimental: 
    --summary         List numbers of clients per user (only for clients all)

Example:

$ dptool  groups me
id                                             displayName                            
---------------------------------------------  ---------------------------------------
fc:orgadmin:uninett.no                         Administratorer for UNINETT            
fc:adhoc:fea9fe3a-8d97-4805-9c0b-e54f5e282206  Connect Prosjektgruppe                 
fc:adhoc:81d852b5-3cb5-49ce-9a37-6e39a4020a66  Connect referansegruppe                
fc:adhoc:090fe2d3-47ed-4158-bfc9-cfe4db321d3c  Tester å lage en ny gruppe             
fc:org:uninett.no                              UNINETT AS                             
fc:org:uninett.no:unit:AVD-U20                 Avdeling for System og Mellomvare      
fc:platformadmin:admins                        Plattformadministratorer for Dataporten